public final class NullableVarCharVector extends BaseValueVector implements VariableWidthVector, NullableVector, FieldVector
| Modifier and Type | Class and Description |
|---|---|
class |
NullableVarCharVector.Accessor |
class |
NullableVarCharVector.Mutator |
BaseValueVector.BaseAccessor, BaseValueVector.BaseMutatorVariableWidthVector.VariableWidthAccessor, VariableWidthVector.VariableWidthMutator| Modifier and Type | Field and Description |
|---|---|
protected static byte[] |
emptyByteArray |
allocator, INITIAL_VALUE_ALLOCATION, MAX_ALLOCATION_SIZE, MAX_ALLOCATION_SIZE_PROPERTY, name| Constructor and Description |
|---|
NullableVarCharVector(String name,
BufferAllocator allocator) |
NullableVarCharVector(String name,
FieldType fieldType,
BufferAllocator allocator) |
| Modifier and Type | Method and Description |
|---|---|
void |
allocateNew()
Allocate new buffers.
|
void |
allocateNew(int totalBytes,
int valueCount)
Allocate a new memory space for this vector.
|
boolean |
allocateNewSafe()
Allocates new buffers.
|
void |
clear()
Release the underlying ArrowBuf and reset the ValueVector to empty.
|
void |
close()
Alternative to clear().
|
void |
copyFrom(int fromIndex,
int thisIndex,
NullableVarCharVector from) |
void |
copyFromSafe(int fromIndex,
int thisIndex,
NullableVarCharVector from) |
void |
copyFromSafe(int fromIndex,
int thisIndex,
VarCharVector from) |
NullableVarCharVector.Accessor |
getAccessor() |
ArrowBuf |
getBuffer() |
ArrowBuf[] |
getBuffers(boolean clear)
Return the underlying buffers associated with this vector.
|
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.
|
int |
getByteCapacity()
Provide the maximum amount of variable width bytes that can be stored in this vector.
|
List<FieldVector> |
getChildrenFromFields()
the returned list is the same size as the list passed to initializeChildrenFromFields
|
int |
getCurrentSizeInBytes() |
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() |
Types.MinorType |
getMinorType() |
NullableVarCharVector.Mutator |
getMutator() |
ArrowBuf |
getOffsetBuffer()
Gets the underlying buffer associated with offset vector
|
long |
getOffsetBufferAddress()
Gets the starting address of 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
|
long |
getValidityBufferAddress()
Gets the starting address of the underlying buffer associated with validity vector
|
BitVector |
getValidityVector() |
int |
getValueCapacity()
Returns the maximum number of values that can be stored in this vector instance.
|
VarCharVector |
getValuesVector() |
void |
initializeChildrenFromFields(List<Field> children)
Initializes the child vectors
to be later loaded with loadBuffers
|
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 |
setInitialCapacity(int numRecords)
Set the initial record capacity
|
void |
splitAndTransferTo(int startIndex,
int length,
NullableVarCharVector target) |
void |
transferTo(NullableVarCharVector target) |
checkBufRefs, getAllocator, iterator, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetAllocatorforEach, iterator, spliteratorpublic NullableVarCharVector(String name, BufferAllocator allocator)
public NullableVarCharVector(String name, FieldType fieldType, BufferAllocator allocator)
public BitVector getValidityVector()
getValidityVector in interface NullableVectorpublic List<BufferBacked> getFieldInnerVectors()
getFieldInnerVectors in interface FieldVectorpublic void initializeChildrenFromFields(List<Field> children)
FieldVectorinitializeChildrenFromFields in interface FieldVectorchildren - the schemapublic List<FieldVector> getChildrenFromFields()
FieldVectorgetChildrenFromFields in interface FieldVectorpublic void loadFieldBuffers(ArrowFieldNode fieldNode, List<ArrowBuf> ownBuffers)
FieldVectorloadFieldBuffers in interface FieldVectorfieldNode - the fieldNodeownBuffers - the buffers for this Field (own buffers only, children not included)public List<ArrowBuf> getFieldBuffers()
FieldVectorgetFieldBuffers in interface FieldVectorpublic Field getField()
ValueVectorgetField in interface ValueVectorpublic Types.MinorType getMinorType()
getMinorType in interface ValueVectorpublic FieldReader getReader()
getReader in interface ValueVectorfield reader that supports reading values
from this vector.public int getValueCapacity()
ValueVectorgetValueCapacity in interface ValueVectorpublic ArrowBuf[] getBuffers(boolean clear)
ValueVectorgetBuffers in interface ValueVectorclear - 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()
ValueVectorclose in interface Closeableclose in interface AutoCloseableclose in interface ValueVectorclose in class BaseValueVectorpublic void clear()
ValueVectorclear in interface ValueVectorclear in class BaseValueVectorpublic int getBufferSize()
getBufferSize in interface ValueVectorpublic int getBufferSizeFor(int valueCount)
ValueVectorgetBufferSizeFor in interface ValueVectorvalueCount - the number of values to assume this vector containspublic ArrowBuf getBuffer()
public VarCharVector getValuesVector()
getValuesVector in interface NullableVectorpublic void setInitialCapacity(int numRecords)
ValueVectorsetInitialCapacity in interface ValueVectornumRecords - the initial record capacity.public void allocateNew()
ValueVectorallocateNew in interface ValueVectorpublic boolean allocateNewSafe()
ValueVectorallocateNewSafe in interface ValueVectorpublic void reAlloc()
ValueVectorreAlloc in interface ValueVectorpublic void reset()
public void allocateNew(int totalBytes,
int valueCount)
VariableWidthVectorallocateNew in interface VariableWidthVectortotalBytes - Desired size of the underlying data buffer.valueCount - Number of values in the vector.public int getByteCapacity()
VariableWidthVectorgetByteCapacity in interface VariableWidthVectorpublic int getCurrentSizeInBytes()
getCurrentSizeInBytes in interface VariableWidthVectorpublic TransferPair getTransferPair(String ref, BufferAllocator allocator, CallBack callBack)
getTransferPair in interface ValueVectorpublic TransferPair getTransferPair(BufferAllocator allocator)
ValueVectorgetTransferPair in interface ValueVectorgetTransferPair in class BaseValueVectorallocator - the target allocatortransfer pair, creating a new target vector of
the same type.public TransferPair getTransferPair(String ref, BufferAllocator allocator)
getTransferPair in interface ValueVectorpublic TransferPair makeTransferPair(ValueVector to)
ValueVectormakeTransferPair in interface ValueVectorto - the target for the transfertransfer pair that is used to transfer underlying
buffers into the target vector.public void transferTo(NullableVarCharVector target)
public void splitAndTransferTo(int startIndex,
int length,
NullableVarCharVector target)
public NullableVarCharVector.Accessor getAccessor()
getAccessor in interface ValueVectorgetAccessor in interface VariableWidthVectoraccessor that is used to read from this vector
instance.public NullableVarCharVector.Mutator getMutator()
getMutator in interface ValueVectorgetMutator in interface VariableWidthVectormutator that is used to write to this vector
instance.public void copyFrom(int fromIndex,
int thisIndex,
NullableVarCharVector from)
public void copyFromSafe(int fromIndex,
int thisIndex,
VarCharVector from)
public void copyFromSafe(int fromIndex,
int thisIndex,
NullableVarCharVector from)
public long getValidityBufferAddress()
FieldVectorgetValidityBufferAddress in interface FieldVectorpublic long getDataBufferAddress()
FieldVectorgetDataBufferAddress in interface FieldVectorpublic long getOffsetBufferAddress()
FieldVectorgetOffsetBufferAddress in interface FieldVectorpublic ArrowBuf getValidityBuffer()
ValueVectorgetValidityBuffer in interface ValueVectorpublic ArrowBuf getDataBuffer()
ValueVectorgetDataBuffer in interface ValueVectorpublic ArrowBuf getOffsetBuffer()
ValueVectorgetOffsetBuffer in interface ValueVectorCopyright © 2017 The Apache Software Foundation. All rights reserved.