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
hive


source to share


No one has answered this question yet

Check out similar questions:

7
Hive LEFT SEMI JOIN for "DOES NOT EXIST"
4
Hive spacing emulation
2
The hive joins the OR condition
1
Hive: work for a non-single left joint
1
Join table using LIKE or RLIKE in Hive
0
How can I perform a LEFT OUTER JOIN on a hive without duplicates to check for only one value in the desired table?
0
Left outer joint in the hive causing rows to shrink
0
Complete table scan issue with LEFT OUTER JOIN in Hive
0
Date filter in the hive when making external external join
0
Non equi Left outer join in hive bypass



All Articles
Loading...
X
Show
Funny
Dev
Pics