hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Meagher <john.meag...@gmail.com>
Subject Re: How to do a calculation among 2 rows?
Date Wed, 15 May 2013 13:58:02 GMT
There's a new release candidate version of Hive that includes
windowing functions that address this.  RC1 is available at
http://people.apache.org/~hashutosh/hive-0.11.0-rc1/.  Also see
https://issues.apache.org/jira/browse/HIVE-896

Without 0.11 the approach from Paul will work, but will be slow.

On Wed, May 15, 2013 at 7:53 AM, Paul COURTOIS <paul@pole-conseils.com> wrote:
> Hi Bhathiya,
>
> what about cartesian product ?
>
> the idea would be something like that :
> select a, b, c from t1
> join t1 as t2 on t2.a = t1.a
> where t2.b > t1.b
>
> it's not very "elegant", but should work ;-)
>
> Paul
>
>
> 2013/5/15 Bhathiya Jayasekara <tobhathiyaj@gmail.com>
>>
>> Hi all,
>>
>> Can someone please give an idea for this? I'm totally stuck.
>>
>>
>> http://stackoverflow.com/questions/16558438/in-hive-how-to-do-a-calculation-among-2-rows
>>
>> Thanks.
>>
>> --Bhathiya
>
>

Mime
View raw message