kazuyukitanimura commented on code in PR #604:
URL: https://github.com/apache/datafusion-comet/pull/604#discussion_r1681603572


##########
native/core/src/parquet/read/values.rs:
##########
@@ -506,6 +610,21 @@ macro_rules! generate_cast_to_signed {
 generate_cast_to_signed!(copy_i32_to_i8, i32, i8);
 generate_cast_to_signed!(copy_i32_to_i16, i32, i16);
 generate_cast_to_signed!(copy_i32_to_i64, i32, i64);
+generate_cast_to_signed!(copy_i32_to_f64, i32, f64);
+generate_cast_to_signed!(copy_f32_to_f64, f32, f64);
+
+fn copy_i64_to_i64(src: &[u8], dst: &mut [u8], num: usize) {
+    debug_assert!(

Review Comment:
   This is `debug_assert!` so should be fine to check every time



##########
native/core/src/parquet/read/values.rs:
##########
@@ -506,6 +610,21 @@ macro_rules! generate_cast_to_signed {
 generate_cast_to_signed!(copy_i32_to_i8, i32, i8);
 generate_cast_to_signed!(copy_i32_to_i16, i32, i16);
 generate_cast_to_signed!(copy_i32_to_i64, i32, i64);
+generate_cast_to_signed!(copy_i32_to_f64, i32, f64);
+generate_cast_to_signed!(copy_f32_to_f64, f32, f64);
+
+fn copy_i64_to_i64(src: &[u8], dst: &mut [u8], num: usize) {
+    debug_assert!(
+        src.len() >= num * std::mem::size_of::<i64>(),
+        "Source slice is too small"
+    );
+    debug_assert!(
+        dst.len() >= num * std::mem::size_of::<i64>(),
+        "Destination slice is too small"
+    );
+
+    bit::memcpy_value(src, 8 * num, dst);

Review Comment:
   updated



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to