xuzifu666 commented on code in PR #4542:
URL: https://github.com/apache/calcite/pull/4542#discussion_r2349427121


##########
core/src/test/java/org/apache/calcite/sql/type/SqlTypeUtilTest.java:
##########
@@ -198,6 +198,20 @@ private void checkConvert(SqlTypeCoercionRule rules,
     assertThat(fieldTypeNames, isListOf("INTEGER", "INTEGER"));
   }
 
+  /**
+   * Test for <a 
href="https://issues.apache.org/jira/browse/CALCITE-7186";>[CALCITE-7186]</a>
+   * Add mapping from Byte[] to VARBINARY and Character[] to VARCHAR in Java 
UDF.
+   */
+  @Test void testJavaToSqlCharacterArrayAndByteArrayMapping() {
+    SqlTypeName sqlTypeName = 
JavaToSqlTypeConversionRules.instance().lookup(Byte[].class);
+    assertThat("Byte[].class should map to SqlTypeName.VARBINARY",
+        sqlTypeName, is(SqlTypeName.VARBINARY));
+
+    sqlTypeName = 
JavaToSqlTypeConversionRules.instance().lookup(Character[].class);
+    assertThat("Character[].class should map to SqlTypeName.VARBINARY",

Review Comment:
   CI not error in previous version may be OK here, because it is just a error 
out message.



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

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to