Skip to content

Commit 038047c

Browse files
committed
fix cargo
1 parent 426c6d3 commit 038047c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

datafusion/sql/src/statement.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,9 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
754754
return not_impl_err!("SHOW COLUMNS LIMIT FROM not supported")?;
755755
}
756756
if filter_position.is_some() {
757-
return not_impl_err!("SHOW COLUMNS with WHERE or LIKE is not supported")?;
757+
return not_impl_err!(
758+
"SHOW COLUMNS with WHERE or LIKE is not supported"
759+
)?;
758760
}
759761
let Some(ShowStatementIn {
760762
// specifies if the syntax was `SHOW COLUMNS IN` or `SHOW
@@ -1919,6 +1921,12 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
19191921
self.options.enable_ident_normalization,
19201922
);
19211923

1924+
if !self.has_table("information_schema", "columns") {
1925+
return plan_err!(
1926+
"SHOW COLUMNS is not supported unless information_schema is enabled"
1927+
);
1928+
}
1929+
19221930
// Do a table lookup to verify the table exists
19231931
let table_ref = self.object_name_to_table_reference(sql_table_name)?;
19241932
let _ = self.context_provider.get_table_source(table_ref)?;

0 commit comments

Comments
 (0)