You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2019/10/29 06:19:46 UTC

[GitHub] [calcite] yanlin-Lynn commented on a change in pull request #1540: [CALCITE-3433] EQUALS operator between date/timestamp types returns false if the type is nullable

yanlin-Lynn commented on a change in pull request #1540: [CALCITE-3433] EQUALS operator between date/timestamp types returns false if the type is nullable
URL: https://github.com/apache/calcite/pull/1540#discussion_r339907887
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/adapter/enumerable/RexImpTable.java
 ##########
 @@ -2339,6 +2357,15 @@ private boolean anyAnyOperands(RexCall call) {
       return false;
     }
 
+    /** Checks whether the expression is null constant. */
+    private boolean isConstantNullExpression(Expression expression) {
+      if (!(expression instanceof ConstantExpression)) {
+        return false;
+      }
+      ConstantExpression ce = (ConstantExpression) expression;
+      return ce.value == null;
+    }
 
 Review comment:
   I think `isConstantNullExpression` is unnecessary, it seems null value is process in
   https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/adapter/enumerable/RexImpTable.java#L1083.
   You can check again.
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services