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 2019/09/27 16:43:37 UTC

[GitHub] [flink] HuangZhenQiu commented on a change in pull request #9689: [FLINK-7151] add a basic function ddl

HuangZhenQiu commented on a change in pull request #9689: [FLINK-7151] add a basic function ddl
URL: https://github.com/apache/flink/pull/9689#discussion_r329159775
 
 

 ##########
 File path: flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/internal/TableEnvironmentImpl.java
 ##########
 @@ -351,6 +353,21 @@ public void sqlUpdate(String stmt) {
 			DropTableOperation dropTableOperation = (DropTableOperation) operation;
 			ObjectIdentifier objectIdentifier = catalogManager.qualifyIdentifier(dropTableOperation.getTableName());
 			catalogManager.dropTable(objectIdentifier, dropTableOperation.isIfExists());
+		} else if (operation instanceof CreateFunctionOperation) {
+			CreateFunctionOperation createFunctionOperation = (CreateFunctionOperation) operation;
+			ObjectIdentifier objectIdentifier =
+				catalogManager.qualifyIdentifier(createFunctionOperation.getFunctionPath());
+			catalogManager.createFunction(
+				createFunctionOperation.getCatalogFunction(),
+				objectIdentifier,
+				createFunctionOperation.isIgnoreIfExists());
+		} else if (operation instanceof DropTableOperation) {
 
 Review comment:
   Good catch. 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services