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/21 17:54:26 UTC

[GitHub] [arrow-datafusion] alamb commented on a change in pull request #2050: fix panic in register_catalog if default catalog not named "datafusion" and information schema enabled

alamb commented on a change in pull request #2050:
URL: https://github.com/apache/arrow-datafusion/pull/2050#discussion_r831389496



##########
File path: datafusion/src/execution/context.rs
##########
@@ -573,18 +578,10 @@ impl SessionContext {
 
         let state = self.state.lock();
         let catalog = if state.config.information_schema {
-            let is = state
-                .catalog_list
-                .catalog("datafusion")
-                .unwrap()
-                .schema("information_schema");
-            match is {
-                Some(_) => catalog,
-                None => Arc::new(CatalogWithInformationSchema::new(
-                    Arc::downgrade(&state.catalog_list),
-                    catalog,
-                )),
-            }
+            Arc::new(CatalogWithInformationSchema::new(

Review comment:
       This is the fix -- I did not understand what this special case was for (and all the tests seem to pass without it). It seems like this code will basically ignore the `catalog` parameter passed in if it finds an existing `information_schema` which doesn't seem correct to me
   
   @matthewmturner  do you remember why it was added in https://github.com/apache/arrow-datafusion/pull/1959?




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