public class MapVector extends ListVector
Modifier and Type | Field and Description |
---|---|
static String |
DATA_VECTOR_NAME |
static String |
KEY_NAME |
static String |
VALUE_NAME |
field, lastSet, reader, validityAllocationSizeInBytes, validityBuffer
DEFAULT_DATA_VECTOR, defaultDataVectorName, OFFSET_WIDTH, offsetAllocationSizeInBytes, offsetBuffer, valueCount, vector
allocator, fieldReader, INITIAL_VALUE_ALLOCATION, MAX_ALLOCATION_SIZE, MAX_ALLOCATION_SIZE_PROPERTY
DEFAULT_REPEAT_PER_RECORD
Constructor and Description |
---|
MapVector(Field field,
BufferAllocator allocator,
CallBack callBack) |
MapVector(String name,
BufferAllocator allocator,
FieldType fieldType,
CallBack callBack)
Construct a MapVector instance.
|
Modifier and Type | Method and Description |
---|---|
static MapVector |
empty(String name,
BufferAllocator allocator,
boolean keysSorted)
Construct an empty MapVector with no data.
|
Types.MinorType |
getMinorType() |
UnionMapReader |
getReader()
Get the reader for this MapVector instance.
|
TransferPair |
getTransferPair(Field field,
BufferAllocator allocator)
To transfer quota responsibility.
|
TransferPair |
getTransferPair(Field field,
BufferAllocator allocator,
CallBack callBack)
To transfer quota responsibility.
|
TransferPair |
getTransferPair(String ref,
BufferAllocator allocator)
To transfer quota responsibility.
|
TransferPair |
getTransferPair(String ref,
BufferAllocator allocator,
CallBack callBack)
To transfer quota responsibility.
|
UnionMapWriter |
getWriter()
Get the writer for this MapVector instance.
|
void |
initializeChildrenFromFields(List<Field> children)
Initialize child vectors of the map from the given list of fields.
|
TransferPair |
makeTransferPair(ValueVector target)
Makes a new transfer pair used to transfer underlying buffers.
|
accept, addOrGetVector, allocateNew, allocateNewSafe, allocateValidityBuffer, clear, copyFrom, copyFromSafe, empty, endValue, getBuffers, getBufferSize, getBufferSizeFor, getChildrenFromFields, getDataBuffer, getDataBufferAddress, getDataVector, getDensity, getElementEndIndex, getElementStartIndex, getField, getFieldBuffers, getFieldInnerVectors, getLastSet, getNullCount, getObject, getOffsetBuffer, getOffsetBufferAddress, getReaderImpl, getValidityBuffer, getValidityBufferAddress, getValueCapacity, hashCode, hashCode, invalidateReader, isEmpty, isNull, isSet, loadFieldBuffers, promoteToUnion, reAlloc, reallocValidityAndOffsetBuffers, reset, setInitialCapacity, setInitialCapacity, setInitialTotalCapacity, setLastSet, setNotNull, setNull, setValueCount, startNewValue
allocateOffsetBuffer, getInnerValueCount, getInnerValueCountAt, getName, getOffsetBufferValueCapacity, getOffsetVector, getValueCount, iterator, reallocOffsetBuffer, replaceDataVector, size
checkBufRefs, close, getAllocator, getTransferPair, getValidityBufferSizeFromCount, releaseBuffer, toString, transferBuffer
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
close, getAllocator, getTransferPair, validate, validateFull
forEach, spliterator
public static final String KEY_NAME
public static final String VALUE_NAME
public static final String DATA_VECTOR_NAME
public MapVector(String name, BufferAllocator allocator, FieldType fieldType, CallBack callBack)
name
- The name of the vector.allocator
- The allocator used for allocating/reallocating buffers.fieldType
- The type definition of the MapVector.callBack
- A schema change callback.public MapVector(Field field, BufferAllocator allocator, CallBack callBack)
public static MapVector empty(String name, BufferAllocator allocator, boolean keysSorted)
name
- The name of the vector.allocator
- The allocator used for allocating/reallocating buffers.keysSorted
- True if the map keys have been pre-sorted.public void initializeChildrenFromFields(List<Field> children)
initializeChildrenFromFields
in interface FieldVector
initializeChildrenFromFields
in class ListVector
children
- List of fields that will be children of this MapVector.public UnionMapWriter getWriter()
getWriter
in class ListVector
public UnionMapReader getReader()
getReader
in interface ValueVector
getReader
in class ListVector
public Types.MinorType getMinorType()
getMinorType
in interface ValueVector
getMinorType
in class ListVector
public TransferPair getTransferPair(String ref, BufferAllocator allocator)
ValueVector
getTransferPair
in interface ValueVector
getTransferPair
in class ListVector
ref
- the name of the vectorallocator
- the target allocatortransfer pair
, creating a new target vector of
the same type.public TransferPair getTransferPair(Field field, BufferAllocator allocator)
ValueVector
getTransferPair
in interface ValueVector
getTransferPair
in class ListVector
field
- the Field object used by the target vectorallocator
- the target allocatortransfer pair
, creating a new target vector of
the same type.public TransferPair getTransferPair(String ref, BufferAllocator allocator, CallBack callBack)
ValueVector
getTransferPair
in interface ValueVector
getTransferPair
in class ListVector
ref
- the name of the vectorallocator
- the target allocatorcallBack
- A schema change callback.transfer pair
, creating a new target vector of
the same type.public TransferPair getTransferPair(Field field, BufferAllocator allocator, CallBack callBack)
ValueVector
getTransferPair
in interface ValueVector
getTransferPair
in class ListVector
field
- the Field object used by the target vectorallocator
- the target allocatorcallBack
- A schema change callback.transfer pair
, creating a new target vector of
the same type.public TransferPair makeTransferPair(ValueVector target)
ValueVector
makeTransferPair
in interface ValueVector
makeTransferPair
in class ListVector
target
- the target for the transfertransfer pair
that is used to transfer underlying
buffers into the target vector.Copyright © 2024 The Apache Software Foundation. All rights reserved.