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_r332333004
 
 

 ##########
 File path: 
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/api/internal/TableEnvImpl.scala
 ##########
 @@ -412,6 +412,18 @@ abstract class TableEnvImpl(
       case dropTable: SqlDropTable =>
         val objectIdentifier = 
catalogManager.qualifyIdentifier(dropTable.fullTableName(): _*)
         catalogManager.dropTable(objectIdentifier, dropTable.getIfExists)
+      case createFunction: SqlCreateFunction =>
+        val operation = SqlToOperationConverter
+          .convert(planner, createFunction)
+          .asInstanceOf[CreateFunctionOperation]
+        val identifier = 
catalogManager.qualifyIdentifier(createFunction.fullFunctionName(): _*)
+        catalogManager.createFunction(
+          operation.getCatalogFunction,
+          identifier,
+          operation.isIgnoreIfExists)
+      case dropFunction: SqlDropFunction =>
+        val identifier = 
catalogManager.qualifyIdentifier(dropFunction.fullFunctionName(): _*)
+        catalogManager.dropFunction(identifier, dropFunction.getIfExists)
 
 Review comment:
   catalogManager.qualifyIdentifier will actually compose a full path with the 
current catalog and current database in this case.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to