hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jesus Camacho Rodriguez (JIRA)" <>
Subject [jira] [Commented] (HIVE-4662) first_value can't have more than one order by column
Date Wed, 16 Mar 2016 18:44:33 GMT


Jesus Camacho Rodriguez commented on HIVE-4662:

[~ashutoshc], if {{range unbounded preceding}} is used for row_number(), we throw the following
exception (line 402, PTFTranslator):

Expecting right window frame boundary for function row_number()...

The reason is by default, {{range unbounded preceding}} is transformed into {{range between
unbounded preceding and current row}} (this is correct). However, GenericUDAFRowNumber sets
_supportsWindow_ to false, and thus, it can only be used with {{between unbounded preceding
and unbounded following}}. Hence, I propose we study this into more detail and maybe we solve
it in a follow-up issue, as it seems it is unrelated to this one.

What do you think? Is it OK to check this one in?

> first_value can't have more than one order by column
> ----------------------------------------------------
>                 Key: HIVE-4662
>                 URL:
>             Project: Hive
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 0.11.0
>            Reporter: Frans Drijver
>            Assignee: Jesus Camacho Rodriguez
>         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

View raw message