jaylmiller commented on code in PR #6096:
URL: https://github.com/apache/arrow-datafusion/pull/6096#discussion_r1181088912


##########
datafusion/core/src/catalog/catalog.rs:
##########
@@ -124,6 +124,26 @@ pub trait CatalogProvider: Sync + Send {
             "Registering new schemas is not supported".to_string(),
         ))
     }
+
+    /// Removes a schema from this catalog. Implementations of this method 
should return
+    /// errors if the schema exists but cannot be dropped. For example, in 
DataFusion's
+    /// default in-memory catalog, [`MemoryCatalogProvider`], a non-empty 
schema
+    /// will only be successfully dropped when `cascade` is true.
+    /// This is equivalent to how DROP SCHEMA works in PostgreSQL.
+    ///
+    /// Implementations of this method should return None if schema with 
`name` does
+    /// cannot be found.
+    ///
+    /// By default returns a "Not Implemented" error
+    fn deregister_schema(
+        &self,
+        _name: &str,
+        _cascade: bool,
+    ) -> Result<Option<Arc<dyn SchemaProvider>>> {

Review Comment:
   Moved cascade logic into the `CatalogProvider` as per suggestion



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

Reply via email to