rubenada 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_r307679830
##########
File path: core/src/test/java/org/apache/calcite/test/RexProgramTest.java
##########
@@ -1493,6 +1493,83 @@ private void checkExponentialCnf(int n) {
"false");
}
+ /** Test case for
+ * <a
href="https://issues.apache.org/jira/browse/CALCITE-3198">[CALCITE-3198]
+ * ReduceExpressionsRule.FILTER_INSTANCE does not reduce 'NOT(x=a AND
x=b)'</a>. */
+ @Test public void testSimplify3198() {
+ final RelDataType intType = typeFactory.createSqlType(SqlTypeName.INTEGER);
+ final RelDataType rowType = typeFactory.builder()
+ .add("a", intType).nullable(false)
+ .add("b", intType).nullable(true)
+ .build();
+
+ final RexDynamicParam range = rexBuilder.makeDynamicParam(rowType, 0);
Review comment:
Tests updated
----------------------------------------------------------------
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