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

Allow register_catalog to return an Error #2051

Closed
alamb opened this issue Mar 21, 2022 · 0 comments · Fixed by #2052
Closed

Allow register_catalog to return an Error #2051

alamb opened this issue Mar 21, 2022 · 0 comments · Fixed by #2052
Assignees
Labels
enhancement New feature or request

Comments

@alamb
Copy link
Contributor

alamb commented Mar 21, 2022

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
We have a custom catalog implementation in IOx that implements SchemaProvider. However, in our usecase I don't want to allow users to register new schemas via SQL (and would like to return an Error about 'not supported')

However, the current API only returns a Option:

https://github.com/apache/arrow-datafusion/blob/3ec0d55c736aecef5051311e639836aecbde7f51/datafusion/src/catalog/catalog.rs#L150-L154

Describe the solution you'd like
return a Result<Option<.>> and default the implementation to "registering new schemas is not supported"

Additional context
Found while updating datafusion in IOx: #2048

@alamb alamb added the enhancement New feature or request label Mar 21, 2022
@alamb alamb changed the title Ticket 2: Allow register_catalog to return an error Allow register_catalog to return an error Mar 21, 2022
@alamb alamb self-assigned this Mar 21, 2022
@alamb alamb changed the title Allow register_catalog to return an error Allow register_catalog to return an Error Mar 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant