Interface TypedSetters

All Known Implementing Classes:
BinaryArrayData, BinaryRowData, ColumnarArrayData, ColumnarRowData, NestedRowData

@Internal public interface TypedSetters
Provide type specialized setters to reduce if/else and eliminate box and unbox. This is mainly used on the binary format such as BinaryRowData.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    setBoolean(int pos, boolean value)
     
    void
    setByte(int pos, byte value)
     
    void
    setDecimal(int pos, DecimalData value, int precision)
    Set the decimal column value.
    void
    setDouble(int pos, double value)
     
    void
    setFloat(int pos, float value)
     
    void
    setInt(int pos, int value)
     
    void
    setLong(int pos, long value)
     
    void
    setNullAt(int pos)
     
    void
    setShort(int pos, short value)
     
    void
    setTimestamp(int pos, TimestampData value, int precision)
    Set Timestamp value.
  • Method Details

    • setNullAt

      void setNullAt(int pos)
    • setBoolean

      void setBoolean(int pos, boolean value)
    • setByte

      void setByte(int pos, byte value)
    • setShort

      void setShort(int pos, short value)
    • setInt

      void setInt(int pos, int value)
    • setLong

      void setLong(int pos, long value)
    • setFloat

      void setFloat(int pos, float value)
    • setDouble

      void setDouble(int pos, double value)
    • setDecimal

      void setDecimal(int pos, DecimalData value, int precision)
      Set the decimal column value.

      Note: Precision is compact: can call setNullAt(int) when decimal is null. Precision is not compact: can not call setNullAt(int) when decimal is null, must call setDecimal(pos, null, precision) because we need update var-length-part.

    • setTimestamp

      void setTimestamp(int pos, TimestampData value, int precision)
      Set Timestamp value.

      Note: If precision is compact: can call setNullAt(int) when TimestampData value is null. Otherwise: can not call setNullAt(int) when TimestampData value is null, must call setTimestamp(pos, null, precision) because we need to update var-length-part.