Repository navigation
Conversation
DuckDB's V2 scan builds the same ScanRequest as its V1 scan, scans the file's plan data source and opens it, and each thread polls a clone of the stream, as for V1. The private V2 queue in scan_v2.rs goes away, and progress comes from ScanStream::progress for both executors. Signed-off-by: Nicholas Gates <nick@nickgates.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…b-v2 Signed-off-by: Nicholas Gates <nick@nickgates.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…b-v2 Signed-off-by: Nicholas Gates <nick@nickgates.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both executors now bind the projection against each file through ScanRequest, so the bound copy in GlobalState and its helper go. Signed-off-by: Nicholas Gates <nick@nickgates.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…b-v2 Signed-off-by: Nicholas Gates <nick@nickgates.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Polar Signals Profiling ResultsLatest Run
Previous Runs (23)
Powered by Polar Signals Cloud |
Benchmarks: String Encoding 📖Commits: PR vortex / vortex-file-compressed / ns (0.999x ➖, 0↑ 0↓)
vortex / vortex-file-compressed / bytes (1.000x ➖, 0↑ 0↓)
|
Benchmarks: Compression 📖Commits: PR vortex / vortex-file-compressed / ns (0.997x ➖, 2↑ 0↓)
vortex / vortex-file-compressed / bytes (1.000x ➖, 0↑ 0↓)
vortex / parquet / ns (0.998x ➖, 0↑ 0↓)
vortex / parquet / bytes (1.000x ➖, 0↑ 0↓)
vortex / arrow-ipc / ns (0.990x ➖, 1↑ 0↓)
vortex / arrow-ipc / bytes (1.000x ➖, 0↑ 0↓)
|
Benchmarks: Random Access (S3) 📖Commits: PR How to read Verdict and Engines
random-access / vortex-file-compressed / ns (0.948x ➖, 3↑ 1↓)
random-access / parquet / ns (0.967x ➖, 1↑ 0↓)
random-access / lance / ns (1.054x ➖, 0↑ 1↓)
|
🚨🚨🚨❌❌❌ SQL BENCHMARK FAILED ❌❌❌🚨🚨🚨Benchmark |
Benchmarks: Random Access 📖Commits: PR How to read Verdict and Engines
vortex / arrow-ipc / ns (0.927x ➖, 4↑ 0↓)
random-access / vortex-file-compressed / ns (1.012x ➖, 0↑ 0↓)
random-access / parquet / ns (1.009x ➖, 0↑ 0↓)
random-access / lance / ns (1.002x ➖, 0↑ 0↓)
random-access / litdata / ns (0.998x ➖, 0↑ 0↓)
|
🚨🚨🚨❌❌❌ SQL BENCHMARK FAILED ❌❌❌🚨🚨🚨Benchmark |
🚨🚨🚨❌❌❌ SQL BENCHMARK FAILED ❌❌❌🚨🚨🚨Benchmark |
🚨🚨🚨❌❌❌ SQL BENCHMARK FAILED ❌❌❌🚨🚨🚨Benchmark |
🚨🚨🚨❌❌❌ SQL BENCHMARK FAILED ❌❌❌🚨🚨🚨Benchmark |
🚨🚨🚨❌❌❌ SQL BENCHMARK FAILED ❌❌❌🚨🚨🚨Benchmark |
🚨🚨🚨❌❌❌ SQL BENCHMARK FAILED ❌❌❌🚨🚨🚨Benchmark |
🚨🚨🚨❌❌❌ SQL BENCHMARK FAILED ❌❌❌🚨🚨🚨Benchmark |
🚨🚨🚨❌❌❌ SQL BENCHMARK FAILED ❌❌❌🚨🚨🚨Benchmark |
🚨🚨🚨❌❌❌ SQL BENCHMARK FAILED ❌❌❌🚨🚨🚨Benchmark |
🚨🚨🚨❌❌❌ SQL BENCHMARK FAILED ❌❌❌🚨🚨🚨Benchmark |
🚨🚨🚨❌❌❌ SQL BENCHMARK FAILED ❌❌❌🚨🚨🚨Benchmark |
🚨🚨🚨❌❌❌ SQL BENCHMARK FAILED ❌❌❌🚨🚨🚨Benchmark |
🚨🚨🚨❌❌❌ SQL BENCHMARK FAILED ❌❌❌🚨🚨🚨Benchmark |
🚨🚨🚨❌❌❌ SQL BENCHMARK FAILED ❌❌❌🚨🚨🚨Benchmark |
🚨🚨🚨❌❌❌ SQL BENCHMARK FAILED ❌❌❌🚨🚨🚨Benchmark |
Benchmarks: TPC-H SF=1 on NVME 📖Commits: PR How to read Verdict and Engines
Hot runs: geomean 1.003x ➖ · 22 queries × 7 targets (0↑ 0↓)Each cell is develop
Cold runs (first iteration): geomean 1.008x ➖ · 22 queries × 7 targets (0↑ 2↓)
No file size changes detected. |
Benchmarks: Clickbench on NVME 📖Commits: PR How to read Verdict and Engines
Hot runs: geomean 1.001x ➖ · 43 queries × 7 targets (4↑ 1↓)Each cell is develop
Cold runs (first iteration): geomean 1.006x ➖ · 43 queries × 7 targets (4↑ 7↓)
No file size changes detected. |
…b-v2 Signed-off-by: Nicholas Gates <nick@nickgates.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> # Conflicts: # vortex-duckdb/src/file_reader.rs
…b-v2 Signed-off-by: Nicholas Gates <nick@nickgates.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…b-v2 Signed-off-by: Nicholas Gates <nick@nickgates.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…b-v2 Signed-off-by: Nicholas Gates <nick@nickgates.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…b-v2 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Nicholas Gates <nick@nickgates.com>
…b-v2 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Nicholas Gates <nick@nickgates.com>
Part of #9062
DuckDB's V2 scan reads through the Scan API the way its V1 scan does. For each file it builds the same
ScanRequestas the V1 path, callsscanon the file'splan_data_sourceandopens it once into aScanExec, which the file's shared state holds without a lock. A thread that joins a file creates its own stream on its first scan call, outside DuckDB's global lock, and polls it withRUNTIME.block_on(stream.next()). Under the lock, joining is one check ofis_exhausted(), which the V2 source sets when the file's last part is taken, as the V1 source does for its last split. The progress bar reports the fraction of a file's parts taken, fromScanExec::progress.Split::V2,FileScanand the private part queue inscan_v2.rsare gone, so DuckDB has one scan path whatever the executor. Files are openedwith_cachingso the V2 splitter reuses the layout reader DuckDB already builds. V2 batches that join several layout chunks are still exported chunk by chunk, so DuckDB evaluates expressions over each chunk's dictionary once.This PR is one layer of experiment A, which tests one decision about the Scan API: whether
DataSourceScan::open(), a sharedScanExecwhose asyncScanStreams each host thread polls, is enough for the V2 scan engine, or whether a host needs V2's synchronous step. The stack puts the V2 engine behindopen()and moves DuckDB's V2 scan onto it. The gate is DuckDB V2 on TPC-H and ClickBench within noise of develop's DuckDB V2, measured on the last layer with rotated runs. If V2 cannot reach parity through the stream, the experiment stops and reports what the engine needs thatScanStreamcannot express, with profile evidence, rather than tuning around it. This is the layer the benchmark measures.Results for this head are pending the CI benchmark run.
What the port shows about the trait, as findings:
ScanExec::is_exhaustedis that answer: a flag written once, read with one load. The stream itself, which owns the V2Run, is created by the thread that polls it and never crosses DuckDB's lock.scan(), andopen()andsplit()read nothing. For the V2 source that read is the whole-file prune of a dynamic filter, which therefore runs when DuckDB initializes a file. Breaking the rule is measurable: with that prune on the first poll of a stream, ClickBench q25, a top-N with a dynamic filter, runs 9.5% slower than develop; with it inscan(), q25 is within noise of develop.ScanRequest::split_concurrencymeans nothing to V2: a stream always runs one part at a time.Stacked on #11716
🤖 Generated with Claude Code