public abstract class BaseDataValueVector extends BaseValueVector
BaseValueVector.BaseAccessor, BaseValueVector.BaseMutatorValueVector.Accessor, ValueVector.Mutator| Modifier and Type | Field and Description |
|---|---|
protected DrillBuf |
data |
protected static byte[] |
emptyByteArray |
allocator, field, INITIAL_VALUE_ALLOCATION, MAX_ALLOCATION_SIZEBITS_VECTOR_NAME, MAX_BUFFER_SIZE, MAX_ROW_COUNT, MIN_ROW_COUNT, OFFSETS_VECTOR_NAME, VALUES_VECTOR_NAME| Constructor and Description |
|---|
BaseDataValueVector(MaterializedField field,
BufferAllocator allocator) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Release the underlying DrillBuf and reset the ValueVector to empty.
|
void |
close()
Alternative to clear().
|
void |
collectLedgers(Set<AllocationManager.BufferLedger> ledgers)
Add the ledgers underlying the buffers underlying the components of the
vector to the set provided.
|
void |
exchange(ValueVector other)
Exchange state with another value vector of the same type.
|
int |
getAllocatedSize()
Returns the total size of buffers allocated by this vector.
|
DrillBuf |
getBuffer() |
DrillBuf[] |
getBuffers(boolean clear)
Return the underlying buffers associated with this vector.
|
int |
getBufferSize()
Returns the number of bytes that is used by this vector instance.
|
abstract DrillBuf |
reallocRaw(int newAllocationSize)
Core of vector allocation.
|
void |
reset()
This method has a similar effect of allocateNew() without actually clearing and reallocating
the value vector.
|
checkBufRefs, fillBitsVector, getAllocator, getField, getField, getMetadata, getMetadataBuilder, getTransferPair, iterator, toNullable, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitallocateNew, allocateNewSafe, copyEntry, getAccessor, getBufferSizeFor, getMutator, getPayloadByteCount, getReader, getTransferPair, getValueCapacity, load, makeTransferPair, setInitialCapacityforEach, spliteratorprotected static final byte[] emptyByteArray
protected DrillBuf data
public BaseDataValueVector(MaterializedField field, BufferAllocator allocator)
public abstract DrillBuf reallocRaw(int newAllocationSize)
newAllocationSize - new buffer size as a power of twopublic void clear()
ValueVectorclear in interface ValueVectorclear in class BaseValueVectorpublic void close()
ValueVectorclose in interface Closeableclose in interface AutoCloseableclose in interface ValueVectorclose in class BaseValueVectorpublic DrillBuf[] getBuffers(boolean clear)
ValueVectorclear - Whether to clear vector before returning; the buffers will still be refcounted;
but the returned array will be the only reference to thembuffers that is used by this vector instance.public int getBufferSize()
ValueVectorpublic int getAllocatedSize()
ValueVectorpublic DrillBuf getBuffer()
public void reset()
public void exchange(ValueVector other)
ValueVectorpublic void collectLedgers(Set<AllocationManager.BufferLedger> ledgers)
ValueVectorledgers - set of ledgers to which to add ledgers for this vectorCopyright © 2021 The Apache Software Foundation. All rights reserved.