xiaodao created FLINK-17153: ------------------------------- Summary: flink sql convert constant to char type cause loop Key: FLINK-17153 URL: https://issues.apache.org/jira/browse/FLINK-17153 Project: Flink Issue Type: Bug Components: Table SQL / Planner Affects Versions: 1.9.1 Reporter: xiaodao
sql: SELECT '公开发债' AS secondary_business FROM VarBondCode WHERE stock_type = '77'; code is: org.apache.flink.table.planner.codegen.CodeGeneratorContext#addReusableStringConstants when it parse constant, it change to unicode, and str length is change, in this case secondary_business is char(4), and after change it become '_UTF-16LE'\u516C\u5F00\u53D1\u503A''. calcite call makecast func can't remove it,and call it loop; org.apache.calcite.rex.RexBuilder#canRemoveCastFromLiteral -- This message was sent by Atlassian Jira (v8.3.4#803005)