WindowFunctionFrame
WindowFunctionFrame
is a contract for…FIXME
Name | Description |
---|---|
|
|
|
|
|
|
UnboundedWindowFunctionFrame
UnboundedWindowFunctionFrame
is a WindowFunctionFrame that gives the same value for every row in a partition.
UnboundedWindowFunctionFrame
is created for AggregateFunctions (in AggregateExpressions) or AggregateWindowFunctions with no frame defined (i.e. no rowsBetween
or rangeBetween
) that boils down to using the entire partition frame.
UnboundedWindowFunctionFrame
takes the following when created:
-
Target InternalRow
prepare
Method
1 2 3 4 5 |
prepare(rows: ExternalAppendOnlyUnsafeRowArray): Unit |
prepare
requests AggregateProcessor to initialize passing in the number of UnsafeRows
in the input ExternalAppendOnlyUnsafeRowArray
.
prepare
then requests ExternalAppendOnlyUnsafeRowArray
to generate an interator.
In the end, prepare
requests AggregateProcessor to update passing in every UnsafeRow
in the iterator one at a time.
write
Method
1 2 3 4 5 |
write(index: Int, current: InternalRow): Unit |
write
simply requests AggregateProcessor to evaluate the target InternalRow.
WindowFunctionFrame Contract
1 2 3 4 5 6 7 8 9 10 |
package org.apache.spark.sql.execution.window abstract class WindowFunctionFrame { def prepare(rows: ExternalAppendOnlyUnsafeRowArray): Unit def write(index: Int, current: InternalRow): Unit } |
Note
|
WindowFunctionFrame is a private[window] contract.
|
Method | Description |
---|---|
Used exclusively when |
|
Used exclusively when the Iterator[InternalRow] (from executing |