ebyhr commented on code in PR #16096:
URL: https://github.com/apache/iceberg/pull/16096#discussion_r3151100583
##########
spark/v4.1/spark/src/main/java/org/apache/iceberg/spark/SparkCatalog.java:
##########
@@ -483,6 +483,18 @@ public void alterNamespace(String[] namespace,
NamespaceChange... changes)
@Override
public boolean dropNamespace(String[] namespace, boolean cascade)
throws NoSuchNamespaceException {
+ if (cascade) {
+ for (String[] ns : listNamespaces(namespace)) {
+ dropNamespace(ns, true);
+ }
+ for (Identifier view : listViews(namespace)) {
+ dropView(view);
+ }
+ for (Identifier table : listTables(namespace)) {
+ dropTable(table);
+ }
Review Comment:
Those methods return arrays. I updated views / tables lines with
`Arrays.stream`. Skipped namespace line because the method throws
NoSuchNamespaceException which requires additional try-catch.
--
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]