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

unary_dyn returns PrimitiveArray for DictionaryArray #2664

Closed
tustvold opened this issue Sep 6, 2022 · 1 comment
Closed

unary_dyn returns PrimitiveArray for DictionaryArray #2664

tustvold opened this issue Sep 6, 2022 · 1 comment
Labels
development-process Related to development process of arrow-rs question Further information is requested

Comments

@tustvold
Copy link
Contributor

tustvold commented Sep 6, 2022

Which part is this question about

The implementation for unary_dyn currently iterates the dictionary keys, looking up the corresponding value for each non-null key, and storing the result in a PrimitiveArray.

Aside from being grossly inefficient, it seems counter-intuitive at least to me that calling dyn_unary would change the type of the array.

Describe your question

Should this kernel instead just apply the unary operation to the dictionary values, leaving the keys unchanged?

Additional context

Tagging @viirya @sunchao who implemented and reviewed this implementation initially in #1990

@tustvold tustvold added the question Further information is requested label Sep 6, 2022
@tustvold
Copy link
Contributor Author

tustvold commented Sep 6, 2022

Nvm brain fart, too early in the morning 😅

@tustvold tustvold closed this as completed Sep 6, 2022
@tustvold tustvold added the development-process Related to development process of arrow-rs label Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development-process Related to development process of arrow-rs question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant