public abstract class AbstractRepeatedMapVector extends AbstractMapVector implements RepeatedValueVector
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractRepeatedMapVector.Accessor |
class |
AbstractRepeatedMapVector.Mutator |
RepeatedValueVector.RepeatedAccessor, RepeatedValueVector.RepeatedMutator| Modifier and Type | Field and Description |
|---|---|
protected EmptyValuePopulator |
emptyPopulator |
protected org.apache.drill.exec.vector.UInt4Vector |
offsets |
allocator, callBack, fieldDEFAULT_REPEAT_PER_RECORDBITS_VECTOR_NAME, MAX_BUFFER_SIZE, MAX_ROW_COUNT, MIN_ROW_COUNT, OFFSETS_VECTOR_NAME, VALUES_VECTOR_NAME| Modifier | Constructor and Description |
|---|---|
protected |
AbstractRepeatedMapVector(MaterializedField field,
BufferAllocator allocator,
CallBack callBack) |
protected |
AbstractRepeatedMapVector(MaterializedField field,
org.apache.drill.exec.vector.UInt4Vector offsets,
CallBack callBack) |
| 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.
|
void |
allocateNew(int groupCount,
int innerValueCount) |
boolean |
allocateNewSafe()
Allocates new buffers.
|
void |
allocateOffsetsNew(int groupCount) |
void |
clear()
Release the underlying DrillBuf and reset the ValueVector to empty.
|
void |
close()
Clears out all underlying child vectors.
|
void |
collectLedgers(Set<AllocationManager.BufferLedger> ledgers)
Add the ledgers underlying the buffers underlying the components of the
vector to the set provided.
|
void |
copyEntry(int toIndex,
ValueVector from,
int fromIndex) |
void |
copyFromSafe(int fromIndex,
int thisIndex,
AbstractRepeatedMapVector from) |
void |
exchange(ValueVector other)
Exchange state with another value vector of the same type.
|
Iterator<String> |
fieldNameIterator() |
abstract AbstractRepeatedMapVector.Accessor |
getAccessor()
Returns an
accessor that is used to read from this vector
instance. |
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() |
UserBitShared.SerializedField |
getMetadata()
Get the metadata for this field.
|
org.apache.drill.exec.vector.UInt4Vector |
getOffsetVector() |
int |
getPayloadByteCount(int valueCount)
Return the number of value bytes consumed by actual data.
|
List<ValueVector> |
getPrimitiveVectors()
Returns a list of scalar child vectors recursing the entire vector hierarchy.
|
TransferPair |
getTransferPairToSingleMap(String reference,
BufferAllocator allocator) |
int |
getValueCapacity()
Returns the maximum number of values that can be stored in this vector instance.
|
void |
load(UserBitShared.SerializedField metadata,
DrillBuf buffer)
Load the data provided in the buffer.
|
void |
setInitialCapacity(int numRecords)
Set the initial record capacity
|
void |
toNullable(ValueVector nullableVector)
Convert a non-nullable vector to nullable by shuffling the data from
one to the other.
|
addOrGet, getChild, getChildByOrdinal, getChildren, getChildVectorWithOrdinal, iterator, putChild, putVector, sizeallocateNew, getAllocator, getChild, getChildFieldNames, getField, supportsDirectRead, typeifyclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetMutatorallocateNew, getAllocator, getField, getReader, getTransferPair, getTransferPair, makeTransferPairforEach, iterator, spliteratorsizeprotected final org.apache.drill.exec.vector.UInt4Vector offsets
protected final EmptyValuePopulator emptyPopulator
protected AbstractRepeatedMapVector(MaterializedField field, BufferAllocator allocator, CallBack callBack)
protected AbstractRepeatedMapVector(MaterializedField field, org.apache.drill.exec.vector.UInt4Vector offsets, CallBack callBack)
public org.apache.drill.exec.vector.UInt4Vector getOffsetVector()
getOffsetVector in interface RepeatedValueVectorpublic ValueVector getDataVector()
getDataVector in interface RepeatedValueVectorpublic <T extends ValueVector> AddOrGetResult<T> addOrGetVector(VectorDescriptor descriptor)
ContainerVectorLikeaddOrGetVector in interface ContainerVectorLikedescriptor - vector descriptorpublic void setInitialCapacity(int numRecords)
ValueVectorsetInitialCapacity in interface ValueVectorpublic void allocateNew(int groupCount,
int innerValueCount)
public void allocateOffsetsNew(int groupCount)
public List<ValueVector> getPrimitiveVectors()
AbstractMapVectorgetPrimitiveVectors in class AbstractMapVectorpublic int getBufferSize()
ValueVectorgetBufferSize in interface ValueVectorgetBufferSize in class AbstractMapVectorpublic int getAllocatedSize()
ValueVectorgetAllocatedSize in interface ValueVectorgetAllocatedSize in class AbstractMapVectorpublic int getBufferSizeFor(int valueCount)
ValueVectorgetBufferSizeFor in interface ValueVectorvalueCount - the number of values to assume this vector containspublic void close()
AbstractContainerVectorclose in interface Closeableclose in interface AutoCloseableclose in interface ValueVectorclose in class AbstractMapVectorpublic TransferPair getTransferPairToSingleMap(String reference, BufferAllocator allocator)
public boolean allocateNewSafe()
ValueVectorallocateNewSafe in interface ValueVectorallocateNewSafe in class AbstractMapVectorpublic void copyFromSafe(int fromIndex,
int thisIndex,
AbstractRepeatedMapVector from)
public void copyEntry(int toIndex,
ValueVector from,
int fromIndex)
copyEntry in interface ValueVectorpublic int getValueCapacity()
ValueVectorgetValueCapacity in interface ValueVectorpublic void exchange(ValueVector other)
ValueVectorexchange in interface ValueVectorexchange in class AbstractMapVectorpublic DrillBuf[] getBuffers(boolean clear)
ValueVectorgetBuffers in interface ValueVectorgetBuffers in class AbstractMapVectorclear - 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 UserBitShared.SerializedField getMetadata()
ValueVectorgetMetadata in interface ValueVectorpublic void clear()
ValueVectorclear in interface ValueVectorpublic void collectLedgers(Set<AllocationManager.BufferLedger> ledgers)
ValueVectorcollectLedgers in interface ValueVectorcollectLedgers in class AbstractMapVectorledgers - set of ledgers to which to add ledgers for this vectorpublic void toNullable(ValueVector nullableVector)
ValueVectortoNullable in interface ValueVectornullableVector - nullable vector of the same minor type as
this vectorpublic int getPayloadByteCount(int valueCount)
ValueVectorgetPayloadByteCount in interface ValueVectorgetPayloadByteCount in class AbstractMapVectorpublic abstract AbstractRepeatedMapVector.Accessor getAccessor()
ValueVectoraccessor that is used to read from this vector
instance.getAccessor in interface RepeatedValueVectorgetAccessor in interface ValueVectorCopyright © 2021 The Apache Software Foundation. All rights reserved.