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

Navis commented on HIVE-5129:
-----------------------------

It seemed current distinct implementation has flaw.

{noformat}
select key, count(distinct key) + count(distinct value) from src tablesample 
(10 ROWS) group by key;

100     1
val_100 1
165     1
val_165 1
238     1
val_238 1
255     1
val_255 1
27      1
val_27  1
278     1
val_278 1
311     1
val_311 1
409     1
val_409 1
86      1
val_86  1
98      1
val_98  1
{noformat}

this does not make sense.
                
> Multiple table insert fails on count(distinct)
> ----------------------------------------------
>
>                 Key: HIVE-5129
>                 URL: https://issues.apache.org/jira/browse/HIVE-5129
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 0.11.0
>            Reporter: Vikram Dixit K
>            Assignee: Vikram Dixit K
>         Attachments: aggrTestMultiInsertData1.txt, 
> aggrTestMultiInsertData.txt, aggrTestMultiInsert.q, HIVE-5129.1.patch.txt, 
> HIVE-5129.2.WIP.patch.txt
>
>
> Hive fails with a class cast exception on queries of the form:
> {noformat}
> from studenttab10k
> insert overwrite table multi_insert_2_1
> select name, avg(age) as avgage
> group by name
> insert overwrite table multi_insert_2_2
> select name, age, sum(gpa) as sumgpa
> group by name, age
> insert overwrite table multi_insert_2_3
> select name, count(distinct age) as distage
> group by name;
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to