hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vineet Garg (JIRA)" <>
Subject [jira] [Commented] (HIVE-6348) Order by/Sort by in subquery
Date Wed, 14 Jun 2017 04:38:00 GMT


Vineet Garg commented on HIVE-6348:

{{HiveSortRemoveRule}} removes HiveSortLimit only if it is created by HiveSortJoinReduceRule
"If it is not created by HiveSortJoinReduceRule, we cannot remove it" {{HiveSortMergeRule}}
seems to merge two HiveSortLimit into one which isn't the case here. So I don't think there
is any existing rule covering this case.

> Order by/Sort by in subquery
> ----------------------------
>                 Key: HIVE-6348
>                 URL:
>             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, HIVE-6348.3.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

This message was sent by Atlassian JIRA

View raw message