You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/12/23 10:15:34 UTC

[GitHub] [flink] fsk119 opened a new pull request, #21554: [FLINK-30493][table-api] Introduce TableChange to SET/RESET options

fsk119 opened a new pull request, #21554:
URL: https://github.com/apache/flink/pull/21554

   <!--
   *Thank you very much for contributing to Apache Flink - we are happy that you want to help us improve Flink. To help the community review your contribution in the best possible way, please go through the checklist below, which will get the contribution into a shape in which it can be best reviewed.*
   
   *Please understand that we do not do this to make contributions to Flink a hassle. In order to uphold a high standard of quality for code contributions, while at the same time managing a large number of contributions, we need contributors to prepare the contributions well, and give reviewers enough contextual information for the review. Please also understand that contributions that do not follow this guide will take longer to review and thus typically be picked up with lower priority by the community.*
   
   ## Contribution Checklist
   
     - Make sure that the pull request corresponds to a [JIRA issue](https://issues.apache.org/jira/projects/FLINK/issues). Exceptions are made for typos in JavaDoc or documentation files, which need no JIRA issue.
     
     - Name the pull request in the form "[FLINK-XXXX] [component] Title of the pull request", where *FLINK-XXXX* should be replaced by the actual issue number. Skip *component* if you are unsure about which is the best component.
     Typo fixes that have no associated JIRA issue should be named following this pattern: `[hotfix] [docs] Fix typo in event time introduction` or `[hotfix] [javadocs] Expand JavaDoc for PuncuatedWatermarkGenerator`.
   
     - Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review.
     
     - Make sure that the change passes the automated tests, i.e., `mvn clean verify` passes. You can set up Azure Pipelines CI to do that following [this guide](https://cwiki.apache.org/confluence/display/FLINK/Azure+Pipelines#AzurePipelines-Tutorial:SettingupAzurePipelinesforaforkoftheFlinkrepository).
   
     - Each pull request should address only one issue, not mix up code from multiple issues.
     
     - Each commit in the pull request has a meaningful commit message (including the JIRA id)
   
     - Once all items of the checklist are addressed, remove the above text and this checklist, leaving only the filled out template below.
   
   
   **(The sections below can be removed for hotfixes of typos)**
   -->
   
   ## What is the purpose of the change
   
   *Introduce TableChange to represent ALTER TABLE SET/RESET syntax*
   
   
   ## Brief change log
   
     - *Introduce TableChange API*
     - *Add Catalog method to alter table with table changes.*
     - *Use AlterTableChangeOperation to represents set/reset*
   
   
   ## Verifying this change
   
   Add change in SqlToOperationConverter to make sure the Operation contains the expected changes.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (yes / **no**)
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (**yes** / no)
     - The serializers: (yes / **no** / don't know)
     - The runtime per-record code paths (performance sensitive): (yes / **no** / don't know)
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (yes / **no** / don't know)
     - The S3 file system connector: (yes / **no** / don't know)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (**yes** / no)
     - If yes, how is the feature documented? (not applicable / docs / **JavaDocs** / not documented)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] LadyForest commented on a diff in pull request #21554: [FLINK-30493][table-api] Introduce TableChange to SET/RESET options

Posted by GitBox <gi...@apache.org>.
LadyForest commented on code in PR #21554:
URL: https://github.com/apache/flink/pull/21554#discussion_r1057409885


##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/operations/SqlToOperationConverter.java:
##########
@@ -595,10 +596,16 @@ private Operation convertAlterTableOptions(
                     new CatalogPartitionImpl(newProps, catalogPartition.getComment()));
         } else {
             // it's altering a table
-            Map<String, String> newOptions = new HashMap<>(oldTable.getOptions());
-            newOptions.putAll(
-                    OperationConverterUtils.extractProperties(alterTableOptions.getPropertyList()));
-            return new AlterTableOptionsOperation(tableIdentifier, oldTable.copy(newOptions));
+            Map<String, String> newOptions =

Review Comment:
   Nit: the naming of `newOptions` and `allOptions` is a little confusing. What about `changeOptions` and `newOptions`?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] fsk119 merged pull request #21554: [FLINK-30493][table-api] Introduce TableChange to SET/RESET options

Posted by GitBox <gi...@apache.org>.
fsk119 merged PR #21554:
URL: https://github.com/apache/flink/pull/21554


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] fsk119 commented on pull request #21554: [FLINK-30493][table-api] Introduce TableChange to SET/RESET options

Posted by GitBox <gi...@apache.org>.
fsk119 commented on PR #21554:
URL: https://github.com/apache/flink/pull/21554#issuecomment-1365651199

   > Is it deprecated now? 
   
   Yes. I think the `AlterTableOptionsOperation ` is deprecated. Considering it's totally internal, we may remove this directly? WDYT?
   
   > I sawHiveParserDDLSemanticAnalyzer#convertAlterTableProps still refer to it.
   
   Thanks for pointing it out, I will add a commit to remove the usage. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] LadyForest commented on a diff in pull request #21554: [FLINK-30493][table-api] Introduce TableChange to SET/RESET options

Posted by GitBox <gi...@apache.org>.
LadyForest commented on code in PR #21554:
URL: https://github.com/apache/flink/pull/21554#discussion_r1057423443


##########
flink-table/flink-table-common/src/main/java/org/apache/flink/table/catalog/TableChange.java:
##########
@@ -0,0 +1,164 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.catalog;
+
+import org.apache.flink.annotation.PublicEvolving;
+
+import java.util.Objects;
+
+/** {@link TableChange} represents the modification of the table. */
+@PublicEvolving
+public interface TableChange {
+
+    /**
+     * A table change to set the table option.
+     *
+     * <p>It is equal to the following statement:
+     *
+     * <pre>
+     *    ALTER TABLE &lt;table_name&gt; SET '&lt;key&gt;' = '&lt;value&gt;';
+     * </pre>
+     *
+     * @param key the option name to set.
+     * @param value the option value to set.
+     * @return a TableChange represents the modification.
+     */
+    static SetOption set(String key, String value) {
+        return new SetOption(key, value);
+    }
+
+    /**
+     * A table change to reset the table option.
+     *
+     * <p>It is equal to the following statement:
+     *
+     * <pre>
+     *    ALTER TABLE &lt;table_name&gt; RESET '&lt;key&gt;'
+     * </pre>
+     *
+     * @param key the option name to reset.
+     * @return a TableChange represents the modification.
+     */
+    static ResetOption reset(String key) {
+        return new ResetOption(key);
+    }
+
+    // --------------------------------------------------------------------------------------------
+    // Property change
+    // --------------------------------------------------------------------------------------------
+
+    /**
+     * A table change to set the table option.
+     *
+     * <p>It is equal to the following statement:
+     *
+     * <pre>
+     *    ALTER TABLE &lt;table_name&gt; SET '&lt;key&gt;' = '&lt;value&gt;';
+     * </pre>
+     */
+    @PublicEvolving
+    class SetOption implements TableChange {
+
+        private final String key;
+        private final String value;
+
+        private SetOption(String key, String value) {
+            this.key = key;
+            this.value = value;
+        }
+
+        /** Returns the Option key to set. */
+        public String getKey() {
+            return key;
+        }
+
+        /** Returns the Option value to set. */
+        public String getValue() {
+            return value;
+        }
+
+        @Override
+        public boolean equals(Object o) {
+            if (this == o) {
+                return true;
+            }
+            if (!(o instanceof SetOption)) {
+                return false;
+            }
+            SetOption setOption = (SetOption) o;
+            return Objects.equals(key, setOption.key) && Objects.equals(value, setOption.value);
+        }
+
+        @Override
+        public int hashCode() {
+            return Objects.hash(key, value);
+        }
+
+        @Override
+        public String toString() {
+            return "SetOption{" + "key='" + key + '\'' + ", value='" + value + '\'' + '}';
+        }
+    }
+
+    /**
+     * A table change to reset the table option.
+     *
+     * <p>It is equal to the following statement:
+     *
+     * <pre>
+     *    ALTER TABLE &lt;table_name&gt; RESET '&lt;key&gt;'
+     * </pre>
+     */
+    @PublicEvolving
+    class ResetOption implements TableChange {
+
+        private final String key;
+
+        public ResetOption(String key) {
+            this.key = key;
+        }
+
+        /** Returns the Option key to reset. */
+        public String getKey() {
+            return key;
+        }
+
+        @Override
+        public boolean equals(Object o) {
+            if (this == o) {
+                return true;
+            }
+            if (!(o instanceof ResetOption)) {
+                return false;
+            }
+            ResetOption that = (ResetOption) o;
+            return Objects.equals(key, that.key);
+        }
+
+        @Override
+        public int hashCode() {
+            return Objects.hash(key);
+        }
+
+        @Override
+        public String toString() {
+            return "ResetOption{" + "key='" + key + '\'' + '}';
+        }
+    }

Review Comment:
   Nit: Is it mandatory to add `toString`, `equals`, and `hashCode`?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] LadyForest commented on a diff in pull request #21554: [FLINK-30493][table-api] Introduce TableChange to SET/RESET options

Posted by GitBox <gi...@apache.org>.
LadyForest commented on code in PR #21554:
URL: https://github.com/apache/flink/pull/21554#discussion_r1057411111


##########
flink-table/flink-table-common/src/main/java/org/apache/flink/table/catalog/TableChange.java:
##########
@@ -0,0 +1,162 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.catalog;
+
+import org.apache.flink.annotation.PublicEvolving;
+
+import java.util.Objects;
+
+/** {@link TableChange} represents the modification of the table. */
+@PublicEvolving
+public interface TableChange {
+
+    /**
+     * A table change to set the table option.
+     *
+     * <p>It is equal to the following statement:
+     *
+     * <pre>
+     *    ALTER TABLE &lt;table_name&gt; SET '&lt;key&gt;' = '&lt;value&gt;';
+     * </pre>
+     *
+     * @param key the option name to set.
+     * @param value the option value to set.
+     * @return a TableChange represents the modification.
+     */
+    static SetOption set(String key, String value) {
+        return new SetOption(key, value);
+    }
+
+    /**
+     * A table change to reset the table option.
+     *
+     * <p>It is equal to the following statement:
+     *
+     * <pre>
+     *    ALTER TABLE &lt;table_name&gt; RESET '&lt;key&gt;'
+     * </pre>
+     *
+     * @param key the option name to reset.
+     * @return a TableChange represents the modification.
+     */
+    static ResetOption reset(String key) {
+        return new ResetOption(key);
+    }
+
+    // --------------------------------------------------------------------------------------------
+    // Property change
+    // --------------------------------------------------------------------------------------------
+
+    /**
+     * A table change to set the table option.
+     *
+     * <p>It is equal to the following statement:
+     *
+     * <pre>
+     *    ALTER TABLE &lt;table_name&gt; SET '&lt;key&gt;' = '&lt;value&gt;';
+     * </pre>
+     */
+    class SetOption implements TableChange {

Review Comment:
   Add `@PublicEvolving` annotation?



##########
flink-table/flink-table-common/src/main/java/org/apache/flink/table/catalog/TableChange.java:
##########
@@ -0,0 +1,162 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.catalog;
+
+import org.apache.flink.annotation.PublicEvolving;
+
+import java.util.Objects;
+
+/** {@link TableChange} represents the modification of the table. */
+@PublicEvolving
+public interface TableChange {
+
+    /**
+     * A table change to set the table option.
+     *
+     * <p>It is equal to the following statement:
+     *
+     * <pre>
+     *    ALTER TABLE &lt;table_name&gt; SET '&lt;key&gt;' = '&lt;value&gt;';
+     * </pre>
+     *
+     * @param key the option name to set.
+     * @param value the option value to set.
+     * @return a TableChange represents the modification.
+     */
+    static SetOption set(String key, String value) {
+        return new SetOption(key, value);
+    }
+
+    /**
+     * A table change to reset the table option.
+     *
+     * <p>It is equal to the following statement:
+     *
+     * <pre>
+     *    ALTER TABLE &lt;table_name&gt; RESET '&lt;key&gt;'
+     * </pre>
+     *
+     * @param key the option name to reset.
+     * @return a TableChange represents the modification.
+     */
+    static ResetOption reset(String key) {
+        return new ResetOption(key);
+    }
+
+    // --------------------------------------------------------------------------------------------
+    // Property change
+    // --------------------------------------------------------------------------------------------
+
+    /**
+     * A table change to set the table option.
+     *
+     * <p>It is equal to the following statement:
+     *
+     * <pre>
+     *    ALTER TABLE &lt;table_name&gt; SET '&lt;key&gt;' = '&lt;value&gt;';
+     * </pre>
+     */
+    class SetOption implements TableChange {
+
+        private final String key;
+        private final String value;
+
+        private SetOption(String key, String value) {
+            this.key = key;
+            this.value = value;
+        }
+
+        /** Returns the Option key to set. */
+        public String getKey() {
+            return key;
+        }
+
+        /** Returns the Option value to set. */
+        public String getValue() {
+            return value;
+        }
+
+        @Override
+        public boolean equals(Object o) {
+            if (this == o) {
+                return true;
+            }
+            if (!(o instanceof SetOption)) {
+                return false;
+            }
+            SetOption setOption = (SetOption) o;
+            return Objects.equals(key, setOption.key) && Objects.equals(value, setOption.value);
+        }
+
+        @Override
+        public int hashCode() {
+            return Objects.hash(key, value);
+        }
+
+        @Override
+        public String toString() {
+            return "SetOption{" + "key='" + key + '\'' + ", value='" + value + '\'' + '}';
+        }
+    }
+
+    /**
+     * A table change to reset the table option.
+     *
+     * <p>It is equal to the following statement:
+     *
+     * <pre>
+     *    ALTER TABLE &lt;table_name&gt; RESET '&lt;key&gt;'
+     * </pre>
+     */
+    class ResetOption implements TableChange {

Review Comment:
   ditto



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] flinkbot commented on pull request #21554: [FLINK-30493][table-api] Introduce TableChange to SET/RESET options

Posted by GitBox <gi...@apache.org>.
flinkbot commented on PR #21554:
URL: https://github.com/apache/flink/pull/21554#issuecomment-1363821088

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "7069b3ac86229d0157bc72db30c9a1875882fc29",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "7069b3ac86229d0157bc72db30c9a1875882fc29",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 7069b3ac86229d0157bc72db30c9a1875882fc29 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] fsk119 commented on pull request #21554: [FLINK-30493][table-api] Introduce TableChange to SET/RESET options

Posted by GitBox <gi...@apache.org>.
fsk119 commented on PR #21554:
URL: https://github.com/apache/flink/pull/21554#issuecomment-1365030894

   @flinkbot run azure


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] LadyForest commented on pull request #21554: [FLINK-30493][table-api] Introduce TableChange to SET/RESET options

Posted by GitBox <gi...@apache.org>.
LadyForest commented on PR #21554:
URL: https://github.com/apache/flink/pull/21554#issuecomment-1365585827

   Hi @fsk119, thanks for the contribution; it looks good in general. I have one question about `AlterTableOptionsOption`. Is it deprecated now? I saw`HiveParserDDLSemanticAnalyzer#convertAlterTableProps` still refer to it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] fsk119 commented on a diff in pull request #21554: [FLINK-30493][table-api] Introduce TableChange to SET/RESET options

Posted by GitBox <gi...@apache.org>.
fsk119 commented on code in PR #21554:
URL: https://github.com/apache/flink/pull/21554#discussion_r1057475505


##########
flink-table/flink-table-common/src/main/java/org/apache/flink/table/catalog/TableChange.java:
##########
@@ -0,0 +1,164 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.catalog;
+
+import org.apache.flink.annotation.PublicEvolving;
+
+import java.util.Objects;
+
+/** {@link TableChange} represents the modification of the table. */
+@PublicEvolving
+public interface TableChange {
+
+    /**
+     * A table change to set the table option.
+     *
+     * <p>It is equal to the following statement:
+     *
+     * <pre>
+     *    ALTER TABLE &lt;table_name&gt; SET '&lt;key&gt;' = '&lt;value&gt;';
+     * </pre>
+     *
+     * @param key the option name to set.
+     * @param value the option value to set.
+     * @return a TableChange represents the modification.
+     */
+    static SetOption set(String key, String value) {
+        return new SetOption(key, value);
+    }
+
+    /**
+     * A table change to reset the table option.
+     *
+     * <p>It is equal to the following statement:
+     *
+     * <pre>
+     *    ALTER TABLE &lt;table_name&gt; RESET '&lt;key&gt;'
+     * </pre>
+     *
+     * @param key the option name to reset.
+     * @return a TableChange represents the modification.
+     */
+    static ResetOption reset(String key) {
+        return new ResetOption(key);
+    }
+
+    // --------------------------------------------------------------------------------------------
+    // Property change
+    // --------------------------------------------------------------------------------------------
+
+    /**
+     * A table change to set the table option.
+     *
+     * <p>It is equal to the following statement:
+     *
+     * <pre>
+     *    ALTER TABLE &lt;table_name&gt; SET '&lt;key&gt;' = '&lt;value&gt;';
+     * </pre>
+     */
+    @PublicEvolving
+    class SetOption implements TableChange {
+
+        private final String key;
+        private final String value;
+
+        private SetOption(String key, String value) {
+            this.key = key;
+            this.value = value;
+        }
+
+        /** Returns the Option key to set. */
+        public String getKey() {
+            return key;
+        }
+
+        /** Returns the Option value to set. */
+        public String getValue() {
+            return value;
+        }
+
+        @Override
+        public boolean equals(Object o) {
+            if (this == o) {
+                return true;
+            }
+            if (!(o instanceof SetOption)) {
+                return false;
+            }
+            SetOption setOption = (SetOption) o;
+            return Objects.equals(key, setOption.key) && Objects.equals(value, setOption.value);
+        }
+
+        @Override
+        public int hashCode() {
+            return Objects.hash(key, value);
+        }
+
+        @Override
+        public String toString() {
+            return "SetOption{" + "key='" + key + '\'' + ", value='" + value + '\'' + '}';
+        }
+    }
+
+    /**
+     * A table change to reset the table option.
+     *
+     * <p>It is equal to the following statement:
+     *
+     * <pre>
+     *    ALTER TABLE &lt;table_name&gt; RESET '&lt;key&gt;'
+     * </pre>
+     */
+    @PublicEvolving
+    class ResetOption implements TableChange {
+
+        private final String key;
+
+        public ResetOption(String key) {
+            this.key = key;
+        }
+
+        /** Returns the Option key to reset. */
+        public String getKey() {
+            return key;
+        }
+
+        @Override
+        public boolean equals(Object o) {
+            if (this == o) {
+                return true;
+            }
+            if (!(o instanceof ResetOption)) {
+                return false;
+            }
+            ResetOption that = (ResetOption) o;
+            return Objects.equals(key, that.key);
+        }
+
+        @Override
+        public int hashCode() {
+            return Objects.hash(key);
+        }
+
+        @Override
+        public String toString() {
+            return "ResetOption{" + "key='" + key + '\'' + '}';
+        }
+    }

Review Comment:
   I think TableChange is a pojo class here. So I add these helpful methods for use.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org