Fix: Snowflake ALTER SESSION cannot be followed by other statements. (#1786)

Co-authored-by: Roman Borschel <roman@cluvio.com>
This commit is contained in:
Roman Borschel 2025-03-31 18:09:58 +02:00 committed by GitHub
parent 25bb871175
commit 45420cedd6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 20 additions and 6 deletions

View file

@ -3505,3 +3505,14 @@ fn test_alter_session() {
);
snowflake().one_statement_parses_to("ALTER SESSION UNSET a\nB", "ALTER SESSION UNSET a, B");
}
#[test]
fn test_alter_session_followed_by_statement() {
let stmts = snowflake()
.parse_sql_statements("ALTER SESSION SET QUERY_TAG='hello'; SELECT 42")
.unwrap();
match stmts[..] {
[Statement::AlterSession { .. }, Statement::Query { .. }] => {}
_ => panic!("Unexpected statements: {:?}", stmts),
}
}