[ https://issues.apache.org/jira/browse/FLINK-24342?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martijn Visser updated FLINK-24342: ----------------------------------- Component/s: (was: Table SQL / API) > Filesystem sink does not escape right bracket in partition name > --------------------------------------------------------------- > > Key: FLINK-24342 > URL: https://issues.apache.org/jira/browse/FLINK-24342 > Project: Flink > Issue Type: Bug > Components: Connectors / FileSystem > Reporter: Alexander Trushev > Priority: Minor > Labels: pull-request-available > > h3. How to reproduce the problem > In the following code snippet filesystem sink creates a partition named > "\{date\}" and writes content "1" to file. > {code:scala} > val env = StreamExecutionEnvironment.getExecutionEnvironment > val tEnv = StreamTableEnvironment.create(env) > val source = env.fromElements(("{date}", 1)) > tEnv.createTemporaryView("source", source) > val sinkSql = > """ > |create table sink ( > | part string, > | content int > |) partitioned by (part) with ( > | 'connector' = 'filesystem', > | 'path' = '/tmp/sink', > | 'format' = 'csv' > |) > |""".stripMargin > tEnv.executeSql(sinkSql).await() > tEnv.executeSql("insert into sink select * from source").await() > {code} > h3. Expected behavior > Escaped "\{" and "\}" in partition name > {code} > $ ls /tmp/sink/ > part=%7Bdate%7D > {code} > h3. Actual behavior > Escaped only "\{" in partition name > {code} > $ ls /tmp/sink/ > part=%7Bdate} > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)