Na Yang created HIVE-7810: ----------------------------- Summary: Insert overwrite table query has strange behavior when set hive.optimize.union.remove=true [Spark Branch] Key: HIVE-7810 URL: https://issues.apache.org/jira/browse/HIVE-7810 Project: Hive Issue Type: Task Components: Spark Reporter: Na Yang
Insert overwrite table query has strange behavior when set hive.optimize.union.remove=true We expect the following two sets of queries return the same result, but they do not. 1) {noformat} insert overwrite table outputTbl1 SELECT * FROM ( select key, 1 as values from inputTbl1 union all select * FROM ( SELECT key, count(1) as values from inputTbl1 group by key UNION ALL SELECT key, 2 as values from inputTbl1 ) a )b; select * from outputTbl1; {noformat} 2) {noformat} SELECT * FROM ( select key, 1 as values from inputTbl1 union all select * FROM ( SELECT key, count(1) as values from inputTbl1 group by key UNION ALL SELECT key, 2 as values from inputTbl1 ) a )b; {noformat} Some data is missing in the first set of query result. -- This message was sent by Atlassian JIRA (v6.2#6252)