diff --git a/datafusion/core/src/catalog_common/mod.rs b/datafusion/core/src/catalog_common/mod.rs index 68c78dda4899..9827f259bd13 100644 --- a/datafusion/core/src/catalog_common/mod.rs +++ b/datafusion/core/src/catalog_common/mod.rs @@ -156,6 +156,8 @@ pub fn resolve_table_references( | Statement::ShowColumns { .. } | Statement::ShowTables { .. } | Statement::ShowCollation { .. } + | Statement::ShowSchemas { .. } + | Statement::ShowDatabases { .. } ); if requires_information_schema { for s in INFORMATION_SCHEMA_TABLES { diff --git a/datafusion/core/src/execution/session_state.rs b/datafusion/core/src/execution/session_state.rs index c5874deb6ed5..19d0fae207be 100644 --- a/datafusion/core/src/execution/session_state.rs +++ b/datafusion/core/src/execution/session_state.rs @@ -285,7 +285,9 @@ impl SessionState { .build() } - pub(crate) fn resolve_table_ref( + /// Resolves a [`TableReference`] to a [`ResolvedTableReference`] + /// using the default catalog and schema. + pub fn resolve_table_ref( &self, table_ref: impl Into, ) -> ResolvedTableReference { @@ -845,9 +847,9 @@ impl SessionState { overwrite: bool, ) -> Result<(), DataFusionError> { let ext = file_format.get_ext().to_lowercase(); - match (self.file_formats.entry(ext.clone()), overwrite){ - (Entry::Vacant(e), _) => {e.insert(file_format);}, - (Entry::Occupied(mut e), true) => {e.insert(file_format);}, + match (self.file_formats.entry(ext.clone()), overwrite) { + (Entry::Vacant(e), _) => { e.insert(file_format); } + (Entry::Occupied(mut e), true) => { e.insert(file_format); } (Entry::Occupied(_), false) => return config_err!("File type already registered for extension {ext}. Set overwrite to true to replace this extension."), }; Ok(())