asolimando commented on code in PR #3143:
URL: https://github.com/apache/calcite/pull/3143#discussion_r1166640775
##########
core/src/test/resources/sql/sub-query.iq:
##########
@@ -1748,7 +1748,7 @@ select sal from "scott".emp e
(0 rows)
!ok
-EnumerableCalc(expr#0..4=[{inputs}], expr#5=[RAND()],
expr#6=[CAST($t5):INTEGER NOT NULL], expr#7=[2], expr#8=[MOD($t6, $t7)],
expr#9=[3], expr#10=[=($t8, $t9)], expr#11=[IS NOT NULL($t4)],
expr#12=[AND($t4, $t11)], expr#13=[OR($t10, $t12)], SAL=[$t1],
$condition=[$t13])
+EnumerableCalc(expr#0..4=[{inputs}], expr#5=[RAND()],
expr#6=[CAST($t5):INTEGER NOT NULL], expr#7=[2], expr#8=[MOD($t6, $t7)],
expr#9=[3], expr#10=[=($t8, $t9)], expr#11=[OR($t10, $t4)], SAL=[$t1],
$condition=[$t11])
Review Comment:
I am OK with `IS NOT NULL($t4)` going away due to `AND($t4, $t11)`
`$condition=[$t11]` IIUC makes `$t11` in `AND($t4, $t11)` "redundant", so I
understand that `$t11` goes away and that `$t4` can be placed in the `OR`.
What about `$t12`? I don't understand why it's being simplified.
Can you explain a bit the reasoning here, please?
--
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]