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 2021/12/02 15:23:30 UTC

[GitHub] [calcite] vlsi commented on a change in pull request #2628: [CALCITE-4917] Add test for 'IS NOT NULL(a) AND a=b' simplification

vlsi commented on a change in pull request #2628:
URL: https://github.com/apache/calcite/pull/2628#discussion_r761199916



##########
File path: core/src/test/java/org/apache/calcite/rex/RexProgramTest.java
##########
@@ -1710,6 +1710,17 @@ private void checkExponentialCnf(int n) {
         .expandedSearch(expanded);
   }
 
+  @Test void testSimplifyAndIsNotNullEquality() {
+    RelDataType intNullableType =
+        typeFactory.createTypeWithNullability(
+            typeFactory.createSqlType(SqlTypeName.INTEGER), true);
+    final RexInputRef i0 = rexBuilder.makeInputRef(intNullableType, 0);
+    final RexInputRef i1 = rexBuilder.makeInputRef(intNullableType, 1);
+
+    checkSimplify2(and(isNotNull(i0), eq(i0, i1)),

Review comment:
       ```suggestion
       checkSimplify2(and(isNotNull(vIntNotNull(0)), eq(vIntNotNull(0), vIntNotNull(1))),
   ```




-- 
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: commits-unsubscribe@calcite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org