dchvn commented on a change in pull request #35246:
URL: https://github.com/apache/spark/pull/35246#discussion_r792396103
##########
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:
Do you mean we should keep the old API `dropNamespace(String[]
namespace)`, and add a new API `dropNamespace( String[] namespace, boolean
cascade)`? @HyukjinKwon
--
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]