jonahgao commented on issue #13994:
URL: https://github.com/apache/datafusion/issues/13994#issuecomment-2574284445

   > if `&mut self` was passed to this fn it would be much easier to control 
the functionality.
   
   Since checking for supportability is more of a read-only operation, I think 
using `&self` would be more appropriate. Additionally, changing this would 
break many downstreams, so it’s usually more conservative to avoid making such 
breaking changes. 
   
   > Thanks for explaining this. We can probably work with this but the issue 
is that since we want some filters and not others (in other words some are 
preferred indexes) we need to keep state between supports_filters_pushdown 
calls. 
   
   DataFusion currently has no knowledge about the relationship between 
multiple filters, and the current way it operates assumes that they are 
independent. Another approach may be to add your own 
[OptimizerRule](https://github.com/apache/datafusion/blob/4e877a08d224d992a8cbcc9a14f59468e312b13f/datafusion-examples/examples/optimizer_rule.rs#L35).
 You can select the filters in your 
[TableScan](https://github.com/apache/datafusion/blob/4e877a08d224d992a8cbcc9a14f59468e312b13f/datafusion/expr/src/logical_plan/plan.rs#L2486)
 and return the unnecessary ones to the parent `Filter` plan.


-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to