Class ShiftedColumnAccessorBase

java.lang.Object
org.apache.druid.query.operator.window.value.ShiftedColumnAccessorBase
All Implemented Interfaces:
ColumnAccessor

public abstract class ShiftedColumnAccessorBase extends Object implements ColumnAccessor
  • Constructor Details

    • ShiftedColumnAccessorBase

      public ShiftedColumnAccessorBase(ColumnAccessor accessor)
  • Method Details

    • getType

      public ColumnType getType()
      Description copied from interface: ColumnAccessor
      Get the type of the Column
      Specified by:
      getType in interface ColumnAccessor
      Returns:
      the type of the Column
    • numRows

      public int numRows()
      Description copied from interface: ColumnAccessor
      Get the number of rows
      Specified by:
      numRows in interface ColumnAccessor
      Returns:
      the number of rows
    • isNull

      public boolean isNull(int rowNum)
      Description copied from interface: ColumnAccessor
      Get whether the value of a row is null
      Specified by:
      isNull in interface ColumnAccessor
      Parameters:
      rowNum - the row id, 0-indexed
      Returns:
      true if the value is null
    • getObject

      public Object getObject(int rowNum)
      Description copied from interface: ColumnAccessor
      Get the Object representation of the row.
      Specified by:
      getObject in interface ColumnAccessor
      Parameters:
      rowNum - the row id, 0-indexed
      Returns:
      the Object representation of the row. Returns null If ColumnAccessor.isNull(int) is true.
    • getDouble

      public double getDouble(int rowNum)
      Description copied from interface: ColumnAccessor
      Get the primitive double representation of the row.
      Specified by:
      getDouble in interface ColumnAccessor
      Parameters:
      rowNum - the row id, 0-indexed
      Returns:
      the primitive double representation of the row. Returns 0D If ColumnAccessor.isNull(int) is true.
    • getFloat

      public float getFloat(int rowNum)
      Description copied from interface: ColumnAccessor
      Get the primitive float representation of the row.
      Specified by:
      getFloat in interface ColumnAccessor
      Parameters:
      rowNum - the row id, 0-indexed
      Returns:
      the primitive float representation of the row. Returns 0F If ColumnAccessor.isNull(int) is true.
    • getLong

      public long getLong(int rowNum)
      Description copied from interface: ColumnAccessor
      Get the primitive long representation of the row.
      Specified by:
      getLong in interface ColumnAccessor
      Parameters:
      rowNum - the row id, 0-indexed
      Returns:
      the primitive long representation of the row. Returns 0L If ColumnAccessor.isNull(int) is true.
    • getInt

      public int getInt(int rowNum)
      Description copied from interface: ColumnAccessor
      Get the primitive int representation of the row.
      Specified by:
      getInt in interface ColumnAccessor
      Parameters:
      rowNum - the row id, 0-indexed
      Returns:
      the primitive int representation of the row. Returns 0 If ColumnAccessor.isNull(int) is true.
    • compareRows

      public int compareRows(int lhsRowNum, int rhsRowNum)
      Description copied from interface: ColumnAccessor
      Compares two rows using a comparison that follows the same semantics as Comparator.compare(T, T)

      This is not comparing the row Ids, but the values referred to by the row ids.

      Specified by:
      compareRows in interface ColumnAccessor
      Parameters:
      lhsRowNum - the row id of the left-hand-side of the comparison
      rhsRowNum - the row id of the right-hand-side of the comparison
      Returns:
      the result of the comparison of the two rows
    • getActualValue

      protected abstract int getActualValue(int rowNum)
    • outsideBounds

      protected abstract boolean outsideBounds(int rowNum)