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 @@ -7824,6 +7824,7 @@ pub enum ObjectType {
78247824 Stage ,
78257825 Type ,
78267826 User ,
7827+ Stream ,
78277828}
78287829
78297830impl fmt:: Display for ObjectType {
@@ -7840,6 +7841,7 @@ impl fmt::Display for ObjectType {
78407841 ObjectType :: Stage => "STAGE" ,
78417842 ObjectType :: Type => "TYPE" ,
78427843 ObjectType :: User => "USER" ,
7844+ ObjectType :: Stream => "STREAM" ,
78437845 } )
78447846 }
78457847}
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 @@ -16357,3 +16357,21 @@ fn parse_create_user() {
1635716357 _ => unreachable!(),
1635816358 }
1635916359}
16360+
16361+ #[test]
16362+ fn parse_drop_stream() {
16363+ let sql = "DROP STREAM s1";
16364+ match verified_stmt(sql) {
16365+ Statement::Drop {
16366+ names, object_type, ..
16367+ } => {
16368+ assert_eq!(
16369+ vec!["s1"],
16370+ names.iter().map(ToString::to_string).collect::<Vec<_>>()
16371+ );
16372+ assert_eq!(ObjectType::Stream, object_type);
16373+ }
16374+ _ => unreachable!(),
16375+ }
16376+ verified_stmt("DROP STREAM IF EXISTS s1");
16377+ }
You can’t perform that action at this time.
0 commit comments