public class ListWriterImpl extends ObjectArrayWriter
AbstractArrayWriter.ArrayElementWriterIndex, AbstractArrayWriter.ArrayObjectWriter, AbstractArrayWriter.BaseArrayWriter
WriterEvents.ColumnWriterListener, WriterEvents.State
elementIndex, elementObjWriter, offsetsWriter, outerIndex
Constructor and Description |
---|
ListWriterImpl(ColumnMetadata schema,
ListVector vector,
AbstractObjectWriter memberWriter) |
Modifier and Type | Method and Description |
---|---|
void |
bindIndex(ColumnWriterIndex index)
Bind the writer to a writer index.
|
void |
endArrayValue()
End a value.
|
void |
endWrite()
End a batch: finalize any vector values.
|
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.
|
void |
saveRow()
Saves a row.
|
void |
setNull(boolean isNull) |
void |
setObject(Object array)
Generic technique to write data as a generic Java object.
|
void |
startRow()
Start a new row.
|
void |
startWrite()
Start a write (batch) operation.
|
ListVector |
vector() |
save
dump, lastWriteIndex
array, bindListener, copy, dict, entry, entryType, isProjected, nullable, offsetWriter, rowStartIndex, scalar, schema, setNull, size, tuple, type, variant, writeIndex
public ListWriterImpl(ColumnMetadata schema, ListVector vector, AbstractObjectWriter memberWriter)
public void bindIndex(ColumnWriterIndex index)
WriterEvents
bindIndex
in interface WriterEvents
bindIndex
in class AbstractArrayWriter.BaseArrayWriter
index
- the writer index (top level or nested for
arrays)public ListVector vector()
public void setNull(boolean isNull)
setNull
in interface ArrayWriter
setNull
in class AbstractArrayWriter
public void startWrite()
WriterEvents
startWrite
in interface WriterEvents
startWrite
in class AbstractArrayWriter.BaseArrayWriter
public void startRow()
WriterEvents
WriterEvents.restartRow()
instead.startRow
in interface WriterEvents
startRow
in class AbstractArrayWriter.BaseArrayWriter
public void endArrayValue()
WriterEvents
WriterEvents.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 WriterEvents
endArrayValue
in class AbstractArrayWriter.BaseArrayWriter
public void restartRow()
WriterEvents
restartRow
in interface WriterEvents
restartRow
in class AbstractArrayWriter.BaseArrayWriter
public void saveRow()
WriterEvents
saveRow
in interface WriterEvents
saveRow
in class AbstractArrayWriter.BaseArrayWriter
public void preRollover()
WriterEvents
preRollover
in interface WriterEvents
preRollover
in class AbstractArrayWriter.BaseArrayWriter
public void postRollover()
WriterEvents
postRollover
in interface WriterEvents
postRollover
in class AbstractArrayWriter.BaseArrayWriter
public void endWrite()
WriterEvents
endWrite
in interface WriterEvents
endWrite
in class AbstractArrayWriter.BaseArrayWriter
public void setObject(Object array)
ColumnWriter
setObject
in interface ColumnWriter
setObject
in class ObjectArrayWriter
array
- value to write to the vector. The Java type of the
object indicates the Drill storage typeCopyright © 1970 The Apache Software Foundation. All rights reserved.