Add focused benchmark for Parquet pruning setup cache - #24323
Conversation
- Adds `benchmarks/benches/parquet_pruning_setup_cache.rs` with 128 same‑schema files. - Predicate hits all files, exercising cache reuse and validating 16,384 rows. - Updates `benchmarks/Cargo.toml` to include bench target and Criterion Tokio feature.
…seline scope and remove ClickBench generalization claim
52f889c to
5b62f3e
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #24323 +/- ##
==========================================
- Coverage 81.29% 81.14% -0.16%
==========================================
Files 1110 1112 +2
Lines 385205 386933 +1728
Branches 385205 386933 +1728
==========================================
+ Hits 313145 313963 +818
- Misses 53580 54475 +895
- Partials 18480 18495 +15 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
|
||
| //! Benchmarks end-to-end Parquet scan cost for a cache-favourable workload. | ||
| //! | ||
| //! The 128 files share one physical schema and use the same predicate and target |
There was a problem hiding this comment.
what would happen if the schema is not the same? or schema is already merged?
There was a problem hiding this comment.
what would happen if the schema is not the same?
Different physical file schemas produce distinctParquetPruningSetupCachekeys in #21566, so their setup is not reused across schema variants.
or schema is already merged?
Merged table schema is also not the targeted scenario in #21554.
This benchmark's purpose is to evaluate whether addressing #21554 improves performance: that issue targets avoiding repeated per-file schema adaptation, predicate rewrites, and pruning-predicate construction when many files have the same physical schema.
Schema evolution/merged-schema behavior is a separate workload and would dilute this focused benchmark.
Existing clickbench_partitioned benchmarks do not show significant improvement, I think because:
- pruning setup work constitutes a small percentage of the work
- the scenarios do not reuse cache
Which issue does this PR close?
Rationale for this change
ParquetPruningSetupCachein #21566 needs a focused benchmark that exercises it under deliberately cache-favourable conditions.This benchmark provides a workload where many Parquet files share the same physical schema and use the same predicate, target partition count, and query, creating repeated opportunities to reuse pruning setup. It is intended to measure end-to-end scan cost for this specific workload shape, rather than represent general DataFusion performance or predict improvements in broader benchmarks such as ClickBench.
What changes are included in this PR?
SELECT id FROM t WHERE id >= 0.async_tokiofeature so the asynchronous query execution can be benchmarked with the Tokio runtime.parquet_pruning_setup_cachebenchmark target.Are these changes tested?
The benchmark includes a correctness check that verifies the query returns
128 × 128 = 16,384rows before the timed benchmark begins.No additional tests are included in this patch.
Are there any user-facing changes?
No. This PR adds a focused benchmark and benchmark configuration only; it does not change user-facing DataFusion behavior or public APIs.
LLM-generated code disclosure
This PR includes LLM-generated code and comments. All LLM-generated content has been manually reviewed.