Window Unary Logical Operator¶
Window is a spark-sql-LogicalPlan.md#UnaryNode[unary logical operator] that...FIXME
Window is <
-
ExtractWindowExpressions logical resolution rule is executed
-
CleanupAliases logical analysis rule is executed
[[output]] When requested for <Window requests the <
NOTE: Window logical operator is a subject of pruning unnecessary window expressions in <
Note
Window logical operator is resolved to a WindowExec in BasicOperators execution planning strategy.
=== [[catalyst-dsl]] Catalyst DSL -- window Operator
[source, scala]¶
window( windowExpressions: Seq[NamedExpression], partitionSpec: Seq[Expression], orderSpec: Seq[SortOrder]): LogicalPlan
window operator in Catalyst DSL creates a <
[source, scala]¶
// FIXME: DEMO¶
=== [[creating-instance]] Creating Window Instance
Window takes the following when created:
- [[windowExpression]] Window expressions/NamedExpression.md[named expressions]
- [[partitionSpec]] Window partition specification expressions/Expression.md[expressions]
- [[orderSpec]] Window order specification (as a collection of
SortOrderexpressions) - [[child]] Child <
>
=== [[windowOutputSet]] Creating AttributeSet with Window Expression Attributes -- windowOutputSet Method
[source, scala]¶
windowOutputSet: AttributeSet¶
windowOutputSet simply creates a AttributeSet with the <
[NOTE]¶
windowOutputSet is used when:
ColumnPruninglogical optimization is <> (on a < > operator with a Windowas the <>)
* CollapseWindow logical optimization is <> (on a Window operator with another Window operator as the <>)¶
Window operator with another Window operator as the <