You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "hzuo (via GitHub)" <gi...@apache.org> on 2024/03/25 23:58:59 UTC

[I] IPC code writes data with insufficient alignment [arrow-rs]

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: github-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] IPC code writes data with insufficient alignment [arrow-rs]

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on issue #5553:
URL: https://github.com/apache/arrow-rs/issues/5553#issuecomment-2061309234

   `label_issue.py` automatically added labels {'arrow-flight'} from #5554


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] IPC code writes data with insufficient alignment [arrow-rs]

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on issue #5553:
URL: https://github.com/apache/arrow-rs/issues/5553#issuecomment-2061309191

   `label_issue.py` automatically added labels {'arrow'} from #5554


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] IPC code writes data with insufficient alignment [arrow-rs]

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold closed issue #5553: IPC code writes data with insufficient alignment
URL: https://github.com/apache/arrow-rs/issues/5553


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org