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 2020/11/12 08:15:23 UTC

[GitHub] [calcite] liyafan82 commented on a change in pull request #2256: [CALCITE-4392] The operation of checking types equal ignoring null can be more efficient

liyafan82 commented on a change in pull request #2256:
URL: https://github.com/apache/calcite/pull/2256#discussion_r521911562



##########
File path: core/src/test/java/org/apache/calcite/sql/type/SqlTypeUtilTest.java
##########
@@ -197,4 +197,31 @@ private RelDataType struct(RelDataType...relDataTypes) {
     }
     return builder.build();
   }
+
+  @Test public void testEqualSansNullability() {
+    final RelDataTypeFactory factory = f.typeFactory;
+
+    RelDataType bigIntType = f.sqlBigInt;
+    RelDataType nullableBigIntType = f.sqlBigIntNullable;
+    RelDataType varCharType = f.sqlVarchar;
+
+    // different types
+    assertThat(
+        SqlTypeUtil.equalSansNullability(factory, bigIntType, varCharType), is(false));
+    assertThat(
+        SqlTypeUtil.equalSansNullability(bigIntType, varCharType), is(false));

Review comment:
       Done. Thanks for the good suggestion. 




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