You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by je...@orange-ftgroup.com on 2008/11/13 01:56:14 UTC

ORDER?

There is way to sort data in hive currently, isn't it?
ORDER BY is accepted but has no effect.

Tx.
J.

Re: ORDER?

Posted by Zheng Shao <zs...@gmail.com>.
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 <ha...@cloudera.com>wrote:

> Done: https://issues.apache.org/jira/browse/HIVE-61.
>
>
> On Wed, Nov 12, 2008 at 5:18 PM, Ashish Thusoo <at...@facebook.com>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:* jeremy.huylebroeck@orange-ftgroup.com [mailto:
>> jeremy.huylebroeck@orange-ftgroup.com]
>> *Sent:* Wednesday, November 12, 2008 4:56 PM
>> *To:* hive-user@hadoop.apache.org
>> *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

Re: ORDER?

Posted by Jeff Hammerbacher <ha...@cloudera.com>.
Done: https://issues.apache.org/jira/browse/HIVE-61.

On Wed, Nov 12, 2008 at 5:18 PM, Ashish Thusoo <at...@facebook.com> 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:* jeremy.huylebroeck@orange-ftgroup.com [mailto:
> jeremy.huylebroeck@orange-ftgroup.com]
> *Sent:* Wednesday, November 12, 2008 4:56 PM
> *To:* hive-user@hadoop.apache.org
> *Subject:* ORDER?
>
>
> There is way to sort data in hive currently, isn't it?
> ORDER BY is accepted but has no effect.
>
> Tx.
> J.
>

RE: ORDER?

Posted by Ashish Thusoo <at...@facebook.com>.
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: jeremy.huylebroeck@orange-ftgroup.com [mailto:jeremy.huylebroeck@orange-ftgroup.com]
Sent: Wednesday, November 12, 2008 4:56 PM
To: hive-user@hadoop.apache.org
Subject: ORDER?



There is way to sort data in hive currently, isn't it?
ORDER BY is accepted but has no effect.

Tx.
J.