final class UnboundedPrecedingWindowFunctionFrame extends WindowFunctionFrame
The UnboundPreceding window frame calculates frames with the following SQL form: ... BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW
There is only an upper bound. Very common use cases are for instance running sums or counts (row_number). Technically this is a special case of a sliding window. However a sliding window has to maintain a buffer, and it must do a full evaluation everytime the buffer changes. This is not the case when there is no lower bound, given the additive nature of most aggregates streaming updates and partial evaluation suffice and no buffering is needed.
- Alphabetic
- By Inheritance
- UnboundedPrecedingWindowFunctionFrame
- WindowFunctionFrame
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
UnboundedPrecedingWindowFunctionFrame(target: InternalRow, processor: AggregateProcessor, ubound: BoundOrdering)
- target
to write results to.
- processor
to calculate the row values with.
- ubound
comparator used to identify the upper bound of an output row.
Value Members
-
def
currentLowerBound(): Int
The current lower window bound in the row array (inclusive).
The current lower window bound in the row array (inclusive).
This should be called after the current row is updated via
write
.- Definition Classes
- UnboundedPrecedingWindowFunctionFrame → WindowFunctionFrame
-
def
currentUpperBound(): Int
The current row index of the upper window bound in the row array (exclusive)
The current row index of the upper window bound in the row array (exclusive)
This should be called after the current row is updated via
write
.- Definition Classes
- UnboundedPrecedingWindowFunctionFrame → WindowFunctionFrame
-
def
prepare(rows: ExternalAppendOnlyUnsafeRowArray): Unit
Prepare the frame for calculating a new partition.
Prepare the frame for calculating a new partition.
- rows
to calculate the frame results for.
- Definition Classes
- UnboundedPrecedingWindowFunctionFrame → WindowFunctionFrame
-
def
write(index: Int, current: InternalRow): Unit
Write the frame columns for the current row to the given target row.
Write the frame columns for the current row to the given target row.
- Definition Classes
- UnboundedPrecedingWindowFunctionFrame → WindowFunctionFrame