You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Jesus Camacho Rodriguez (Jira)" <ji...@apache.org> on 2019/11/02 01:57:00 UTC

[jira] [Commented] (HIVE-22448) CBO: Expand the multiple count distinct with a group-by key

    [ https://issues.apache.org/jira/browse/HIVE-22448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16965193#comment-16965193 ] 

Jesus Camacho Rodriguez commented on HIVE-22448:
------------------------------------------------

Uploaded initial patch... It needs further testing and probably a bit of cleanup in the rule implementation.

> CBO: Expand the multiple count distinct with a group-by key
> -----------------------------------------------------------
>
>                 Key: HIVE-22448
>                 URL: https://issues.apache.org/jira/browse/HIVE-22448
>             Project: Hive
>          Issue Type: Bug
>          Components: CBO
>            Reporter: Gopal Vijayaraghavan
>            Assignee: Jesus Camacho Rodriguez
>            Priority: Major
>         Attachments: HIVE-22448.patch
>
>
> {code}
> create temporary table mytable1 (x integer, y integer, z integer, a integer);
> explain cbo
> select z, x, count(distinct y), count(distinct a)
> from mytable1
> group by z, x;
> explain cbo
> select z, x, count(distinct y), count(distinct a)
> from mytable1
> {code}
> The first is not vectorized, the second one is because of the grouping-set based rewrite for count distinct.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)