[
https://issues.apache.org/jira/browse/FLINK-22878?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17360719#comment-17360719
]
Timo Walther edited comment on FLINK-22878 at 6/11/21, 7:52 AM:
----------------------------------------------------------------
We found a solution that should solve this problem without touching the general
ConfigOption design too much. For ConfigOptions of MapType, we propose to
extend the syntax to two possible representations:
Current syntax:
{code}
value.avro-confluent.properties = schema: 1, other-prop: 2
{code}
Pro: constant key space
Con: difficult to read or modify
Additional syntax (but lower precedence):
{code}
value.avro-confluent.properties.schema = 1
value.avro-confluent.properties.other-prop = 2
{code}
Pro: individual string properties can be replaced easily, matches with what is
already exposed in table factories
Con: non-constant key space
It would be made available via `ReadableConfig.get[Optional]`.
`WritableConfig.set` would remain unchanged.
was (Author: twalthr):
We found a solution that should solve this problem without touching the general
ConfigOption design too much. For ConfigOptions of MapType, we propose to
extend the syntax to two possible representations:
Current syntax:
{code}
value.avro-confluent.properties = schema: 1, other-prop: 2
{code}
Pro: constant key space
Con: difficult to read or modify
Additional syntax (but lower precedence):
{code}
value.avro-confluent.properties.schema = 1
value.avro-confluent.properties.other-prop = 2
{code}
Pro: individual string properties can be replaced easily, matches with what is
already exposed in table factories
Con: non-constant key space
It would be made available via `ReadableConfig.get[Optional]`.
`ReadableConfig.set` would remain unchanged.
> Allow placeholder options in format factories
> ---------------------------------------------
>
> Key: FLINK-22878
> URL: https://issues.apache.org/jira/browse/FLINK-22878
> Project: Flink
> Issue Type: Sub-task
> Components: Table SQL / API
> Reporter: Timo Walther
> Assignee: Timo Walther
> Priority: Major
>
> The current factory design does not allow placeholder options in
> {{EncodingFormatFactory}} or {{DecodingFormatFactory}}.
> The past has shown that placeholder options are used at a couple of locations.
> See FLINK-22475 or {{KafkaOptions#PROPERTIES_PREFIX}}.
> We should think about adding an additional functionality to
> {{ReadableConfig}} or a special {{ConfigOption}} type to finally solve this
> problem. This could also be useful for FLIP-129. And would solve the [current
> shortcomings for Confluent Avro
> registry|https://github.com/apache/flink/pull/15808#discussion_r645494282].
--
This message was sent by Atlassian Jira
(v8.3.4#803005)