关注 spark技术分享,
撸spark源码 玩spark最佳实践

HashJoin — Contract for Hash-based Join Physical Operators

HashJoin — Contract for Hash-based Join Physical Operators

HashJoin is the contract for hash-based join physical operators (e.g. BroadcastHashJoinExec and ShuffledHashJoinExec).

Table 1. HashJoin Contract
Method Description

buildSide

Left or right build side

Used when:

joinType

JoinType

Table 2. HashJoin’s Internal Properties (e.g. Registries, Counters and Flags)
Name Description

boundCondition

buildKeys

Build join keys (as Catalyst expressions)

buildPlan

streamedKeys

Streamed join keys (as Catalyst expressions)

streamedPlan

join Method

join branches off per joinType to create a join iterator of internal rows (i.e. Iterator[InternalRow]) for the input streamedIter and hashed:

join requests TaskContext to add a TaskCompletionListener to update the input avg hash probe SQL metric. The TaskCompletionListener is executed on a task completion (regardless of the task status: success, failure, or cancellation) and uses getAverageProbesPerLookup from the input hashed to set the input avg hash probe.

In the end, for every row in the join iterator of internal rows join increments the input numOutputRows SQL metric and applies the result projection.

join reports a IllegalArgumentException when the joinType is incorrect.

Note
join is used when BroadcastHashJoinExec and ShuffledHashJoinExec are executed.

innerJoin Internal Method

innerJoin…​FIXME

Note
innerJoin is used when…​FIXME

outerJoin Internal Method

outerJoin…​FIXME

Note
outerJoin is used when…​FIXME

semiJoin Internal Method

semiJoin…​FIXME

Note
semiJoin is used when…​FIXME

antiJoin Internal Method

antiJoin…​FIXME

Note
antiJoin is used when…​FIXME

existenceJoin Internal Method

existenceJoin…​FIXME

Note
existenceJoin is used when…​FIXME

createResultProjection Method

createResultProjection…​FIXME

Note
createResultProjection is used when…​FIXME
赞(0) 打赏
未经允许不得转载:spark技术分享 » HashJoin — Contract for Hash-based Join Physical Operators
分享到: 更多 (0)

关注公众号:spark技术分享

联系我们联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏