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

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

[~ashutoshc], it will not. However, I have been checking the rule to expand 
distinct into grouping sets, and I guess it could be extended to cover this 
case, although the rewriting would be more complex. The Calcite equivalent rule 
has additional logic that is not in the Hive rule, maybe it is also worthy 
taking a look at that.

> Count distinct throws error when used in conjunction with grouping set
> ----------------------------------------------------------------------
>
>                 Key: HIVE-15045
>                 URL: https://issues.apache.org/jira/browse/HIVE-15045
>             Project: Hive
>          Issue Type: Bug
>          Components: Operators
>    Affects Versions: 1.0.0, 1.2.0, 1.1.0, 2.0.0, 2.1.0
>            Reporter: Ashutosh Chauhan
>
> {code}
> SELECT key, value, count(distinct value) FROM src GROUP BY key, value with 
> cube;
> FAILED: SemanticException [Error 10210]: Grouping sets aggregations (with 
> rollups or cubes) are not allowed if aggregation function parameters overlap 
> with the aggregation functions columns
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to