Skip to content

Conversation

@alamb
Copy link
Contributor

@alamb alamb commented Mar 21, 2022

Which issue does this PR close?

Closes #2049

Rationale for this change

code panic! if information table is enabled but default catalog is named something different

Update: 🤔 the bug seems to have been fixed in #2029 -- I still think this PR has value to add tests

What changes are included in this PR?

  1. Fix panic
  2. Use named symbolic constants rather than hard coded strings

Are there any user-facing changes?

image

catalog,
)),
}
Arc::new(CatalogWithInformationSchema::new(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 #1959?

@alamb alamb force-pushed the alamb/fix_register_schema branch from f3f5765 to 7adcfba Compare March 21, 2022 20:15
@alamb alamb changed the title fix panic in register_catalog if default catalog not named "datafusion" and information schema enabled Add test in register_catalog and change to use named symbolic constants Mar 21, 2022
@alamb alamb merged commit f5c0cea into apache:master Mar 22, 2022
@alamb alamb deleted the alamb/fix_register_schema branch March 22, 2022 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

panic in register_catalog if default catalog not named "datafusion" and information schema enabled

2 participants