You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by "Raghunath, Ranjith" <Ra...@usaa.com> on 2012/08/08 05:09:17 UTC

Hive and joins

Since Hive (0.7.1) only supports equi-based join how are people using it for joins employing the between clause?

Thanks,
Ranjith      

Re: Hive and joins

Posted by "Raghunath, Ranjith" <Ra...@usaa.com>.
Thanks Bejoy. What if those values a,b are not static and are housed in a table. Much like a type 2 dimension. Is the current solution still to put it in the where clause?

Thanks,
Ranjith

From: Bejoy Ks [mailto:bejoy_ks@yahoo.com]
Sent: Wednesday, August 08, 2012 06:55 AM
To: user@hive.apache.org <us...@hive.apache.org>
Subject: Re: Hive and joins

Hi Ranjith

BETWEEN a and b, you can implement as >=a , <=b . Since that is not equality you cannot use that in ON clause you need to move it to WHERE condition in your query.

Regards,
Bejoy KS

________________________________
From: "Raghunath, Ranjith" <Ra...@usaa.com>
To: "'user@hive.apache.org'" <us...@hive.apache.org>
Sent: Wednesday, August 8, 2012 8:39 AM
Subject: Hive and joins

Since Hive (0.7.1) only supports equi-based join how are people using it for joins employing the between clause?

Thanks,
Ranjith


Re: Hive and joins

Posted by Bejoy Ks <be...@yahoo.com>.
Hi Ranjith

BETWEEN a and b, you can implement as >=a , <=b . Since that is not equality you cannot use that in ON clause you need to move it to WHERE condition in your query.


 
Regards,
Bejoy KS


________________________________
 From: "Raghunath, Ranjith" <Ra...@usaa.com>
To: "'user@hive.apache.org'" <us...@hive.apache.org> 
Sent: Wednesday, August 8, 2012 8:39 AM
Subject: Hive and joins
 
Since Hive (0.7.1) only supports equi-based join how are people using it for joins employing the between clause?

Thanks,
Ranjith