bowenli86 commented on a change in pull request #11116: [FLINK-15349] add
'create catalog' DDL to blink planner
URL: https://github.com/apache/flink/pull/11116#discussion_r383384203
##########
File path:
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/internal/TableEnvironmentImpl.java
##########
@@ -663,6 +665,15 @@ public void sqlUpdate(String stmt) {
DropTempSystemFunctionOperation
dropTempSystemFunctionOperation =
(DropTempSystemFunctionOperation) operation;
dropSystemFunction(dropTempSystemFunctionOperation);
+ } else if (operation instanceof CreateCatalogOperation) {
+ CreateCatalogOperation createCatalogOperation =
(CreateCatalogOperation) operation;
+ String exMsg =
getDDLOpExecuteErrorMsg(createCatalogOperation.asSummaryString());
+ try {
+ catalogManager.registerCatalog(
+
createCatalogOperation.getCatalogName(), createCatalogOperation.getCatalog());
+ } catch (CatalogException e) {
+ throw new ValidationException(exMsg, e);
+ }
Review comment:
we only throw TableException(system error) and ValidationException(user
error) in table env
----------------------------------------------------------------
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