epgif commented on code in PR #16401: URL: https://github.com/apache/datafusion/pull/16401#discussion_r2155260272
########## datafusion/catalog/src/schema.rs: ########## @@ -54,6 +55,14 @@ pub trait SchemaProvider: Debug + Sync + Send { name: &str, ) -> Result<Option<Arc<dyn TableProvider>>, DataFusionError>; + /// Retrieves the type of a specific table from the schema by name, if it exists, otherwise + /// returns `None`. Implementations for which this operation is cheap but [Self::table] is + /// expensive can override this to improve operations that only need the type, e.g. + /// `SELECT * FROM information_schema.tables`. + async fn table_type(&self, name: &str) -> Result<Option<TableType>, DataFusionError> { Review Comment: All references in the test are also already `datafusion_common::Result`, thanks to `use super::*`. However, as before, this one can be simplified as `DataFusionError` is already the default. The only reason the code I added is like that is it's copied and pasted from what is already here. -- 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-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org