Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive, mail # user - Re: Does Hive supports EXISTS keyword in select query?


Copy link to this message
-
Re: Does Hive supports EXISTS keyword in select query?
Philip Tromans 2012-04-11, 13:02
Hi,

Hive supports EXISTS via SEMI JOIN. Have a look at:

https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Joins

Cheers,

Phil.

On 11 April 2012 13:59, Bhavesh Shah <[EMAIL PROTECTED]> wrote:
> Hello all,
> I want to query like below in Hive:
> Select a.* FROM tblA a JOIN tblB b ON a.field1 = b.field1
> where (a.field2 is null or not exists(select field2 from tblB where filed2
> is not null)
>
> But I think Hive doesn't supports EXISTS keyword so how can I overcome this
> issue?
> Pls suggest me some solution to this. I just got this kind of situation
> where I need to implement some thing like EXISTS/NOT EXISTS
>
>
>
> --
> Thanks and Regards,
> Bhavesh Shah
>