auto join sql code example
Example 1: self join
SELECT column_name(s)
FROM table1 T1, table1 T2
WHERE condition;
Example 2: Perform a right outer join of self and other.
x = sc.parallelize([("a", 1), ("b", 4)])
y = sc.parallelize([("a", 2)])
sorted(y.rightOuterJoin(x).collect())
# [('a', (2, 1)), ('b', (None, 4))]