Class RankingWindowFunction

    • Constructor Detail

      • RankingWindowFunction

        public RankingWindowFunction()
    • Method Detail

      • reset

        public final void reset​(WindowIndex windowIndex)
        Description copied from interface: WindowFunction
        Reset state for a new partition (including the first one).
        Specified by:
        reset in interface WindowFunction
        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: WindowFunction
        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).

        Specified by:
        processRow in interface WindowFunction
        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
      • reset

        public void reset()
        Reset state for a new partition (including the first one).
      • processRow

        public abstract void processRow​(BlockBuilder output,
                                        boolean newPeerGroup,
                                        int peerGroupCount,
                                        int currentPosition)
        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
        newPeerGroup - if this row starts a new peer group
        peerGroupCount - the total number of rows in this peer group
        currentPosition - the current position for this row