alamb opened a new pull request, #27757: URL: https://github.com/apache/datafusion/pull/27757
## Which issue does this PR close? - Related to https://github.com/apache/datafusion/issues/24358 - Related to https://github.com/apache/datafusion/pull/27738 ## Rationale for this change https://github.com/apache/datafusion/pull/27738 lets runtime (TopK dynamic filter) row group pruning run when the page index has installed a row selection. Its tests check the `row_groups_pruned_dynamic_filter` metric, but nothing shows the effect on the I/O the scan actually does. This PR adds an I/O trace test for that case, with the expected output on `main` today, so that the fix shows up as a diff in the requests made to object storage. ## What changes are included in this PR? One new test in `datafusion/core/tests/parquet/io/topk_io.rs`, `test_topk_io_dynamic_filter_with_page_pruning`, and a helper that writes its file. The file has three row groups, each with two pages. `w = 1` matches only the second page of each row group, so the page index creates a row selection for every row group. The query is ```sql SELECT id FROM t WHERE w = 1 ORDER BY id DESC LIMIT 2 ``` On `main` the scan fetches all three row groups, even though the TopK filter (`id > 17`) rules out row groups 1 and 0 once row group 2 has been read. With the code from https://github.com/apache/datafusion/pull/27738 the same test produces this, and I plan to update the expected output once that PR merges: ```text Request 4 Read data page 1 for column 'w' (rg 2) (offsets 323..352) Request 5 Read data page 0 for column 'id' (rg 2) (offsets 236..265) Read data page 1 for column 'id' (rg 2) (offsets 265..294) Produce batch (2 rows) ``` Note: the trace also shows data page 0 of `id` being fetched, although the page index pruned it. That happens both with and without https://github.com/apache/datafusion/pull/27738. ## What is the testing strategy for this PR? This PR only adds a test: ```shell cargo test -p datafusion --test parquet_integration -- io::topk_io ``` ## Are there any user-facing changes? No, this only adds a test. -- 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]
