comphead commented on code in PR #718: URL: https://github.com/apache/datafusion-comet/pull/718#discussion_r1700735318
########## native/core/src/common/bit.rs: ########## @@ -131,6 +131,18 @@ pub fn read_num_bytes_u32(size: usize, src: &[u8]) -> u32 { trailing_bits(v as u64, size * 8) as u32 } +#[inline] +pub fn read_u64(src: &[u8]) -> u64 { + let in_ptr = src.as_ptr() as *const u64; + unsafe { in_ptr.read_unaligned() } Review Comment: I'm curios why to read the raw pointer unaligned? its not guaranteed to be aligned? -- 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