Conversation
peterxcli
force-pushed
the
codex/parquet-io-policy-df55
branch
from
September 10, 2026 03:19
172f077 to
a37616d
Compare
|
Thank you for opening this pull request! Reviewer note: cargo-semver-checks reported the current version number is not SemVer-compatible with the changes in this pull request (compared against the base branch). Details |
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. This fork draft provides the I/O policy and an optional prefetch path; upstream submission and the default-policy decision remain open.
Rationale for this change
Parquet filter pushdown can add dependent reads for predicate and output columns. Reading the required pages together preserves filter pushdown without requiring that progressive I/O pattern. Optional next-row-group prefetch overlaps reads with decoding.
What changes are included in this PR?
datafusion.execution.parquet.progressive_io=falsefetches required predicate and output pages together after statistics and page-index pruning. The default remainstrue, including when decoding older serialized plans.with_row_group_prefetch(bytes, memory_pool)enables at most one future row group per stream, with budget checks, cancellation, and demand-read fallback.Whole-query profiling found that a spawned prefetch could remain in the Tokio worker's local queue while its consumer continued decoding. The decoder now yields after scheduling the read. On chia-ping-aws1, single-partition local-file I/O CPU overlap rose from 0.03% to 99.6%, and all-worker parked time fell from 426 ms to 1.9 ms. Untraced wide scans used 9–16% less time with one partition; short indexed queries remain mixed.
The full partitioned ClickBench run on chia-ping-aws1 covers all 100 files (99,997,497 rows) and all 43 queries. Before/after scheduling-fix timings improve by 0.06% and 2.04% in the two passes; 11 queries improve in both, 7 slow in both, and 25 change direction. Separate profiles show 5.94% less summed worker-blocked time. The full report and 43 query charts include all 1,032 executions, spill and VM-steal caveats, and result differences from unordered or tied LIMIT queries. This compares the previous patch with the scheduling fix; both sides already use upfront I/O and prefetch.
The Linux profiling report includes before/after CPU timelines, 384 checked executions, both timing passes, reproduction commands, and VM CPU-steal measurements. The Mac profiling report provides an independent run; the earlier benchmark compares the original patch with upstream main. These are warm local-file measurements; remote storage and Spark remain unmeasured.
I/O policy and prefetch flow
For
SELECT name FROM t WHERE age > 30:Prefetch is a separate option:
What is the testing strategy for this PR?
The new regression reproduces a consumer keeping a runtime worker busy while a read is queued; it fails before the fix and passes afterward. This follow-up passes 259 Parquet library tests, the SQL page-pruning regression, formatting, workspace Clippy, and
dev/rust_lint.sh. All 384 synthetic benchmark executions return the independently expected row count and checksum, with identical paired requested-byte and prefetch counters. In full ClickBench, 35 queries return matching result multisets; eight have unordered or tied LIMIT results, documented separately in the report.Existing coverage includes page pruning, predicate-only columns, dictionaries, nested output, dynamic-filter cancellation, memory pressure, speculative I/O failures, and serialization defaults.
Are there any user-facing changes?
Configure the I/O policy before registering the table:
Upfront reads can fetch pages that later row filtering would skip. Prefetch stays disabled by default and is not serialized; the ClickBench runner accepts
--prefetch-bytes. The Comet POC remains pinned to its earlier DataFusion implementation.