public class MapVector extends AbstractMapVector
| Modifier and Type | Class and Description |
|---|---|
protected static class |
MapVector.MapTransferPair |
| Modifier and Type | Field and Description |
|---|---|
protected FieldType |
fieldType |
int |
valueCount |
allocator, callBack, name| Constructor and Description |
|---|
MapVector(String name,
BufferAllocator allocator,
CallBack callBack)
Deprecated.
|
MapVector(String name,
BufferAllocator allocator,
FieldType fieldType,
CallBack callBack) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Release the underlying ArrowBuf and reset the ValueVector to empty.
|
void |
close()
Clears out all underlying child vectors.
|
void |
copyFromSafe(int fromIndex,
int thisIndex,
MapVector from) |
static MapVector |
empty(String name,
BufferAllocator allocator) |
Iterator<String> |
fieldNameIterator() |
void |
get(int index,
ComplexHolder holder) |
int |
getBufferSize() |
int |
getBufferSizeFor(int valueCount)
Returns the number of bytes that is used by this vector if it holds the given number
of values.
|
List<FieldVector> |
getChildrenFromFields() |
ArrowBuf |
getDataBuffer()
Gets the underlying buffer associated with data vector
|
Field |
getField()
Get information about how this field is materialized.
|
Types.MinorType |
getMinorType() |
int |
getNullCount()
Returns number of null elements in the vector
|
Object |
getObject(int index)
Get friendly type object from the vector
|
ArrowBuf |
getOffsetBuffer()
Gets the underlying buffer associated with offset vector
|
FieldReader |
getReader() |
TransferPair |
getTransferPair(BufferAllocator allocator)
to transfer quota responsibility
|
TransferPair |
getTransferPair(String ref,
BufferAllocator allocator) |
TransferPair |
getTransferPair(String ref,
BufferAllocator allocator,
CallBack callBack) |
ArrowBuf |
getValidityBuffer()
Gets the underlying buffer associated with validity vector
|
int |
getValueCapacity()
Returns the maximum number of values that can be stored in this vector instance.
|
int |
getValueCount()
Gets the number of values
|
ValueVector |
getVectorById(int id) |
void |
initializeChildrenFromFields(List<Field> children) |
boolean |
isNull(int index)
Check whether an element in the vector is null
|
TransferPair |
makeTransferPair(ValueVector to)
makes a new transfer pair used to transfer underlying buffers
|
void |
setInitialCapacity(int numRecords)
Set the initial record capacity
|
void |
setValueCount(int valueCount)
Set number of values in the vector
|
protected boolean |
supportsDirectRead() |
add, addOrGet, allocateNewSafe, getBuffers, getChild, getChildByOrdinal, getChildFieldNames, getChildren, getChildVectorWithOrdinal, getPrimitiveVectors, iterator, putChild, putVector, reAlloc, sizeaddOrGetList, addOrGetMap, addOrGetUnion, allocateNew, getAllocator, getChild, typeifyprotected final FieldType fieldType
public int valueCount
@Deprecated public MapVector(String name, BufferAllocator allocator, CallBack callBack)
public MapVector(String name, BufferAllocator allocator, FieldType fieldType, CallBack callBack)
public static MapVector empty(String name, BufferAllocator allocator)
public FieldReader getReader()
field reader that supports reading values
from this vector.public void copyFromSafe(int fromIndex,
int thisIndex,
MapVector from)
protected boolean supportsDirectRead()
supportsDirectRead in class AbstractContainerVectorpublic void setInitialCapacity(int numRecords)
ValueVectornumRecords - the initial record capacity.public int getBufferSize()
getBufferSize in interface ValueVectorgetBufferSize in class AbstractMapVectorpublic int getBufferSizeFor(int valueCount)
ValueVectorvalueCount - the number of values to assume this vector containspublic ArrowBuf getValidityBuffer()
ValueVectorpublic ArrowBuf getDataBuffer()
ValueVectorpublic ArrowBuf getOffsetBuffer()
ValueVectorpublic TransferPair getTransferPair(BufferAllocator allocator)
ValueVectorallocator - the target allocatortransfer pair, creating a new target vector of
the same type.public TransferPair getTransferPair(String ref, BufferAllocator allocator, CallBack callBack)
public TransferPair makeTransferPair(ValueVector to)
ValueVectorto - the target for the transfertransfer pair that is used to transfer underlying
buffers into the target vector.public TransferPair getTransferPair(String ref, BufferAllocator allocator)
public int getValueCapacity()
ValueVectorpublic Object getObject(int index)
ValueVectorpublic boolean isNull(int index)
ValueVectorpublic int getNullCount()
ValueVectorpublic void get(int index,
ComplexHolder holder)
public int getValueCount()
ValueVectorpublic ValueVector getVectorById(int id)
public void setValueCount(int valueCount)
ValueVectorpublic void clear()
ValueVectorpublic Field getField()
ValueVectorpublic Types.MinorType getMinorType()
public void close()
AbstractContainerVectorclose in interface Closeableclose in interface AutoCloseableclose in interface ValueVectorclose in class AbstractMapVectorpublic List<FieldVector> getChildrenFromFields()
Copyright © 2017 The Apache Software Foundation. All rights reserved.