Interface WindowIndex


public interface WindowIndex
A window index contains the sorted values for a window partition. Each window function argument is available as a separate channel.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    appendTo(int channel, int position, BlockBuilder output)
    Outputs a value from the index.
    boolean
    getBoolean(int channel, int position)
    Gets a value as a boolean.
    double
    getDouble(int channel, int position)
    Gets a value as a double.
    long
    getLong(int channel, int position)
    Gets a value as a long.
    getObject(int channel, int position)
    Gets an object value.
    getSingleValueBlock(int channel, int position)
    Gets a value stored as a Block.
    io.airlift.slice.Slice
    getSlice(int channel, int position)
    Gets a value as a Slice.
    boolean
    isNull(int channel, int position)
    Check if a value is null.
    int
    Gets the number of rows in the partition
  • Method Details

    • size

      int size()
      Gets the number of rows in the partition
    • isNull

      boolean isNull(int channel, int position)
      Check if a value is null.
      Parameters:
      channel - argument number
      position - row within the partition, starting at zero
      Returns:
      if the value is null
    • getBoolean

      boolean getBoolean(int channel, int position)
      Gets a value as a boolean.
      Parameters:
      channel - argument number
      position - row within the partition, starting at zero
      Returns:
      value at the specified channel and position
    • getLong

      long getLong(int channel, int position)
      Gets a value as a long.
      Parameters:
      channel - argument number
      position - row within the partition, starting at zero
      Returns:
      value at the specified channel and position
    • getDouble

      double getDouble(int channel, int position)
      Gets a value as a double.
      Parameters:
      channel - argument number
      position - row within the partition, starting at zero
      Returns:
      value at the specified channel and position
    • getSlice

      io.airlift.slice.Slice getSlice(int channel, int position)
      Gets a value as a Slice.
      Parameters:
      channel - argument number
      position - row within the partition, starting at zero
    • getSingleValueBlock

      Block getSingleValueBlock(int channel, int position)
      Gets a value stored as a Block.
      Parameters:
      channel - argument number
      position - row within the partition, starting at zero
    • getObject

      Object getObject(int channel, int position)
      Gets an object value.
      Parameters:
      channel - argument number
      position - row within the partition, starting at zero
    • appendTo

      void appendTo(int channel, int position, BlockBuilder output)
      Outputs a value from the index. This is useful for "value" window functions such as lag that operate on arbitrary types without caring about the specific contents.
      Parameters:
      channel - argument number
      position - row within the partition, starting at zero
      output - the BlockBuilder to output to