Skip to content

perf: Avoid unnecessary rechunk when sorting already sorted DataFrame#27264

Open
gab23r wants to merge 2 commits intopola-rs:mainfrom
gab23r:sort-fast-path
Open

perf: Avoid unnecessary rechunk when sorting already sorted DataFrame#27264
gab23r wants to merge 2 commits intopola-rs:mainfrom
gab23r:sort-fast-path

Conversation

@gab23r
Copy link
Copy Markdown
Contributor

@gab23r gab23r commented Apr 10, 2026

Fixes #25733
Removed unconditional rechunk_mut_par() call from the sort executor.
sort_impl already handles rechunking after checking if a fast path (already sorted) can be taken, so the executor's rechunk was redundant

@github-actions github-actions bot added performance Performance issues or improvements python Related to Python Polars rust Related to Rust Polars labels Apr 10, 2026
@gab23r gab23r force-pushed the sort-fast-path branch 2 times, most recently from 8e37f7e to 28f38b5 Compare April 10, 2026 13:34
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.57%. Comparing base (86f9210) to head (4914e71).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #27264   +/-   ##
=======================================
  Coverage   81.56%   81.57%           
=======================================
  Files        1820     1820           
  Lines      251061   251060    -1     
  Branches     3149     3149           
=======================================
+ Hits       204788   204796    +8     
+ Misses      45465    45456    -9     
  Partials      808      808           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance Performance issues or improvements python Related to Python Polars rust Related to Rust Polars

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sort on already sorted DataFrame causes unnecessary rechunk

1 participant