adriangb opened a new pull request, #27761: URL: https://github.com/apache/datafusion/pull/27761
## Which issue does this PR close? - Part of https://github.com/apache/datafusion/issues/24358. - Prepares a benchmark for https://github.com/apache/datafusion/pull/27738. ## Rationale for this change No benchmark runs a TopK over a Parquet scan where the page index installs a row selection. ClickBench files have no page index, and the `sort_pushdown` queries have no `WHERE` clause. https://github.com/apache/datafusion/pull/27738 lets runtime TopK row-group pruning and statistics reordering run with a row selection. This PR adds a benchmark that exercises that path, so https://github.com/apache/datafusion/pull/27738 can rebase on it and show the effect. ## What changes are included in this PR? - `bench.sh`: the `sort_pushdown_inexact` generator writes the page index with 64 KiB data pages. Each 100K-row RG gets about five pages. - `queries/sort_pushdown_inexact/q5.sql`: a new query that filters on 30 narrow `l_orderkey` ranges and runs `ORDER BY l_orderkey DESC LIMIT 10`. - `README.md`: documents q5 and the page index. The query uses `OR` of ranges, not `IN`. The page index skips `IN` lists with more than 20 values, and 20 keys give each RG fewer rows than the `LIMIT`. | Metric (`EXPLAIN ANALYZE`) | `main` | https://github.com/apache/datafusion/pull/27738 | | --- | --- | --- | | `row_groups_pruned_statistics` | 61 total, 38 matched | 61 total, 38 matched | | `page_index_pages_pruned` | 190 total, 38 matched | 190 total, 38 matched | | `row_groups_pruned_dynamic_filter` | 0 | 21 | ## What is the testing strategy for this PR? This PR only changes benchmarks. I regenerated the data with `./bench.sh data sort_pushdown_inexact` and ran q5 with `dfbench sort-pushdown --sorted` and `pushdown_filters=true`. The existing queries return the same results, because the page index does not change the data. ## Are there any user-facing changes? No. Anyone with existing `sort_pushdown_inexact` data must delete it and regenerate it to get the page index. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
