Prune plan scans with zoned statistics - #9244
Draft
joseph-isaacs wants to merge 1 commit into
Draft
Conversation
Merging this PR will improve performance by 12.2%
Performance Changes
Tip Curious why this is faster? Comment Comparing Footnotes
|
joseph-isaacs
force-pushed
the
vortex-plan-zoned-pruning
branch
from
August 6, 2026 20:40
7d7bdf1 to
57d4c88
Compare
joseph-isaacs
force-pushed
the
vortex-plan-zoned-pruning
branch
from
August 6, 2026 23:58
57d4c88 to
1bdf135
Compare
joseph-isaacs
force-pushed
the
vortex-plan-zoned-pruning
branch
from
August 7, 2026 15:33
1bdf135 to
dd57303
Compare
joseph-isaacs
force-pushed
the
vortex-plan-zoned-pruning
branch
from
August 7, 2026 15:57
dd57303 to
de37c0f
Compare
Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
joseph-isaacs
force-pushed
the
vortex-plan-zoned-pruning
branch
from
August 7, 2026 16:05
de37c0f to
1673868
Compare
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.
Summary
BoundExpressionbetween exact filtering and pruning-planconstruction
(ExpressionPlan, ZonedPlan)rule, representing pruning as bound state onZonedPlanrather than introducing another plan-node typeand expand zone proofs into the data row domain
do not request data
request
final zones, skipped data-segment reads, and shared filter/projection reads
Stack
This is part 6 of the plan-native scan stack and is based on #9240. Its history is one coherent
pruning commit. The focused planning optimization is split into follow-up #9254.
Performance follow-up
The current implementation prioritizes correctness and keeps pruning inside the general array-plan
execution contract. On the 100-shard ClickBench scan, pruning eliminated 51.8% of rows and fully
skipped 264 of 1,100 splits, but prepared v2 execution was 44.41 ms with pruning versus 30.69 ms
without it. Profiling attributes roughly 5.3 ms to materializing a row-aligned boolean/validity
proof and another 8.4 ms to filtering the encoded input before the exact comparison.
A follow-up should make pruning mask-native and preserve encoded filter evaluation before combining
the pruning mask. That execution work is deliberately separate from this planning and correctness
PR.
Validation
RUSTC_WRAPPER= cargo nextest run -p vortex-layout -p vortex-scan-v2RUSTC_WRAPPER= cargo clippy -p vortex-layout -p vortex-scan-v2 --all-targets --all-features -- -D warningsRUSTC_WRAPPER= cargo test --doc -p vortex-layout -p vortex-scan-v2cargo +nightly fmt --all -- --checkgit diff --check