You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Frans Drijver (JIRA)" <ji...@apache.org> on 2013/06/05 14:29:20 UTC

[jira] [Updated] (HIVE-4662) first_value can't have more than one order by column

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

Frans Drijver updated HIVE-4662:
--------------------------------

    Description: 
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}

  was:
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, rettr.DEVPDNR )
from RTAVP_DRKASTR kastr
;
{quote}

Error given:

{quote}
FAILED: SemanticException Range based Window Frame can have only 1 Sort Key
{quote}

    
> 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
>
> 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira