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

feat: Order observability optimizations #20396

Merged
merged 10 commits into from
Dec 21, 2024
Merged

feat: Order observability optimizations #20396

merged 10 commits into from
Dec 21, 2024

Conversation

ritchie46
Copy link
Member

@ritchie46 ritchie46 commented Dec 21, 2024

An operation doesn't have to maintain_order if it isn't observed. E.g.

concat().sort() could do an unordered union for instance.

.sort().groupby().sum() can remove the sort, etc.

@ritchie46 ritchie46 changed the title perf: Unset maintain_order pass feat: Unset maintain_order pass Dec 21, 2024
@github-actions github-actions bot added performance Performance issues or improvements python Related to Python Polars rust Related to Rust Polars enhancement New feature or an improvement of an existing feature labels Dec 21, 2024
Copy link

codecov bot commented Dec 21, 2024

Codecov Report

Attention: Patch coverage is 98.31461% with 3 lines in your changes missing coverage. Please review.

Project coverage is 78.96%. Comparing base (2f2bb92) to head (17dda41).

Files with missing lines Patch % Lines
...rates/polars-plan/src/plans/optimizer/set_order.rs 98.33% 2 Missing ⚠️
py-polars/polars/lazyframe/frame.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #20396      +/-   ##
==========================================
+ Coverage   78.95%   78.96%   +0.01%     
==========================================
  Files        1561     1562       +1     
  Lines      219931   220076     +145     
  Branches     2480     2480              
==========================================
+ Hits       173643   173789     +146     
+ Misses      45717    45716       -1     
  Partials      571      571              

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

@ritchie46 ritchie46 changed the title feat: Unset maintain_order pass feat: Order observability optimizations. Dec 21, 2024
@ritchie46 ritchie46 changed the title feat: Order observability optimizations. feat: Order observability optimizations Dec 21, 2024
@s-banach
Copy link
Contributor

Not in front of my computer so I can’t test an example, is groupby always faster than sort.groupby eg in case of groupby a high cardinality float column where the values might be all unique?

@ritchie46 ritchie46 merged commit 127f590 into main Dec 21, 2024
26 of 27 checks passed
@ritchie46 ritchie46 deleted the order branch December 21, 2024 18:04
@c-peters c-peters added the accepted Ready for implementation label Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Ready for implementation enhancement New feature or an improvement of an existing feature performance Performance issues or improvements python Related to Python Polars rust Related to Rust Polars
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants