File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -71,6 +71,12 @@ impl Dialect for SnowflakeDialect {
7171 true
7272 }
7373
74+ // Snowflake doesn't document this but `FIRST_VALUE(arg, { IGNORE | RESPECT } NULLS)`
75+ // works (i.e. inside the argument list instead of after).
76+ fn supports_window_function_null_treatment_arg ( & self ) -> bool {
77+ true
78+ }
79+
7480 /// See [doc](https://docs.snowflake.com/en/sql-reference/sql/set#syntax)
7581 fn supports_parenthesized_set_variables ( & self ) -> bool {
7682 true
Original file line number Diff line number Diff line change @@ -1576,3 +1576,12 @@ fn test_select_wildcard_with_ilike_replace() {
15761576 "sql parser error: Expected end of statement, found: EXCLUDE"
15771577 ) ;
15781578}
1579+
1580+ #[ test]
1581+ fn first_value_ignore_nulls ( ) {
1582+ snowflake ( ) . verified_only_select ( concat ! (
1583+ "SELECT FIRST_VALUE(column2 IGNORE NULLS) " ,
1584+ "OVER (PARTITION BY column1 ORDER BY column2) " ,
1585+ "FROM some_table"
1586+ ) ) ;
1587+ }
You can’t perform that action at this time.
0 commit comments