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

Miklos Gergely updated HIVE-16924:
----------------------------------
    Attachment: HIVE-16924.01.patch

> Support distinct in presence of Group By 
> -----------------------------------------
>
>                 Key: HIVE-16924
>                 URL: https://issues.apache.org/jira/browse/HIVE-16924
>             Project: Hive
>          Issue Type: New Feature
>          Components: Query Planning
>            Reporter: Carter Shanklin
>            Assignee: Miklos Gergely
>            Priority: Major
>         Attachments: HIVE-16924.01.patch, HIVE-16924.01.patch, 
> HIVE-16924.02.patch, HIVE-16924.03.patch, HIVE-16924.04.patch, 
> HIVE-16924.05.patch, HIVE-16924.06.patch
>
>
> {code:sql}
> create table e011_01 (c1 int, c2 smallint);
> insert into e011_01 values (1, 1), (2, 2);
> {code}
> These queries should work:
> {code:sql}
> select distinct c1, count(*) from e011_01 group by c1;
> select distinct c1, avg(c2) from e011_01 group by c1;
> {code}
> Currently, you get : 
> FAILED: SemanticException 1:52 SELECT DISTINCT and GROUP BY can not be in the 
> same query. Error encountered near token 'c1'



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to