You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/01/26 03:24:44 UTC
[GitHub] [spark] HyukjinKwon commented on a change in pull request #35246: [SPARK-37929][SQL] Support cascade mode for `dropNamespace` API
HyukjinKwon commented on a change in pull request #35246:
URL: https://github.com/apache/spark/pull/35246#discussion_r792289685
##########
File path: sql/catalyst/src/main/java/org/apache/spark/sql/connector/catalog/SupportsNamespaces.java
##########
@@ -136,15 +137,20 @@ void alterNamespace(
NamespaceChange... changes) throws NoSuchNamespaceException;
/**
- * Drop a namespace from the catalog, recursively dropping all objects within the namespace.
+ * Drop a namespace from the catalog with cascade mode, recursively dropping all objects
+ * within the namespace if cascade is true.
* <p>
* If the catalog implementation does not support this operation, it may throw
* {@link UnsupportedOperationException}.
*
* @param namespace a multi-part namespace
+ * @param cascade When true, deletes all objects under the namespace
* @return true if the namespace was dropped
* @throws NoSuchNamespaceException If the namespace does not exist (optional)
+ * @throws NonEmptyNamespaceException If the namespace is non-empty and cascade is false
* @throws UnsupportedOperationException If drop is not a supported operation
*/
- boolean dropNamespace(String[] namespace) throws NoSuchNamespaceException;
+ boolean dropNamespace(
+ String[] namespace,
+ boolean cascade) throws NoSuchNamespaceException, NonEmptyNamespaceException;
Review comment:
Wait .. this API was added in 3.0.0 at SPARK-27661. Shouldn't we have overwritten version to keep the backward compatibility?
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org