[ 
https://issues.apache.org/jira/browse/HIVE-4662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15199146#comment-15199146
 ] 

Lefty Leverenz commented on HIVE-4662:
--------------------------------------

Doc note:  This should be documented in the Windowing and Analytics wikidoc for 
release 2.1.0.

* [Windowing and Analytics -- Enhancements to HiveQL -- FIRST_VALUE | 
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+WindowingAndAnalytics#LanguageManualWindowingAndAnalytics-EnhancementstoHiveQL]
* [Windowing and Analytics -- Examples (none yet) | 
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+WindowingAndAnalytics#LanguageManualWindowingAndAnalytics-Examples]

Also, [~the6campbells] wrote:

{quote}
not just first value
select c1, c2, sum ( c3 ) over ( partition by c1 order by c2, c3 ) from t
{quote}

So does the patch cover more than just first_value?  A release note would be 
helpful.

> first_value can't have more than one order by column
> ----------------------------------------------------
>
>                 Key: HIVE-4662
>                 URL: https://issues.apache.org/jira/browse/HIVE-4662
>             Project: Hive
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 0.11.0
>            Reporter: Frans Drijver
>            Assignee: Jesus Camacho Rodriguez
>              Labels: TODOC2.1
>             Fix For: 2.1.0
>
>         Attachments: HIVE-4662.01.patch, HIVE-4662.01.patch, 
> HIVE-4662.01.patch, HIVE-4662.patch
>
>
> In the current implementation of the first_value function, it's not allowed 
> to have more than one (1) order by column, as so:
> {quote}
> select distinct 
> first_value(kastr.DEWNKNR) over ( partition by kastr.DEKTRNR order by 
> kastr.DETRADT, kastr.DEVPDNR )
> from RTAVP_DRKASTR kastr
> ;
> {quote}
> Error given:
> {quote}
> FAILED: SemanticException Range based Window Frame can have only 1 Sort Key
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to