Skip to content

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:

partitionSpec

partitionSpec: Seq[Expression]

Partition Specification (Expressions)

windowExpression

windowExpression: Seq[NamedExpression]

Window Expressions (that are supposed to be WindowExpressions to build windowFrameExpressionFactoryPairs)

Used when:

Implementations

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):

  1. AggregateExpression
  2. FrameLessOffsetWindowFunction
  3. OffsetWindowFunction
  4. AggregateWindowFunction
  5. PythonUDF (PySpark)
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

Back to top