Consider I have 2 tables,
- A (1000 rows)
- B (1B rows)
Left table: A Right table: B
I need to left join A with B, as I want all rows of A to remain in the output.
As expected, we can't broadcast A (to speed up) if I am doing a left join.
D = A.join(B,'key','left)
So, I have been doing an inner join of A & B, which allows broadcast. The intermediate output, say C, is much smaller table. I then left join A with C. In my experience, this is much much faster, and uses lesser resources as well.
C = B.join(F.broadcast(A),'key','inner')
D = C.join(A, 'key','right')
Is there any drawback to this approach? Missing out on edge cases?