Interface WindowFunction

All Known Implementing Classes:
RankingWindowFunction, ValueWindowFunction

public interface WindowFunction
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    processRow(BlockBuilder output, int peerGroupStart, int peerGroupEnd, int frameStart, int frameEnd)
    Process a row by outputting the result of the window function.
    void
    reset(WindowIndex windowIndex)
    Reset state for a new partition (including the first one).
  • Method Details

    • reset

      void reset(WindowIndex windowIndex)
      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 - the BlockBuilder to use for writing the output row
      peerGroupStart - the position of the first row in the peer group
      peerGroupEnd - the position of the last row in the peer group
      frameStart - the position of the first row in the window frame
      frameEnd - the position of the last row in the window frame