Details
-
Improvement
-
Status: Reopened
-
Minor
-
Resolution: Unresolved
-
3.0.0
-
None
-
None
Description
According to the ANSI SQL 2011:
<default expression> ::= <value expression> <null treatment> ::= RESPECT NULLS | IGNORE NULLS <first or last value function> ::= <first or last value> <left paren> <value expression> <right paren> [ <null treatment> ] <first or last value> ::= FIRST_VALUE | LAST_VALUE
Teradata - https://docs.teradata.com/reader/756LNiPSFdY~4JcCCcR5Cw/SUwCpTupqmlBJvi2mipOaA
Redshift – https://docs.aws.amazon.com/redshift/latest/dg/r_WF_first_value.html
Postgresql didn't implement the Ignore/respect nulls.
https://www.postgresql.org/docs/devel/functions-window.html
Note
The SQL standard defines a RESPECT NULLS or IGNORE NULLS option for lead, lag, first_value, last_value, and nth_value. This is not implemented in PostgreSQL: the behavior is always the same as the standard's default, namely RESPECT NULLS.
Attachments
Issue Links
- is duplicated by
-
SPARK-30726 ANSI SQL: FIRST_VALUE function
- Closed
-
SPARK-30727 ANSI SQL: LAST_VALUE function
- Closed
- relates to
-
SPARK-33459 Commonly used Teradata extension syntax
- Open
- links to