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

Replace temporal _generic kernels with dyn #3004

Closed
tustvold opened this issue Nov 2, 2022 · 2 comments · Fixed by #3046
Closed

Replace temporal _generic kernels with dyn #3004

tustvold opened this issue Nov 2, 2022 · 2 comments · Fixed by #3046
Labels
arrow Changes to the arrow crate enhancement Any new improvement worthy of a entry in the changelog

Comments

@tustvold
Copy link
Contributor

tustvold commented Nov 2, 2022

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

The temporal _generic methods exist to handle dictionaries, but do so in a way inconsistent with the other kernels such as arithmetic:

  • Don't return a dictionary array
  • Require explicitly downcasting the dictionary

Describe the solution you'd like

Instead of _generic kernels I would like an _dyn kernel that takes an &dyn Array.

In the case of a dictionary, this will recurse calling itself on the dictionary values, and then use
https://docs.rs/arrow-array/latest/arrow_array/array/struct.DictionaryArray.html#method.with_values to replace the values with the newly computed

Describe alternatives you've considered

We could not do this

Additional context

FYI @viirya

@tustvold tustvold added the enhancement Any new improvement worthy of a entry in the changelog label Nov 2, 2022
@viirya
Copy link
Member

viirya commented Nov 2, 2022

Don't return a dictionary array
Require explicitly downcasting the dictionary

I think that arithmetic kernels don't return a dictionary array for input dictionaries?
But for temporal kernels, it sounds reasonable to do as the keys should be the same.

@alamb
Copy link
Contributor

alamb commented Nov 11, 2022

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

@alamb alamb added the arrow Changes to the arrow crate label Nov 11, 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.

3 participants