final class UnboundedFollowingWindowFunctionFrame extends WindowFunctionFrame
The UnboundFollowing window frame calculates frames with the following SQL form: ... BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING
There is only an upper bound. This is a slightly modified version of the sliding window. The sliding window operator has to check if both upper and the lower bound change when a new row gets processed, where as the unbounded following only has to check the lower bound.
This is a very expensive operator to use, O(n * (n - 1) /2), because we need to maintain a buffer and must do full recalculation after each row. Reverse iteration would be possible, if the commutativity of the used window functions can be guaranteed.
- Alphabetic
- By Inheritance
- UnboundedFollowingWindowFunctionFrame
- WindowFunctionFrame
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new UnboundedFollowingWindowFunctionFrame(target: InternalRow, processor: AggregateProcessor, lbound: BoundOrdering)
- target
to write results to.
- processor
to calculate the row values with.
- lbound
comparator used to identify the lower 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
- UnboundedFollowingWindowFunctionFrame → 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
- UnboundedFollowingWindowFunctionFrame → 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
- UnboundedFollowingWindowFunctionFrame → 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
- UnboundedFollowingWindowFunctionFrame → WindowFunctionFrame