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


##########
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/internal/TableEnvironmentImpl.java:
##########
@@ -564,6 +565,36 @@ public boolean createView(String path, Table view, boolean 
ignoreIfExists) {
         return catalogManager.createTable(tableTable, viewIdentifier, 
ignoreIfExists);
     }
 
+    @Override
+    public void createModel(String path, ModelDescriptor descriptor, boolean 
ignoreIfExists) {
+        Preconditions.checkNotNull(path, "Path must not be null.");
+        Preconditions.checkNotNull(descriptor, "Model descriptor must not be 
null.");
+        final ObjectIdentifier objectIdentifier =
+                
catalogManager.qualifyIdentifier(getParser().parseIdentifier(path));
+        catalogManager.createModel(descriptor.toCatalogModel(), 
objectIdentifier, ignoreIfExists);
+    }
+
+    @Override
+    public void createModel(String path, ModelDescriptor descriptor) {
+        createModel(path, descriptor, false);
+    }
+
+    @Override
+    public void createTemporaryModel(String path, ModelDescriptor descriptor) {
+        createTemporaryModel(path, descriptor, false);
+    }
+
+    @Override
+    public void createTemporaryModel(
+            String path, ModelDescriptor descriptor, boolean ignoreIfExists) {
+        Preconditions.checkNotNull(path, "Path must not be null.");
+        Preconditions.checkNotNull(descriptor, "Model descriptor must not be 
null.");
+        final ObjectIdentifier objectIdentifier =
+                
catalogManager.qualifyIdentifier(getParser().parseIdentifier(path));

Review Comment:
   nit: could be extracted into a separate private method with replacement all 
occurrences 



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