snowflake: fix rendering of SELECT TOP (#1070)

This commit is contained in:
Joey Hain 2023-12-22 10:43:31 -08:00 committed by GitHub
parent 1baec96685
commit 2950a843c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 53 additions and 11 deletions

View file

@ -1147,3 +1147,11 @@ fn parse_pivot_of_table_factor_derived() {
"SELECT * FROM (SELECT place_id, weekday, open FROM times AS p) PIVOT(max(open) FOR weekday IN (0, 1, 2, 3, 4, 5, 6)) AS p (place_id, open_sun, open_mon, open_tue, open_wed, open_thu, open_fri, open_sat)"
);
}
#[test]
fn parse_top() {
snowflake().one_statement_parses_to(
"SELECT TOP 4 c1 FROM testtable",
"SELECT TOP 4 c1 FROM testtable",
);
}