perf: Make is_in row-group pruning precise on null-containing haystacks#27495
Merged
ritchie46 merged 2 commits intopola-rs:mainfrom May 4, 2026
Merged
perf: Make is_in row-group pruning precise on null-containing haystacks#27495ritchie46 merged 2 commits intopola-rs:mainfrom
is_in row-group pruning precise on null-containing haystacks#27495ritchie46 merged 2 commits intopola-rs:mainfrom
Conversation
nameexhaustion
previously approved these changes
May 4, 2026
Collaborator
nameexhaustion
left a comment
There was a problem hiding this comment.
Looks good, just 1 nit https://github.com/pola-rs/polars/pull/27495/changes#r3180804874
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #27495 +/- ##
==========================================
+ Coverage 80.54% 81.14% +0.60%
==========================================
Files 1842 1842
Lines 254718 254720 +2
Branches 3181 3181
==========================================
+ Hits 205173 206705 +1532
+ Misses 48722 47192 -1530
Partials 823 823 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
17c87ab to
5a9c1d4
Compare
nameexhaustion
approved these changes
May 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #27475. The helper
try_extract_is_in_haystackused to give up on haystacks with nulls under defaultnulls_equal=false. Now it drops them (like pyarrow does); undernulls_equal=true, if a null was dropped, we addnull_count(col) == 0to the skip predicate so row groups with nulls aren't skipped.Also fixes a hidden bug:
col_has_no_nulls = col_nc.has_no_nulls(arena)computes a column-wide value that's alwaystrueagainst the stats table, so the check did nothing. Replaced withcol_nc.eq(idx_zero, arena)so it checks per row group.