libenchao commented on code in PR #2887:
URL: https://github.com/apache/calcite/pull/2887#discussion_r957362319
##########
core/src/main/java/org/apache/calcite/plan/Strong.java:
##########
@@ -149,14 +149,45 @@ public static boolean allStrong(List<RexNode> operands) {
return operands.stream().allMatch(Strong::isStrong);
}
- /** Returns whether an expression is definitely not true. */
+ /** Returns whether an expression is definitely not true by either it being
analyzed to be not
Review Comment:
It's not necessary to change the comment for `isNotTrue`
##########
core/src/main/java/org/apache/calcite/plan/Strong.java:
##########
@@ -149,14 +149,45 @@ public static boolean allStrong(List<RexNode> operands) {
return operands.stream().allMatch(Strong::isStrong);
}
- /** Returns whether an expression is definitely not true. */
+ /** Returns whether an expression is definitely not true by either it being
analyzed to be not
+ * true or null. */
public boolean isNotTrue(RexNode node) {
+ return isPredicateNotTrue(node) || isNull(node);
+ }
+
+ /** Returns whether an expression is definitely not true. */
+ public boolean isPredicateNotTrue(RexNode node) {
Review Comment:
Why do you add this public method? Can it be merged into `isNotTrue`?
--
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]