You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "yuxiqian (via GitHub)" <gi...@apache.org> on 2025/06/05 13:32:40 UTC
[PR] [FLINK-37905] Fix transform failure with non-ascii string literals [flink-cdc]
yuxiqian opened a new pull request, #4038:
URL: https://github.com/apache/flink-cdc/pull/4038
This closes FLINK-37905.
As reported by @ruanhang1993, any non-ascii string literals in transform expressions will be encoded into something like `"&'\xxxx"`, which is unexpected since Unicodes are fully supported in Flink SQL expressions.
+@aiwenmo
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-37905] Fix transform failure with non-ascii string literals [flink-cdc]
Posted by "yuxiqian (via GitHub)" <gi...@apache.org>.
yuxiqian merged PR #4038:
URL: https://github.com/apache/flink-cdc/pull/4038
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-37905] Fix transform failure with non-ascii string literals [flink-cdc]
Posted by "lvyanquan (via GitHub)" <gi...@apache.org>.
lvyanquan commented on code in PR #4038:
URL: https://github.com/apache/flink-cdc/pull/4038#discussion_r2259236555
##########
flink-cdc-runtime/src/main/java/org/apache/flink/cdc/runtime/parser/JaninoCompiler.java:
##########
@@ -158,10 +159,10 @@ private static Java.Rvalue translateSqlSqlLiteral(SqlLiteral sqlLiteral) {
if (sqlLiteral.getValue() == null) {
return new Java.NullLiteral(Location.NOWHERE);
}
- String value = sqlLiteral.getValue().toString();
+ Object value = sqlLiteral.getValue();
if (sqlLiteral instanceof SqlCharStringLiteral) {
// Double quotation marks represent strings in Janino.
- value = "\"" + value.substring(1, value.length() - 1) + "\"";
+ value = "\"" + ((NlsString) value).getValue() + "\"";
Review Comment:
value = "\"" + ((SqlCharStringLiteral) sqlLiteral).getValueAs(NlsString.class).getValue() + "\"";
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org