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
;
>
>
> 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
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* '%'
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
= b.code
>
>
>
> *where* b.code != 'ALL'
>
> *and* b.indicatior = 'ALL'
>
>
>
> *union* *all*
>
>
>
> *select* b.code
>
>,b.*value*
>
>
>
> *from*b
>
>
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
mailto:kishore.atmak...@gmail.com]
> *Sent:* Tuesday, April 19, 2016 2:29 PM
> *To:* user@hive.apache.org
> *Subject:* Question on Implementing CASE in Hive Join
>
>
>
> Hi,
>
>
>
> I have a scenario to implement to cases in Hive Joins. I need to implement
> cas
Implementing CASE in Hive Join
Hi,
I have a scenario to implement to cases in Hive Joins. I need to implement case
on the value on which join condition to be applied.
Table A
Code// Type// Indicator// Value//
A 1 XYZ John
B 1 PQR Smith
C 2 XYZ
Hi,
I have a scenario to implement to cases in Hive Joins. I need to implement
case on the value on which join condition to be applied.
Table A
Code// Type// Indicator// Value//
A 1 XYZ John
B 1 PQR Smith
C 2 XYZ John
C 2 PQR