[ https://issues.apache.org/jira/browse/CALCITE-1903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16262141#comment-16262141 ]
yuqi commented on CALCITE-1903: ------------------------------- [~jark], is there is any solution about using chinese character ? > Support charset in LIKE expression > ---------------------------------- > > Key: CALCITE-1903 > URL: https://issues.apache.org/jira/browse/CALCITE-1903 > Project: Calcite > Issue Type: Bug > Reporter: Ted Yu > Assignee: Julian Hyde > > From > http://search-hadoop.com/m/Flink/VkLeQbjp59T6PkF?subj=+How+can+I+set+charset+for+flink+sql+ > The following query > {code} > SELECT > 'HIGH' AS LEVEL, > 'Firewall uplink bandwidth exception:greater than 10000' AS content, > `system.process.username`, > `system.process.memory.rss.bytes` > FROM > test > WHERE > `system.process.username` LIKE '%高危%' > {code} > produces the following: > {code} > Caused by: org.apache.calcite.runtime.CalciteException: Failed to encode > '%高危%' in character set 'ISO-8859-1' > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) ~[na:1.8.0_45] > at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown > Source) ~[na:1.8.0_45] > at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown > Source) ~[na:1.8.0_45] > at java.lang.reflect.Constructor.newInstance(Unknown Source) > ~[na:1.8.0_45] > at > org.apache.calcite.runtime.Resources$ExInstWithCause.ex(Resources.java:463) > ~[flink-table_2.11-1.3.1.jar:1.3.1] > at org.apache.calcite.runtime.Resources$ExInst.ex(Resources.java:572) > ~[flink-table_2.11-1.3.1.jar:1.3.1] > at org.apache.calcite.util.NlsString.<init>(NlsString.java:81) > ~[flink-table_2.11-1.3.1.jar:1.3.1] > at org.apache.calcite.rex.RexBuilder.makeLiteral(RexBuilder.java:864) > ~[flink-table_2.11-1.3.1.jar:1.3.1] > at > org.apache.calcite.rex.RexBuilder.makeCharLiteral(RexBuilder.java:1051) > ~[flink-table_2.11-1.3.1.jar:1.3.1] > at > org.apache.calcite.sql2rel.SqlNodeToRexConverterImpl.convertLiteral(SqlNodeToRexConverterImpl.java:117) > ~[flink-table_2.11-1.3.1.jar:1.3.1] > at > org.apache.calcite.sql2rel.SqlToRelConverter$Blackboard.visit(SqlToRelConverter.java:4408) > ~[flink-table_2.11-1.3.1.jar:1.3.1] > at > org.apache.calcite.sql2rel.SqlToRelConverter$Blackboard.visit(SqlToRelConverter.java:3787) > ~[flink-table_2.11-1.3.1.jar:1.3.1] > at org.apache.calcite.sql.SqlLiteral.accept(SqlLiteral.java:427) > ~[flink-table_2.11-1.3.1.jar:1.3.1] > at > org.apache.calcite.sql2rel.SqlToRelConverter$Blackboard.convertExpression(SqlToRelConverter.java:4321) > ~[flink-table_2.11-1.3.1.jar:1.3.1] > at > org.apache.calcite.sql2rel.StandardConvertletTable.convertExpressionList(StandardConvertletTable.java:968) > ~[flink-table_2.11-1.3.1.jar:1.3.1] > at > org.apache.calcite.sql2rel.StandardConvertletTable.convertCall(StandardConvertletTable.java:944) > ~[flink-table_2.11-1.3.1.jar:1.3.1] > at > org.apache.calcite.sql2rel.StandardConvertletTable.convertCall(StandardConvertletTable.java:928) > ~[flink-table_2.11-1.3.1.jar:1.3.1] > ... 50 common frames omitted > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029)