Conversation
peterxcli
added this pull request to stack #6
September 15, 2026 18:44
This was referenced Sep 15, 2026
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?
Related to apache#24393. Stage 2 of the Parquet I/O stack, based on #4.
Stack, with each PR targeting its predecessor: #4 → #5 → #7 → #8 → #9.
Rationale for this change
A scan can leave CPU workers idle while fetching the next row group. Start one future row-group read while the current reader produces batches.
What changes are included in this PR?
Add
ParquetSource::with_row_group_prefetch(bytes, memory_pool)with a per-stream cap, reservations in the query memory pool, cancellation, and ordinary demand-read fallback. Prefetch preserves page selections and fully matched group suppression. Yield after starting the task so downstream CPU work cannot strand its I/O in a worker's local queue. Add prefetch metrics and a ClickBench option.What is the testing strategy for this PR?
On
lsa-cupid1: workspace Clippy with all targets/features; 265 Parquet tests; SQL page-pruning coverage; regressions for overlap, limits, memory pressure, cancellation, and speculative read failures. The workspace extended test suite passed with a private PID namespace, CPUs 96–111, and a 65,536 file limit.Fork CI’s security audit reports RUSTSEC-2026-0285 in the baseline’s
rustls 0.23.39. This stack leavesCargo.lockunchanged; all other checks passed.Full partitioned ClickBench on
lsa-cupid1,/work/peterxcliNVMe: 100 files, 99,997,497 rows, all 43 queries, eight workers/partitions. Versus the immediate parent, the sum of query medians changes -1.86% / -1.22% warm and -2.33% with evicted files (negative is faster). Warm values are two reversed-order passes; evicted files use three runs per query.Keep opt-in. Q29 with 8 ms added per read improves 8.23% versus the parent. The scheduling yield is included in this PR, so its effect is not measured separately. Results and methodology · 43 per-query comparisons and CPU charts. Result-ordering limitations and synthetic-latency controls are documented in the report.
Are there any user-facing changes?
Prefetch is opt-in, execution-local, and independent of the demand I/O policy. It can read bytes subsequently discarded by filters. The ClickBench runner accepts
--prefetch-bytes; zero disables it.