Package io.trino.spi.function
Interface WindowFunction
- All Known Implementing Classes:
RankingWindowFunction,ValueWindowFunction
public interface WindowFunction
-
Method Summary
Modifier and TypeMethodDescriptionvoidprocessRow(BlockBuilder output, int peerGroupStart, int peerGroupEnd, int frameStart, int frameEnd) Process a row by outputting the result of the window function.voidreset(WindowIndex windowIndex) Reset state for a new partition (including the first one).
-
Method Details
-
reset
Reset state for a new partition (including the first one).- Parameters:
windowIndex- the window index which contains sorted values for the partition
-
processRow
void processRow(BlockBuilder output, int peerGroupStart, int peerGroupEnd, int frameStart, int frameEnd) Process 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).- 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
-