[
https://issues.apache.org/jira/browse/HIVE-5237?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Børge Svingen resolved HIVE-5237.
---------------------------------
Resolution: Duplicate
> Incorrect group-by aggregation in 0.11.0
> ----------------------------------------
>
> Key: HIVE-5237
> URL: https://issues.apache.org/jira/browse/HIVE-5237
> Project: Hive
> Issue Type: Bug
> Affects Versions: 0.11.0
> Reporter: Børge Svingen
> Priority: Critical
>
> group by with sub queries does not correctly aggregate results in Hive 0.11.0.
> To reproduce:
> Put the file
> {code}
> 1,b
> 2,c
> 2,b
> 3,a
> 3,c
> 4,a
> {code}
> in HDFS, and run
> {code}
> create external table abc (x int, y string) row format delimited fields
> terminated by ',' location '/data/';
> {code}
> The query
> {code}
> select
> x,
> count(*)
> from
> (select
> x,
> y
> from
> abc
> group by
> x,
> y
> ) a
> group by
> x;
> {code}
> will then give the result
> {code}
> 2 1
> 3 1
> 2 1
> 4 1
> 3 1
> 1 1
> {code}
> instead of the correct
> {code}
> 1 1
> 2 2
> 3 2
> 4 1
> {code}
> In 0.9.0 and 0.10.0 this is all working correctly.
--
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