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] [Commented] (HIVE-16934) Transform COUNT(x) into COUNT() when x is not nullable
Date Thu, 22 Jun 2017 09:15:00 GMT

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

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

[~vgarg], there are multiple benefits that I can think of. First, at the execution side we
will not have to access/evaluate any expression when calculating the COUNT. Further, by removing
expressions that are referenced by the aggregate call, we might be able to further prune columns
in the operator plan. Another benefit is that this might lead to some aggregate calls not
being computed twice, e.g., {{COUNT(x)}} and {{COUNT(y)}} if _x_ and _y_ are not nullable.
Finally, as a side effect, we might be able to recognize more equivalent expressions in MVs
rewriting or SharedWorkOptimizer, and push more computation to Druid, since currently Druid
is only capable of executing {{count(*)}}.

> Transform COUNT(x) into COUNT() when x is not nullable
> ------------------------------------------------------
>
>                 Key: HIVE-16934
>                 URL: https://issues.apache.org/jira/browse/HIVE-16934
>             Project: Hive
>          Issue Type: Improvement
>          Components: Logical Optimizer
>            Reporter: Jesus Camacho Rodriguez
>            Assignee: Jesus Camacho Rodriguez
>         Attachments: HIVE-16934.patch
>
>
> Add a rule to simplify COUNT aggregation function if possible, removing expressions that
cannot be nullable from its parameters.



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

Mime
View raw message