[ https://issues.apache.org/jira/browse/HIVE-1398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14231980#comment-14231980 ]
Raj Bains commented on HIVE-1398: --------------------------------- Looks like it is fixed in Hive 0.14 hive> insert into table foo1 select a,b from foo1 union all select a,b from foo3; Query ID = rbains_20141202142626_58807159-1762-4855-aa36-3fc3803b9ab7 Total jobs = 1 Launching Job 1 out of 1 Status: Running (application id: application_1414029100044_2856) Map 1: -/- Map 3: -/- Status: Finished successfully Loading data to table default.foo1 Table default.foo1 stats: [numFiles=4, numRows=0, totalSize=0, rawDataSize=0] OK Time taken: 2.575 seconds hive> insert into table foo1 select a,b from foo1 union all select x as a,y as b from foo2; Query ID = rbains_20141202143333_daaf52e4-7b15-413f-a0de-9b192cee2fcd Total jobs = 1 Launching Job 1 out of 1 Status: Running (application id: application_1414029100044_2856) Map 1: -/- Map 3: -/- Status: Finished successfully Loading data to table default.foo1 Table default.foo1 stats: [numFiles=6, numRows=0, totalSize=0, rawDataSize=0] OK Time taken: 2.396 seconds hive> hive> insert into table foo1 select a,b from foo1 union all select x as a,y as b from foo2; Query ID = rbains_20141202143333_daaf52e4-7b15-413f-a0de-9b192cee2fcd Total jobs = 1 Launching Job 1 out of 1 Status: Running (application id: application_1414029100044_2856) Map 1: -/- Map 3: -/- Status: Finished successfully Loading data to table default.foo1 Table default.foo1 stats: [numFiles=6, numRows=0, totalSize=0, rawDataSize=0] OK Time taken: 2.396 seconds hive> > Support union all without an outer select * > ------------------------------------------- > > Key: HIVE-1398 > URL: https://issues.apache.org/jira/browse/HIVE-1398 > Project: Hive > Issue Type: Improvement > Components: Query Processor > Reporter: Ashish Thusoo > Assignee: Ashish Thusoo > Labels: SQL > > In hive for union alls the query has to be wrapped in an sub query as shown > below: > select * from > (select c1 from t1 > union all > select c2 from t2); > This JIRA proposes to fix that to support > select c1 from t1 > union all > select c2 from t2; -- This message was sent by Atlassian JIRA (v6.3.4#6332)