Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/dialect/redshift.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,4 +156,8 @@ impl Dialect for RedshiftSqlDialect {
fn supports_string_literal_concatenation_with_newline(&self) -> bool {
true
}

fn supports_window_function_null_treatment_arg(&self) -> bool {
true
}
}
6 changes: 6 additions & 0 deletions tests/sqlparser_redshift.rs
Original file line number Diff line number Diff line change
Expand Up @@ -511,3 +511,9 @@ fn test_create_table_backup() {
"CREATE TABLE public.users_backup_test BACKUP YES DISTSTYLE AUTO AS SELECT id, name, email FROM public.users",
);
}

#[test]
fn test_null_treatment_inside_and_outside_window_function() {
redshift().verified_stmt("SELECT FIRST_VALUE(1 IGNORE NULLS) OVER () FROM (SELECT 1) t");
redshift().verified_stmt("SELECT FIRST_VALUE(1) IGNORE NULLS OVER () FROM (SELECT 1) t");
}
Loading