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/07/19 14:34:31 UTC

[GitHub] [calcite] jinxing64 commented on a change in pull request #1322: [CALCITE-3198] ReduceExpressionsRule.FILTER_INSTANCE does not reduce 'NOT(x=a AND x=b)'

jinxing64 commented on a change in pull request #1322: [CALCITE-3198] ReduceExpressionsRule.FILTER_INSTANCE does not reduce 'NOT(x=a AND x=b)'
URL: https://github.com/apache/calcite/pull/1322#discussion_r305385474
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/rex/RexSimplify.java
 ##########
 @@ -1624,6 +1626,24 @@ private RexNode simplifyOrs(List<RexNode> terms, RexUnknownAs unknownAs) {
             continue;
           }
         }
+        break;
+      case NOT_EQUALS:
+        Comparison notEqualsComparison =
+            Comparison.of(term, node -> RexUtil.isReferenceOrAccess(node, false));
 
 Review comment:
   If it's not limited by `RexUtil.isReferenceOrAccess `, is it possible we support below case ?
   ```
   (x+y <> a OR x+y <> b) => TRUE

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