hzuo opened a new issue, #5553:
URL: https://github.com/apache/arrow-rs/issues/5553

   **Describe the bug**
   
   `FileWriter` and `StreamWriter` should ensure that the data is written with 
appropriately alignment such that arrays can be used without copying to a 
more-aligned buffer.
   
   In particular, as of Rust 1.77.0 and LLVM 18, `i128` now has a 16-byte 
alignment requirement, i.e. `std::mem::align_of::<i128> == 16`. So 
`Decimal128Array`s must be aligned to a 16-byte boundary when it serialized 
into an IPC buffer. The `pad_to_8` used everywhere in the IPC code causes it to 
pad insufficiently.
   
   **To Reproduce**
   
   (Opening a PR in one moment - will link a failing test in the PR.)
   
   **Expected behavior**
   
   (Opening a PR in one moment - will link a failing test in the PR.)
   
   **Additional context**
   
   `IpcWriteOptions` already has an "alignment" field but it is not being 
respected throughout the IPC code.
   
   Past commits touching the option:
   - https://github.com/apache/arrow-rs/pull/2884
   - 
https://github.com/apache/arrow-rs/commit/32c9dea9c3003e114b9981cae15acdfc8448971b
   


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