xudong963 opened a new pull request, #22191:
URL: https://github.com/apache/datafusion/pull/22191

   ## Which issue does this PR close?
   
   N/A, follow-up to review comments from #21637.
   
   ## Rationale for this change
   
   PR #21637 added logic to skip row filters and page-index pruning for row 
groups that are fully matched by row-group statistics. The resulting opener 
code had a few local closures and manually tracked `Option<RowFilter>` state, 
which made the scan setup harder to follow.
   
   This also restores the public 
`PagePruningAccessPlanFilter::prune_plan_with_page_index` return type to 
`ParquetAccessPlan`. The extra fully-matched page count is still available 
internally for metrics without changing the public API.
   
   ## What changes are included in this PR?
   
   - Extract row filter construction and reuse into `RowFilterGenerator`.
   - Extract access-plan preparation into a helper function.
   - Extract push decoder builder setup into a helper function and config 
struct.
   - Add an internal `PagePruningResult` and 
`prune_plan_with_page_index_and_metrics` for opener metrics.
   - Keep the public `prune_plan_with_page_index` API returning 
`ParquetAccessPlan`.
   
   ## Are these changes tested?
   
   Yes.
   
   ```bash
   cargo fmt --all
   cargo fmt --all --check
   cargo test -p datafusion-datasource-parquet --lib fully_matched
   cargo test -p datafusion-datasource-parquet --lib 
test_page_pruning_predicate_respects_enable_page_index
   cargo clippy --all-targets --all-features -- -D warnings
   ```
   
   ## Are there any user-facing changes?
   
   No user-facing behavior changes. This preserves the existing public 
`prune_plan_with_page_index` return type.
   


-- 
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]

Reply via email to