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

   ## Which issue does this PR close?
   
   - Part of #22144 (Adaptive filter pushdown), split into a reviewable stack. 
This is **PR 2 of 4**.
   
   ## Rationale for this change
   
   Adaptive filter scheduling needs to know how effective each *individual* 
predicate conjunct was, so it can decide where to place that conjunct. Today 
pruning only reports an aggregate result. This PR surfaces per-conjunct 
effectiveness as a free side effect of the pruning pass that already runs — no 
extra passes.
   
   ## What changes are included in this PR?
   
   - `PruningPredicate::try_new_tagged_conjuncts` — build a predicate from 
AND-conjuncts, each carrying a caller-supplied tag.
   - `PruningPredicate::prune_per_conjunct` — returns the usual prune mask plus 
per-conjunct `PerConjunctPruneStats`.
   - `RowGroupAccessPlanFilter::prune_by_statistics_with_per_conjunct_stats` 
and `PagePruningAccessPlanFilter::prune_plan_with_per_conjunct_stats` — surface 
those stats for row-group and page-index pruning.
   
   Existing untagged `prune` / `prune_by_statistics` / 
`prune_plan_with_page_index` paths are preserved and unchanged. No in-tree 
caller uses the tagged path yet.
   
   ## Are these changes tested?
   
   Yes — unit tests for the tagged-conjunct constructor and per-conjunct stat 
accounting.
   
   ## Are there any user-facing changes?
   
   New public API on `PruningPredicate`. Purely additive; no behavior change.
   
   ---
   
   **Stacked PR — diff is cumulative against `main`.** Review the top commit 
*"feat: per-conjunct pruning statistics for PruningPredicate"*; the commit 
below it is PR #22234.
   
   Stack (review/merge in order):
   1. #22234 — OptionalFilterPhysicalExpr + proto
   2. **this PR** — Per-conjunct pruning statistics
   3. SelectivityTracker cost model
   4. Adaptive parquet scan integration


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