peter-toth commented on code in PR #13032:
URL: https://github.com/apache/datafusion/pull/13032#discussion_r1810351750


##########
datafusion/sqllogictest/test_files/cse.slt:
##########
@@ -199,18 +199,18 @@ physical_plan
 # Surely only once but also conditionally evaluated subexpressions
 query TT
 EXPLAIN SELECT
-    (a = 1 OR random() = 0) AND (a = 1 OR random() = 1) AS c1,
-    (a = 2 AND random() = 0) OR (a = 2 AND random() = 1) AS c2,
+    (a = 1 OR random() = 0) AND (a = 2 OR random() = 1) AS c1,

Review Comment:
   Yeah, this change looks good to me to avoid simplification in this CSE test.
   (Actually the same trick is applied in the previous test called `# Surely 
only once but also conditionally evaluated expressions` a bit above.)
   
   Out of curiosity, volatile common expressions don't get eliminated, do they?
   E.g. `(a = 1 AND random() = 0) OR (a = 2 AND random() = 0)` is not rewritten 
to `random() = 0 AND (a = 1 OR a = 2)`?



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to