public abstract class BaseValueVector extends Object implements ValueVector
| Modifier and Type | Field and Description |
|---|---|
protected BufferAllocator |
allocator |
protected FieldReader |
fieldReader |
static int |
INITIAL_VALUE_ALLOCATION |
static long |
MAX_ALLOCATION_SIZE |
static String |
MAX_ALLOCATION_SIZE_PROPERTY |
| Modifier | Constructor and Description |
|---|---|
protected |
BaseValueVector(BufferAllocator allocator) |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
checkBufRefs(ValueVector vv)
Checks to ensure that every buffer
vv uses
has a positive reference count, throws if this precondition
isn't met. |
void |
clear()
Release any owned ArrowBuf and reset the ValueVector to the initial state.
|
void |
close()
Alternative to clear().
|
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() |
abstract String |
getName()
Gets the name of the vector.
|
FieldReader |
getReader()
Default implementation to create a reader for the vector.
|
protected abstract FieldReader |
getReaderImpl()
Each vector has a different reader that implements the FieldReader interface.
|
TransferPair |
getTransferPair(BufferAllocator allocator)
To transfer quota responsibility.
|
protected static int |
getValidityBufferSizeFromCount(int valueCount) |
Iterator<ValueVector> |
iterator() |
protected ArrowBuf |
releaseBuffer(ArrowBuf buffer) |
String |
toString()
Representation of vector suitable for debugging.
|
static ArrowBuf |
transferBuffer(ArrowBuf srcBuffer,
BufferAllocator targetAllocator) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaccept, allocateNew, allocateNewSafe, getBuffers, getBufferSize, getBufferSizeFor, getDataBuffer, getField, getMinorType, getNullCount, getObject, getOffsetBuffer, getTransferPair, getTransferPair, getTransferPair, getTransferPair, getValidityBuffer, getValueCapacity, getValueCount, hashCode, hashCode, isNull, makeTransferPair, reAlloc, reset, setInitialCapacity, setValueCount, validate, validateFullforEach, spliteratorpublic static final String MAX_ALLOCATION_SIZE_PROPERTY
public static final long MAX_ALLOCATION_SIZE
public static final int INITIAL_VALUE_ALLOCATION
protected final BufferAllocator allocator
protected volatile FieldReader fieldReader
protected BaseValueVector(BufferAllocator allocator)
public abstract String getName()
ValueVectorgetName in interface ValueVectorpublic String toString()
public void clear()
ValueVectorclear in interface ValueVectorpublic void close()
ValueVectorclose in interface Closeableclose in interface AutoCloseableclose in interface ValueVectorpublic TransferPair getTransferPair(BufferAllocator allocator)
ValueVectorgetTransferPair in interface ValueVectorallocator - the target allocatortransfer pair, creating a new target vector of
the same type.public Iterator<ValueVector> iterator()
iterator in interface Iterable<ValueVector>public static boolean checkBufRefs(ValueVector vv)
vv uses
has a positive reference count, throws if this precondition
isn't met. Returns true otherwise.public BufferAllocator getAllocator()
getAllocator in interface ValueVectorprotected static int getValidityBufferSizeFromCount(int valueCount)
protected abstract FieldReader getReaderImpl()
public FieldReader getReader()
getReaderImpl() to initialize the reader appropriately.getReader in interface ValueVectorpublic static ArrowBuf transferBuffer(ArrowBuf srcBuffer, BufferAllocator targetAllocator)
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 vectorCopyright © 2024 The Apache Software Foundation. All rights reserved.