Class AbstractContainerVector
java.lang.Object
org.apache.drill.exec.vector.complex.AbstractContainerVector
- All Implemented Interfaces:
Closeable,AutoCloseable,Iterable<ValueVector>,ValueVector
- Direct Known Subclasses:
AbstractMapVector,RepeatedListVector
Base class for composite vectors.
This class implements common functionality of composite vectors.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.drill.exec.vector.ValueVector
ValueVector.Accessor, ValueVector.Mutator -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final BufferAllocatorprotected final CallBackprotected MaterializedFieldFields inherited from interface org.apache.drill.exec.vector.ValueVector
BITS_VECTOR_NAME, MAX_BUFFER_SIZE, MAX_ROW_COUNT, MIN_ROW_COUNT, OFFSETS_VECTOR_NAME, VALUES_VECTOR_NAME -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractContainerVector(MaterializedField field, BufferAllocator allocator, CallBack callBack) -
Method Summary
Modifier and TypeMethodDescriptionabstract <T extends ValueVector>
TaddOrGet(String name, TypeProtos.MajorType type, Class<T> clazz) voidAllocate new buffers.voidclose()Clears out all underlying child vectors.Returns aValueVectorcorresponding to the given field name if exists or null.abstract <T extends ValueVector>
Tprotected Collection<String> Returns a sequence of field names in the order that they show up in the schema.abstract VectorWithOrdinalgetField()Returns the field definition of this instance.abstract intsize()protected booleanprotected <T extends ValueVector>
Ttypeify(ValueVector v, Class<T> clazz) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, iterator, spliteratorMethods inherited from interface org.apache.drill.exec.vector.ValueVector
allocateNewSafe, clear, collectLedgers, copyEntry, exchange, getAccessor, getAllocatedSize, getBuffers, getBufferSize, getBufferSizeFor, getMetadata, getMutator, getPayloadByteCount, getReader, getTransferPair, getTransferPair, getValueCapacity, load, makeTransferPair, setInitialCapacity, toNullable
-
Field Details
-
field
-
allocator
-
callBack
-
-
Constructor Details
-
AbstractContainerVector
protected AbstractContainerVector(MaterializedField field, BufferAllocator allocator, CallBack callBack)
-
-
Method Details
-
allocateNew
Description copied from interface:ValueVectorAllocate new buffers. ValueVector implements logic to determine how much to allocate.- Specified by:
allocateNewin interfaceValueVector- Throws:
OutOfMemoryException- Thrown if no memory can be allocated.
-
getAllocator
- Specified by:
getAllocatorin interfaceValueVector
-
getField
Returns the field definition of this instance.- Specified by:
getFieldin interfaceValueVector
-
getChild
Returns aValueVectorcorresponding to the given field name if exists or null. -
getChildFieldNames
Returns a sequence of field names in the order that they show up in the schema. -
close
public void close()Clears out all underlying child vectors.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceValueVector
-
typeify
-
supportsDirectRead
protected boolean supportsDirectRead() -
size
public abstract int size() -
addOrGet
public abstract <T extends ValueVector> T addOrGet(String name, TypeProtos.MajorType type, Class<T> clazz) -
getChild
-
getChildVectorWithOrdinal
-