kbendick commented on a change in pull request #3573:
URL: https://github.com/apache/iceberg/pull/3573#discussion_r752006300



##########
File path: 
spark/v3.2/spark/src/main/java/org/apache/iceberg/spark/SparkCatalog.java
##########
@@ -370,13 +371,21 @@ public void alterNamespace(String[] namespace, 
NamespaceChange... changes) throw
   }
 
   @Override
-  public boolean dropNamespace(String[] namespace) throws 
NoSuchNamespaceException {
+  // Spark assumes that catalogs CASCADE by default. So we have to eagerly
+  // attempt to drop namespaces and tables, but the CASCADE keyword is still
+  // required to actually drop tables and namespaces.
+  //
+  // TODO - Somehow this got rid of the checked NoSuchNamespaceException.
+  //        I don't think we should check for it and throw if it's not present,
+  //        as we don't know if the user used `if not exists` or not.

Review comment:
       Should look into why this isn't thrown anymore.... Given that we're 
relying on Spark to handle the `ifExists` type behavior and we don't know if 
the user used that, it doesn't quite make sense to just check if the 
`namespace` exists or not.
   
   But it does seem like this should be a possibility. I think it's just no 
longer throwing _our_ `NoSuchNamespaceException`, but the one from Spark (which 
comes from Scala and thus isn't checked). But I want to be sure that something 
I did isn't swallowing them - I'm pretty sure its the bytecode issue.




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

Reply via email to