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

Dictionary Uniqueness and Sortedness #1217

Closed
tustvold opened this issue Jan 21, 2022 · 0 comments
Closed

Dictionary Uniqueness and Sortedness #1217

tustvold opened this issue Jan 21, 2022 · 0 comments
Labels
development-process Related to development process of arrow-rs enhancement Any new improvement worthy of a entry in the changelog

Comments

@tustvold
Copy link
Contributor

tustvold commented Jan 21, 2022

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

A schema Field currently has a dict_is_ordered field. Much like dict_id this is non-trivial to use in practice (#1206) as it is part of the schema which may need to remain constant across multiple RecordBatch that might otherwise wish to use different dictionaries. It is also not visible to compute kernels.

There doesn't appear to be a notion of if a dictionary contains unique values.

Describe the solution you'd like

We would ideally like to associated dictionary properties with the dictionary arrays themselves. This would allow compute kernels to exploit their properties, in addition to avoiding schema incompatibility issues.

There is an assumption in many places that the arrays themselves are sugar on top of ArrayData, with it possible to construct a DictionaryArray from a ArrayData. As such I would like to propose:

  • Remove dict_is_ordered from Field
  • Add dict_is_ordered bool to ArrayData (default false)
  • Add dict_is_unique bool to ArrayData (default false)

The various compute kernels can then progressively be updated to exploit these properties.

@tustvold tustvold added the enhancement Any new improvement worthy of a entry in the changelog label Jan 21, 2022
@tustvold tustvold added the development-process Related to development process of arrow-rs label Oct 27, 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 enhancement Any new improvement worthy of a entry in the changelog
Projects
None yet
Development

No branches or pull requests

1 participant