Package org.apache.drill.exec.record
Class VectorAccessibleComplexWriter
java.lang.Object
org.apache.drill.exec.vector.complex.AbstractContainerVector
org.apache.drill.exec.vector.complex.AbstractMapVector
org.apache.drill.exec.vector.complex.MapVector
org.apache.drill.exec.record.VectorAccessibleComplexWriter
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Iterable<ValueVector>
,ValueVector
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.drill.exec.vector.complex.MapVector
MapVector.Accessor, MapVector.MapTransferPair, MapVector.Mutator
-
Field Summary
Fields inherited from class org.apache.drill.exec.vector.complex.AbstractContainerVector
allocator, callBack, field
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
-
Method Summary
Modifier and TypeMethodDescription<T extends ValueVector>
TaddOrGet
(String name, TypeProtos.MajorType type, Class<T> clazz) Adds a new field with the given parameters or replaces the existing one and consequently returns the resultantValueVector
.static BaseWriter.ComplexWriter
getWriter
(String name, VectorContainer container) Methods inherited from class org.apache.drill.exec.vector.complex.MapVector
clear, close, copyEntry, copyFromSafe, copyFromSafe, exchange, fieldNameIterator, getAccessor, getAllocatedSize, getBuffers, getBufferSize, getBufferSizeFor, getMetadata, getMutator, getReader, getTransferPair, getTransferPair, getValueCapacity, getVectorById, load, makeTransferPair, setInitialCapacity, setMapValueCount, supportsDirectRead, toNullable
Methods inherited from class org.apache.drill.exec.vector.complex.AbstractMapVector
allocateNewSafe, collectLedgers, getChild, getChildByOrdinal, getChildren, getChildVectorWithOrdinal, getPayloadByteCount, getPrimitiveVectors, iterator, putChild, putVector, size
Methods inherited from class org.apache.drill.exec.vector.complex.AbstractContainerVector
allocateNew, getAllocator, getChild, getChildFieldNames, getField, typeify
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, spliterator
-
Constructor Details
-
VectorAccessibleComplexWriter
-
-
Method Details
-
addOrGet
Description copied from class:AbstractMapVector
Adds a new field with the given parameters or replaces the existing one and consequently returns the resultantValueVector
. Execution takes place in the following order:- if field is new, create and insert a new vector of desired type.
- if field exists and existing vector is of desired vector type, return the vector.
- if field exists and null filled, clear the existing vector; create and insert a new vector of desired type.
-
otherwise, throw an
IllegalStateException
- Overrides:
addOrGet
in classAbstractMapVector
- Type Parameters:
T
- class type of expected vector type- Parameters:
name
- name of the fieldtype
- type of the fieldclazz
- class of expected vector type- Returns:
- resultant
ValueVector
-
getWriter
-