public abstract static class AbstractArrayWriter.BaseArrayWriter extends AbstractArrayWriter
AbstractArrayWriter.ArrayElementWriterIndex, AbstractArrayWriter.ArrayObjectWriter, AbstractArrayWriter.BaseArrayWriter
WriterEvents.ColumnWriterListener, WriterEvents.State
elementIndex, elementObjWriter, offsetsWriter, outerIndex
Constructor and Description |
---|
BaseArrayWriter(ColumnMetadata schema,
UInt4Vector offsetVector,
AbstractObjectWriter elementObjWriter) |
Modifier and Type | Method and Description |
---|---|
void |
bindIndex(ColumnWriterIndex index)
Bind the writer to a writer index.
|
void |
dump(HierarchicalFormatter format) |
void |
endArrayValue()
End a value.
|
void |
endWrite()
End a batch: finalize any vector values.
|
int |
lastWriteIndex()
Return the last write position in the vector.
|
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 |
startRow()
Start a new row.
|
void |
startWrite()
Start a write (batch) operation.
|
array, bindListener, copy, dict, entry, entryType, isProjected, nullable, offsetWriter, rowStartIndex, scalar, schema, setNull, setNull, size, tuple, type, variant, writeIndex
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
save
setObject
public BaseArrayWriter(ColumnMetadata schema, UInt4Vector offsetVector, AbstractObjectWriter elementObjWriter)
public void bindIndex(ColumnWriterIndex index)
WriterEvents
index
- the writer index (top level or nested for
arrays)public void startWrite()
WriterEvents
public void startRow()
WriterEvents
WriterEvents.restartRow()
instead.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.public void restartRow()
WriterEvents
public void saveRow()
WriterEvents
public void preRollover()
WriterEvents
public void postRollover()
WriterEvents
public void endWrite()
WriterEvents
public int lastWriteIndex()
WriterPosition
lastWriteIndex
in interface WriterPosition
lastWriteIndex
in class AbstractArrayWriter
public void dump(HierarchicalFormatter format)
dump
in interface WriterEvents
dump
in class AbstractArrayWriter
Copyright © 1970 The Apache Software Foundation. All rights reserved.