public abstract class BaseDataValueVector extends BaseValueVector
BaseValueVector.BaseAccessor, BaseValueVector.BaseMutator
ValueVector.Accessor, ValueVector.Mutator
Modifier and Type | Field and Description |
---|---|
protected DrillBuf |
data |
protected static byte[] |
emptyByteArray |
allocator, field, INITIAL_VALUE_ALLOCATION, MAX_ALLOCATION_SIZE
BITS_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, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
allocateNew, allocateNewSafe, copyEntry, getAccessor, getBufferSizeFor, getMutator, getPayloadByteCount, getReader, getTransferPair, getValueCapacity, load, makeTransferPair, setInitialCapacity
forEach, spliterator
protected 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()
ValueVector
clear
in interface ValueVector
clear
in class BaseValueVector
public void close()
ValueVector
close
in interface Closeable
close
in interface AutoCloseable
close
in interface ValueVector
close
in class BaseValueVector
public DrillBuf[] getBuffers(boolean clear)
ValueVector
clear
- 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()
ValueVector
public int getAllocatedSize()
ValueVector
public DrillBuf getBuffer()
public void reset()
public void exchange(ValueVector other)
ValueVector
public void collectLedgers(Set<AllocationManager.BufferLedger> ledgers)
ValueVector
ledgers
- set of ledgers to which to add ledgers for this vectorCopyright © 1970 The Apache Software Foundation. All rights reserved.