hililiwei commented on code in PR #4658:
URL: https://github.com/apache/iceberg/pull/4658#discussion_r867323306
##########
flink/v1.14/flink/src/main/java/org/apache/iceberg/flink/FlinkCatalog.java:
##########
@@ -229,6 +229,20 @@ public void dropDatabase(String name, boolean
ignoreIfNotExists, boolean cascade
throws DatabaseNotExistException, DatabaseNotEmptyException,
CatalogException {
if (asNamespaceCatalog != null) {
try {
+ if (cascade) {
+ List<ObjectPath> deleteTablePaths =
icebergCatalog.listTables(toNamespace(name)).stream()
+ .map(s -> ObjectPath.fromString(s.toString()))
+ .collect(Collectors.toList());
+ deleteTablePaths.forEach(
+ objectPath -> {
+ try {
+ dropTable(objectPath, true);
+ } catch (TableNotExistException ex) {
Review Comment:
We can certainly be consistent with it, I have no objection. I just want to
confirm our deletion policy. For now, when encounter an exception other than A,
it will abort the deletion, 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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]