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* '%'
union* *all*
>
>
>
> *select* b.code
>
>,b.*value*
>
>
>
> *from*b
>
>
>
> *left* *join* a
>
>
>
> *on* a.*type* = b.*type*
>
> *and* a.code
Tue, Apr 19, 2016 at 5:46 AM, Markovitz, Dudu
wrote:
> 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 [
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