[ https://issues.apache.org/jira/browse/FLINK-17845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17345019#comment-17345019 ]
Jane Chan commented on FLINK-17845: ----------------------------------- Hi [~jark], sorry to joining this discussion late. I went through the conversion and had a question on this syntax's behavior. According to [Postgresql-doc|https://www.postgresql.org/docs/9.1/sql-altertable.html] {quote}This form resets one or more storage parameters to their defaults {quote} So I'd like to clarify that {{RESET('k1', 'k2')}} syntax is supposed to <1>remove the mentioned property keys {{'k1', 'k2' }}or <2>remove all existed options and reset the mentioned keys {{'k1', 'k2' }}to their defaults or <3>reset the mentioned keys {{'k1', 'k2' }}to their defaults and keep everything else unchanged. > 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 > Labels: stale-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)