WindowExecBase Unary Physical Operators¶
WindowExecBase
is an extension of the UnaryExecNode abstraction for window unary physical operators.
Contract¶
orderSpec¶
orderSpec: Seq[SortOrder]
Order Specification (SortOrder expressions)
Used when:
WindowExecBase
is requested to createBoundOrdering
partitionSpec¶
partitionSpec: Seq[Expression]
Partition Specification (Expressions)
windowExpression¶
windowExpression: Seq[NamedExpression]
Window Expressions (that are supposed to be WindowExpressions to build windowFrameExpressionFactoryPairs)
Used when:
WindowExecBase
is requested to createResultProjection and windowFrameExpressionFactoryPairs
Implementations¶
- WindowExec
WindowInPandasExec
(PySpark)
windowFrameExpressionFactoryPairs¶
windowFrameExpressionFactoryPairs: Seq[(ExpressionBuffer, InternalRow => WindowFunctionFrame)]
windowFrameExpressionFactoryPairs
finds WindowExpressions in the given windowExpressions.
windowFrameExpressionFactoryPairs
assumes that the WindowFrame (of the WindowSpecDefinition of the WindowExpression) is a SpecifiedWindowFrame
.
windowFrameExpressionFactoryPairs
branches off based on the window function (of the WindowExpression):
- AggregateExpression
FrameLessOffsetWindowFunction
- OffsetWindowFunction
- AggregateWindowFunction
- PythonUDF
Lazy Value
windowFrameExpressionFactoryPairs
is a Scala lazy value to guarantee that the code to initialize it is executed once only (when accessed for the first time) and the computed value never changes afterwards.
Learn more in the Scala Language Specification.
createBoundOrdering¶
createBoundOrdering(
frame: FrameType,
bound: Expression,
timeZone: String): BoundOrdering
createBoundOrdering
...FIXME