public class EmptyListShim extends Object implements UnionWriterImpl.UnionShim
WriterEvents.ColumnWriterListener, WriterEvents.State
Constructor and Description |
---|
EmptyListShim() |
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.
|
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 void bindWriter(UnionWriterImpl writer)
bindWriter
in interface UnionWriterImpl.UnionShim
public void bindIndex(ColumnWriterIndex index)
WriterEvents
bindIndex
in interface WriterEvents
index
- the writer index (top level or nested for
arrays)public void bindListener(WriterEvents.ColumnWriterListener listener)
WriterEvents
bindListener
in interface WriterEvents
listener
- the vector event listener to bindpublic void startWrite()
WriterEvents
startWrite
in interface WriterEvents
public void startRow()
WriterEvents
WriterEvents.restartRow()
instead.startRow
in interface WriterEvents
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
public void restartRow()
WriterEvents
restartRow
in interface WriterEvents
public void saveRow()
WriterEvents
saveRow
in interface WriterEvents
public void endWrite()
WriterEvents
endWrite
in interface WriterEvents
public void preRollover()
WriterEvents
preRollover
in interface WriterEvents
public void postRollover()
WriterEvents
postRollover
in interface WriterEvents
public void setNull()
setNull
in interface UnionWriterImpl.UnionShim
public boolean hasType(TypeProtos.MinorType type)
hasType
in interface UnionWriterImpl.UnionShim
public ObjectWriter member(TypeProtos.MinorType type)
UnionWriterImpl.UnionShim
member
in interface UnionWriterImpl.UnionShim
type
- desired variant typepublic void setType(TypeProtos.MinorType type)
setType
in interface UnionWriterImpl.UnionShim
public AbstractObjectWriter addMember(ColumnMetadata colSchema)
addMember
in interface UnionWriterImpl.UnionShim
public AbstractObjectWriter addMember(TypeProtos.MinorType type)
addMember
in interface UnionWriterImpl.UnionShim
public int lastWriteIndex()
WriterPosition
lastWriteIndex
in interface UnionWriterImpl.UnionShim
lastWriteIndex
in interface WriterPosition
public int rowStartIndex()
WriterPosition
rowStartIndex
in interface UnionWriterImpl.UnionShim
rowStartIndex
in interface WriterPosition
public int writeIndex()
WriterPosition
writeIndex
in interface WriterPosition
public void addMember(AbstractObjectWriter colWriter)
addMember
in interface UnionWriterImpl.UnionShim
public void dump(HierarchicalFormatter format)
dump
in interface WriterEvents
Copyright © 1970 The Apache Software Foundation. All rights reserved.