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

fix: Invalidate sortedness flag when sorting from pl.Categorical to pl.Categorical("lexical") #21044

Merged
merged 1 commit into from
Feb 3, 2025

Conversation

siddharth-vi
Copy link
Contributor

Fixes #20864 .

As we never set sorted flags for pl.Categorical("lexical"), when casting to it we need to explicitly set it to not sorted.

@github-actions github-actions bot added fix Bug fix python Related to Python Polars rust Related to Rust Polars labels Feb 2, 2025
Copy link

codecov bot commented Feb 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.21%. Comparing base (96a2d01) to head (aeccc1f).
Report is 46 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #21044      +/-   ##
==========================================
- Coverage   79.34%   79.21%   -0.13%     
==========================================
  Files        1579     1583       +4     
  Lines      224319   225554    +1235     
  Branches     2573     2586      +13     
==========================================
+ Hits       177976   178670     +694     
- Misses      45755    46294     +539     
- Partials      588      590       +2     

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

@ritchie46 ritchie46 merged commit d0c8a5e into pola-rs:main Feb 3, 2025
28 checks passed
@siddharth-vi siddharth-vi deleted the cat_cast_sorted branch February 3, 2025 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fix python Related to Python Polars rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Casting pl.Categorical("physical") to pl.Categorical("lexical") doesn't invalidate sortedness flag
2 participants