Skip to content

test(parquet): add I/O tracking tests for row group pruning, filter pushdown and TopK - #27022

Draft
alamb wants to merge 8 commits into
apache:mainfrom
alamb:alamb/parquet-io-pruning-tests
Draft

alamb wants to merge 8 commits into
apache:mainfrom
alamb:alamb/parquet-io-pruning-tests

Conversation

@alamb

@alamb alamb commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Note

This PR is stacked on #26897. The new tests are in the last commit: e85a89f

Rationale for this change

#26897 adds an instrumented object store that shows the exact storage requests made by a Parquet scan. This PR uses the same test setup to show what I/O several pruning optimizations save, so changes to the parquet reader's I/O pattern are visible in review.

What changes are included in this PR?

New tests in datafusion/core/tests/parquet/io/, all using a shared file with three row groups (three_row_group_file):

row group id val
0 1, 2, 3 0, 5, 10
1 4, 5, 6 0, 7, 10
2 7, 8, 9 0, 5, 10
  1. row_group_pruning_io.rs: the same file with different predicates on id (none, id = 5, id > 5, id > 100), showing that pruned row groups are never fetched.
  2. filter_pushdown_io.rs: val = 7 (which statistics cannot prune) with pushdown_filters off and on. With pushdown on, val is fetched for every row group, but id is fetched only for row group 1.
  3. topk_io.rs: ORDER BY id DESC LIMIT 2 with TopK dynamic filter pushdown on and off. With it on, sort pushdown reads row group 2 first, and the dynamic filter then prunes row groups 1 and 0 before they are fetched. With it off, all three row groups are fetched.

What is the testing strategy for this PR?

This PR only adds tests. I ran the TopK tests 15 times locally to check that they don't depend on timing (they use target_partitions = 1).

Are there any user-facing changes?

No

mohitgurav20 and others added 8 commits October 31, 2026 12:54
…ng baseline

- Add InstrumentedObjectStore that correlates requested byte ranges to Parquet file structures (footers, page indexes, bloom filters, data pages)

- Add test_parquet_bloom_filter_io_baseline using public SessionContext SQL APIs

- Use insta snapshot to capture and compare the storage I/O trace

- Documents baseline on main where all candidate column Bloom filters are loaded upfront, establishing the target diff for incremental pruning (apache#25811)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Split the Bloom filter I/O test into reusable setup code in
tests/parquet/io/mod.rs and the test itself in
tests/parquet/io/bloom_filter_io.rs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ushdown and TopK

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the core Core DataFusion crate label Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Core DataFusion crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants