Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: add support for 'enum' extension type to v2 reader/writer #3038

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

westonpace
Copy link
Contributor

@westonpace westonpace commented Oct 23, 2024

The eventual goal is to get more compatibility with polars. There is still a bit of work missing (but this PR can probably stand on its own).

At the dataset level we should ensure that all files share the same dictionary within the dataset (we have some of this code so maybe it's just a matter of adding tests or ensuring myself it is still working)

A more tricky change is finding a way for polars to start using an extension array for the enum type. I'll try and open an issue and see if there is any interest in it.

@github-actions github-actions bot added enhancement New feature or request python labels Oct 23, 2024
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 88.32335% with 39 lines in your changes missing coverage. Please review.

Project coverage is 78.38%. Comparing base (536e73d) to head (f0c02c4).

Files with missing lines Patch % Lines
rust/lance-arrow/src/dict_enum.rs 58.10% 27 Missing and 4 partials ⚠️
rust/lance-encoding/src/encoder.rs 82.35% 2 Missing and 4 partials ⚠️
.../lance-encoding/src/encodings/logical/primitive.rs 50.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             main    #3038    +/-   ##
========================================
  Coverage   78.38%   78.38%            
========================================
  Files         240      241     +1     
  Lines       77122    77287   +165     
  Branches    77122    77287   +165     
========================================
+ Hits        60449    60581   +132     
- Misses      13565    13597    +32     
- Partials     3108     3109     +1     
Flag Coverage Δ
unittests 78.38% <88.32%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@wjones127 wjones127 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW I notice this array type is considered "unstable" https://docs.pola.rs/api/python/dev/reference/api/polars.datatypes.Enum.html#

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants