KurtYoung 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_r353030027
########## File path: flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/catalog/GenericInMemoryCatalog.java ########## @@ -116,6 +116,29 @@ public void dropDatabase(String databaseName, boolean ignoreIfNotExists) // Make sure the database is empty if (isDatabaseEmpty(databaseName)) { databases.remove(databaseName); + } else if (cascade) { + // delete all tables in this database and then delete the database. + List<ObjectPath> deleteTablePaths = tables.keySet().stream() + .filter(op -> op.getDatabaseName().equals(databaseName)) Review comment: nit: format doesn't seem right ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services