Interface ScalarWriter
- All Superinterfaces:
ColumnWriter
,ValueWriter
- All Known Subinterfaces:
OffsetVectorWriter
- All Known Implementing Classes:
AbstractFixedWidthWriter
,AbstractFixedWidthWriter.BaseFixedWidthWriter
,AbstractFixedWidthWriter.BaseIntWriter
,AbstractScalarWriter
,AbstractScalarWriterImpl
,BaseScalarWriter
,BaseVarWidthWriter
,BitColumnWriter
,ColumnAccessors.BigIntColumnWriter
,ColumnAccessors.DateColumnWriter
,ColumnAccessors.Decimal18ColumnWriter
,ColumnAccessors.Decimal28SparseColumnWriter
,ColumnAccessors.Decimal38SparseColumnWriter
,ColumnAccessors.Decimal9ColumnWriter
,ColumnAccessors.Float4ColumnWriter
,ColumnAccessors.Float8ColumnWriter
,ColumnAccessors.IntColumnWriter
,ColumnAccessors.IntervalColumnWriter
,ColumnAccessors.IntervalDayColumnWriter
,ColumnAccessors.IntervalYearColumnWriter
,ColumnAccessors.SmallIntColumnWriter
,ColumnAccessors.TimeColumnWriter
,ColumnAccessors.TimeStampColumnWriter
,ColumnAccessors.TinyIntColumnWriter
,ColumnAccessors.UInt1ColumnWriter
,ColumnAccessors.UInt2ColumnWriter
,ColumnAccessors.UInt4ColumnWriter
,ColumnAccessors.UInt8ColumnWriter
,ColumnAccessors.Var16CharColumnWriter
,ColumnAccessors.VarBinaryColumnWriter
,ColumnAccessors.VarCharColumnWriter
,ColumnAccessors.VarDecimalColumnWriter
,DummyArrayWriter.DummyOffsetVectorWriter
,DummyScalarWriter
,NullableScalarWriter
,OffsetVectorWriterImpl
Represents a scalar value: a required column, a nullable column,
or one element within an array of scalars.
Vector values are mapped to their "natural" representations: the representation closest to the actual vector value. For date and time values, this generally means a numeric value. Applications can then map this value to Java objects as desired. Decimal types all map to BigDecimal as that is the only way in Java to represent large decimal values.
In general, a column maps to just one value. However, derived classes may choose to provide type conversions if convenient. An exception is thrown if a call is made to a method that is not supported by the column type.
-
Method Summary
Modifier and TypeMethodDescriptionThe extended type of the value, describes the secondary type for DATE, TIME and TIMESTAMP for which the value type is int or long.void
setDefaultValue
(Object value) Set the default value to be used to fill empties for this writer.Describe the type of the value.Methods inherited from interface org.apache.drill.exec.vector.accessor.ColumnWriter
copy, isProjected, nullable, schema, setNull, setObject, type
Methods inherited from interface org.apache.drill.exec.vector.accessor.ValueWriter
appendBytes, setBoolean, setBytes, setDate, setDecimal, setDouble, setFloat, setInt, setLong, setNull, setPeriod, setString, setTime, setTimestamp, setValue
-
Method Details
-
valueType
ValueType valueType()Describe the type of the value. This is a compression of the value vector type: it describes which method will return the vector value.- Returns:
- the value type which indicates which get method is valid for the column
-
extendedType
ValueType extendedType()The extended type of the value, describes the secondary type for DATE, TIME and TIMESTAMP for which the value type is int or long. -
setDefaultValue
Set the default value to be used to fill empties for this writer. Only valid for required writers: null writers set this is-set bit to 0 and set the data value to 0.- Parameters:
value
- the value to set. Cannot be null. The type of the value must match that legal forValueWriter.setValue(Object)
-