public final class VarBinaryVector extends BaseDataValueVector implements VariableWidthVector
| Modifier and Type | Class and Description |
|---|---|
class |
VarBinaryVector.Accessor |
class |
VarBinaryVector.Mutator
MutableVarBinary implements a vector of variable width values.
|
BaseValueVector.BaseAccessor, BaseValueVector.BaseMutatorVariableWidthVector.VariableWidthAccessor, VariableWidthVector.VariableWidthMutator| Modifier and Type | Field and Description |
|---|---|
static String |
OFFSETS_VECTOR_NAME |
data, emptyByteArrayallocator, INITIAL_VALUE_ALLOCATION, MAX_ALLOCATION_SIZE, MAX_ALLOCATION_SIZE_PROPERTY, name| Constructor and Description |
|---|
VarBinaryVector(String name,
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.
|
protected void |
copyFrom(int fromIndex,
int thisIndex,
VarBinaryVector from) |
boolean |
copyFromSafe(int fromIndex,
int thisIndex,
VarBinaryVector from) |
void |
decrementAllocationMonitor() |
VarBinaryVector.Accessor |
getAccessor()
Returns an
accessor that is used to read from this vector
instance. |
ArrowBuf[] |
getBuffers(boolean clear)
Return the underlying buffers associated with this vector.
|
int |
getBufferSize()
Returns the number of bytes that is used by this vector instance.
|
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.
|
int |
getCurrentSizeInBytes() |
Field |
getField()
Get information about how this field is materialized.
|
Types.MinorType |
getMinorType() |
VarBinaryVector.Mutator |
getMutator()
Returns an
mutator that is used to write to this vector
instance. |
long |
getOffsetAddr() |
UInt4Vector |
getOffsetVector() |
FieldReader |
getReader()
Returns a
field reader that supports reading values
from this vector. |
TransferPair |
getTransferPair(BufferAllocator allocator)
Returns a
transfer pair, creating a new target vector of
the same type. |
TransferPair |
getTransferPair(String ref,
BufferAllocator allocator) |
int |
getValueCapacity()
Returns the maximum number of values that can be stored in this vector instance.
|
int |
getVarByteLength()
Return the number of bytes contained in the current var len byte vector.
|
TransferPair |
makeTransferPair(ValueVector to)
Returns a new
transfer pair that is used to transfer underlying
buffers into the target vector. |
void |
reAlloc() |
void |
reset()
This method has a similar effect of allocateNew() without actually clearing and reallocating
the value vector.
|
void |
setInitialCapacity(int valueCount)
Set the initial record capacity
|
void |
splitAndTransferTo(int startIndex,
int length,
VarBinaryVector target) |
void |
transferTo(VarBinaryVector target) |
close, getBuffer, load, load, unLoad, unloadcheckBufRefs, getAllocator, iterator, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitclose, getAllocatorpublic static final String OFFSETS_VECTOR_NAME
public VarBinaryVector(String name, BufferAllocator allocator)
public Field getField()
ValueVectorgetField in interface ValueVectorpublic Types.MinorType getMinorType()
getMinorType in interface ValueVectorpublic FieldReader getReader()
ValueVectorfield reader that supports reading values
from this vector.getReader in interface ValueVectorpublic int getBufferSize()
ValueVectorgetBufferSize in interface ValueVectorgetBufferSize in class BaseDataValueVectorpublic int getBufferSizeFor(int valueCount)
ValueVectorgetBufferSizeFor in interface ValueVectorvalueCount - the number of values to assume this vector containspublic int getValueCapacity()
ValueVectorgetValueCapacity in interface ValueVectorpublic int getByteCapacity()
VariableWidthVectorgetByteCapacity in interface VariableWidthVectorpublic int getCurrentSizeInBytes()
getCurrentSizeInBytes in interface VariableWidthVectorpublic int getVarByteLength()
public void clear()
ValueVectorclear in interface ValueVectorclear in class BaseDataValueVectorpublic ArrowBuf[] getBuffers(boolean clear)
ValueVectorgetBuffers in interface ValueVectorgetBuffers in class BaseDataValueVectorclear - 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 long getOffsetAddr()
public UInt4Vector getOffsetVector()
public TransferPair getTransferPair(BufferAllocator allocator)
ValueVectortransfer pair, creating a new target vector of
the same type.getTransferPair in interface ValueVectorgetTransferPair in class BaseValueVectorpublic TransferPair getTransferPair(String ref, BufferAllocator allocator)
getTransferPair in interface ValueVectorpublic TransferPair makeTransferPair(ValueVector to)
ValueVectortransfer pair that is used to transfer underlying
buffers into the target vector.makeTransferPair in interface ValueVectorpublic void transferTo(VarBinaryVector target)
public void splitAndTransferTo(int startIndex,
int length,
VarBinaryVector target)
protected void copyFrom(int fromIndex,
int thisIndex,
VarBinaryVector from)
public boolean copyFromSafe(int fromIndex,
int thisIndex,
VarBinaryVector from)
public void setInitialCapacity(int valueCount)
ValueVectorsetInitialCapacity in interface ValueVectorvalueCount - the initial record capacity.public void allocateNew()
ValueVectorallocateNew in interface ValueVectorpublic boolean allocateNewSafe()
ValueVectorallocateNewSafe in interface ValueVectorpublic 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 void reset()
BaseDataValueVectorreset in class BaseDataValueVectorpublic void reAlloc()
public void decrementAllocationMonitor()
public VarBinaryVector.Accessor getAccessor()
ValueVectoraccessor that is used to read from this vector
instance.getAccessor in interface ValueVectorgetAccessor in interface VariableWidthVectorpublic VarBinaryVector.Mutator getMutator()
ValueVectormutator that is used to write to this vector
instance.getMutator in interface ValueVectorgetMutator in interface VariableWidthVectorCopyright © 2016 The Apache Software Foundation. All rights reserved.