public abstract class AbstractScalarWriterImpl extends AbstractScalarWriter implements WriterEvents
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractScalarWriterImpl.ScalarObjectWriter
Wraps a scalar writer and its event handler to provide a uniform
JSON-like interface for all writer types.
|
WriterEvents.ColumnWriterListener, WriterEvents.State| Modifier and Type | Field and Description |
|---|---|
protected ColumnMetadata |
schema |
protected ColumnWriterIndex |
vectorIndex
Indicates the position in the vector to write.
|
| Constructor and Description |
|---|
AbstractScalarWriterImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
bindIndex(ColumnWriterIndex vectorIndex)
Bind the writer to a writer index.
|
void |
bindSchema(ColumnMetadata schema) |
void |
dump(HierarchicalFormatter format) |
void |
endArrayValue()
End a value.
|
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 |
rowStartIndex()
Position within the vector of the first value for the current row.
|
void |
saveRow()
Saves a row.
|
ColumnMetadata |
schema()
Returns the schema of the column associated with this writer.
|
void |
startRow()
Start a new row.
|
void |
startWrite()
Start a write (batch) operation.
|
ObjectType |
type()
Return the object (structure) type of this writer.
|
abstract BaseDataValueVector |
vector() |
int |
writeIndex()
Current write index for the writer.
|
bindListener, conversionError, extendedType, setObject, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitbindListener, endWrite, postRollover, preRollover, restartRowlastWriteIndexsetDefaultValue, valueTypecopy, nullable, setNullappendBytes, setBoolean, setBytes, setDate, setDecimal, setDouble, setFloat, setInt, setLong, setNull, setPeriod, setString, setTime, setTimestamp, setValueprotected ColumnMetadata schema
protected ColumnWriterIndex vectorIndex
public ObjectType type()
ColumnWritertype in interface ColumnWriterpublic void bindSchema(ColumnMetadata schema)
public void bindIndex(ColumnWriterIndex vectorIndex)
WriterEventsbindIndex in interface WriterEventsvectorIndex - the writer index (top level or nested for
arrays)public int rowStartIndex()
WriterPositionrowStartIndex in interface WriterPositionpublic int writeIndex()
WriterPositionwriteIndex in interface WriterPositionpublic ColumnMetadata schema()
ColumnWriterschema in interface ColumnWriterpublic abstract BaseDataValueVector vector()
public void startWrite()
WriterEventsstartWrite in interface WriterEventspublic void startRow()
WriterEventsWriterEvents.restartRow() instead.startRow in interface WriterEventspublic void endArrayValue()
WriterEventsWriterEvents.saveRow(), but the save of a value
is conditional on saving the row. This version is primarily of use
in tuples nested inside arrays: it saves each tuple within the array,
advancing to a new position in the array. The update of the array's
offset vector based on the cumulative value saves is done when
saving the row.endArrayValue in interface WriterEventspublic void saveRow()
WriterEventssaveRow in interface WriterEventspublic boolean isProjected()
ColumnWriterisProjected in interface ColumnWriterpublic void dump(HierarchicalFormatter format)
dump in interface WriterEventsCopyright © 2021 The Apache Software Foundation. All rights reserved.