You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Rui Li (JIRA)" <ji...@apache.org> on 2017/06/02 11:27:04 UTC

[jira] [Commented] (HIVE-6348) Order by/Sort by in subquery

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

Rui Li commented on HIVE-6348:
------------------------------

Fix some tests in v2 patch.
The plan is to disallow order/sort by w/o limit in sub query in semantic level. We somehow have lots of such queries in qtest, and so they need to be updated.

> Order by/Sort by in subquery
> ----------------------------
>
>                 Key: HIVE-6348
>                 URL: https://issues.apache.org/jira/browse/HIVE-6348
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Gunther Hagleitner
>            Assignee: Rui Li
>            Priority: Minor
>              Labels: sub-query
>         Attachments: HIVE-6348.1.patch, HIVE-6348.2.patch
>
>
> select * from (select * from foo order by c asc) bar order by c desc;
> in hive sorts the data set twice. The optimizer should probably remove any order by/sort by in the sub query unless you use 'limit '. Could even go so far as barring it at the semantic level.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)