pchintar commented on PR #9778:
URL: https://github.com/apache/arrow-rs/pull/9778#issuecomment-4316857705

   Yes @alamb , w.r.t the alignment concern. I checked this specifically before 
adding the fix.
   
   In `arrow-ipc/src/reader.rs`, the only direct `ScalarBuffer<...>` 
conversions are the two inside the `Union(fields, mode)` branch. Other array 
paths go through `ArrayDataBuilder::align_buffers(...)`, so this is the only 
place in the IPC reader where the Vec-backed buffer can bypass the usual 
alignment handling before typed access.
   
   The `type_ids` buffer is `i8`, so it does not need extra alignment. The 
dense union offsets buffer is `i32`, so the fix ensures alignment only for that 
buffer before converting to `ScalarBuffer<i32>`.
   
   So this is effectively the minimal targeted version of passing the alignment 
requirement to the buffer access point, without adding checks to the common 
read path.


-- 
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]

Reply via email to