File tree Expand file tree Collapse file tree 4 files changed +23
-0
lines changed Expand file tree Collapse file tree 4 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -7835,6 +7835,7 @@ pub enum ObjectType {
78357835 Stage ,
78367836 Type ,
78377837 User ,
7838+ Stream ,
78387839}
78397840
78407841impl fmt:: Display for ObjectType {
@@ -7851,6 +7852,7 @@ impl fmt::Display for ObjectType {
78517852 ObjectType :: Stage => "STAGE" ,
78527853 ObjectType :: Type => "TYPE" ,
78537854 ObjectType :: User => "USER" ,
7855+ ObjectType :: Stream => "STREAM" ,
78547856 } )
78557857 }
78567858}
Original file line number Diff line number Diff line change @@ -870,6 +870,7 @@ define_keywords!(
870870 STORAGE_SERIALIZATION_POLICY ,
871871 STORED ,
872872 STRAIGHT_JOIN ,
873+ STREAM ,
873874 STRICT ,
874875 STRING ,
875876 STRUCT ,
Original file line number Diff line number Diff line change @@ -6325,6 +6325,8 @@ impl<'a> Parser<'a> {
63256325 ObjectType::Type
63266326 } else if self.parse_keyword(Keyword::USER) {
63276327 ObjectType::User
6328+ } else if self.parse_keyword(Keyword::STREAM) {
6329+ ObjectType::Stream
63286330 } else if self.parse_keyword(Keyword::FUNCTION) {
63296331 return self.parse_drop_function();
63306332 } else if self.parse_keyword(Keyword::POLICY) {
Original file line number Diff line number Diff line change @@ -16359,3 +16359,21 @@ fn parse_create_user() {
1635916359 _ => unreachable!(),
1636016360 }
1636116361}
16362+
16363+ #[test]
16364+ fn parse_drop_stream() {
16365+ let sql = "DROP STREAM s1";
16366+ match verified_stmt(sql) {
16367+ Statement::Drop {
16368+ names, object_type, ..
16369+ } => {
16370+ assert_eq!(
16371+ vec!["s1"],
16372+ names.iter().map(ToString::to_string).collect::<Vec<_>>()
16373+ );
16374+ assert_eq!(ObjectType::Stream, object_type);
16375+ }
16376+ _ => unreachable!(),
16377+ }
16378+ verified_stmt("DROP STREAM IF EXISTS s1");
16379+ }
You can’t perform that action at this time.
0 commit comments