andygrove commented on code in PR #718:
URL: https://github.com/apache/datafusion-comet/pull/718#discussion_r1701817076


##########
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 don't think we can ever guarantee that the memory is 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

Reply via email to