alamb commented on code in PR #25112:
URL: https://github.com/apache/datafusion/pull/25112#discussion_r4097087154
##########
datafusion/session/src/catalog.rs:
##########
@@ -171,6 +182,14 @@ pub trait CatalogProvider: Any + Debug + Sync + Send {
) -> Result<Option<Arc<dyn SchemaProvider>>> {
not_impl_err!("Deregistering new schemas is not supported")
}
+
+ /// Called when a catalog is being dropped. Implementations can use this
hook
+ /// to prevent a catalog from being dropped if it is not empty.
+ ///
+ /// By default returns a "Not Implemented" error
+ fn prepare_deregister_catalog(&self, _cascade: bool) -> Result<()> {
Review Comment:
I don't fully understand why this can't be implemented in deregister_catalog
(why couldn't a deregister_catalog call simply return an error if it wasn't
empty 🤔 )
--
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]