hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zoltan Haindrich (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-17617) Rollup of an empty resultset should contain the grouping of the empty grouping set
Date Tue, 24 Oct 2017 12:58:02 GMT

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

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

#8)

* [~ashutoshc], I feeled the method more connected to the Desc; because both the vectorized/normal
execution would use it; I've moved it to the GroupByOperator as a static method.
* address a cornercase (failed qtest)



> Rollup of an empty resultset should contain the grouping of the empty grouping set
> ----------------------------------------------------------------------------------
>
>                 Key: HIVE-17617
>                 URL: https://issues.apache.org/jira/browse/HIVE-17617
>             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, HIVE-17617.05.patch,
HIVE-17617.06.patch, HIVE-17617.07.patch, HIVE-17617.07.patch, HIVE-17617.08.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
it.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message