snuyanzin commented on code in PR #25834:
URL: https://github.com/apache/flink/pull/25834#discussion_r1957361662


##########
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/catalog/CatalogManager.java:
##########
@@ -1512,18 +1513,52 @@ public void createTemporaryModel(
     /**
      * Alters a model in a given fully qualified path.
      *
-     * @param modelChange The model containing only changes
+     * @param newModel The new model containing changes. It could be null if 
the model to alter
+     *     doesn't exist
+     * @param modelChanges The changes to apply to the model.
      * @param objectIdentifier The fully qualified path where to alter the 
model.
      * @param ignoreIfNotExists If false exception will be thrown if the model 
to be altered does
      *     not exist.
      */
     public void alterModel(
-            CatalogModel modelChange,
+            @Nullable CatalogModel newModel,
+            List<ModelChange> modelChanges,
             ObjectIdentifier objectIdentifier,
             boolean ignoreIfNotExists) {
         execute(
                 (catalog, path) -> {
-                    ResolvedCatalogModel resolvedModel = 
resolveCatalogModel(modelChange);
+                    ResolvedCatalogModel resolvedModel =
+                            newModel == null ? null : 
resolveCatalogModel(newModel);
+                    catalog.alterModel(path, resolvedModel, modelChanges, 
ignoreIfNotExists);

Review Comment:
   I wonder if there is a reason to pass non-existing model as a `null` further 
rather than applying similar behavior as for `alterTable`?



-- 
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-unsubscr...@flink.apache.org

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

Reply via email to