Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
1.9.1
-
None
-
None
Description
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
Attachments
Issue Links
- is duplicated by
-
FLINK-16113 ExpressionReducer shouldn't escape the reduced string value
- Resolved