andygrove commented on code in PR #554: URL: https://github.com/apache/datafusion-comet/pull/554#discussion_r1634891448
########## core/src/parquet/util/hash_util.rs: ########## @@ -106,16 +110,12 @@ unsafe fn crc32_hash(bytes: &[u8], seed: u32) -> u32 { let num_words = num_bytes / u32_num_bytes; num_bytes %= u32_num_bytes; - let bytes_u32: &[u32] = std::slice::from_raw_parts( - &bytes[0..num_words * u32_num_bytes] as *const [u8] as *const u32, - num_words, - ); Review Comment: This violates a precondition for `from_raw_parts` because `bytes` is not guaranteed to be correctly aligned for `u32`. -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org