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:
[email protected]


With regards,
Apache Git Services

Reply via email to