andygrove opened a new issue, #3865: URL: https://github.com/apache/arrow-datafusion/issues/3865
**Describe the bug** Consider the following two expressions, which are not the same: ```rust let expr1 = expr1.and(expr2.or(expr3)); let expr2 = expr1.and(expr2).or(expr3); ``` They both produce the same string from `canonical_name`: ```sql a < Int32(1) AND b < Int32(2) OR c < Int32(3) ``` **To Reproduce** **Expected behavior** They should produce different results: `expr1.and(expr2.or(expr3))` should produce: ```sql a < Int32(1) AND (b < Int32(2) OR c < Int32(3)) ``` `expr1.and(expr2).or(expr3)` should produce either of these: ```sql a < Int32(1) AND b < Int32(2) OR c < Int32(3) (a < Int32(1) AND b < Int32(2)) OR c < Int32(3) ``` **Additional context** -- 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...@arrow.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org