datafusion
datafusion copied to clipboard
`SchemaProvider::table` should return `Result`
Is your feature request related to a problem or challenge?
SchemaProvider::table is async and clearly allows IO:
https://github.com/apache/arrow-datafusion/blob/6fad5ed7a37c50b9c200f214c3e13b0e1f0cecbc/datafusion/core/src/catalog/schema.rs#L114-L116
However this method cannot fail. Casting errors to None is semantically wrong.
Describe the solution you'd like
Change return type from Option<Arc<dyn TableProvider>> to Result<Option<Arc<dyn TableProvider>>, DataFusionError>.
Describe alternatives you've considered
-
Additional context
No response