You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Krisztian Kasa (Jira)" <ji...@apache.org> on 2021/03/11 17:42:00 UTC

[jira] [Resolved] (HIVE-24865) Implement Respect/Ignore Nulls in first/last_value

     [ https://issues.apache.org/jira/browse/HIVE-24865?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Krisztian Kasa resolved HIVE-24865.
-----------------------------------
    Resolution: Fixed

Pushed to master. Thanks [~jcamachorodriguez] for review.

> Implement Respect/Ignore Nulls in first/last_value
> --------------------------------------------------
>
>                 Key: HIVE-24865
>                 URL: https://issues.apache.org/jira/browse/HIVE-24865
>             Project: Hive
>          Issue Type: Improvement
>          Components: Parser, UDF
>            Reporter: Krisztian Kasa
>            Assignee: Krisztian Kasa
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> {code:java}
> <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}
> Example:
> {code:java}
> select last_value(b) ignore nulls over(partition by a order by b) from t1;
> {code}
> Existing non-standard implementation:
> {code:java}
> select last_value(b, true) over(partition by a order by b) from t1;
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)