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

ResolveWindowFrame

ResolveWindowFrame Logical Resolution Rule

ResolveWindowFrame is a logical resolution rule that the logical query plan analyzer uses to validate and resolve WindowExpression expressions in an entire logical query plan.

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

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

ResolveWindowFrame takes a logical plan and does the following:

  1. Makes sure that the window frame of a WindowFunction is unspecified or matches the SpecifiedWindowFrame of the WindowSpecDefinition expression.

    Reports a AnalysisException when the frames do not match:

  2. Copies the frame specification of WindowFunction to WindowSpecDefinition

  3. Creates a new SpecifiedWindowFrame for WindowExpression with the resolved Catalyst expression and UnspecifiedFrame

Note
ResolveWindowFrame is a Scala object inside Analyzer class.

Applying ResolveWindowFrame to Logical Plan — apply Method

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

apply…​FIXME

赞(0) 打赏
未经允许不得转载:spark技术分享 » ResolveWindowFrame
分享到: 更多 (0)

关注公众号:spark技术分享

联系我们联系我们

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

支付宝扫一扫打赏

微信扫一扫打赏