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: Only slice after sort when slice is smaller than frame length #20084

Merged
merged 1 commit into from
Dec 2, 2024

Conversation

mcrumiller
Copy link
Contributor

@mcrumiller mcrumiller commented Dec 1, 2024

Closes #20079

>>> import polars as pl
>>> pl.LazyFrame({"a": [None, 1.2]}).sort("a", nulls_last=True).slice(0, 10).collect()
shape: (2, 1)
┌──────┐
│ a    │
│ ---  │
│ f64  │
╞══════╡
│ 1.2  │
│ null │
└──────┘

@github-actions github-actions bot added fix Bug fix python Related to Python Polars rust Related to Rust Polars labels Dec 1, 2024
@mcrumiller mcrumiller marked this pull request as ready for review December 1, 2024 03:25
Copy link

codecov bot commented Dec 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.53%. Comparing base (954000c) to head (1d558c2).
Report is 9 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #20084   +/-   ##
=======================================
  Coverage   79.52%   79.53%           
=======================================
  Files        1563     1563           
  Lines      217124   217124           
  Branches     2464     2464           
=======================================
+ Hits       172674   172689   +15     
+ Misses      43890    43875   -15     
  Partials      560      560           

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

Copy link
Member

@ritchie46 ritchie46 left a comment

Choose a reason for hiding this comment

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

Cheers.

@ritchie46 ritchie46 merged commit 57de43f into pola-rs:main Dec 2, 2024
27 checks passed
@mcrumiller mcrumiller deleted the sort-slice branch December 2, 2024 12:40
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.

LazyFrame sort and slice with nulls_last causes panic
2 participants