lewiszlw commented on code in PR #10420: URL: https://github.com/apache/datafusion/pull/10420#discussion_r1594159897
########## datafusion/core/src/catalog/information_schema.rs: ########## @@ -225,34 +213,31 @@ impl InformationSchemaConfig { #[async_trait] impl SchemaProvider for InformationSchemaProvider { - fn as_any(&self) -> &(dyn Any + 'static) { + fn as_any(&self) -> &dyn Any { self } fn table_names(&self) -> Vec<String> { - vec![ - TABLES.to_string(), - VIEWS.to_string(), - COLUMNS.to_string(), - DF_SETTINGS.to_string(), - SCHEMATA.to_string(), - ] + INFORMATION_SCHEMA_TABLES + .iter() + .map(|t| t.to_string()) + .collect() } async fn table( &self, name: &str, ) -> Result<Option<Arc<dyn TableProvider>>, DataFusionError> { let config = self.config.clone(); - let table: Arc<dyn PartitionStream> = if name.eq_ignore_ascii_case("tables") { + let table: Arc<dyn PartitionStream> = if name.eq_ignore_ascii_case(TABLES) { Arc::new(InformationSchemaTables::new(config)) - } else if name.eq_ignore_ascii_case("columns") { + } else if name.eq_ignore_ascii_case(COLUMNS) { Arc::new(InformationSchemaColumns::new(config)) - } else if name.eq_ignore_ascii_case("views") { + } else if name.eq_ignore_ascii_case(VIEWS) { Arc::new(InformationSchemaViews::new(config)) - } else if name.eq_ignore_ascii_case("df_settings") { + } else if name.eq_ignore_ascii_case(DF_SETTINGS) { Arc::new(InformationSchemaDfSettings::new(config)) - } else if name.eq_ignore_ascii_case("schemata") { + } else if name.eq_ignore_ascii_case(SCHEMATA) { Arc::new(InformationSchemata::new(config)) } else { return Ok(None); Review Comment: Cannot commit this change due to "Applying suggestions on deleted lines is currently not supported.". I'll change it myself. -- 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