Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
Turing on the hive.optimize.union.remove property generates wrong union all result.
For Example:
create table inputTbl1(key string, val string) stored as textfile; load data local inpath '../../data/files/T1.txt' into table inputTbl1; SELECT * FROM ( SELECT key, count(1) as values from inputTbl1 group by key UNION ALL SELECT key, count(1) as values from inputTbl1 group by key ) a;
when the hive.optimize.union.remove is turned on, the query result is like:
1 1 2 1 3 1 7 1 8 2
when the hive.optimize.union.remove is turned off, the query result is like:
7 1 2 1 8 2 3 1 1 1 7 1 2 1 8 2 3 1 1 1
The expected query result is:
7 1 2 1 8 2 3 1 1 1 7 1 2 1 8 2 3 1 1 1