hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aihua Xu (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-12574) windowing function returns incorrect result when the window size is larger than the partition size
Date Wed, 02 Dec 2015 21:49:11 GMT

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

Aihua Xu updated HIVE-12574:
----------------------------
    Description: 
In PTF windowing, when the partition is small and the window size is larger than the partition
size, we are seeing incorrect result.

{noformat}
CREATE TABLE sdy1(
ord int,
type string);
{noformat}

The data is:
{noformat}
2 a
3 a
1 a 
{noformat}

The result is as follows for the query {{select ord, collect_set(ord) over (partition by type
order by ord rows between 1 preceding and 7 following)}}
{noformat}
1 [1,2,3]
2 [1,2,3]
3 [1,2,3] 
{noformat}

The expected result is:
1 [1,2,3]
2 [1,2,3]
3 [2,3]
{noformat}

  was:
In PTF windowing, when the partition is small and the window size is larger than the partition
size, we are seeing incorrect result.

{noformat}
CREATE TABLE sdy1(
ord int,
type string);
{noformat]

The data is:
{noformat}
2 a
3 a
1 a 
{noformat}

The result is as follows for the query {{select ord, collect_set(ord) over (partition by type
order by ord rows between 1 preceding and 7 following) }}
{noformat}
1 [1,2,3]
2 [1,2,3]
3 [1,2,3] 
{noformat}

The expected result is:
1 [1,2,3]
2 [1,2,3]
3 [2,3]
{noformat}


> windowing function returns incorrect result when the window size is larger than the partition
size
> --------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-12574
>                 URL: https://issues.apache.org/jira/browse/HIVE-12574
>             Project: Hive
>          Issue Type: Sub-task
>          Components: PTF-Windowing
>    Affects Versions: 2.0.0
>            Reporter: Aihua Xu
>            Assignee: Aihua Xu
>             Fix For: 1.3.0, 2.0.0
>
>
> In PTF windowing, when the partition is small and the window size is larger than the
partition size, we are seeing incorrect result.
> {noformat}
> CREATE TABLE sdy1(
> ord int,
> type string);
> {noformat}
> The data is:
> {noformat}
> 2 a
> 3 a
> 1 a 
> {noformat}
> The result is as follows for the query {{select ord, collect_set(ord) over (partition
by type order by ord rows between 1 preceding and 7 following)}}
> {noformat}
> 1 [1,2,3]
> 2 [1,2,3]
> 3 [1,2,3] 
> {noformat}
> The expected result is:
> 1 [1,2,3]
> 2 [1,2,3]
> 3 [2,3]
> {noformat}



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

Mime
View raw message