Allow to use the TABLE keyword in DESC|DESCRIBE|EXPLAIN TABLE statement (#1351)

This commit is contained in:
hulk 2024-07-30 05:16:29 +08:00 committed by GitHub
parent 547d82f07d
commit 7fdb2ec5d1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 42 additions and 12 deletions

View file

@ -7972,10 +7972,13 @@ impl<'a> Parser<'a> {
_ => {}
}
// only allow to use TABLE keyword for DESC|DESCRIBE statement
let has_table_keyword = self.parse_keyword(Keyword::TABLE);
let table_name = self.parse_object_name(false)?;
Ok(Statement::ExplainTable {
describe_alias,
hive_format,
has_table_keyword,
table_name,
})
}