ZheHu created CALCITE-6146:
------------------------------

             Summary: Target charset should be used when comparing two strings 
through CONVERT/TRANSLATE function during validation
                 Key: CALCITE-6146
                 URL: https://issues.apache.org/jira/browse/CALCITE-6146
             Project: Calcite
          Issue Type: Bug
          Components: core
    Affects Versions: 1.36.0
            Reporter: ZheHu
            Assignee: ZheHu


The following test in JdbcTest throws "Cannot apply = to the two different 
charsets ISO-8859-1 and GBK"

{code:java}
CalciteAssert.hr()
        .query("select \"name\", \"empid\" from \"hr\".\"emps\"\n"
            + "where convert('a' using GBK)=_GBK'a' order by \"empid\"")
        .returns("name=Eric; empid=200\n"
            + "name=Sebastian; empid=150\n"
            + "name=Theodore; empid=110\n"
            + "name=Bill; empid=100\n");
{code}

Since we try to convert 'a' with GBK, the charset of its result should also be 
treated as GBK.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to