bowenli86 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_r352765408
 
 

 ##########
 File path: 
flink-table/flink-table-common/src/main/java/org/apache/flink/table/catalog/Catalog.java
 ##########
 @@ -144,7 +144,26 @@ void createDatabase(String name, CatalogDatabase 
database, boolean ignoreIfExist
         * @throws DatabaseNotExistException if the given database does not 
exist
         * @throws CatalogException in case of any runtime exception
         */
-       void dropDatabase(String name, boolean ignoreIfNotExists) throws 
DatabaseNotExistException,
+       default void dropDatabase(String name, boolean ignoreIfNotExists) 
throws DatabaseNotExistException,
+                       DatabaseNotEmptyException, CatalogException{
+               dropDatabase(name, ignoreIfNotExists, true);
+       }
+
+       /**
+        * Drop a database.
+        *
+        * @param name              Name of the database to be dropped.
+        * @param ignoreIfNotExists Flag to specify behavior when the database 
does not exist:
+        *                          if set to false, throw an exception,
+        *                          if set to true, do nothing.
+        * @param restrict         Flag to specify behavior when the database 
contains table:
+        *                          if set to false, delete all tables in the 
database and then delete the database,
 
 Review comment:
   what about functions?

----------------------------------------------------------------
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

Reply via email to