hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jesus Camacho Rodriguez (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-13982) Extension to limit push down through order by & group by
Date Fri, 10 Jun 2016 18:20:21 GMT

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

Jesus Camacho Rodriguez updated HIVE-13982:
-------------------------------------------
    Description: 
Pointed out by [~gopalv].

Queries which follow the format are not optimal with map-side aggregation, because the Map
1 does not have TopN in the reduce sink.

These queries shuffle 100% of the aggregate in cases where the reduce de-dup does not kick
in. 

{code}
select state, city, sum(sales) from table
group by state, city
order by state, city
limit 10;
{code}

{code}
select state, city, sum(sales) from table
group by city, state
order by state, city
limit 10;
{code}

{code}
select state, city, sum(sales) from table
group by city, state
order by state desc, city
limit 10;
{code}

  was:
Pointed out by [~gopalv].

Queries which follow the format are not optimal with map-side aggregation, because the Map
1 does not have TopN in the reduce sink.

These queries shuffle 100% of the aggregate in cases where the reduce de-dup does not kick
in. 

As input data grows, it falls off a cliff of performance after 4 reducers.

{code}
select state, city, sum(sales) from table
group by state, city
order by state, city
limit 10;
{code}

{code}
select state, city, sum(sales) from table
group by city, state
order by state, city
limit 10;
{code}

{code}
select state, city, sum(sales) from table
group by city, state
order by state desc, city
limit 10;
{code}


> Extension to limit push down through order by & group by
> --------------------------------------------------------
>
>                 Key: HIVE-13982
>                 URL: https://issues.apache.org/jira/browse/HIVE-13982
>             Project: Hive
>          Issue Type: Improvement
>          Components: Physical Optimizer
>    Affects Versions: 2.2.0
>            Reporter: Jesus Camacho Rodriguez
>            Assignee: Jesus Camacho Rodriguez
>         Attachments: HIVE-13982.2.patch, HIVE-13982.patch
>
>
> Pointed out by [~gopalv].
> Queries which follow the format are not optimal with map-side aggregation, because the
Map 1 does not have TopN in the reduce sink.
> These queries shuffle 100% of the aggregate in cases where the reduce de-dup does not
kick in. 
> {code}
> select state, city, sum(sales) from table
> group by state, city
> order by state, city
> limit 10;
> {code}
> {code}
> select state, city, sum(sales) from table
> group by city, state
> order by state, city
> limit 10;
> {code}
> {code}
> select state, city, sum(sales) from table
> group by city, state
> order by state desc, city
> limit 10;
> {code}



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

Mime
View raw message