Repository navigation
[core] Prune merged Data Evolution reads with Parquet statistics - #1469
SteNicholas wants to merge 1 commit into
Conversation
2c72193 to
276ea60
Compare
JingsongLi
left a comment
There was a problem hiding this comment.
Shared row ranges have end-to-end value. The earlier undersized-page case now falls back. Locally, 46 integration tests, eight candidate-range cases and 102 Parquet tests passed. The selective benchmark returned the same row and reduced column data reads from 2,342,012 bytes to 756. Two additional probes exposed the cases below.
b6d1080 to
789b8d6
Compare
270508e to
05bb9b7
Compare
05bb9b7 to
5137483
Compare
|
@JingsongLi, I reran the four regression tests for the cases you reported after rebasing
|
JingsongLi
left a comment
There was a problem hiding this comment.
Shared Parquet statistics can reduce the work needed for selective Data Evolution reads. The merged-reader and Parquet suites passed locally on aaa35f6f, and the earlier offset-only fallback preserved data-page reads in the new probe. I reproduced a separate cold-read I/O regression below.
edc2753 to
03980db
Compare
|
Thanks for checking the earlier fallback and reproducing the cold-read regression. The force-pushed commit keeps sparse reads on the The same commit updates Parquet to |
JingsongLi
left a comment
There was a problem hiding this comment.
The shared selection has end-to-end value for selective merged reads. The full core suite passed 5,112 tests locally. The earlier footer-decidable sparse reads, page alignment and optional-index fallback cases pass on this head. An additional counting-I/O test reproduced the point-read regression below.
|
Thanks for rerunning the core suite and reproducing the point-read regression, @JingsongLi. The follow-up keeps a single selected row on the On the 100,000-row fixture with a 49-column rating provider, |
942195a to
1646549
Compare
|
Ping @JingsongLi. |
JingsongLi
left a comment
There was a problem hiding this comment.
The shared selection has end-to-end value. On 1646549b integrated with ebcff9f1, 39 table integration tests and 14 candidate-selection tests passed. The local cold-metadata selective benchmark returned the same result and reduced total reads from 3,390,588 to 1,157,808 bytes. Two additional read cases reproduced the issues below.
Selective filters can leave Data Evolution reads decoding entire column files. Issue apache#1445 calls for shared candidate row ranges to reduce Parquet reads while keeping current column values aligned. - Resolve current providers by field ID, schema and file version. Prune row groups and pages when a provider owns the whole conjunct and the effective read type preserves comparisons. - Intersect candidate row IDs with requested ranges, bitmap hits and live rows. Apply residual filters to reconstructed rows before LIMIT. - Reuse Parquet footers and indexes between planning and decoding. Avoid unnecessary index I/O for sparse selections. - Validate indexed byte spans, page row counts and null statistics. Fall back to whole column chunks when projected page row counts cannot be verified or indexed decoding fails. - Enable pruning by default for row-tracked, unbucketed tables under Java's merged-read statistics pushdown option. - Test schema evolution, sparse read I/O and damaged metadata. Document the option and benchmark selective and full-range reads.
1646549 to
23c1c85
Compare
|
Thanks for the review and both reproductions, @JingsongLi. I pushed
The updated head passed 5,179 core unit tests and 63 targeted integration tests. I reran the selective benchmark and confirmed the same result, with total reads falling from 3,390,588 to 1,157,808 bytes. |
Purpose
Closes #1445.
Selective filters can leave Data Evolution reads decoding entire column files. This change uses Parquet statistics from the current column providers to build one shared row-ID selection, keeping reconstructed values aligned across files with different page boundaries.
Brief change log
LIMIT.ColumnIndexfails to decode, reuse fetched bytes to recover theOffsetIndex.Tests
INTtoTINYINTprojections preserve matches on full and sparse reads, while widening toBIGINTstill prunes.Benchmark
The in-memory benchmark returned identical results in both modes. Median times come from seven alternating runs in the Rust 1.98.0 test profile with the shared metadata cache disabled.
API and Format
The Java-compatible
data-evolution.merged-read.stats-pushdown.enabledoption defaults totrue. It applies to row-tracked, unbucketed Data Evolution append tables whose ordinary Parquet files share a complete row-ID range. Both settings read the existing storage format.Documentation
🤖 Assisted with Codex.