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

Lefty Leverenz commented on HIVE-9039:
--------------------------------------

Nicely done, [~pxiong].  I added emphasis for version changes at the beginning 
and trimmed the version note at the end.  Feel free to change things back again 
if you disagree.

Some minor questions:

1.  In this example, should there be a space before "a" and "b" (after the 
parentheses) or is it optional?
{code}
SELECT key FROM (SELECT key FROM src ORDER BY key LIMIT 10)a
UNION
SELECT key FROM (SELECT key FROM src1 ORDER BY key LIMIT 10)b
{code}

2.  Does DISTRIBUTE BY belong in the first half of this sentence, or should it 
be removed from the second half?  And can "after the last one" be rephrased 
"after the last SELECT of the UNION" or something similar?
{quote}
To apply an ORDER BY, SORT BY, CLUSTER BY or LIMIT clause to the entire UNION 
result, place the ORDER BY, SORT BY, CLUSTER BY, DISTRIBUTE BY or LIMIT after 
the last one. 
{quote}

Thanks.

> 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
>              Labels: TODOC1.2
>             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