public class NullableMapVector extends MapVector implements FieldVector
Modifier and Type | Class and Description |
---|---|
protected class |
NullableMapVector.NullableMapTransferPair |
MapVector.MapTransferPair
Modifier and Type | Field and Description |
---|---|
protected ArrowBuf |
validityBuffer |
fieldType, valueCount
allocator, callBack, name
Constructor and Description |
---|
NullableMapVector(String name,
BufferAllocator allocator,
CallBack callBack)
Deprecated.
|
NullableMapVector(String name,
BufferAllocator allocator,
DictionaryEncoding dictionary,
CallBack callBack)
Deprecated.
|
NullableMapVector(String name,
BufferAllocator allocator,
FieldType fieldType,
CallBack callBack) |
Modifier and Type | Method and Description |
---|---|
boolean |
allocateNewSafe()
Allocates new buffers.
|
void |
clear()
Same as
close() |
void |
close()
Close the vector and release the associated buffers.
|
static NullableMapVector |
empty(String name,
BufferAllocator allocator) |
void |
get(int index,
ComplexHolder holder) |
ArrowBuf[] |
getBuffers(boolean clear)
Return the underlying buffers associated with this vector.
|
int |
getBufferSize()
Get the size (number of bytes) of underlying buffers used by this
vector
|
int |
getBufferSizeFor(int valueCount)
Get the potential buffer size for a particular number of records.
|
ArrowBuf |
getDataBuffer()
Gets the underlying buffer associated with data vector
|
long |
getDataBufferAddress()
Gets the starting address of the underlying buffer associated with data vector
|
Field |
getField()
Get information about how this field is materialized.
|
List<ArrowBuf> |
getFieldBuffers()
(same size as getFieldVectors() since it is their content)
|
List<BufferBacked> |
getFieldInnerVectors()
Deprecated.
|
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
|
long |
getOffsetBufferAddress()
Gets the starting address of the underlying buffer associated with offset vector
|
NullableMapReaderImpl |
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
|
long |
getValidityBufferAddress()
Gets the starting address of the underlying buffer associated with validity vector
|
int |
getValueCapacity()
Get the current value capacity for the vector
|
NullableMapWriter |
getWriter() |
boolean |
isNull(int index)
Check whether an element in the vector is null
|
int |
isSet(int index) |
void |
loadFieldBuffers(ArrowFieldNode fieldNode,
List<ArrowBuf> ownBuffers)
loads data in the vectors
(ownBuffers must be the same size as getFieldVectors())
|
TransferPair |
makeTransferPair(ValueVector to)
makes a new transfer pair used to transfer underlying buffers
|
void |
reAlloc()
Allocate new buffer with double capacity, and copy data into the new buffer.
|
void |
reset() |
void |
setIndexDefined(int index) |
void |
setInitialCapacity(int numRecords)
Set the initial record capacity
|
void |
setNull(int index) |
void |
setValueCount(int valueCount)
Set number of values in the vector
|
copyFromSafe, fieldNameIterator, getChildrenFromFields, getMinorType, getValueCount, getVectorById, initializeChildrenFromFields, supportsDirectRead
add, addOrGet, getChild, getChildByOrdinal, getChildFieldNames, getChildren, getChildVectorWithOrdinal, getPrimitiveVectors, iterator, putChild, putVector, size
addOrGetList, addOrGetMap, addOrGetUnion, allocateNew, getAllocator, getChild, typeify
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getChildrenFromFields, initializeChildrenFromFields
allocateNew, getAllocator, getMinorType, getValueCount
protected ArrowBuf validityBuffer
@Deprecated public NullableMapVector(String name, BufferAllocator allocator, CallBack callBack)
@Deprecated public NullableMapVector(String name, BufferAllocator allocator, DictionaryEncoding dictionary, CallBack callBack)
public NullableMapVector(String name, BufferAllocator allocator, FieldType fieldType, CallBack callBack)
public static NullableMapVector empty(String name, BufferAllocator allocator)
public Field getField()
ValueVector
getField
in interface ValueVector
getField
in class MapVector
public void loadFieldBuffers(ArrowFieldNode fieldNode, List<ArrowBuf> ownBuffers)
FieldVector
loadFieldBuffers
in interface FieldVector
fieldNode
- the fieldNodeownBuffers
- the buffers for this Field (own buffers only, children not included)public List<ArrowBuf> getFieldBuffers()
FieldVector
getFieldBuffers
in interface FieldVector
@Deprecated public List<BufferBacked> getFieldInnerVectors()
getFieldInnerVectors
in interface FieldVector
public NullableMapReaderImpl getReader()
getReader
in interface ValueVector
getReader
in class MapVector
field reader
that supports reading values
from this vector.public NullableMapWriter getWriter()
public TransferPair getTransferPair(BufferAllocator allocator)
ValueVector
getTransferPair
in interface ValueVector
getTransferPair
in class MapVector
allocator
- the target allocatortransfer pair
, creating a new target vector of
the same type.public TransferPair makeTransferPair(ValueVector to)
ValueVector
makeTransferPair
in interface ValueVector
makeTransferPair
in class MapVector
to
- the target for the transfertransfer pair
that is used to transfer underlying
buffers into the target vector.public TransferPair getTransferPair(String ref, BufferAllocator allocator)
getTransferPair
in interface ValueVector
getTransferPair
in class MapVector
public TransferPair getTransferPair(String ref, BufferAllocator allocator, CallBack callBack)
getTransferPair
in interface ValueVector
getTransferPair
in class MapVector
public int getValueCapacity()
getValueCapacity
in interface ValueVector
getValueCapacity
in class MapVector
public ArrowBuf[] getBuffers(boolean clear)
getBuffers
in interface ValueVector
getBuffers
in class AbstractMapVector
clear
- 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 close()
close
in interface Closeable
close
in interface AutoCloseable
close
in interface ValueVector
close
in class MapVector
public void clear()
close()
clear
in interface ValueVector
clear
in class MapVector
public int getBufferSize()
getBufferSize
in interface ValueVector
getBufferSize
in class MapVector
public int getBufferSizeFor(int valueCount)
getBufferSizeFor
in interface ValueVector
getBufferSizeFor
in class MapVector
valueCount
- desired number of elements in the vectorpublic void setInitialCapacity(int numRecords)
ValueVector
setInitialCapacity
in interface ValueVector
setInitialCapacity
in class MapVector
numRecords
- the initial record capacity.public boolean allocateNewSafe()
ValueVector
allocateNewSafe
in interface ValueVector
allocateNewSafe
in class AbstractMapVector
public void reAlloc()
ValueVector
reAlloc
in interface ValueVector
reAlloc
in class AbstractMapVector
public long getValidityBufferAddress()
FieldVector
getValidityBufferAddress
in interface FieldVector
public long getDataBufferAddress()
FieldVector
getDataBufferAddress
in interface FieldVector
public long getOffsetBufferAddress()
FieldVector
getOffsetBufferAddress
in interface FieldVector
public ArrowBuf getValidityBuffer()
ValueVector
getValidityBuffer
in interface ValueVector
getValidityBuffer
in class MapVector
public ArrowBuf getDataBuffer()
ValueVector
getDataBuffer
in interface ValueVector
getDataBuffer
in class MapVector
public ArrowBuf getOffsetBuffer()
ValueVector
getOffsetBuffer
in interface ValueVector
getOffsetBuffer
in class MapVector
public Object getObject(int index)
ValueVector
getObject
in interface ValueVector
getObject
in class MapVector
public void get(int index, ComplexHolder holder)
public int getNullCount()
ValueVector
getNullCount
in interface ValueVector
getNullCount
in class MapVector
public boolean isNull(int index)
ValueVector
isNull
in interface ValueVector
isNull
in class MapVector
public int isSet(int index)
public void setIndexDefined(int index)
public void setNull(int index)
public void setValueCount(int valueCount)
ValueVector
setValueCount
in interface ValueVector
setValueCount
in class MapVector
public void reset()
Copyright © 2017 The Apache Software Foundation. All rights reserved.