LeonidChistov commented on code in PR #3143:
URL: https://github.com/apache/calcite/pull/3143#discussion_r1166675851
##########
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:
Since `$t12` is defined as `expr#12=[AND($t4, $t11)]`, and we have just
eliminated `expr#11=[IS NOT NULL($t4)]` as redundant (and you agree with that),
there is no sense in doing `AND` anymore.
So, what happens here AFAICS, is that we had condition `OR($t10, AND($t4, IS
NOT NULL($t4)))` and managed to simplify it to `OR($t10, $t4)`.
--
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]