Class ColumnAccessors.Decimal18ColumnWriter
java.lang.Object
org.apache.drill.exec.vector.accessor.writer.AbstractScalarWriter
org.apache.drill.exec.vector.accessor.writer.AbstractScalarWriterImpl
org.apache.drill.exec.vector.accessor.writer.BaseScalarWriter
org.apache.drill.exec.vector.accessor.writer.AbstractFixedWidthWriter
org.apache.drill.exec.vector.accessor.writer.AbstractFixedWidthWriter.BaseFixedWidthWriter
org.apache.drill.exec.vector.accessor.ColumnAccessors.Decimal18ColumnWriter
- All Implemented Interfaces:
ColumnWriter
,ScalarWriter
,ValueWriter
,WriterEvents
,WriterPosition
- Enclosing class:
- ColumnAccessors
public static class ColumnAccessors.Decimal18ColumnWriter
extends AbstractFixedWidthWriter.BaseFixedWidthWriter
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.drill.exec.vector.accessor.writer.AbstractFixedWidthWriter
AbstractFixedWidthWriter.BaseFixedWidthWriter, AbstractFixedWidthWriter.BaseIntWriter
Nested classes/interfaces inherited from class org.apache.drill.exec.vector.accessor.writer.AbstractScalarWriterImpl
AbstractScalarWriterImpl.ScalarObjectWriter
Nested classes/interfaces inherited from interface org.apache.drill.exec.vector.accessor.writer.WriterEvents
WriterEvents.ColumnWriterListener, WriterEvents.State
-
Field Summary
Fields inherited from class org.apache.drill.exec.vector.accessor.writer.AbstractFixedWidthWriter
lastWriteIndex
Fields inherited from class org.apache.drill.exec.vector.accessor.writer.BaseScalarWriter
capacity, drillBuf, emptyValue, listener, MIN_BUFFER_SIZE
Fields inherited from class org.apache.drill.exec.vector.accessor.writer.AbstractScalarWriterImpl
schema, vectorIndex
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal void
copy
(ColumnReader from) Copy a single value from the given reader, which must be of the same type as this writer.final void
setDecimal
(BigDecimal value) final void
setDefaultValue
(Object value) Set the default value to be used to fill empties for this writer.final void
setDouble
(double value) final void
setFloat
(float value) final void
setInt
(int value) final void
setLong
(long value) final void
Write value to a vector as a Java object of the "native" type for the column.Describe the type of the value.vector()
int
width()
final void
writeDecimal
(DrillBuf buf, BigDecimal value) Methods inherited from class org.apache.drill.exec.vector.accessor.writer.AbstractFixedWidthWriter.BaseFixedWidthWriter
fillEmpties, prepareWrite, prepareWrite
Methods inherited from class org.apache.drill.exec.vector.accessor.writer.AbstractFixedWidthWriter
dump, endWrite, lastWriteIndex, mandatoryResize, postRollover, preRollover, resize, restartRow, setBuffer, setLastWriteIndex, setValueCount, skipNulls, startWrite
Methods inherited from class org.apache.drill.exec.vector.accessor.writer.BaseScalarWriter
appendBytes, bindListener, bindSchema, canExpand, nullable, overflowed, realloc, setBoolean, setBytes, setDate, setNull, setPeriod, setString, setTime, setTimestamp
Methods inherited from class org.apache.drill.exec.vector.accessor.writer.AbstractScalarWriterImpl
bindIndex, endArrayValue, isProjected, rowStartIndex, saveRow, schema, startRow, type, writeIndex
Methods inherited from class org.apache.drill.exec.vector.accessor.writer.AbstractScalarWriter
conversionError, extendedType, setObject, toString
-
Constructor Details
-
Decimal18ColumnWriter
-
-
Method Details
-
vector
- Specified by:
vector
in classAbstractScalarWriterImpl
-
width
public int width()- Specified by:
width
in classAbstractFixedWidthWriter
-
valueType
Description copied from interface:ScalarWriter
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
-
setDecimal
- Specified by:
setDecimal
in interfaceValueWriter
- Overrides:
setDecimal
in classBaseScalarWriter
-
writeDecimal
-
setInt
public final void setInt(int value) - Specified by:
setInt
in interfaceValueWriter
- Overrides:
setInt
in classBaseScalarWriter
-
setLong
public final void setLong(long value) - Specified by:
setLong
in interfaceValueWriter
- Overrides:
setLong
in classBaseScalarWriter
-
setDouble
public final void setDouble(double value) - Specified by:
setDouble
in interfaceValueWriter
- Overrides:
setDouble
in classBaseScalarWriter
-
setFloat
public final void setFloat(float value) - Specified by:
setFloat
in interfaceValueWriter
- Overrides:
setFloat
in classBaseScalarWriter
-
setValue
Description copied from interface:ValueWriter
Write value to a vector as a Java object of the "native" type for the column. This form is available only on scalar writers. The object must be of the form for the primary write method above.Primarily to be used when the code already knows the object type.
- Parameters:
value
- a value that matches the primary setter above, or null to set the column to null- See Also:
-
setDefaultValue
Description copied from interface:ScalarWriter
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)
-
copy
Description copied from interface:ColumnWriter
Copy a single value from the given reader, which must be of the same type as this writer.- Parameters:
from
- reader to provide the data
-