public abstract class AbstractContainerVector extends Object implements ValueVector, DensityAwareVector
This class implements common functionality of composite vectors.
| Modifier and Type | Field and Description |
|---|---|
protected BufferAllocator |
allocator |
protected CallBack |
callBack |
protected String |
name |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractContainerVector(String name,
BufferAllocator allocator,
CallBack callBack) |
| Modifier and Type | Method and Description |
|---|---|
abstract <T extends FieldVector> |
addOrGet(String name,
FieldType fieldType,
Class<T> clazz) |
FixedSizeListVector |
addOrGetFixedSizeList(String name,
int listSize) |
ListVector |
addOrGetList(String name) |
MapVector |
addOrGetMap(String name,
boolean keysSorted) |
StructVector |
addOrGetStruct(String name) |
UnionVector |
addOrGetUnion(String name) |
void |
allocateNew()
Allocate new buffers.
|
void |
close()
Clears out all underlying child vectors.
|
void |
copyFrom(int fromIndex,
int thisIndex,
ValueVector from)
Copy a cell value from a particular index in source vector to a particular
position in this vector.
|
void |
copyFromSafe(int fromIndex,
int thisIndex,
ValueVector from)
Same as
ValueVector.copyFrom(int, int, ValueVector) except that
it handles the case when the capacity of the vector needs to be expanded
before copy. |
BufferAllocator |
getAllocator() |
FieldVector |
getChild(String name)
Returns a
ValueVector corresponding to the given field name if exists or null. |
abstract <T extends FieldVector> |
getChild(String name,
Class<T> clazz) |
abstract VectorWithOrdinal |
getChildVectorWithOrdinal(String name) |
String |
getName()
Gets the name of the vector.
|
abstract int |
size() |
protected boolean |
supportsDirectRead() |
String |
toString()
Representation of vector suitable for debugging.
|
protected <T extends ValueVector> |
typeify(ValueVector v,
Class<T> clazz) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaccept, 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, validateFullforEach, iterator, spliteratorsetInitialCapacityprotected final String name
protected final BufferAllocator allocator
protected final CallBack callBack
protected AbstractContainerVector(String name, BufferAllocator allocator, CallBack callBack)
public String toString()
public void allocateNew()
throws OutOfMemoryException
ValueVectorallocateNew in interface ValueVectorOutOfMemoryException - Thrown if no memory can be allocated.public BufferAllocator getAllocator()
getAllocator in interface ValueVectorpublic FieldVector getChild(String name)
ValueVector corresponding to the given field name if exists or null.name - the name of the child to returnpublic void close()
close in interface Closeableclose in interface AutoCloseableclose in interface ValueVectorprotected <T extends ValueVector> T typeify(ValueVector v, Class<T> clazz)
protected boolean supportsDirectRead()
public abstract int size()
public abstract <T extends FieldVector> T addOrGet(String name, FieldType fieldType, Class<T> clazz)
public abstract <T extends FieldVector> T getChild(String name, Class<T> clazz)
public abstract VectorWithOrdinal getChildVectorWithOrdinal(String name)
public StructVector addOrGetStruct(String name)
public ListVector addOrGetList(String name)
public UnionVector addOrGetUnion(String name)
public FixedSizeListVector addOrGetFixedSizeList(String name, int listSize)
public void copyFrom(int fromIndex,
int thisIndex,
ValueVector from)
ValueVectorcopyFrom in interface ValueVectorfromIndex - position to copy from in source vectorthisIndex - position to copy to in this vectorfrom - source vectorpublic void copyFromSafe(int fromIndex,
int thisIndex,
ValueVector from)
ValueVectorValueVector.copyFrom(int, int, ValueVector) except that
it handles the case when the capacity of the vector needs to be expanded
before copy.copyFromSafe in interface ValueVectorfromIndex - position to copy from in source vectorthisIndex - position to copy to in this vectorfrom - source vectorpublic String getName()
ValueVectorgetName in interface ValueVectorCopyright © 2024 The Apache Software Foundation. All rights reserved.