You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Julian Hyde (JIRA)" <ji...@apache.org> on 2018/02/06 02:26:00 UTC
[jira] [Commented] (HIVE-16924) Support distinct in presence Gby
[ https://issues.apache.org/jira/browse/HIVE-16924?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16353242#comment-16353242 ]
Julian Hyde commented on HIVE-16924:
------------------------------------
Test failures so far: wrong_distinct1.q, global_limit.q (statistics), llap_smb.q (statistics), mm_all.q, mm_cttas.q, unionDistinct_1.q.
> Support distinct in presence Gby
> ---------------------------------
>
> 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: Julian Hyde
> Priority: Major
> Attachments: HIVE-16924.01.patch, HIVE-16924.02.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)