Optimize NULL-containing string IN list pruning - #24954
Merged
kumarUjjawal merged 3 commits intoSep 5, 2026
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #24954 +/- ##
==========================================
- Coverage 81.61% 81.61% -0.01%
==========================================
Files 1124 1124
Lines 411978 412054 +76
Branches 411978 412054 +76
==========================================
+ Hits 336236 336298 +62
- Misses 55936 55944 +8
- Partials 19806 19812 +6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
jayzhan211
approved these changes
Sep 5, 2026
jayzhan211
left a comment
Contributor
There was a problem hiding this comment.
Thanks @kumarUjjawal, LGTM!
Contributor
Author
|
Thank you @jayzhan211 for the review. |
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.
Which issue does this PR close?
IN-list pruning excludesNOT INand NULL-containing lists #24711.Rationale for this change
#24781 added compact pruning for non-NULL
NOT INlists. Issue #24711 still needs support for NULL-containing lists.Large string lists can create expensive per-value pruning expressions. The compact path reduces this cost when
max_in_list_sizepermits the rewrite.NULL values require special handling. Filter pruning treats FALSE and UNKNOWN equally, but full-match detection must keep these results separate.
What changes are included in this PR?
This PR makes these changes:
INlists that contain NULL.NOT INwith NULL as unable to match rows.INlists as unable to match rows.What is the testing strategy for this PR?
The tests cover positive and negative lists, all-NULL lists, nested
ORexpressions, configured caps, and Parquet full-match detection.These commands passed:
Focused benchmarks also cover compact
INand constant-falseNOT INexpressions with NULL.Are there any user-facing changes?
Large string
INandNOT INlists that contain NULL can now use compact pruning when the cap permits it.Query results and configuration defaults do not change.
This PR adds two non-breaking
PruningPredicateaccessors:max_in_list_sizeandcan_be_inverted_for_full_match.