Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test in register_catalog and change to use named symbolic constants #2050

Merged
merged 1 commit into from
Mar 22, 2022

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

@github-actions github-actions bot added the datafusion Changes in the datafusion crate label Mar 21, 2022
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
datafusion Changes in the datafusion crate
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