unary_dyn returns PrimitiveArray for DictionaryArray #2664
Labels
development-process
Related to development process of arrow-rs
question
Further information is requested
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
The text was updated successfully, but these errors were encountered: