Class EmptyListShim
java.lang.Object
org.apache.drill.exec.vector.accessor.writer.EmptyListShim
- All Implemented Interfaces:
- UnionShim,- WriterEvents,- WriterPosition
Internal implementation for a list of (possible) variants when
 the list has no type associated with it at all. This shim is a
 placeholder that waits for the first type to be added. Used in
 the case that a list may eventually hold a union, but at present
 it holds nothing.
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.apache.drill.exec.vector.accessor.writer.UnionShimUnionShim.AbstractUnionShimNested classes/interfaces inherited from interface org.apache.drill.exec.vector.accessor.writer.WriterEventsWriterEvents.ColumnWriterListener, WriterEvents.State
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionaddMember(ColumnMetadata colSchema) voidaddMember(AbstractObjectWriter colWriter) voidbindIndex(ColumnWriterIndex index) Bind the writer to a writer index.voidBind a listener to the underlying vector writer.voidbindWriter(UnionWriterImpl writer) voiddump(HierarchicalFormatter format) voidEnd a value.voidendWrite()End a batch: finalize any vector values.booleanhasType(TypeProtos.MinorType type) booleanintReturn the last write position in the vector.member(TypeProtos.MinorType type) Return an existing writer for the given type, or create a new one if needed.voidThe vectors backing this writer rolled over.voidThe vectors backing this vector are about to roll over.voidDuring a writer to a row, rewind the the current index position to restart the row.intPosition within the vector of the first value for the current row.voidsaveRow()Saves a row.voidsetNull()voidsetType(TypeProtos.MinorType type) voidstartRow()Start a new row.voidStart a write (batch) operation.intCurrent write index for the writer.
- 
Constructor Details- 
EmptyListShimpublic EmptyListShim()
 
- 
- 
Method Details- 
bindWriter- Specified by:
- bindWriterin interface- UnionShim
 
- 
bindIndexDescription copied from interface:WriterEventsBind the writer to a writer index.- Specified by:
- bindIndexin interface- WriterEvents
- Parameters:
- index- the writer index (top level or nested for arrays)
 
- 
bindListenerDescription copied from interface:WriterEventsBind a listener to the underlying vector writer. This listener reports on vector events (overflow, growth), and so is called only when the writer is backed by a vector. The listener is ignored (and never called) for dummy (non-projected) columns. If the column is compound (such as for a nullable or repeated column, or for a map), then the writer is bound to the individual components.- Specified by:
- bindListenerin interface- WriterEvents
- Parameters:
- listener- the vector event listener to bind
 
- 
startWritepublic void startWrite()Description copied from interface:WriterEventsStart a write (batch) operation. Performs any vector initialization required at the start of a batch (especially for offset vectors.)- Specified by:
- startWritein interface- WriterEvents
 
- 
startRowpublic void startRow()Description copied from interface:WriterEventsStart a new row. To be called only when a row is not active. To restart a row, callWriterEvents.restartRow()instead.- Specified by:
- startRowin interface- WriterEvents
 
- 
endArrayValuepublic void endArrayValue()Description copied from interface:WriterEventsEnd a value. Similar toWriterEvents.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.- Specified by:
- endArrayValuein interface- WriterEvents
 
- 
restartRowpublic void restartRow()Description copied from interface:WriterEventsDuring a writer to a row, rewind the the current index position to restart the row. Done when abandoning the current row, such as when filtering out a row at read time.- Specified by:
- restartRowin interface- WriterEvents
 
- 
saveRowpublic void saveRow()Description copied from interface:WriterEventsSaves a row. Commits offset vector locations and advances each to the next position. Can be called only when a row is active.- Specified by:
- saveRowin interface- WriterEvents
 
- 
endWritepublic void endWrite()Description copied from interface:WriterEventsEnd a batch: finalize any vector values.- Specified by:
- endWritein interface- WriterEvents
 
- 
preRolloverpublic void preRollover()Description copied from interface:WriterEventsThe vectors backing this vector are about to roll over. Finish the current batch up to, but not including, the current row.- Specified by:
- preRolloverin interface- WriterEvents
 
- 
postRolloverpublic void postRollover()Description copied from interface:WriterEventsThe vectors backing this writer rolled over. This means that data for the current row has been rolled over into a new vector. Offsets and indexes should be shifted based on the understanding that data for the current row now resides at the start of a new vector instead of its previous location elsewhere in an old vector.- Specified by:
- postRolloverin interface- WriterEvents
 
- 
setNullpublic void setNull()
- 
hasType
- 
memberDescription copied from interface:UnionShimReturn an existing writer for the given type, or create a new one if needed.
- 
setType
- 
addMember
- 
addMember
- 
lastWriteIndexpublic int lastWriteIndex()Description copied from interface:WriterPositionReturn the last write position in the vector. This may be the same as the writer index position (if the vector was written at that point), or an earlier point. In either case, this value points to the last valid value in the vector.- Specified by:
- lastWriteIndexin interface- UnionShim
- Specified by:
- lastWriteIndexin interface- WriterPosition
- Returns:
- index of the last valid value in the vector
 
- 
rowStartIndexpublic int rowStartIndex()Description copied from interface:WriterPositionPosition within the vector of the first value for the current row. Note that this is always the first value for the row, even for a writer deeply nested within a hierarchy of arrays. (The first position for the current array is not exposed in this API.)- Specified by:
- rowStartIndexin interface- UnionShim
- Specified by:
- rowStartIndexin interface- WriterPosition
- Returns:
- the vector offset of the first value for the current row
 
- 
writeIndexpublic int writeIndex()Description copied from interface:WriterPositionCurrent write index for the writer. This is the global array location for arrays, same as the row index for top-level columns.- Specified by:
- writeIndexin interface- WriterPosition
- Returns:
- current write index
 
- 
addMember
- 
dump- Specified by:
- dumpin interface- WriterEvents
 
- 
isProjectedpublic boolean isProjected()- Specified by:
- isProjectedin interface- UnionShim
 
 
-