KurtYoung commented on a change in pull request #10296: [FLINK-14691][table]Add 
use/create/drop/alter database operation and support it in flink/blink planner
URL: https://github.com/apache/flink/pull/10296#discussion_r353028839
 
 

 ##########
 File path: 
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/internal/TableEnvironmentImpl.java
 ##########
 @@ -469,21 +479,84 @@ public void sqlUpdate(String stmt) {
                                createTableOperation.getCatalogTable(),
                                createTableOperation.getTableIdentifier(),
                                createTableOperation.isIgnoreIfExists());
+               } else if (operation instanceof CreateDatabaseOperation) {
+                       CreateDatabaseOperation createDatabaseOperation = 
(CreateDatabaseOperation) operation;
+                       Catalog catalog = 
getCatalogOrThrowException(createDatabaseOperation.getCatalogName());
+                       String exMsg = getDDLOpExecuteErrorMsg("CREATE 
DATABASE", createDatabaseOperation.getCatalogName());
 
 Review comment:
   replace `CREATE DATABASE` with `createDatabaseOperation.asSummaryString`? 
And you don't need provide catalog name anymore

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to