You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/05/07 07:21:23 UTC
[GitHub] [iceberg] Zephyr589 commented on a diff in pull request #4658: Flink: Support drop non-empty namespace with CASCADE
Zephyr589 commented on code in PR #4658:
URL: https://github.com/apache/iceberg/pull/4658#discussion_r867317038
##########
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 ignore it, and drop other tables.
--
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@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org