ILuffZhe commented on code in PR #3558:
URL: https://github.com/apache/calcite/pull/3558#discussion_r1874632211


##########
testkit/src/main/java/org/apache/calcite/test/SqlOperatorTest.java:
##########
@@ -4479,6 +4479,78 @@ static void checkRlikeFails(SqlOperatorFixture f) {
     f.checkType("convert(cast(1 as varchar(2)), utf8, latin1)", "VARCHAR(2) 
NOT NULL");
   }
 
+  /** Test case for
+   * <a 
href="https://issues.apache.org/jira/browse/CALCITE-6146";>[CALCITE-6146]
+   * Target charset should be used when comparing two strings through
+   * CONVERT/TRANSLATE function during validation</a>. */
+  @Test void testStringComparisonWithConvertFunc() {
+    final SqlOperatorFixture f = fixture();
+    f.setFor(SqlStdOperatorTable.CONVERT, VM_JAVA);
+    f.check("select 'a' as col\n"

Review Comment:
   > this example is confusing, because the column name is col and the literal 
is also col. Can you change one of them?
   
   Sure, I've changed the column alia.



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