Class GenericColumnVector

Object
io.delta.kernel.internal.data.GenericColumnVector
All Implemented Interfaces:
ColumnVector, AutoCloseable

public class GenericColumnVector extends Object implements ColumnVector
A generic implementation of ColumnVector that wraps a list of values.
  • Constructor Details

    • GenericColumnVector

      public GenericColumnVector(List<?> values, DataType dataType)
  • Method Details

    • getDataType

      public DataType getDataType()
      Specified by:
      getDataType in interface ColumnVector
      Returns:
      the data type of this column vector.
    • getSize

      public int getSize()
      Specified by:
      getSize in interface ColumnVector
      Returns:
      number of elements in the vector
    • close

      public void close()
      Description copied from interface: ColumnVector
      Cleans up memory for this column vector. The column vector is not usable after this.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface ColumnVector
    • isNullAt

      public boolean isNullAt(int rowId)
      Specified by:
      isNullAt in interface ColumnVector
      Parameters:
      rowId -
      Returns:
      whether the value at rowId is NULL.
    • getBoolean

      public boolean getBoolean(int rowId)
      Description copied from interface: ColumnVector
      Returns the boolean type value for rowId. The return value is undefined and can be anything, if the slot for rowId is null.
      Specified by:
      getBoolean in interface ColumnVector
      Parameters:
      rowId -
      Returns:
      Boolean value at the given row id
    • getByte

      public byte getByte(int rowId)
      Description copied from interface: ColumnVector
      Returns the byte type value for rowId. The return value is undefined and can be anything, if the slot for rowId is null.
      Specified by:
      getByte in interface ColumnVector
      Parameters:
      rowId -
      Returns:
      Byte value at the given row id
    • getShort

      public short getShort(int rowId)
      Description copied from interface: ColumnVector
      Returns the short type value for rowId. The return value is undefined and can be anything, if the slot for rowId is null.
      Specified by:
      getShort in interface ColumnVector
      Parameters:
      rowId -
      Returns:
      Short value at the given row id
    • getInt

      public int getInt(int rowId)
      Description copied from interface: ColumnVector
      Returns the int type value for rowId. The return value is undefined and can be anything, if the slot for rowId is null.
      Specified by:
      getInt in interface ColumnVector
      Parameters:
      rowId -
      Returns:
      Integer value at the given row id
    • getLong

      public long getLong(int rowId)
      Description copied from interface: ColumnVector
      Returns the long type value for rowId. The return value is undefined and can be anything, if the slot for rowId is null.
      Specified by:
      getLong in interface ColumnVector
      Parameters:
      rowId -
      Returns:
      Long value at the given row id
    • getFloat

      public float getFloat(int rowId)
      Description copied from interface: ColumnVector
      Returns the float type value for rowId. The return value is undefined and can be anything, if the slot for rowId is null.
      Specified by:
      getFloat in interface ColumnVector
      Parameters:
      rowId -
      Returns:
      Float value at the given row id
    • getDouble

      public double getDouble(int rowId)
      Description copied from interface: ColumnVector
      Returns the double type value for rowId. The return value is undefined and can be anything, if the slot for rowId is null.
      Specified by:
      getDouble in interface ColumnVector
      Parameters:
      rowId -
      Returns:
      Double value at the given row id
    • getDecimal

      public BigDecimal getDecimal(int rowId)
      Description copied from interface: ColumnVector
      Returns the decimal type value for rowId. The return value is undefined and can be anything, if the slot for rowId is null.
      Specified by:
      getDecimal in interface ColumnVector
      Parameters:
      rowId -
      Returns:
      Decimal value at the given row id
    • getString

      public String getString(int rowId)
      Description copied from interface: ColumnVector
      Returns the string type value for rowId. The return value is undefined and can be anything, if the slot for rowId is null.
      Specified by:
      getString in interface ColumnVector
      Parameters:
      rowId -
      Returns:
      String value at the given row id
    • getBinary

      public byte[] getBinary(int rowId)
      Description copied from interface: ColumnVector
      Returns the binary type value for rowId. The return value is undefined and can be anything, if the slot for rowId is null.
      Specified by:
      getBinary in interface ColumnVector
      Parameters:
      rowId -
      Returns:
      Binary value at the given row id
    • getArray

      public ArrayValue getArray(int rowId)
      Description copied from interface: ColumnVector
      Return the array value located at rowId. Returns null if the slot for rowId is null
      Specified by:
      getArray in interface ColumnVector
    • getMap

      public MapValue getMap(int rowId)
      Description copied from interface: ColumnVector
      Return the map value located at rowId. Returns null if the slot for rowId is null
      Specified by:
      getMap in interface ColumnVector
    • getChild

      public ColumnVector getChild(int ordinal)
      Description copied from interface: ColumnVector
      Get the child vector associated with the given ordinal. This method is applicable only to the struct type columns.
      Specified by:
      getChild in interface ColumnVector
      Parameters:
      ordinal - Ordinal of the child vector to return.