Skip to content

feat: DESC[RIBE] [TABLE] <name> #14736

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 26, 2024
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
4 changes: 2 additions & 2 deletions src/query/ast/src/parser/statement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -642,9 +642,9 @@ pub fn statement(i: Input) -> IResult<StatementWithFormat> {
);
let describe_table = map(
rule! {
( DESC | DESCRIBE ) ~ #dot_separated_idents_1_to_3
( DESC | DESCRIBE ) ~ TABLE? ~ #dot_separated_idents_1_to_3
},
|(_, (catalog, database, table))| {
|(_, _, (catalog, database, table))| {
Statement::DescribeTable(DescribeTableStmt {
catalog,
database,
Expand Down
25 changes: 25 additions & 0 deletions tests/sqllogictests/suites/base/issues/issue_14713.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# GitHub issue: https://github.com/datafuselabs/databend/issues/14713

statement ok
DROP DATABASE IF EXISTS databend0

statement ok
CREATE DATABASE databend0

statement ok
USE databend0

statement ok
CREATE TABLE t0(c0 INT, c1 FLOAT)

query TTTTT
DESC t0
----
c0 INT YES NULL (empty)
c1 FLOAT YES NULL (empty)

query TTTTT
DESC TABLE t0
----
c0 INT YES NULL (empty)
c1 FLOAT YES NULL (empty)