tustvold commented on a change in pull request #1297:
URL: https://github.com/apache/arrow-rs/pull/1297#discussion_r803520302
##########
File path: arrow/src/util/bit_chunk_iterator.rs
##########
@@ -520,6 +516,13 @@ mod tests {
assert_eq!(unaligned.suffix(), None);
let buffer = Buffer::from(&[0xFF; 14]);
+
+ // Verify buffer alignment
+ let (prefix, aligned, suffix) = unsafe {
buffer.as_slice().align_to::<u64>() };
Review comment:
Technically `align_to` is not guaranteed to return the maximal `aligned`
slice. In practice we rely on this in so many places, this is what the current
upstream implementation will do, and any other behaviour would be extremely
contrived.
--
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]