public abstract class BaseRepeatedValueVector extends BaseValueVector implements RepeatedValueVector
| Modifier and Type | Class and Description |
|---|---|
class |
BaseRepeatedValueVector.BaseRepeatedAccessor |
class |
BaseRepeatedValueVector.BaseRepeatedMutator |
protected class |
BaseRepeatedValueVector.BaseRepeatedValueVectorTransferPair<T extends BaseRepeatedValueVector> |
BaseValueVector.BaseAccessor, BaseValueVector.BaseMutatorRepeatedValueVector.RepeatedAccessor, RepeatedValueVector.RepeatedMutatorValueVector.Accessor, ValueVector.Mutator| Modifier and Type | Field and Description |
|---|---|
static String |
DATA_VECTOR_NAME |
static ValueVector |
DEFAULT_DATA_VECTOR |
protected org.apache.drill.exec.vector.UInt4Vector |
offsets |
static MaterializedField |
OFFSETS_FIELD |
static String |
OFFSETS_VECTOR_NAME |
protected ValueVector |
vector |
allocator, field, INITIAL_VALUE_ALLOCATION, MAX_ALLOCATION_SIZEDEFAULT_REPEAT_PER_RECORDBITS_VECTOR_NAME, MAX_BUFFER_SIZE, MAX_ROW_COUNT, MIN_ROW_COUNT, VALUES_VECTOR_NAME| Modifier | Constructor and Description |
|---|---|
protected |
BaseRepeatedValueVector(MaterializedField field,
BufferAllocator allocator) |
protected |
BaseRepeatedValueVector(MaterializedField field,
BufferAllocator allocator,
ValueVector vector) |
| Modifier and Type | Method and Description |
|---|---|
<T extends ValueVector> |
addOrGetVector(VectorDescriptor descriptor)
Creates and adds a child vector if none with the same name exists, else returns the vector instance.
|
boolean |
allocateNewSafe()
Allocates new buffers.
|
void |
clear()
Release the underlying DrillBuf and reset the ValueVector to empty.
|
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[] |
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.
|
int |
getBufferSizeFor(int valueCount)
Returns the number of bytes that is used by this vector if it holds the given number
of values.
|
ValueVector |
getDataVector() |
protected UserBitShared.SerializedField.Builder |
getMetadataBuilder() |
org.apache.drill.exec.vector.UInt4Vector |
getOffsetVector() |
int |
getPayloadByteCount(int valueCount)
Return the number of value bytes consumed by actual data.
|
int |
getValueCapacity()
Returns the maximum number of values that can be stored in this vector instance.
|
Iterator<ValueVector> |
iterator() |
void |
load(UserBitShared.SerializedField metadata,
DrillBuf buffer)
Load the data provided in the buffer.
|
protected void |
replaceDataVector(ValueVector v) |
void |
setChildVector(ValueVector childVector) |
void |
setInitialCapacity(int numRecords)
Set the initial record capacity
|
int |
size()
Returns 1 if inner vector is explicitly set via #addOrGetVector else 0
|
checkBufRefs, close, fillBitsVector, getAllocator, getField, getField, getMetadata, getTransferPair, toNullable, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetAccessor, getMutatorallocateNew, close, copyEntry, getAllocator, getField, getMetadata, getReader, getTransferPair, getTransferPair, makeTransferPair, toNullableforEach, spliteratorpublic static final ValueVector DEFAULT_DATA_VECTOR
public static final String OFFSETS_VECTOR_NAME
public static final String DATA_VECTOR_NAME
public static final MaterializedField OFFSETS_FIELD
protected final org.apache.drill.exec.vector.UInt4Vector offsets
protected ValueVector vector
protected BaseRepeatedValueVector(MaterializedField field, BufferAllocator allocator)
protected BaseRepeatedValueVector(MaterializedField field, BufferAllocator allocator, ValueVector vector)
public boolean allocateNewSafe()
ValueVectorallocateNewSafe in interface ValueVectorpublic org.apache.drill.exec.vector.UInt4Vector getOffsetVector()
getOffsetVector in interface RepeatedValueVectorpublic ValueVector getDataVector()
getDataVector in interface RepeatedValueVectorpublic void setInitialCapacity(int numRecords)
ValueVectorsetInitialCapacity in interface ValueVectorpublic int getValueCapacity()
ValueVectorgetValueCapacity in interface ValueVectorprotected UserBitShared.SerializedField.Builder getMetadataBuilder()
getMetadataBuilder in class BaseValueVectorpublic int getBufferSize()
ValueVectorgetBufferSize in interface ValueVectorpublic int getAllocatedSize()
ValueVectorgetAllocatedSize in interface ValueVectorpublic int getBufferSizeFor(int valueCount)
ValueVectorgetBufferSizeFor in interface ValueVectorvalueCount - the number of values to assume this vector containspublic Iterator<ValueVector> iterator()
iterator in interface Iterable<ValueVector>iterator in class BaseValueVectorpublic void clear()
ValueVectorclear in interface ValueVectorclear in class BaseValueVectorpublic DrillBuf[] getBuffers(boolean clear)
ValueVectorgetBuffers in interface 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 void load(UserBitShared.SerializedField metadata, DrillBuf buffer)
ValueVectorload in interface ValueVectormetadata - Metadata used to decode the incoming buffer.buffer - The buffer that contains the ValueVector.public int size()
size in interface ContainerVectorLikeContainerVectorLike.size()public <T extends ValueVector> AddOrGetResult<T> addOrGetVector(VectorDescriptor descriptor)
ContainerVectorLikeaddOrGetVector in interface ContainerVectorLikedescriptor - vector descriptorprotected void replaceDataVector(ValueVector v)
public void setChildVector(ValueVector childVector)
public void collectLedgers(Set<AllocationManager.BufferLedger> ledgers)
ValueVectorcollectLedgers in interface ValueVectorledgers - set of ledgers to which to add ledgers for this vectorpublic int getPayloadByteCount(int valueCount)
ValueVectorgetPayloadByteCount in interface ValueVectorpublic void exchange(ValueVector other)
ValueVectorexchange in interface ValueVectorCopyright © 2021 The Apache Software Foundation. All rights reserved.