@@ -1072,6 +1072,10 @@ pub struct Function {
10721072 /// Some(true) for ASC, Some(false) for DESC
10731073 pub order_by : Vec < OrderByExpr > ,
10741074 pub limit : Option < Box < Expr > > ,
1075+ // for snowflake - this goes outside of the parens
1076+ // https://docs.snowflake.com/en/sql-reference/functions/first_value.html
1077+ /// Some(true) for IGNORE NULLS, Some(false) for RESPECT NULLS
1078+ pub outer_ignore_respect_nulls : Option < bool > ,
10751079}
10761080
10771081impl fmt:: Display for Function {
@@ -1084,7 +1088,7 @@ impl fmt::Display for Function {
10841088 display_comma_separated( & self . args) ,
10851089 ) ?;
10861090 if let Some ( b) = self . ignore_respect_nulls {
1087- write ! ( f, " {} NULLS" , if b { "IGNORE" } else { "RESPECT" } ) ?;
1091+ write ! ( f, " {} NULLS" , if b { "IGNORE" } else { "RESPECT" } ) ?;
10881092 }
10891093 if !self . order_by . is_empty ( ) {
10901094 write ! ( f, " ORDER BY " ) ?;
@@ -1098,6 +1102,9 @@ impl fmt::Display for Function {
10981102 write ! ( f, " LIMIT {}" , lim) ?;
10991103 }
11001104 write ! ( f, ")" ) ?;
1105+ if let Some ( b) = self . outer_ignore_respect_nulls {
1106+ write ! ( f, " {} NULLS" , if b { "IGNORE" } else { "RESPECT" } ) ?;
1107+ }
11011108 if !self . within_group . is_empty ( ) {
11021109 write ! (
11031110 f,
0 commit comments