@@ -4302,6 +4302,40 @@ fn test_snowflake_fetch_clause_syntax() {
43024302 ) ;
43034303}
43044304
4305+ #[ test]
4306+ fn test_snowflake_begin_standalone ( ) {
4307+ // BEGIN; (no END) should be allowed for Snowflake
4308+ let mut stmts = snowflake ( ) . parse_sql_statements ( "BEGIN;" ) . unwrap ( ) ;
4309+ assert_eq ! ( 1 , stmts. len( ) ) ;
4310+ match stmts. remove ( 0 ) {
4311+ Statement :: StartTransaction {
4312+ begin,
4313+ has_end_keyword,
4314+ statements,
4315+ ..
4316+ } => {
4317+ assert ! ( begin) ;
4318+ assert ! ( !has_end_keyword) ;
4319+ assert ! ( statements. is_empty( ) ) ;
4320+ }
4321+ other => panic ! ( "unexpected stmt: {other:?}" ) ,
4322+ }
4323+ }
4324+
4325+ #[ test]
4326+ fn test_snowflake_begin_commit_sequence ( ) {
4327+ let mut stmts = snowflake ( ) . parse_sql_statements ( "BEGIN; COMMIT;" ) . unwrap ( ) ;
4328+ assert_eq ! ( 2 , stmts. len( ) ) ;
4329+ match stmts. remove ( 0 ) {
4330+ Statement :: StartTransaction { begin, .. } => assert ! ( begin) ,
4331+ other => panic ! ( "unexpected first stmt: {other:?}" ) ,
4332+ }
4333+ match stmts. remove ( 0 ) {
4334+ Statement :: Commit { end, .. } => assert ! ( !end) ,
4335+ other => panic ! ( "unexpected second stmt: {other:?}" ) ,
4336+ }
4337+ }
4338+
43054339#[ test]
43064340fn test_snowflake_create_view_with_multiple_column_options ( ) {
43074341 let create_view_with_tag =
0 commit comments