[
https://issues.apache.org/jira/browse/FLINK-24342?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Flink Jira Bot updated FLINK-24342:
-----------------------------------
Labels: pull-request-available stale-minor (was: pull-request-available)
I am the [Flink Jira Bot|https://github.com/apache/flink-jira-bot/] and I help
the community manage its development. I see this issues has been marked as
Minor but is unassigned and neither itself nor its Sub-Tasks have been updated
for 180 days. I have gone ahead and marked it "stale-minor". If this ticket is
still Minor, please either assign yourself or give an update. Afterwards,
please remove the label or in 7 days the issue will be deprioritized.
> 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, stale-minor
>
> 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.20.1#820001)