You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "jackye1995 (via GitHub)" <gi...@apache.org> on 2023/05/09 04:24:24 UTC
[GitHub] [iceberg] jackye1995 commented on a diff in pull request #7275: Spark 3.3: drop_namespace with CASCADE support
jackye1995 commented on code in PR #7275:
URL: https://github.com/apache/iceberg/pull/7275#discussion_r1188102874
##########
api/src/main/java/org/apache/iceberg/catalog/SessionCatalog.java:
##########
@@ -309,6 +309,17 @@ default List<Namespace> listNamespaces(SessionContext context) {
*/
boolean dropNamespace(SessionContext context, Namespace namespace);
+ /**
+ * Drop a namespace. If the namespace exists and was dropped, this will return true.
+ *
+ * @param context session context
+ * @param namespace a {@link Namespace namespace}
+ * @param cascade – When true, deletes all objects under the namespace
Review Comment:
Glue by default does cascade drop if just call `glue.deleteDatabase`, but does not drop data in the table. So technically you can support that directly. But I am okay to publish another PR to support that, up to you.
For doing purge or not, I think the behavior of cascade is not clearly specified in Spark. It could also be argued as something that is catalog-specific, just like the behavior of Hive and Glue are different and it will be difficult to satisfy the other behavior on both sides.
This is related to the issue about different behaviors of list namespace that comes up recently. Maybe we should make a page documenting all catalogs and their different behaviors.
+1 to have a devlist discussion thread first.
--
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