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 TypeMethodDescriptionvoidsetBoolean(int pos, boolean value) voidsetByte(int pos, byte value) voidsetDecimal(int pos, DecimalData value, int precision) Set the decimal column value.voidsetDouble(int pos, double value) voidsetFloat(int pos, float value) voidsetInt(int pos, int value) voidsetLong(int pos, long value) voidsetNullAt(int pos) voidsetShort(int pos, short value) voidsetTimestamp(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
Set the decimal column value.Note: Precision is compact: can call
setNullAt(int)when decimal is null. Precision is not compact: can not callsetNullAt(int)when decimal is null, must callsetDecimal(pos, null, precision)because we need update var-length-part. -
setTimestamp
Set Timestamp value.Note: If precision is compact: can call
setNullAt(int)when TimestampData value is null. Otherwise: can not callsetNullAt(int)when TimestampData value is null, must callsetTimestamp(pos, null, precision)because we need to update var-length-part.
-