hannerwang commented on code in PR #4078:
URL: https://github.com/apache/calcite/pull/4078#discussion_r1872810383
##########
core/src/main/java/org/apache/calcite/plan/SubstitutionVisitor.java:
##########
@@ -322,7 +325,9 @@ void register(MutableRel result, MutableRel query) {
ImmutableList.of(condition2, target2));
RexNode r =
canonizeNode(rexBuilder, simplify.simplifyUnknownAsFalse(x2));
- if (!r.isAlwaysFalse() && isEquivalent(condition2, r)) {
+ RexNode simplifiedCond2 =
+ canonizeNode(rexBuilder,
simplify.simplifyUnknownAsFalse(condition2));
+ if (!r.isAlwaysFalse() && isEquivalent(simplifiedCond2, r)) {
Review Comment:
Actually I'm not sure why this function uses both simplify and
simplifyUnknownAsFalse, so I made a conservative change to minimize impact. If
possible, we could replace simplify with simplifyUnknownAsFalse, but that seems
too radical.
--
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]