You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "PatrickRen (via GitHub)" <gi...@apache.org> on 2023/07/13 09:29:20 UTC
[GitHub] [flink] PatrickRen commented on a diff in pull request #22869: [FLINK-32403][table] Add database related operations in CatalogManager
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org