You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "luoyuxia (Jira)" <ji...@apache.org> on 2022/10/17 01:37:00 UTC
[jira] [Commented] (FLINK-29651) Code gen will fail when the literal specified in user's sql hasn't be escaped
[ https://issues.apache.org/jira/browse/FLINK-29651?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17618362#comment-17618362 ]
luoyuxia commented on FLINK-29651:
----------------------------------
I would like to fix it.
> Code gen will fail when the literal specified in user's sql hasn't be escaped
> -------------------------------------------------------------------------------
>
> Key: FLINK-29651
> URL: https://issues.apache.org/jira/browse/FLINK-29651
> Project: Flink
> Issue Type: Bug
> Components: Table SQL / Runtime
> Affects Versions: 1.15.0
> Reporter: luoyuxia
> Priority: Major
>
> Can be reproduced with the following code in Flink 1.15:
>
> {code:java}
> // testTable contains a column `field1`
> tableEnvironment
> .executeSql(
> "select *, '1' as run from testTable WHERE field1 LIKE 'b\"cd\"e%'")
> .print(); {code}
> The exception the code generated fail to compile for it will contain the following code line
>
>
> {code:java}
> private final org.apache.flink.table.data.binary.BinaryStringData str$6 =
> org.apache.flink.table.data.binary.BinaryStringData.fromString("b"cd"e"); // mismatched input 'cd' expecting ')'{code}
> Seem it's produced by this [pr]([https://github.com/apache/flink/pull/19001]) which changes the logic for generate literal.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)