Re: Question on Implementing CASE in Hive Join

2016-05-03 Thread Kishore A
t; 18 101 CN Tax Y > 18 101 All Tax Y Smith > > 19 101 CA Tax Y > 19 101 All Tax Y Smith > > 20 101 USA

RE: Question on Implementing CASE in Hive Join

2016-04-27 Thread Kishore A
; > > > CROSS JOIN does not use ON (Hive lets you do that but it not an SQL > standard and it’s actually an INNER JOIN). > > > > 6. > > CASE > > > > CASE is defined by ANSI/ISO and works in Hive the same way it works in HQL > the same way it work

Re: Question on Implementing CASE in Hive Join

2016-04-27 Thread Kishore A
a > > > > *where* a.*type* = b.*type* > > *and* a.code like *case* b.code *when* 'ALL' *then* '%' > *else* b.code *end* > > *and* a.indicator like *case* b.indicator *when* 'ALL' *then* '%'

RE: Question on Implementing CASE in Hive Join

2016-04-20 Thread Markovitz, Dudu
b.indicator end ; Dudu From: Kishore A [mailto:kishore.atmak...@gmail.com] Sent: Wednesday, April 20, 2016 5:04 PM To: user@hive.apache.org Subject: Re: Question on Implementing CASE in Hive Join Hi Dudu, Thank you for sending queries around this. I have run these queries and below are the

Re: Question on Implementing CASE in Hive Join

2016-04-20 Thread Kishore A
= b.code > > > > *where* b.code != 'ALL' > > *and* b.indicatior = 'ALL' > > > > *union* *all* > > > > *select* b.code > >,b.*value* > > > > *from*b > >

RE: Question on Implementing CASE in Hive Join

2016-04-19 Thread Markovitz, Dudu
x27; union all select b.code ,b.value fromb left join a on a.type = b.type where b.code = 'ALL' and b.indicatior = 'ALL' ; From: Kishore A [mailto:kishore.atmak...@gmail.com] Se

Re: Question on Implementing CASE in Hive Join

2016-04-19 Thread Kishore A
Hi Dudu, Actually we use both fields from left and right tables, I mentioned right table just for my convenience to check whether ALL from right table can be pulled as per join condition match. One more reason why we use left join is we should not have extra columns after join. Kishore On Tue

RE: Question on Implementing CASE in Hive Join

2016-04-19 Thread Markovitz, Dudu
Before dealing with the technical aspect, can you please explain what is the point of using LEFT JOIN without selecting any field from table A? Thanks Dudu From: Kishore A [mailto:kishore.atmak...@gmail.com] Sent: Tuesday, April 19, 2016 2:29 PM To: user@hive.apache.org Subject: Question on Imp