Join

Convert to SparkPlan by EquiJoinSelection.

If catalyst cannot evalute the join condition, for example not using EqualTo/EqualNullSafe, then the rule for ExtractEquiJoinKeys may not be applied, resulting in potential CartesianProductExec/CartesianProductExec

JoinType

Inner: The query compares each row of A with each row of B to find all pairs of rows which satisfy the join-predicate. When the join-predicate is satisfied by matching non-NULL values, column values for each matched pair of rows of A and B are combined into a result row.

LeftOuter: A left outer join will give all rows in A, plus any common rows in B, fill in null if not in B.

RightOuter: A right outer join will give all rows in B, plus any common rows in A, fill in null if not in A.

FullOuter: A full outer join will give you the union of A and B, i.e. all the rows in A and all the rows in B. If something in A doesn't have a corresponding datum in B, then the B portion is null, and vice versa.

LeftSemi: Any join query that requests rows form the left row source based on the existence of rows in the right row source without including data from the right row source in the final result and without duplicating rows from the left row source is a logical left semi join. Typically, it is used in The EXISTS() clause. In Spark, it is converted to HashJoin only by LeftSemiJoin

LeftAnti: Used for Not/Not(Exists). Condition passed, if the left side key is not on the right sideused

NaturalJoin: This will be converted to other join type in ResolveNaturalAndUsingJoin.

UsingJoin: Same as NatualJoin.

results matching ""

    No results matching ""