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

   > 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.
   
   Got it -- this makes sense
   
   However, that would then suggest to me that there will be cases where the 
current code on main does not copy the data (because the initial allocation was 
correctly aligned) but the new code *DOES* copy the data (because the 
allocation `read_buffer` chose was not aligned) 🤔 
   
   This may well not be covered in our benchmarks.
   
   


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