@@ -4343,6 +4343,40 @@ fn test_snowflake_fetch_clause_syntax() {
43434343 ) ;
43444344}
43454345
4346+ #[ test]
4347+ fn test_snowflake_begin_standalone ( ) {
4348+ // BEGIN; (no END) should be allowed for Snowflake
4349+ let mut stmts = snowflake ( ) . parse_sql_statements ( "BEGIN;" ) . unwrap ( ) ;
4350+ assert_eq ! ( 1 , stmts. len( ) ) ;
4351+ match stmts. remove ( 0 ) {
4352+ Statement :: StartTransaction {
4353+ begin,
4354+ has_end_keyword,
4355+ statements,
4356+ ..
4357+ } => {
4358+ assert ! ( begin) ;
4359+ assert ! ( !has_end_keyword) ;
4360+ assert ! ( statements. is_empty( ) ) ;
4361+ }
4362+ other => panic ! ( "unexpected stmt: {other:?}" ) ,
4363+ }
4364+ }
4365+
4366+ #[ test]
4367+ fn test_snowflake_begin_commit_sequence ( ) {
4368+ let mut stmts = snowflake ( ) . parse_sql_statements ( "BEGIN; COMMIT;" ) . unwrap ( ) ;
4369+ assert_eq ! ( 2 , stmts. len( ) ) ;
4370+ match stmts. remove ( 0 ) {
4371+ Statement :: StartTransaction { begin, .. } => assert ! ( begin) ,
4372+ other => panic ! ( "unexpected first stmt: {other:?}" ) ,
4373+ }
4374+ match stmts. remove ( 0 ) {
4375+ Statement :: Commit { end, .. } => assert ! ( !end) ,
4376+ other => panic ! ( "unexpected second stmt: {other:?}" ) ,
4377+ }
4378+ }
4379+
43464380#[ test]
43474381fn test_snowflake_create_view_with_multiple_column_options ( ) {
43484382 let create_view_with_tag =
0 commit comments