[ 
https://issues.apache.org/jira/browse/HIVE-9039?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15374832#comment-15374832
 ] 

wangwenli commented on HIVE-9039:
---------------------------------

this issue will cause backward compatibility problem,   sql like this cann't 
work anymore: 

select s1.key as k, s2.value as v from src s1 join src s2 on (s1.key = s2.key) 
limit 10
union all
select s1.key as k, s2.value as v from src s1 join src s2 on (s1.key = s2.key) 
limit 10;

must change to :
select * from (select s1.key as k, s2.value as v from src s1 join src s2 on 
(s1.key = s2.key) limit 10)a
union all
select * from (select s1.key as k, s2.value as v from src s1 join src s2 on 
(s1.key = s2.key) limit 10)b;

> Support Union Distinct
> ----------------------
>
>                 Key: HIVE-9039
>                 URL: https://issues.apache.org/jira/browse/HIVE-9039
>             Project: Hive
>          Issue Type: New Feature
>          Components: Query Planning
>            Reporter: Pengcheng Xiong
>            Assignee: Pengcheng Xiong
>             Fix For: 1.2.0
>
>         Attachments: HIVE-9039.01.patch, HIVE-9039.02.patch, 
> HIVE-9039.03.patch, HIVE-9039.04.patch, HIVE-9039.05.patch, 
> HIVE-9039.06.patch, HIVE-9039.07.patch, HIVE-9039.08.patch, 
> HIVE-9039.09.patch, HIVE-9039.10.patch, HIVE-9039.11.patch, 
> HIVE-9039.12.patch, HIVE-9039.13.patch, HIVE-9039.14.patch, 
> HIVE-9039.15.patch, HIVE-9039.16.patch, HIVE-9039.17.patch, 
> HIVE-9039.18.patch, HIVE-9039.19.patch, HIVE-9039.20.patch, 
> HIVE-9039.21.patch, HIVE-9039.22.patch, HIVE-9039.23.patch
>
>
> CLEAR LIBRARY CACHE
> Current version (Hive 0.14) does not support union (or union distinct). It 
> only supports union all. In this patch, we try to add this new feature by 
> rewriting union distinct to union all followed by group by.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to