public class DummyScalarWriter extends AbstractScalarWriterImpl
AbstractScalarWriterImpl.ScalarObjectWriterWriterEvents.ColumnWriterListener, WriterEvents.Stateschema, vectorIndex| Constructor and Description |
|---|
DummyScalarWriter(ColumnMetadata schema) |
| Modifier and Type | Method and Description |
|---|---|
void |
appendBytes(byte[] value,
int len) |
void |
bindIndex(ColumnWriterIndex index)
Bind the writer to a writer index.
|
void |
bindListener(WriterEvents.ColumnWriterListener listener)
Bind a listener to the underlying vector writer.
|
void |
copy(ColumnReader from)
Copy a single value from the given reader, which must be of the
same type as this writer.
|
void |
endWrite()
End a batch: finalize any vector values.
|
boolean |
isProjected()
Whether this writer is projected (is backed by a materialized vector),
or is unprojected (is just a dummy writer.) In most cases, clients can
ignore whether the column is projected and just write to the writer.
|
int |
lastWriteIndex()
Return the last write position in the vector.
|
boolean |
nullable()
Whether this writer allows nulls.
|
void |
postRollover()
The vectors backing this writer rolled over.
|
void |
preRollover()
The vectors backing this vector are about to roll over.
|
void |
restartRow()
During a writer to a row, rewind the the current index position to
restart the row.
|
int |
rowStartIndex()
Position within the vector of the first value for the current row.
|
void |
setBoolean(boolean value) |
void |
setBytes(byte[] value,
int len) |
void |
setDate(LocalDate value) |
void |
setDecimal(BigDecimal value) |
void |
setDefaultValue(Object value)
Set the default value to be used to fill empties for this writer.
|
void |
setDouble(double value) |
void |
setFloat(float value) |
void |
setInt(int value) |
void |
setLong(long value) |
void |
setNull()
Set the current value to null.
|
void |
setPeriod(org.joda.time.Period value) |
void |
setString(String value) |
void |
setTime(LocalTime value) |
void |
setTimestamp(Instant value) |
void |
setValue(Object value)
Write value to a vector as a Java object of the "native" type for
the column.
|
ValueType |
valueType()
Describe the type of the value.
|
BaseDataValueVector |
vector() |
bindSchema, dump, endArrayValue, saveRow, schema, startRow, startWrite, type, writeIndexconversionError, extendedType, setObject, toStringpublic DummyScalarWriter(ColumnMetadata schema)
public void bindListener(WriterEvents.ColumnWriterListener listener)
WriterEventsbindListener in interface WriterEventsbindListener in class AbstractScalarWriterlistener - the vector event listener to bindpublic ValueType valueType()
ScalarWriterpublic boolean nullable()
ColumnWriterTypeProtos.DataMode.OPTIONAL type in the schema. List entries
are nullable, if they are primitive, but not if they are maps or lists.
Unions are nullable, regardless of cardinality.ColumnWriter.setNull() is supported, false
if notpublic void setNull()
ColumnWriterpublic void setBoolean(boolean value)
public void setInt(int value)
public void setLong(long value)
public void setFloat(float value)
public void setDouble(double value)
public void setString(String value)
public void setBytes(byte[] value,
int len)
public void appendBytes(byte[] value,
int len)
public void setDecimal(BigDecimal value)
public void setPeriod(org.joda.time.Period value)
public void bindIndex(ColumnWriterIndex index)
WriterEventsbindIndex in interface WriterEventsbindIndex in class AbstractScalarWriterImplindex - the writer index (top level or nested for
arrays)public void restartRow()
WriterEventspublic void endWrite()
WriterEventspublic void preRollover()
WriterEventspublic void postRollover()
WriterEventspublic int lastWriteIndex()
WriterPositionpublic BaseDataValueVector vector()
vector in class AbstractScalarWriterImplpublic int rowStartIndex()
WriterPositionrowStartIndex in interface WriterPositionrowStartIndex in class AbstractScalarWriterImplpublic void setDate(LocalDate value)
public void setTime(LocalTime value)
public void setTimestamp(Instant value)
public void setValue(Object value)
ValueWriterPrimarily to be used when the code already knows the object type.
value - a value that matches the primary setter above, or null
to set the column to nullfor the generic casepublic void setDefaultValue(Object value)
ScalarWritervalue - the value to set. Cannot be null. The type of the value
must match that legal for ValueWriter.setValue(Object)public boolean isProjected()
ColumnWriterisProjected in interface ColumnWriterisProjected in class AbstractScalarWriterImplpublic void copy(ColumnReader from)
ColumnWriterfrom - reader to provide the dataCopyright © 2021 The Apache Software Foundation. All rights reserved.