Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make align_buffers as public API #4863

Merged
merged 1 commit into from
Sep 27, 2023

Conversation

viirya
Copy link
Member

@viirya viirya commented Sep 26, 2023

Which issue does this PR close?

Closes #.

Rationale for this change

Buffer alignment is not automatic for FFI (#4681 (comment)). Although there is ArrayData::align_buffers for that, but it is not public API so we cannot use it outside this crate.

What changes are included in this PR?

Are there any user-facing changes?

@github-actions github-actions bot added the arrow Changes to the arrow crate label Sep 26, 2023
Copy link
Contributor

@tustvold tustvold left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The public API is https://docs.rs/arrow-data/latest/arrow_data/struct.ArrayDataBuilder.html#method.build_aligned

Otherwise you have to build an ArrayData with incorrect alignment to call this method, which is technically unsound per the public API contract

@viirya
Copy link
Member Author

viirya commented Sep 26, 2023 via email

@tustvold
Copy link
Contributor

tustvold commented Sep 26, 2023

Eh, fair enough. Its a bit off, but 😅

We probably should be validating FFI

@tustvold tustvold merged commit 8a07be3 into apache:master Sep 27, 2023
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants