Repository navigation
feat(scan): planner-driven V2 scans on the physical plan pipelines - #10464
joseph-isaacs wants to merge 4 commits into
Conversation
Merging this PR will degrade performance by 11.1%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | WallTime | bitpack_blocked_compress_avx2 |
6.8 µs | 7.6 µs | -11.1% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing ji/scan-v2-planning (42b29cc) with ji/scan-v2-io (3c37da1)
…ysical plans Adds the plan operators the planner-driven scan lowers to, compiled to the push-based pipelines: - `Zoned` plans: data plus zone statistics, which an expression over statistics rewrites into a pruning plan that proves per-zone results once and expands them to the selected rows. - `Share` plans, which canonicalize a whole child once and serve its rows. - `Take` keeps whether its values may be reused, and the expression rule pushes the negative-cost part of an expression beneath a share of dictionary values. - `Eval` applies compound infallible predicates to encoded values (dictionary, run-end, PCO) before expanding them. - `ValueCache` keeps whole values, such as dictionary values, between the scans that share it; its owner bounds its lifetime. - `WholeSource` collects an inlet whole before producing one batch. - Scans only count shared segments over the rows their splits read. - Flat layouts lower to a filtered segment scan, and zoned layouts lower. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01P1oQtzTgSzkvrGDKisoNko Signed-off-by: Claude <[email protected]>
82aa9ef to
27bffeb
Compare
2de79b8 to
c3ea33f
Compare
Serves the planning protocol's `IoService` reads of a file: - `FileIoService` coalesces the ranges a batch of requests or announcements asks for, reads each range once for every session interested in it, and withdraws a dropped session's interest. `FileScanIo` serves the same protocol through the file's segment source and read driver. - Local files reuse their handles and admit native reads up to a bound; object-store reads stream completions as they land. - The read driver keeps its coalescing scratch between passes and can leave optional requests out of coalescing. - Segment caches can answer synchronously from `get_if_ready`. - Request tracing ids for diagnostics. A file opened over a reader carries the service as `VortexFile::scan_io`. Nothing drives it yet; the planning scan that does follows separately. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01P1oQtzTgSzkvrGDKisoNko Signed-off-by: Claude <[email protected]>
An opt-in scan (`VORTEX_SCAN_V2=1`) that lowers a file's layout once into a physical plan and runs each split through planners on the planning protocol: - vortex-scan: a planning driver that runs planners and morsels, publishes their IO through an `IoService`, and traces their work. - vortex-file: footer open and footer prune stages, and `scan_file` to describe a file to the scan. - vortex-layout: announce, pruning, filter (adaptive conjunct order) and projection planners whose plans run on the pipeline `Scan`, one scan per stage of a split, with a `ValueCache` shared by a split's scans and dropped with it. The V2 `ScanBuilder`/`RepeatedScanV2`, plan-derived splits, early IO announcements and file pruning. - DataFusion and DuckDB select V2 when it is enabled and supported. Files with list columns, and scans combining a filter with a limit, use the default executor. - DuckDB can prepare later files while earlier ones scan (`VORTEX_DUCKDB_FILE_PREFETCH`, off by default); DataFusion reports predicate and IO diagnostics. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01P1oQtzTgSzkvrGDKisoNko Signed-off-by: Claude <[email protected]>
27bffeb to
3c37da1
Compare
c3ea33f to
42b29cc
Compare
3c37da1 to
22871ce
Compare
…10547) Signed-off-by: Joe Isaacs <[email protected]>
|
Closing as superseded: the planning layer was redone and merged as #10706–#10708. It is now the Generated by Claude Code |
Summary
Third of three stacked PRs carved out of #10339: plan (#10462), IO (#10463), then planning (this PR).
Adds an opt-in scan (
VORTEX_SCAN_V2=1). It lowers a file's layout once into a physical plan and runs each split through planners on the planning protocol, executing every plan on develop's pipelineScan. #10339's own ExecGraph and PipelineGraph executors are gone.On a 4-core VM, DataFusion over Vortex at SF=1, V2 vs the default scan:
I reran every apparent loss with alternating V1/V2 runs; none were reproducible slowdowns.
Changes
IoService, and traces their work.scan_file, which describes a file to the scan.Scan.ValueCachethat is dropped with the split, so dictionary values are never kept for the rest of a scan.ScanBuilderandRepeatedScanV2, plan-derived splits, early IO announcements and file pruning.VORTEX_DUCKDB_FILE_PREFETCH, off by default).Checks run:
cargo clippy -p vortex-scan -p vortex-file -p vortex-layout -p vortex-datafusion --all-targets --all-features -- -D warningscargo +nightly-2026-09-10 fmtcargo test --libfor those four crates, with and withoutVORTEX_SCAN_V2=1Not run:
vortex-duckdbwas not built, because its build downloads the DuckDB source and that download is blocked in this environment.🤖 Generated with Claude Code
https://claude.ai/code/session_01P1oQtzTgSzkvrGDKisoNko
Generated by Claude Code