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

   I agree that type coercion doesn't really belong in an "optimizer" as it 
actually changes the meaning of the exprs (on purpose) where the other 
optimzier passes are supposed to keep the meaning of the plan the same, but 
make it faster in some way.
   
   I recommend  changing the code to explicitly run the type coercion logic 
immediately prior to running any other optimization passes. I also think the 
type coercion logic should not depend on any other simplification (such as 
constant folding) -- it should depend only on the types. 
   
   Once type coercion is done, then we can run the expr simplifier pass to 
clean up / simplify the expressions


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