You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Zheng Shao (JIRA)" <ji...@apache.org> on 2008/11/13 09:28:46 UTC

[jira] Commented: (HIVE-61) Implment ORDER BY

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

Zheng Shao commented on HIVE-61:
--------------------------------

We recently added the "SORT BY" clause which sorts the data in each reducer. An example query is:
insert overwrite table table2 select city, state where city = 'Chicago' from table sort by state;

If you set number of reducers to 1, then "sort by" will have the same result as "order by" (Do trim down the data size first - otherwise it will be very slow).


"ORDER BY" is not supported yet but we have a plan to support it shortly. The implementation of order by in our mind will be based on sort by: we run the query with sort by, and then mark the table as sorted with these columns in the table meta data.
Then we will be able to "merge" the sorted files from each reducer and produce a total order.


> Implment ORDER BY
> -----------------
>
>                 Key: HIVE-61
>                 URL: https://issues.apache.org/jira/browse/HIVE-61
>             Project: Hadoop Hive
>          Issue Type: New Feature
>            Reporter: Jeff Hammerbacher
>
> ORDER BY is in the query language reference but currently is a no-op. We should make it an op.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.