Danran Lai created HIVE-7400: -------------------------------- Summary: 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)