public class MapVector extends ListVector
Modifier and Type | Field and Description |
---|---|
static String |
DATA_VECTOR_NAME |
static String |
KEY_NAME |
static String |
VALUE_NAME |
fieldType, 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(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(String ref,
BufferAllocator allocator) |
TransferPair |
getTransferPair(String ref,
BufferAllocator allocator,
CallBack callBack) |
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, 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
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 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)
getTransferPair
in interface ValueVector
getTransferPair
in class ListVector
public TransferPair getTransferPair(String ref, BufferAllocator allocator, CallBack callBack)
getTransferPair
in interface ValueVector
getTransferPair
in class ListVector
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 © 2023 The Apache Software Foundation. All rights reserved.