Package io.trino.spi.function
Class ValueWindowFunction
java.lang.Object
io.trino.spi.function.ValueWindowFunction
- All Implemented Interfaces:
WindowFunction
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidprocessRow(BlockBuilder output, int frameStart, int frameEnd, int currentPosition) Process a row by outputting the result of the window function.final voidprocessRow(BlockBuilder output, int peerGroupStart, int peerGroupEnd, int frameStart, int frameEnd) Process a row by outputting the result of the window function.voidreset()Reset state for a new partition (including the first one).final voidreset(WindowIndex windowIndex) Reset state for a new partition (including the first one).
-
Field Details
-
windowIndex
-
-
Constructor Details
-
ValueWindowFunction
public ValueWindowFunction()
-
-
Method Details
-
reset
Description copied from interface:WindowFunctionReset state for a new partition (including the first one).- Specified by:
resetin interfaceWindowFunction- Parameters:
windowIndex- the window index which contains sorted values for the partition
-
processRow
public final void processRow(BlockBuilder output, int peerGroupStart, int peerGroupEnd, int frameStart, int frameEnd) Description copied from interface:WindowFunctionProcess a row by outputting the result of the window function. This method provides information about the ordering peer group. A peer group is all of the rows that are peers within the specified ordering. Rows are peers if they compare equal to each other using the specified ordering expression. The ordering of rows within a peer group is undefined (otherwise they would not be peers).- Specified by:
processRowin interfaceWindowFunction- Parameters:
output- theBlockBuilderto use for writing the output rowpeerGroupStart- the position of the first row in the peer grouppeerGroupEnd- the position of the last row in the peer groupframeStart- the position of the first row in the window frameframeEnd- the position of the last row in the window frame
-
reset
public void reset()Reset state for a new partition (including the first one). -
processRow
public abstract void processRow(BlockBuilder output, int frameStart, int frameEnd, int currentPosition) Process a row by outputting the result of the window function.- Parameters:
output- theBlockBuilderto use for writing the output rowframeStart- the position of the first row in the window frameframeEnd- the position of the last row in the window framecurrentPosition- the current position for this row
-