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
Modifier and TypeFieldDescriptionprotected final BufferAllocator
protected final CallBack
protected MaterializedField
Fields 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
ModifierConstructorDescriptionprotected
AbstractContainerVector
(MaterializedField field, BufferAllocator allocator, CallBack callBack) -
Method Summary
Modifier and TypeMethodDescriptionabstract <T extends ValueVector>
TaddOrGet
(String name, TypeProtos.MajorType type, Class<T> clazz) void
Allocate new buffers.void
close()
Clears out all underlying child vectors.Returns aValueVector
corresponding 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 VectorWithOrdinal
getField()
Returns the field definition of this instance.abstract int
size()
protected boolean
protected <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, wait
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
Methods 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:ValueVector
Allocate new buffers. ValueVector implements logic to determine how much to allocate.- Specified by:
allocateNew
in interfaceValueVector
- Throws:
OutOfMemoryException
- Thrown if no memory can be allocated.
-
getAllocator
- Specified by:
getAllocator
in interfaceValueVector
-
getField
Returns the field definition of this instance.- Specified by:
getField
in interfaceValueVector
-
getChild
Returns aValueVector
corresponding 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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in 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
-