alamb commented on a change in pull request #2052:
URL: https://github.com/apache/arrow-datafusion/pull/2052#discussion_r832032134
##########
File path: datafusion/src/catalog/catalog.rs
##########
@@ -110,12 +111,23 @@ pub trait CatalogProvider: Sync + Send {
fn schema(&self, name: &str) -> Option<Arc<dyn SchemaProvider>>;
/// Adds a new schema to this catalog.
- /// If a schema of the same name existed before, it is replaced in the
catalog and returned.
+ ///
+ /// If a schema of the same name existed before, it is replaced in
+ /// the catalog and returned.
+ ///
+ /// By default returns a "Not Implemented" error
fn register_schema(
&self,
name: &str,
schema: Arc<dyn SchemaProvider>,
- ) -> Option<Arc<dyn SchemaProvider>>;
+ ) -> Result<Option<Arc<dyn SchemaProvider>>> {
Review comment:
this is the change -- return `Result` here (and add a default impl that
returns error)
--
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]