You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/03/22 10:51:41 UTC
[GitHub] [arrow-datafusion] alamb commented on a change in pull request #2052: Allow `CatalogProvider::register_catalog` to return an error
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org