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

Write Generic Code over [Large]BinaryArray and [Large]StringArray #2946

Closed
tustvold opened this issue Oct 27, 2022 · 1 comment · Fixed by #2947
Closed

Write Generic Code over [Large]BinaryArray and [Large]StringArray #2946

tustvold opened this issue Oct 27, 2022 · 1 comment · Fixed by #2947
Labels
arrow Changes to the arrow crate enhancement Any new improvement worthy of a entry in the changelog

Comments

@tustvold
Copy link
Contributor

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

Currently binary arrays are defined as GenericByteArray<i32> and GenericByteArray<i64>, and string arrays as GenericStringArray<i32> and GenericStringArray<i64>.

There are a couple of issues with this:

  • It is isn't possible to write kernels that are generic over both, despite them having identical layout
  • The type signature of these is inconsistent with PrimitiveArray which makes use of a sentinel type struct

Describe the solution you'd like

I would like a new GenericBinaryArray<T: BinaryArrayType> which GenericByteArray and GenericStringArray are defined as type aliases of.

Describe alternatives you've considered

Additional context

This fits with the theme of #2637 of having generic array definitions for each underlying array layout

@tustvold tustvold added the enhancement Any new improvement worthy of a entry in the changelog label Oct 27, 2022
tustvold added a commit to tustvold/arrow-rs that referenced this issue Oct 27, 2022
tustvold added a commit that referenced this issue Oct 28, 2022
* Add GenericByteArray (#2946)

* Lint

* Review feedback

* Review feedback
@alamb alamb added api-change Changes to the arrow API and removed api-change Changes to the arrow API labels Oct 28, 2022
@alamb
Copy link
Contributor

alamb commented Oct 28, 2022

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

@alamb alamb added the arrow Changes to the arrow crate label Oct 28, 2022
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 enhancement Any new improvement worthy of a entry in the changelog
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants