Skip to content

test(parquet): add I/O tracking test for Bloom filter loading baseline - #26897

Open
mohitgurav20 wants to merge 1 commit into
apache:mainfrom
mohitgurav20:test/parquet-bloom-filter-io-baseline
Open

mohitgurav20 wants to merge 1 commit into
apache:mainfrom
mohitgurav20:test/parquet-bloom-filter-io-baseline

Conversation

@mohitgurav20

@mohitgurav20 mohitgurav20 commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Part of #25797. Baseline for #25811.

Rationale for this change

In #25811 we evaluate Parquet bloom filters incrementally during row group pruning to avoid fetching filters for later columns when an earlier column already rejects the row group.

Per review discussion on #25811, this PR adds a baseline test to main using a tracking AsyncFileReader (similar to arrow-rs async reader tests). It records that main currently fetches all candidate column bloom filters upfront (2 requests for a 2-column query where the first column is absent).

Once this merges, #25811 will rebase on top and show the skipped fetch directly in the test diff.

What changes are included in this PR?

  • Adds RangeTracker, TrackingAsyncReader, and TrackingReaderFactory in datafusion/datasource-parquet/src/opener/mod.rs to record requested byte ranges.
  • Adds test_bloom_filter_io_pattern_baseline asserting current upfront fetch behavior on main.

Are these changes tested?

Yes, via test_bloom_filter_io_pattern_baseline.

Are there any user-facing changes?

No.

@github-actions github-actions Bot added the datasource Changes to the datasource crate label Oct 29, 2026
@mohitgurav20
mohitgurav20 force-pushed the test/parquet-bloom-filter-io-baseline branch from aacf4dd to 587ce90 Compare October 29, 2026 19:36
@mohitgurav20
mohitgurav20 marked this pull request as ready for review October 29, 2026 19:56

@alamb alamb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this @mohitgurav20

Can you please:

  1. Move this to a "end to end" test that uses datafusion public APIs (dataframe or SQL, preferably SQL)
  2. Move to using insta snapshots

The test hould do something like:

  1. Create a test parquet file
  2. REad the test parquet file using an instrumented object store
  3. Report the series of events

Something like

Read data page for column 1 (offsets...)
Read PageInded for column 1 (ofsets...)
Produce batch (1024 rows)
Read Bloom Filter for column 1 (offsets...)

Then the log should be rendered as text and compared to a snapshot using insta snapshot

…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)
@mohitgurav20
mohitgurav20 force-pushed the test/parquet-bloom-filter-io-baseline branch from 5788ada to c0a70fb Compare October 31, 2026 07:25
@github-actions github-actions Bot added core Core DataFusion crate and removed datasource Changes to the datasource crate labels Oct 31, 2026
@mohitgurav20

Copy link
Copy Markdown
Contributor Author

hiii @alamb
Done — switched this to an end-to-end SQL test in datafusion/core/tests/parquet/bloom_filter_io.rs with an instrumented object store and insta snapshot.

The snapshot records that both bloom filters are loaded upfront on main. Once this lands, #25811's diff on the snapshot will cleanly show the second fetch skipped.

@mohitgurav20
mohitgurav20 requested a review from alamb November 1, 2026 20:05
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