aectaan commented on issue #15291:
URL: https://github.com/apache/datafusion/issues/15291#issuecomment-2734472619

   Thank you @alamb! No, it doesn't require anything custom. 
   
   Unfortunately `datafusion-cli` parser fails at this request: doesn't like 
opening brace before WHERE - that's why I made it as a test. Maybe I missing 
something.
   
   There are two optimisation rules, that involved into bug:
   1. common_sub_expression_eliminate (obviously)
   2. simplify_expr
   
   Order and set of rules is default. Disabling other rules doesn't change 
anything.
   
   If we swap order of first `simplify_expr` and 
`common_sub_expression_eliminate` - everything is ok


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