Skip to content

fix(rust): require arrow >= 59 so FFI imports realign buffers - #5000

Open
felipecrv wants to merge 1 commit into
apache:mainfrom
felipecrv:automatic-buffer-realignment
Open

felipecrv wants to merge 1 commit into
apache:mainfrom
felipecrv:automatic-buffer-realignment

Conversation

@felipecrv

Copy link
Copy Markdown
Contributor

Drivers may export buffers that only meet the C Data Interface's recommended 8-byte alignment (and sometimes not even that), but arrow-rs requires 16-byte alignment for i128 (e.g. Decimal128). With arrow 58, importing such data through from_ffi or ArrowArrayStreamReader panics.

arrow 59 realigns under-aligned buffers on import (apache/arrow-rs#10030), so raise the minimum arrow version to 59 and add a regression test that imports an 8-byte-aligned Decimal128 buffer.

Closes #2526.

Drivers may export buffers that only meet the C Data Interface's
recommended 8-byte alignment, but arrow-rs requires 16-byte alignment
for i128 (e.g. Decimal128). With arrow 58, importing such data through
`from_ffi` or `ArrowArrayStreamReader` panics.

arrow 59 realigns under-aligned buffers on import (apache/arrow-rs#10030),
so raise the minimum arrow version to 59 and add a regression test that
imports an 8-byte-aligned Decimal128 buffer.

Closes apache#2526.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@felipecrv

Copy link
Copy Markdown
Contributor Author

I have no rush in merging this because it bumps the minimum Arrow requirement. It's really just a test and documentation of this problem we had in arrow-rs.

cc @lidavidm @zeroshade

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rust: ADBC driver panics when consuming Arrow batches without properly aligned buffers

1 participant