pan3793 commented on issue #3541:
URL: https://github.com/apache/iceberg/issues/3541#issuecomment-972460374


   Spark already told us the dropNamespace should be act as `CASCADE`
   
   Spark `interface SupportsNamespaces extends CatalogPlugin`
   ```
     /**
      * Drop a namespace from the catalog, **recursively dropping all objects 
within the namespace.**
      * .....
      */
     boolean dropNamespace(String[] namespace) throws NoSuchNamespaceException;
   ```
   
   And in `DropNamespaceExec`, Spark know the `CASCADE` flag, and handled by 
   
   ```
         if (!cascade) {
           if (catalog.asTableCatalog.listTables(ns).nonEmpty
             || nsCatalog.listNamespaces(ns).nonEmpty) {
             throw 
QueryExecutionErrors.cannotDropNonemptyNamespaceError(namespace)
           }
         }
   
         if (!nsCatalog.dropNamespace(ns)) {
           throw 
QueryExecutionErrors.cannotDropNonemptyNamespaceError(namespace)
         }
   ```
   


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