Skip to content

perf(layout): prune multi-field boolean predicates in the struct reader - #10689

Merged
robert3005 merged 3 commits into
vortex-data:developfrom
MichaHoffmann:compound-key-pruning
Oct 27, 2026
Merged

robert3005 merged 3 commits into
vortex-data:developfrom
MichaHoffmann:compound-key-pruning

Conversation

@MichaHoffmann

@MichaHoffmann MichaHoffmann commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Scan level conjunct splitting cannot seperate predicates such as a > 1
OR (a = 1 and b > 4), because the disjunction must remain intact.
The struct reader previously skipped pruning for these multi-field
predicates, forcing scans to decode zones that column statistics could
rule out.

Summary

  • Tracking Issue: #000

Changes

@joseph-isaacs

Copy link
Copy Markdown
Contributor

Thanks for the contribution.

Does the conjunct partitioner not handle this in the ScanBuilder/exec_splits methods.

Can we try and unify this logic with other parts of the StructLayoutReader

@codspeed

codspeed Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

2 warnings

⚠️ Walltime results may be unreliable

Some benchmarks used the Walltime instrument outside CodSpeed Macro Runners, which can make the results inconsistent.

Learn more about Macro Runners

See affected benchmarks

⚠️ 2 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

✅ 2204 untouched benchmarks
⏩ 370 skipped benchmarks1
🗄️ 30 archived benchmarks run2


Comparing MichaHoffmann:compound-key-pruning (ae6d309) with develop (a5f574e)

Open in CodSpeed

Footnotes

  1. 370 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

  2. 30 benchmarks were run, but are now archived. If they were deleted in another branch, consider rebasing to remove them from the report. Instead if they were added back, click here to restore them. ↩

@MichaHoffmann

Copy link
Copy Markdown
Contributor Author

Thanks for the contribution.

Does the conjunct partitioner not handle this in the ScanBuilder/exec_splits methods.

Can we try and unify this logic with other parts of the StructLayoutReader

No it doesnt because the condition contains a disjunction! But the AI helped me to unify the logic a little and simplfiy the PR drastically!

@robert3005 robert3005 added the changelog/fix A bug fix label Oct 25, 2026
MichaHoffmann and others added 2 commits October 27, 2026 14:38
Scan level conjunct splitting cannot seperate predicates such as a > 1
OR (a = 1 and b > 4), because the disjunction must remain intact.
The struct reader previously skipped pruning for these multi-field
predicates, forcing scans to decode zones that column statistics could
rule out.

Signed-off-by: Michael Hoffmann <mhoffmann@cloudflare.com>
Signed-off-by: Robert Kruszewski <robert@spiraldb.com>

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@robert3005
robert3005 force-pushed the compound-key-pruning branch from 95c03e1 to 69c6158 Compare October 27, 2026 14:39
Signed-off-by: Robert Kruszewski <robert@spiraldb.com>

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@robert3005
robert3005 merged commit 67389a0 into vortex-data:develop Oct 27, 2026
87 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/fix A bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants