alamb commented on issue #2535:
URL: 
https://github.com/apache/arrow-datafusion/issues/2535#issuecomment-1135932491

    I think it is important for expression simplification that expressions can 
be partially evaluated at optimization time. 
   
   In terms of evaluating on logical plan `Expr`s directly, I agree there is no 
theoretical reason this can not be done, but if we did so it will result in 
dual expression evaluation systems that would have be kept in sync. This might 
be especially hard if someone wanted to use a different physical expression 
evaluation system
   
   I understand the desire to remove the direct code dependence on the 
execution engine from the optimizer -- perhaps we can do so via a trait -- for 
example, we could pass some sort of `dyn ExprEvaluator` to the optimizer for 
use in `simplify expressions` and elsewhere. 
   
   By default, DataFusion could provide the evaluator based on `PhysicalExpr` 
-- and  for those users of the optimizer itself they could decide the most 
appropriate way to provide expression evaluation to the optimizer


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

Reply via email to