hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ashutosh Chauhan (JIRA)" <>
Subject [jira] [Updated] (HIVE-4109) Partition by column does not have to be in order by
Date Fri, 29 Mar 2013 06:27:15 GMT


Ashutosh Chauhan updated HIVE-4109:

    Attachment: HIVE-4109.patch

First query works. Added test case in the patch and verified results against pg. Second doesn't
because of multiple sort columns without a window frame restriction. Though a close variant
of that does work. Added it as testcase.
> Partition by column does not have to be in order by
> ---------------------------------------------------
>                 Key: HIVE-4109
>                 URL:
>             Project: Hive
>          Issue Type: Bug
>          Components: PTF-Windowing
>            Reporter: Brock Noland
>         Attachments: HIVE-4109.patch
> Cam up in the review of HIVE-4093.
> Ashutosh
> {noformat}
> I am not sure if this is illegal query. I tried following two queries in postgres, both
of them succeeded.
> select p_mfgr, avg(p_retailprice) over(partition by p_mfgr, p_type order by p_mfgr) from
> select p_mfgr, avg(p_retailprice) over(partition by p_mfgr order by p_type,p_mfgr) from
> {noformat}
> Harish
> {noformat}
> The first one doesn't make sense, right? Order on a subset of the partition columns
> The second one: Can we do this with the Hive ReduceOp have the orderColumns be in a different
order than the key columns?
> {noformat}

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:

View raw message