Skip to content

Commit 46bf5ed

Browse files
author
Wojciech Padlo
committed
Snowflake: parse DESCRIBE STAGE (DescribeObjectType::Stage)
1 parent b7529a2 commit 46bf5ed

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
@@ -9683,6 +9683,8 @@ pub enum DescribeObjectType {
96839683
Schema,
96849684
/// `TASK`
96859685
Task,
9686+
/// `STAGE`
9687+
Stage,
96869688
}
96879689

96889690
impl fmt::Display for DescribeObjectType {
@@ -9693,6 +9695,7 @@ impl fmt::Display for DescribeObjectType {
96939695
DescribeObjectType::Database => "DATABASE",
96949696
DescribeObjectType::Schema => "SCHEMA",
96959697
DescribeObjectType::Task => "TASK",
9698+
DescribeObjectType::Stage => "STAGE",
96969699
})
96979700
}
96989701
}

src/parser/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14501,13 +14501,15 @@ impl<'a> Parser<'a> {
1450114501
Keyword::DATABASE,
1450214502
Keyword::SCHEMA,
1450314503
Keyword::TASK,
14504+
Keyword::STAGE,
1450414505
]) {
1450514506
let object_type = match kw {
1450614507
Keyword::TABLE => DescribeObjectType::Table,
1450714508
Keyword::VIEW => DescribeObjectType::View,
1450814509
Keyword::DATABASE => DescribeObjectType::Database,
1450914510
Keyword::SCHEMA => DescribeObjectType::Schema,
1451014511
Keyword::TASK => DescribeObjectType::Task,
14512+
Keyword::STAGE => DescribeObjectType::Stage,
1451114513
_ => unreachable!(),
1451214514
};
1451314515
let object_name = self.parse_object_name(false)?;

0 commit comments

Comments
 (0)