[
https://issues.apache.org/jira/browse/CALCITE-6146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ZheHu updated CALCITE-6146:
---------------------------
Fix Version/s: 1.39.0
> 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
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.39.0
>
>
> 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)