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

ResolveBroadcastHints

ResolveBroadcastHints Logical Resolution Rule — Resolving UnresolvedHint Operators with BROADCAST, BROADCASTJOIN and MAPJOIN Hint Names

ResolveBroadcastHints is a logical resolution rule that the Spark Analyzer uses to resolve UnresolvedHint logical operators with BROADCAST, BROADCASTJOIN or MAPJOIN hints (case-insensitive) to ResolvedHint operators.

Technically, ResolveBroadcastHints is a Catalyst rule for transforming logical plans, i.e. Rule[LogicalPlan].

ResolveBroadcastHints is part of Hints fixed-point batch of rules (that is executed before any other rule).

ResolveBroadcastHints takes a SQLConf when created.

Resolving UnresolvedHint with BROADCAST, BROADCASTJOIN or MAPJOIN Hint Names (Applying ResolveBroadcastHints to Logical Plan) — apply Method

Note
apply is part of Rule Contract to apply a rule to a logical plan.

apply transforms UnresolvedHint operators into ResolvedHint for the hint names as BROADCAST, BROADCASTJOIN or MAPJOIN (case-insensitive).

For UnresolvedHints with no parameters, apply marks the entire child logical plan as eligible for broadcast, i.e. creates a ResolvedHint with the child operator and HintInfo with broadcast flag on.

For UnresolvedHints with parameters defined, apply considers the parameters the names of the tables to apply broadcast hint to.

Note
The table names can be of String or UnresolvedAttribute types.

apply reports an AnalysisException for the parameters that are not of String or UnresolvedAttribute types.

applyBroadcastHint Internal Method

applyBroadcastHint…​FIXME

Note
applyBroadcastHint is used exclusively when ResolveBroadcastHints is requested to execute.
赞(0) 打赏
未经允许不得转载:spark技术分享 » ResolveBroadcastHints
分享到: 更多 (0)

关注公众号:spark技术分享

联系我们联系我们

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

支付宝扫一扫打赏

微信扫一扫打赏