alamb commented on code in PR #9778:
URL: https://github.com/apache/arrow-rs/pull/9778#discussion_r3140639349
##########
arrow-ipc/src/reader.rs:
##########
@@ -211,8 +226,10 @@ impl RecordBatchDecoder<'_> {
let value_offsets = match mode {
UnionMode::Dense => {
- let offsets: ScalarBuffer<i32> =
- self.next_buffer()?.slice_with_length(0, len *
4).into();
+ let offsets_buffer = ensure_aligned_for::<i32>(
Review Comment:
My only concern is that there may be alignment requirements that
MutableBuffer satisfies but Vec<u8> does not and we just happened to catch
this alignment problem with the integration tests.
I wonder if we maybe need to pass in the alignment requirements to
next_buffer (e.g. instead of reading in Vec<u8> in this case we would read in
`Vec<i32>`) 🤔
--
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]