[
https://issues.apache.org/jira/browse/HIVE-22448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16969726#comment-16969726
]
Vineet Garg commented on HIVE-22448:
------------------------------------
[~gopalv] [~jcamachorodriguez] I am trying to understand why this improvement
is always a good idea. With this improvement we end up adding an extra reducer
along with grouping set (which increases the data size). Is it possible
theoretically that the extra time added outweighs reduction in time by
vectorization leading to overall increase in runtime? If so, isn't it better to
make this optimization statistics based?
> 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
> Labels: pull-request-available
> Attachments: HIVE-22448.01.patch, HIVE-22448.02.patch,
> HIVE-22448.02.patch, HIVE-22448.patch
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> {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 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)