@@ -4310,6 +4310,40 @@ fn test_snowflake_fetch_clause_syntax() {
43104310 ) ;
43114311}
43124312
4313+ #[ test]
4314+ fn test_snowflake_begin_standalone ( ) {
4315+ // BEGIN; (no END) should be allowed for Snowflake
4316+ let mut stmts = snowflake ( ) . parse_sql_statements ( "BEGIN;" ) . unwrap ( ) ;
4317+ assert_eq ! ( 1 , stmts. len( ) ) ;
4318+ match stmts. remove ( 0 ) {
4319+ Statement :: StartTransaction {
4320+ begin,
4321+ has_end_keyword,
4322+ statements,
4323+ ..
4324+ } => {
4325+ assert ! ( begin) ;
4326+ assert ! ( !has_end_keyword) ;
4327+ assert ! ( statements. is_empty( ) ) ;
4328+ }
4329+ other => panic ! ( "unexpected stmt: {other:?}" ) ,
4330+ }
4331+ }
4332+
4333+ #[ test]
4334+ fn test_snowflake_begin_commit_sequence ( ) {
4335+ let mut stmts = snowflake ( ) . parse_sql_statements ( "BEGIN; COMMIT;" ) . unwrap ( ) ;
4336+ assert_eq ! ( 2 , stmts. len( ) ) ;
4337+ match stmts. remove ( 0 ) {
4338+ Statement :: StartTransaction { begin, .. } => assert ! ( begin) ,
4339+ other => panic ! ( "unexpected first stmt: {other:?}" ) ,
4340+ }
4341+ match stmts. remove ( 0 ) {
4342+ Statement :: Commit { end, .. } => assert ! ( !end) ,
4343+ other => panic ! ( "unexpected second stmt: {other:?}" ) ,
4344+ }
4345+ }
4346+
43134347#[ test]
43144348fn test_snowflake_create_view_with_multiple_column_options ( ) {
43154349 let create_view_with_tag =
0 commit comments