[ https://issues.apache.org/jira/browse/SPARK-28310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17030284#comment-17030284 ]
Dongjoon Hyun commented on SPARK-28310: --------------------------------------- This is reverted via https://github.com/apache/spark/pull/27458 . > ANSI SQL grammar support: first_value/last_value(expression, [RESPECT NULLS | > IGNORE NULLS]) > -------------------------------------------------------------------------------------------- > > Key: SPARK-28310 > URL: https://issues.apache.org/jira/browse/SPARK-28310 > Project: Spark > Issue Type: Improvement > Components: SQL > Affects Versions: 3.0.0 > Reporter: Zhu, Lipeng > Priority: Minor > > According to the ANSI SQL 2011: > {code:sql} > <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 > {code} > Teradata - > [https://docs.teradata.com/reader/756LNiPSFdY~4JcCCcR5Cw/SUwCpTupqmlBJvi2mipOaA] > > Oracle - > [https://docs.oracle.com/en/database/oracle/oracle-database/18/sqlrf/FIRST_VALUE.html#GUID-D454EC3F-370C-4C64-9B11-33FCB10D95EC] > 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] > h3. 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}}. > -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org