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

Add native comparison kernel support for DictionaryArray #869

Closed
alamb opened this issue Oct 26, 2021 · 5 comments
Closed

Add native comparison kernel support for DictionaryArray #869

alamb opened this issue Oct 26, 2021 · 5 comments
Labels
arrow Changes to the arrow crate enhancement Any new improvement worthy of a entry in the changelog

Comments

@alamb
Copy link
Contributor

alamb commented Oct 26, 2021

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
Today, DataFusion's expression evaluation does not work natively on DictionaryArrays; Instead what happens is that the DictionaryArrays are unpacked into their base type (e.g. a string dictionary gets unpacked into a StringArray)

This is very inefficient, especially for expressions like col != 'foo' -- if col is a DictionaryArray this filter could be applied by finding 'foo' in the dictionary and then checking for values with that dictionary index, and the dictionary could be reused at the output.

Describe the solution you'd like

  1. Add kernels that can compare DictionaryArrays (eq_dict, lt_dict, etc)
  2. Add DataType::Dictionary to the the eq_dyn and the other dynamic kernels implemented in implement eq_dyn, neq_dyn, lt_dyn, lt_eq_dyn, gt_dyn, gt_eq_dyn #858

Describe alternatives you've considered
N/A

Additional context

@alamb alamb added arrow Changes to the arrow crate enhancement Any new improvement worthy of a entry in the changelog labels Oct 26, 2021
@matthewmturner
Copy link
Contributor

@alamb im interested in taking this. will start looking into it.

@alamb
Copy link
Contributor Author

alamb commented Nov 24, 2021

sounds great @matthewmturner -- thank you!

@alamb
Copy link
Contributor Author

alamb commented Dec 28, 2021

I think we have a proposed interface in #1074

@alamb
Copy link
Contributor Author

alamb commented Jan 13, 2022

I believe this task is now complete. Thanks again @matthewmturner

@alamb alamb closed this as completed Jan 13, 2022
@matthewmturner
Copy link
Contributor

I believe this task is now complete. Thanks again @matthewmturner

Thanks for patience and guidance @alamb :)

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