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/04 14:37:46 UTC

[GitHub] [flink-table-store] zjureel commented on a diff in pull request #416: [FLINK-30271] Introduce Table.copy from dynamic options

zjureel commented on code in PR #416:
URL: https://github.com/apache/flink-table-store/pull/416#discussion_r1038981579


##########
flink-table-store-core/src/main/java/org/apache/flink/table/store/table/AbstractFileStoreTable.java:
##########
@@ -40,6 +47,43 @@ public AbstractFileStoreTable(Path path, TableSchema tableSchema) {
 
     protected abstract FileStore<?> store();
 
+    protected abstract FileStoreTable copy(TableSchema newTableSchema);
+
+    @Override
+    public FileStoreTable copy(Map<String, String> dynamicOptions) {
+        // check option is not immutable
+        Map<String, String> options = tableSchema.options();
+        dynamicOptions.forEach(
+                (k, v) -> {
+                    if (!Objects.equals(v, options.get(k))) {

Review Comment:
   Should the immutable field be exist in the dynamic parameters? Maybe it's better to `SchemaManager.checkAlterTableOption(k)` without comparing the value



-- 
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