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

   ## Which issue does this PR close?
   
   - Related to #18856, #24528 and #22883.
   
   ## Rationale for this change
   
   The question "do we need `PushedDown::Inexact`?" keeps coming up (#18856, 
#24528). The behavior that `Inexact` would name already exists: `ParquetSource` 
replies `PushedDown::No` and still keeps the filter for statistics pruning when 
`pushdown_filters` is disabled. The confusion comes from the docs, which say 
`No` means "the predicate could not be pushed down".
   
   A third state would not change what the parent does. Whether the child 
ignores the filter or uses it for pruning, the parent must evaluate it. 
Producers of optional filters (hash join and TopK dynamic filters) do not use 
the reply to find consumers either. Since #24601 they check if the filter is 
present in the child subtree.
   
   ## What changes are included in this PR?
   
   Doc comments on `PushedDown`, `PushedDown::Yes` and `PushedDown::No`:
   
   - `Yes`: the child applies the predicate exactly, so the parent does not 
need to evaluate it.
   - `No`: the parent must still evaluate the predicate. The child may ignore 
it, or use it in an inexact way (for example for statistics pruning).
   - Why there is no separate "inexact" state, and how optional filter 
producers find consumers (`plan_contains_expression_id`).
   
   ## What is the testing strategy for this PR?
   
   Documentation only. `cargo doc -p datafusion-physical-plan` builds with `-D 
warnings`, so the intra-doc link resolves.
   
   ## Are there any user-facing changes?
   
   No. Documentation only.
   
   🤖 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]

Reply via email to