refactor: separate compact IN-list pruning threshold from the default… - #25044
Open
goutamadwant wants to merge 1 commit into
Open
refactor: separate compact IN-list pruning threshold from the default…#25044goutamadwant wants to merge 1 commit into
goutamadwant wants to merge 1 commit into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #25044 +/- ##
==========================================
- Coverage 81.72% 81.72% -0.01%
==========================================
Files 1127 1127
Lines 416310 416334 +24
Branches 416310 416334 +24
==========================================
+ Hits 340224 340233 +9
- Misses 56095 56105 +10
- Partials 19991 19996 +5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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 #24710.Rationale for this change
Small string lists are not uniformly faster with compact pruning. The crossover depends on the number of statistics containers and their distribution, so this retains the existing boundary rather than removing it.
The representation threshold currently reuses
MAX_IN_LIST_SIZE, coupling it to the default maximum eligible list length. These are separate decisions.What changes are included in this PR?
MIN_COMPACT_IN_LIST_SIZEof 21, preserving the current strictly-greater-than-20 boundary.INandNOT IN.NOT INcases. Make NULL-result assertions follow the selected representation rather than the default cap.What is the testing strategy for this PR?
cargo clippy --all-targets --all-features -- -D warningsand the documenteddev/rust_lint.shchecks, including strict documentation, pass.release-nonltobaseline/forced-compact runs demonstrate the tradeoff. With four literals and 4,096 containers,INevaluation changes from 36.5–36.8 µs to 98.4–99.1 µs;NOT INchanges from 28.9–29.3 µs to 85.7–86.7 µs. At 16 containers, compactINis faster, about 1.6 µs versus 5.5–5.6 µs. Compact construction is also cheaper.NOT INchanges from 13.3–13.6 µs to 121.7–122.9 µs when forced compact. Expanded-expression controls remained close across repeated runs.cargo bench -p datafusion-pruning --bench string_in_list_pruning --profile release-nonlto. To compare the small compact form, temporarily set the private minimum to 1 and rerun; that experimental change is not included in this PR.These are pruning microbenchmarks, not whole-query speedups or evidence of a universal optimal threshold.
Are there any user-facing changes?
No. The default cap, representation boundary, pruning behavior, and public APIs remain unchanged.