snuyanzin commented on a change in pull request #17831:
URL: https://github.com/apache/flink/pull/17831#discussion_r754615035
##########
File path:
flink-table/flink-table-common/src/main/java/org/apache/flink/table/catalog/Catalog.java
##########
@@ -206,6 +206,22 @@ void dropDatabase(String name, boolean ignoreIfNotExists,
boolean cascade)
void alterDatabase(String name, CatalogDatabase newDatabase, boolean
ignoreIfNotExists)
throws DatabaseNotExistException, CatalogException;
+ /**
+ * Rename an existing database.
+ *
+ * @param name name of the database to be renamed
+ * @param newDatabaseName new name of the database
+ * @param ignoreIfNotExists flag to specify behavior when database does
not exist: if set to
+ * false, throw an exception, if set to true, do nothing
+ * @throws DatabaseNotExistException if the database does not exist
+ * @throws DatabaseAlreadyExistException if the database with
newDatabaseName already exists
+ * @throws CatalogException in case of any runtime exception
Review comment:
Probably it is questionable and should be rephrased....
because for example in implementation it is used
`org.apache.flink.table.catalog.GenericInMemoryCatalog#databaseExists` which
could fail with `java.lang.IllegalArgumentException` which is
`RuntimeException`. So it will not be caught and rethrown with
`CatalogException`
--
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]