Package org.apache.arrow.vector.complex
Class AbstractContainerVector
java.lang.Object
org.apache.arrow.vector.complex.AbstractContainerVector
- All Implemented Interfaces:
Closeable,AutoCloseable,Iterable<ValueVector>,DensityAwareVector,ValueVector
- Direct Known Subclasses:
AbstractStructVector,DenseUnionVector,UnionVector
public abstract class AbstractContainerVector
extends Object
implements ValueVector, DensityAwareVector
Base class for composite vectors.
This class implements common functionality of composite vectors.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractContainerVector(String name, BufferAllocator allocator, CallBack callBack) -
Method Summary
Modifier and TypeMethodDescriptionabstract <T extends FieldVector>
TaddOrGetFixedSizeList(String name, int listSize) addOrGetList(String name) addOrGetMap(String name, boolean keysSorted) addOrGetStruct(String name) addOrGetUnion(String name) voidAllocate new buffers.voidclose()Clears out all underlying child vectors.voidcopyFrom(int fromIndex, int thisIndex, ValueVector from) Copy a cell value from a particular index in source vector to a particular position in this vector.voidcopyFromSafe(int fromIndex, int thisIndex, ValueVector from) Same asValueVector.copyFrom(int, int, ValueVector)except that it handles the case when the capacity of the vector needs to be expanded before copy.Returns aValueVectorcorresponding to the given field name if exists or null.abstract <T extends FieldVector>
Tabstract VectorWithOrdinalgetName()Gets the name of the vector.abstract intsize()protected booleantoString()Representation of vector suitable for debugging.protected <T extends ValueVector>
Ttypeify(ValueVector v, Class<T> clazz) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.arrow.vector.DensityAwareVector
setInitialCapacityMethods inherited from interface java.lang.Iterable
forEach, iterator, spliteratorMethods inherited from interface org.apache.arrow.vector.ValueVector
accept, allocateNewSafe, clear, getBuffers, getBufferSize, getBufferSizeFor, getDataBuffer, getField, getMinorType, getNullCount, getObject, getOffsetBuffer, getReader, getTransferPair, getTransferPair, getTransferPair, getTransferPair, getTransferPair, getValidityBuffer, getValueCapacity, getValueCount, hashCode, hashCode, isNull, makeTransferPair, reAlloc, reset, setInitialCapacity, setValueCount, validate, validateFull
-
Field Details
-
name
-
allocator
-
callBack
-
-
Constructor Details
-
AbstractContainerVector
-
-
Method Details
-
toString
Representation of vector suitable for debugging. -
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
-
getChild
Returns aValueVectorcorresponding to the given field name if exists or null.- Parameters:
name- the name of the child to return- Returns:
- the corresponding FieldVector
-
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 FieldVector> T addOrGet(String name, FieldType fieldType, Class<T> clazz) -
getChild
-
getChildVectorWithOrdinal
-
addOrGetStruct
-
addOrGetList
-
addOrGetUnion
-
addOrGetFixedSizeList
-
addOrGetMap
-
copyFrom
Description copied from interface:ValueVectorCopy a cell value from a particular index in source vector to a particular position in this vector.- Specified by:
copyFromin interfaceValueVector- Parameters:
fromIndex- position to copy from in source vectorthisIndex- position to copy to in this vectorfrom- source vector
-
copyFromSafe
Description copied from interface:ValueVectorSame asValueVector.copyFrom(int, int, ValueVector)except that it handles the case when the capacity of the vector needs to be expanded before copy.- Specified by:
copyFromSafein interfaceValueVector- Parameters:
fromIndex- position to copy from in source vectorthisIndex- position to copy to in this vectorfrom- source vector
-
getName
Description copied from interface:ValueVectorGets the name of the vector.- Specified by:
getNamein interfaceValueVector- Returns:
- the name of the vector.
-