-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
refactor: Remove debug asserts on scratch space #20224
Conversation
@@ -45,7 +45,8 @@ mod inner { | |||
} | |||
} | |||
|
|||
pub(super) fn nodes_scratch_mut(&mut self) -> &mut UnitVec<Node> { | |||
/// Returns shared scratch space after clearing. | |||
pub(super) fn empty_nodes_scratch_mut(&mut self) -> &mut UnitVec<Node> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename and add doc
@@ -146,7 +146,6 @@ pub fn pushdown_eligibility( | |||
expr_arena: &mut Arena<AExpr>, | |||
scratch: &mut UnitVec<Node>, | |||
) -> PolarsResult<(PushdownEligibility, PlHashMap<PlSmallStr, PlSmallStr>)> { | |||
debug_assert!(scratch.is_empty()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed assert here
@@ -50,7 +51,6 @@ fn can_pushdown_slice_past_projections( | |||
arena: &Arena<AExpr>, | |||
scratch: &mut UnitVec<Node>, | |||
) -> (bool, bool) { | |||
debug_assert!(scratch.is_empty()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed assert here
m @(Select {..}, None) | | ||
m @ (SimpleProjection {..}, _) | ||
m @ (Select {..}, None) | ||
| m @ (HStack {..}, None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original MRE of the panic didn't actually contain a slice()
- I realized this was because we were always checking the projections even when we didn't need to for with_columns()
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #20224 +/- ##
==========================================
- Coverage 79.63% 79.63% -0.01%
==========================================
Files 1565 1565
Lines 218192 218190 -2
Branches 2475 2475
==========================================
- Hits 173749 173745 -4
- Misses 43876 43878 +2
Partials 567 567 ☔ View full report in Codecov by Sentry. |
Always
clear()
insteadwith_columns()