Hive: Left Outer Join with Mutable State
As you know, theta joins (not equals) are not supported by the hive.
In a normal connection, I would handle it with something like:
Select t.A, t.B, u.D
from table t
join uTable u
where t.C rlike u.C
Now I want to make a left join. Putting rlike in the case when the condition will filter out non-matches, and the result will not have null key values. How to handle this scenario in the hive?
During the game, I found this approach. Is it correct?
Select t.A, t.B, u.D
from table t
left outer join uTable u
where ( t.C rlike u.C
or t.C rlike '' )
+3
source to share
No one has answered this question yet
Check out similar questions: