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: Fix assertion panic on LazyFrame scratch.is_empty() #20219

Merged
merged 2 commits into from
Dec 9, 2024

Conversation

nameexhaustion
Copy link
Collaborator

Fixes #20216

@nameexhaustion nameexhaustion changed the title fix: Fix panic on LazyFrame slice fix: Fix assertion panic on LazyFrame slice scratch.is_empty() Dec 9, 2024
@github-actions github-actions bot added fix Bug fix python Related to Python Polars rust Related to Rust Polars labels Dec 9, 2024
@@ -25,6 +25,7 @@ mod inner {
}

pub fn nodes_scratch_mut(&mut self) -> &mut UnitVec<Node> {
self.scratch.clear();
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

🙈

@nameexhaustion nameexhaustion changed the title fix: Fix assertion panic on LazyFrame slice scratch.is_empty() fix: Fix assertion panic on LazyFrame scratch.is_empty() Dec 9, 2024
Copy link

codecov bot commented Dec 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.62%. Comparing base (58a38af) to head (4901216).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #20219   +/-   ##
=======================================
  Coverage   79.62%   79.62%           
=======================================
  Files        1565     1565           
  Lines      218188   218192    +4     
  Branches     2475     2475           
=======================================
+ Hits       173735   173744    +9     
+ Misses      43886    43881    -5     
  Partials      567      567           

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

@@ -49,7 +50,8 @@ fn can_pushdown_slice_past_projections(
arena: &Arena<AExpr>,
scratch: &mut UnitVec<Node>,
) -> (bool, bool) {
assert!(scratch.is_empty());
debug_assert!(scratch.is_empty());
scratch.clear();
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

make this only panic in debug builds, and in release we clear it

@ritchie46 ritchie46 merged commit 1cd807f into pola-rs:main Dec 9, 2024
25 checks passed
@ritchie46
Copy link
Member

Ai, will patch this.

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.

Panic crash with assertion failed in Polars 1.17.0 scratch.is_empty()
2 participants