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

ResolveRelations

ResolveRelations Logical Resolution Rule — Resolving UnresolvedRelations With Tables in Catalog

ResolveRelations is a logical resolution rule that the logical query plan analyzer uses to resolve UnresolvedRelations (in a logical query plan), i.e.

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

ResolveRelations is part of Resolution fixed-point batch of rules.

Applying ResolveRelations to Logical Plan — apply Method

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

apply…​FIXME

Resolving Relation — resolveRelation Method

resolveRelation…​FIXME

Note
resolveRelation is used when…​FIXME

isRunningDirectlyOnFiles Internal Method

isRunningDirectlyOnFiles is enabled (i.e. true) when all of the following conditions hold:

Note
isRunningDirectlyOnFiles is used exclusively when ResolveRelations resolves a relation (as a UnresolvedRelation leaf logical operator for a table reference).

Finding Table in Session-Scoped Catalog of Relational Entities — lookupTableFromCatalog Internal Method

lookupTableFromCatalog simply requests SessionCatalog to find the table in relational catalogs.

Note
lookupTableFromCatalog requests Analyzer for the current SessionCatalog.
Note
The table is described using TableIdentifier of the input UnresolvedRelation.

lookupTableFromCatalog fails the analysis phase (by reporting a AnalysisException) when the table or the table’s database cannot be found.

Note
lookupTableFromCatalog is used when ResolveRelations is executed (for InsertIntoTable with UnresolvedRelation operators) or resolves a relation (for “standalone” UnresolvedRelations).
赞(0) 打赏
未经允许不得转载:spark技术分享 » ResolveRelations
分享到: 更多 (0)

关注公众号:spark技术分享

联系我们联系我们

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

支付宝扫一扫打赏

微信扫一扫打赏