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

Use ScalarBuffer<u8> instead of Buffer for FixedSizeBinaryArray #5667

Closed

Conversation

mbrobbel
Copy link
Contributor

Rationale for this change

Prefer the strongly-typed ScalarBuffer over the untyped Buffer. It helps when trying to construct this array from other typed buffers like Vec<u8> because this conversion is not directly supported for Buffer (because of #3756 (comment)).

What changes are included in this PR?

Changed value_data field of FixedSizeBinaryArray from Buffer to ScalarBuffer<u8>.

Are there any user-facing changes?

FixedSizeBinaryArray new/try_new and into_parts now use ScalarBuffer instead of Buffer.

This is a breaking change.

@github-actions github-actions bot added the arrow Changes to the arrow crate label Apr 18, 2024
@tustvold tustvold added the api-change Changes to the arrow API label Apr 19, 2024
@tustvold
Copy link
Contributor

I'm not sure about this, GenericByteArray and friends also use Buffer for raw bytes, which ultimately is what Buffer is

@tustvold tustvold closed this May 13, 2024
@mbrobbel mbrobbel deleted the fixed-size-binary/scalarbuffer branch May 13, 2024 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-change Changes to the arrow API arrow Changes to the arrow crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants