PatrickRen commented on code in PR #22869:
URL: https://github.com/apache/flink/pull/22869#discussion_r1262279404


##########
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/operations/ddl/AlterDatabaseOperation.java:
##########
@@ -70,10 +69,13 @@ public String asSummaryString() {
 
     @Override
     public TableResultInternal execute(Context ctx) {
-        Catalog catalog = 
ctx.getCatalogManager().getCatalogOrThrowException(getCatalogName());
         try {
-            catalog.alterDatabase(getDatabaseName(), getCatalogDatabase(), 
false);
+            ctx.getCatalogManager()
+                    .alterDatabase(
+                            getCatalogName(), getDatabaseName(), 
getCatalogDatabase(), false);
             return TableResultImpl.TABLE_RESULT_OK;
+        } catch (ValidationException e) {
+            throw e;

Review Comment:
   Do we need to catch the `ValidationException` if we just re-throw it without 
any additional action? Same question as in `CreateDatabaseOperation` and 
`DropDatabaseOperation`. 



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

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to