BroadcastNestedLoopJoinExec Binary Physical Operator
BroadcastNestedLoopJoinExec
is a binary physical operator (with two child left and right physical operators) that is created (and converted to) when JoinSelection physical plan strategy finds a Join logical operator that meets either case:
-
canBuildRight join type and
right
physical operator broadcastable -
canBuildLeft join type and
left
broadcastable -
non-
InnerLike
join type
Note
|
BroadcastNestedLoopJoinExec is the default physical operator when no other operators have matched selection requirements.
|
Note
|
canBuildRight join types are:
canBuildLeft join types are:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
val nums = spark.range(2) val letters = ('a' to 'c').map(_.toString).toDF("letter") val q = nums.crossJoin(letters) scala> q.explain == Physical Plan == BroadcastNestedLoopJoin BuildRight, Cross :- *Range (0, 2, step=1, splits=Some(8)) +- BroadcastExchange IdentityBroadcastMode +- LocalTableScan [letter#69] |
Key | Name (in web UI) | Description |
---|---|---|
number of output rows |
BuildSide | Left Child | Right Child |
---|---|---|
|
BroadcastDistribution (uses |
|
|
BroadcastDistribution (uses |
Creating BroadcastNestedLoopJoinExec Instance
BroadcastNestedLoopJoinExec
takes the following when created:
-
Left physical operator
-
Right physical operator
-
Optional join condition expressions