rubenada commented on code in PR #5070:
URL: https://github.com/apache/calcite/pull/5070#discussion_r3518295599


##########
core/src/main/java/org/apache/calcite/rex/RexSimplify.java:
##########
@@ -1972,7 +1972,7 @@ private <C extends Comparable<C>> RexNode 
simplifyAnd2ForUnknownAsFalse(
         // or weaken terms that are partially implied.
         // E.g. given predicate "x >= 5" and term "x between 3 and 10"
         // we weaken to term to "x between 5 and 10".
-        final RexNode term2 = simplifyUsingPredicates(term, clazz);
+        final RexNode term2 = simplifyUsingPredicates(term, clazz, FALSE);

Review Comment:
   This method is called `simplifyAnd2ForUnknownAsFalse`, and the javadoc (on 
the overloaded method) states "... we assume that if the expression returns 
UNKNOWN it will be interpreted as FALSE". There are other cases in this method 
were we need to call another one passing a RexUnknownAs parameter, and `FALSE` 
value is used (e.g. `return simplify(terms.get(0), FALSE)` in line 1873)



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

Reply via email to