Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions datafusion/core/src/catalog_common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
10 changes: 6 additions & 4 deletions datafusion/core/src/execution/session_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<TableReference>,
) -> ResolvedTableReference {
Expand Down Expand Up @@ -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(())
Expand Down
Loading