hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ashutosh Chauhan (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-7400) count and count distinct not correct
Date Mon, 14 Jul 2014 16:47:05 GMT

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

Ashutosh Chauhan commented on HIVE-7400:
----------------------------------------

[~darranl] If you can upload a small dataset with which this can be reproduced, that will
be great.

> count and count distinct not correct
> ------------------------------------
>
>                 Key: HIVE-7400
>                 URL: https://issues.apache.org/jira/browse/HIVE-7400
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 0.11.0
>            Reporter: Danran Lai
>
> I have a table in Hive and I want to count unique records and all records.
> Table looks like:
> {quote}       
> sid                     string                   
> param                   map<string,string>                                    

> domain                  string       
> product                 string
> {quote}
> And my query like this:
> {quote}
> select domain,product,count(1) as num,count(distinct param['from'])  as user_num
> from table
> group by domain,product
> {quote}
> But the results are not correct. I can get the right user_num, but the num is wrong which
is less than the real num. The real num is about 30 millon but I can only get 9 millon. 
> So how can I fix this so that I get the correct result?



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message