coral
coral copied to clipboard
org.apache.calcite.runtime.CalciteException: Failed to encode '中文' in character set 'ISO-8859-1'
public void testTable() { String sql = "select b, '中文' from test.t2 where b = a"; RelNode relNode = TestUtils.convertTable(sql); RelToTrinoConverter relToTrinoConverter = new RelToTrinoConverter(); SqlNode expandedSql = relToTrinoConverter.convertToSqlNode(relNode); System.out.println(expandedSql); }
Looks like it is an issue of the upstream calcite: https://issues.apache.org/jira/browse/CALCITE-3308, https://issues.apache.org/jira/browse/CALCITE-2616 it would be kind of hard to fix in Coral.
Looks like it is an issue of the upstream calcite: https://issues.apache.org/jira/browse/CALCITE-3308, https://issues.apache.org/jira/browse/CALCITE-2616 it would be kind of hard to fix in Coral.
I agree, do you want to change org.apache.calcite.Util#DEFAULT_CHARSET
or org.apache.calcite.rel.type.RelDataTypeFactoryImpl#getDefaultCharset
?
You can import the configuration file( saffron.properties) of calcite and set calcite.default.charset=utf8,this solves the problem.
You can import the configuration file( saffron.properties) of calcite and set calcite.default.charset=utf8,this solves the problem.
yes,and then use one ’unicodeUtil‘ to convert