hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zoltan Haindrich (JIRA)" <>
Subject [jira] [Updated] (HIVE-17617) Rollup of an empty resultset should contain the grouping of the empty grouping set
Date Mon, 09 Oct 2017 13:45:00 GMT


Zoltan Haindrich updated HIVE-17617:
    Attachment: HIVE-17617.04.patch

#4) I was able to avoid modifing all the groupbydesc constructors ; and found a way the reducers
to emit the empty row....and it works ok in case of TestCliDriver; however llap employs more
than 1 groupy reducers (4) in parallel...and because of that there are 4 result rows...because
all of them ended up with empty input.

[~jcamachorodriguez] I was looking into how to get the index of the reducer the code is in...but
if I was able to get that - that still leaves a open the question: the empty row emittion
condition must only be true for the reducer which is handling the empty groupping sets...
feel free to take it over if you know how to fix it.

> Rollup of an empty resultset should contain the grouping of the empty grouping set
> ----------------------------------------------------------------------------------
>                 Key: HIVE-17617
>                 URL:
>             Project: Hive
>          Issue Type: Sub-task
>          Components: SQL
>            Reporter: Zoltan Haindrich
>            Assignee: Zoltan Haindrich
>         Attachments: HIVE-17617.01.patch, HIVE-17617.03.patch, HIVE-17617.04.patch
> running
> {code}
> drop table if exists tx1;
> create table tx1 (a integer,b integer,c integer);
> select  sum(c),
>         grouping(b)
> from    tx1
> group by rollup (b);
> {code}
> returns 0 rows; however 
> according to the standard:
> The <empty grouping set> is regarded as the shortest such initial sublist. For
example, “ROLLUP ( (A, B), (C, D) )”
> is equivalent to “GROUPING SETS ( (A, B, C, D), (A, B), () )”.
> so I think the totals row (the grouping for {{()}} should be present)  - psql returns

This message was sent by Atlassian JIRA

View raw message