public class SimpleListShim extends Object implements UnionWriterImpl.UnionShim
ListWriterImpl class that
directly holds that single type.) This shim is needed when we want
to present a uniform variant interface for a list that holds zero
one (this case) or many types.WriterEvents.ColumnWriterListener, WriterEvents.State| Constructor and Description |
|---|
SimpleListShim() |
SimpleListShim(AbstractObjectWriter writer) |
| Modifier and Type | Method and Description |
|---|---|
void |
addMember(AbstractObjectWriter colWriter) |
AbstractObjectWriter |
addMember(ColumnMetadata colSchema) |
AbstractObjectWriter |
addMember(TypeProtos.MinorType type) |
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 |
bindWriter(UnionWriterImpl writer) |
void |
dump(HierarchicalFormatter format) |
void |
endArrayValue()
End a value.
|
void |
endWrite()
End a batch: finalize any vector values.
|
boolean |
hasType(TypeProtos.MinorType type) |
int |
lastWriteIndex()
Return the last write position in the vector.
|
ObjectWriter |
member(TypeProtos.MinorType type)
Return an existing writer for the given type, or create a new one
if needed.
|
AbstractObjectWriter |
memberWriter() |
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 |
saveRow()
Saves a row.
|
void |
setNull() |
void |
setType(TypeProtos.MinorType type) |
void |
startRow()
Start a new row.
|
void |
startWrite()
Start a write (batch) operation.
|
int |
writeIndex()
Current write index for the writer.
|
public SimpleListShim()
public SimpleListShim(AbstractObjectWriter writer)
public void bindWriter(UnionWriterImpl writer)
bindWriter in interface UnionWriterImpl.UnionShimpublic void bindIndex(ColumnWriterIndex index)
WriterEventsbindIndex in interface WriterEventsindex - the writer index (top level or nested for
arrays)public void bindListener(WriterEvents.ColumnWriterListener listener)
WriterEventsbindListener in interface WriterEventslistener - the vector event listener to bindpublic boolean hasType(TypeProtos.MinorType type)
hasType in interface UnionWriterImpl.UnionShimpublic void setType(TypeProtos.MinorType type)
setType in interface UnionWriterImpl.UnionShimpublic ObjectWriter member(TypeProtos.MinorType type)
UnionWriterImpl.UnionShimmember in interface UnionWriterImpl.UnionShimtype - desired variant typepublic AbstractObjectWriter memberWriter()
public AbstractObjectWriter addMember(ColumnMetadata colSchema)
addMember in interface UnionWriterImpl.UnionShimpublic AbstractObjectWriter addMember(TypeProtos.MinorType type)
addMember in interface UnionWriterImpl.UnionShimpublic void addMember(AbstractObjectWriter colWriter)
addMember in interface UnionWriterImpl.UnionShimpublic void setNull()
setNull in interface UnionWriterImpl.UnionShimpublic 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 restartRow()
WriterEventsrestartRow in interface WriterEventspublic void saveRow()
WriterEventssaveRow in interface WriterEventspublic void endWrite()
WriterEventsendWrite in interface WriterEventspublic void preRollover()
WriterEventspreRollover in interface WriterEventspublic void postRollover()
WriterEventspostRollover in interface WriterEventspublic int lastWriteIndex()
WriterPositionlastWriteIndex in interface UnionWriterImpl.UnionShimlastWriteIndex in interface WriterPositionpublic int rowStartIndex()
WriterPositionrowStartIndex in interface UnionWriterImpl.UnionShimrowStartIndex in interface WriterPositionpublic int writeIndex()
WriterPositionwriteIndex in interface WriterPositionpublic void dump(HierarchicalFormatter format)
dump in interface WriterEventsCopyright © 2021 The Apache Software Foundation. All rights reserved.