[
https://issues.apache.org/jira/browse/FLINK-17845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17142575#comment-17142575
]
Jark Wu commented on FLINK-17845:
---------------------------------
> I thought users can add arbitrary properties for a table, no?
This is determined by the connector implementation. AFAIK, all the built-in
connectors (except {{FileSystem}} connector) doesn't allow unsupported
properties.
> Can't remove a table connector property with ALTER TABLE
> --------------------------------------------------------
>
> Key: FLINK-17845
> URL: https://issues.apache.org/jira/browse/FLINK-17845
> Project: Flink
> Issue Type: Bug
> Components: Table SQL / API
> Reporter: Fabian Hueske
> Priority: Major
>
> It is not possible to remove an existing table property from a table.
> Looking at the [source
> code|https://github.com/apache/flink/blob/master/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/sqlexec/SqlToOperationConverter.java#L295]
> this seems to be the intended semantics, but it seems counter-intuitive to
> me.
> If I create a table with the following statement:
> {code}
> CREATE TABLE `testTable` (
> id INT
> )
> WITH (
> 'connector.type' = 'kafka',
> 'connector.version' = 'universal',
> 'connector.topicX' = 'test', -- Woops, I made a typo here
> [...]
> )
> {code}
> The statement will be successfully executed. However, the table cannot be
> used due to the typo.
> Fixing the typo with the following DDL is not possible:
> {code}
> ALTER TABLE `testTable` SET (
> 'connector.type' = 'kafka',
> 'connector.version' = 'universal',
> 'connector.topic' = 'test', -- Fixing the typo
> )
> {code}
> because the key {{connector.topicX}} is not removed.
> Right now it seems that the only way to fix a table with an invalid key is to
> DROP and CREATE it. I think that this use case should be supported by ALTER
> TABLE.
> I would even argue that the expected behavior is that previous properties are
> removed and replaced by the new properties.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)