Skip to content

Commit 93921d5

Browse files
author
Wojciech Padlo
committed
Snowflake: parse DESCRIBE STAGE (DescribeObjectType::Stage)
1 parent 16cedc5 commit 93921d5

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

src/ast/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9718,6 +9718,8 @@ pub enum DescribeObjectType {
97189718
Schema,
97199719
/// `TASK`
97209720
Task,
9721+
/// `STAGE`
9722+
Stage,
97219723
}
97229724

97239725
impl fmt::Display for DescribeObjectType {
@@ -9728,6 +9730,7 @@ impl fmt::Display for DescribeObjectType {
97289730
DescribeObjectType::Database => "DATABASE",
97299731
DescribeObjectType::Schema => "SCHEMA",
97309732
DescribeObjectType::Task => "TASK",
9733+
DescribeObjectType::Stage => "STAGE",
97319734
})
97329735
}
97339736
}

src/parser/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14555,13 +14555,15 @@ impl<'a> Parser<'a> {
1455514555
Keyword::DATABASE,
1455614556
Keyword::SCHEMA,
1455714557
Keyword::TASK,
14558+
Keyword::STAGE,
1455814559
]) {
1455914560
let object_type = match kw {
1456014561
Keyword::TABLE => DescribeObjectType::Table,
1456114562
Keyword::VIEW => DescribeObjectType::View,
1456214563
Keyword::DATABASE => DescribeObjectType::Database,
1456314564
Keyword::SCHEMA => DescribeObjectType::Schema,
1456414565
Keyword::TASK => DescribeObjectType::Task,
14566+
Keyword::STAGE => DescribeObjectType::Stage,
1456514567
_ => return self.expected("a describe object type", self.peek_token()),
1456614568
};
1456714569
let object_name = self.parse_object_name(false)?;

0 commit comments

Comments
 (0)