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

Window

Window Unary Logical Operator

Window is a unary logical operator that…​FIXME

Window is created when:

  • ExtractWindowExpressions logical resolution rule is executed

  • CleanupAliases logical analysis rule is executed

When requested for output schema attributes, Window requests the child logical operator for them and adds the attributes of the window named expressions.

Note
Window logical operator is a subject of pruning unnecessary window expressions in ColumnPruning logical optimization and collapsing window operators in CollapseWindow logical optimization.
Note
Window logical operator is resolved to a WindowExec in BasicOperators execution planning strategy.

Catalyst DSL — window Operator

window operator in Catalyst DSL creates a Window logical operator, e.g. for testing or Spark SQL internals exploration.

Creating Window Instance

Window takes the following when created:

Creating AttributeSet with Window Expression Attributes — windowOutputSet Method

windowOutputSet simply creates a AttributeSet with the attributes of the window named expressions.

Note

windowOutputSet is used when:

  • ColumnPruning logical optimization is executed (on a Project operator with a Window as the child operator)

  • CollapseWindow logical optimization is executed (on a Window operator with another Window operator as the child)

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

关注公众号:spark技术分享

联系我们联系我们

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

支付宝扫一扫打赏

微信扫一扫打赏