Thanks Ashish and Jeff.

Hi Jeremy,

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.


Zheng

On Wed, Nov 12, 2008 at 5:26 PM, Jeff Hammerbacher <[EMAIL PROTECTED]>wrote:

> Done: https://issues.apache.org/jira/browse/HIVE-61.
>
>
> On Wed, Nov 12, 2008 at 5:18 PM, Ashish Thusoo <[EMAIL PROTECTED]>wrote:
>
>>  Actually order by is not implemented yet. I don't know if a JIRA is open
>> for that one or not, but if it is not there, feel free to open one.
>>
>> Ashish
>>
>>  ------------------------------
>> *From:* [EMAIL PROTECTED] [mailto:
>> [EMAIL PROTECTED]
>> *Sent:* Wednesday, November 12, 2008 4:56 PM
>> *To:* [email protected]
>> *Subject:* ORDER?
>>
>>
>> There is way to sort data in hive currently, isn't it?
>> ORDER BY is accepted but has no effect.
>>
>> Tx.
>> J.
>>
>
>


-- 
Yours,
Zheng

Reply via email to