public final class VarCharVector extends BaseDataValueVector implements VariableWidthVector
Modifier and Type | Class and Description |
---|---|
class |
VarCharVector.Accessor |
class |
VarCharVector.Mutator
MutableVarChar implements a vector of variable width values.
|
BaseValueVector.BaseAccessor, BaseValueVector.BaseMutator
VariableWidthVector.VariableWidthAccessor, VariableWidthVector.VariableWidthMutator
Modifier and Type | Field and Description |
---|---|
static String |
OFFSETS_VECTOR_NAME |
data
allocator, INITIAL_VALUE_ALLOCATION, MAX_ALLOCATION_SIZE, MAX_ALLOCATION_SIZE_PROPERTY, name
Constructor and Description |
---|
VarCharVector(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,
VarCharVector from) |
boolean |
copyFromSafe(int fromIndex,
int thisIndex,
VarCharVector from) |
void |
decrementAllocationMonitor() |
VarCharVector.Accessor |
getAccessor() |
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.
|
int |
getCurrentSizeInBytes() |
Field |
getField()
Get information about how this field is materialized.
|
Types.MinorType |
getMinorType() |
VarCharVector.Mutator |
getMutator() |
long |
getOffsetAddr() |
UInt4Vector |
getOffsetVector() |
FieldReader |
getReader() |
TransferPair |
getTransferPair(BufferAllocator allocator)
to transfer quota responsibility
|
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)
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()
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,
VarCharVector target) |
void |
transferTo(VarCharVector target) |
getBuffer, getTransferPair, load, load, truncateBufferBasedOnSize, unLoad, unload
checkBufRefs, close, getAllocator, iterator, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
close, getAllocator, getTransferPair
forEach, iterator, spliterator
public static final String OFFSETS_VECTOR_NAME
public VarCharVector(String name, BufferAllocator allocator)
public Field getField()
ValueVector
getField
in interface ValueVector
public Types.MinorType getMinorType()
getMinorType
in interface ValueVector
public FieldReader getReader()
getReader
in interface ValueVector
field reader
that supports reading values
from this vector.public int getBufferSize()
getBufferSize
in interface ValueVector
getBufferSize
in class BaseDataValueVector
public int getBufferSizeFor(int valueCount)
ValueVector
getBufferSizeFor
in interface ValueVector
valueCount
- the number of values to assume this vector containspublic int getValueCapacity()
ValueVector
getValueCapacity
in interface ValueVector
public int getByteCapacity()
VariableWidthVector
getByteCapacity
in interface VariableWidthVector
public int getCurrentSizeInBytes()
getCurrentSizeInBytes
in interface VariableWidthVector
public int getVarByteLength()
public void clear()
ValueVector
clear
in interface ValueVector
clear
in class BaseDataValueVector
public ArrowBuf[] getBuffers(boolean clear)
ValueVector
getBuffers
in interface ValueVector
getBuffers
in class BaseDataValueVector
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 long getOffsetAddr()
public UInt4Vector getOffsetVector()
public TransferPair getTransferPair(BufferAllocator allocator)
ValueVector
getTransferPair
in interface ValueVector
getTransferPair
in class BaseValueVector
allocator
- the target allocatortransfer pair
, creating a new target vector of
the same type.public TransferPair getTransferPair(String ref, BufferAllocator allocator)
getTransferPair
in interface ValueVector
public TransferPair makeTransferPair(ValueVector to)
ValueVector
makeTransferPair
in interface ValueVector
to
- the target for the transfertransfer pair
that is used to transfer underlying
buffers into the target vector.public void transferTo(VarCharVector target)
public void splitAndTransferTo(int startIndex, int length, VarCharVector target)
protected void copyFrom(int fromIndex, int thisIndex, VarCharVector from)
public boolean copyFromSafe(int fromIndex, int thisIndex, VarCharVector from)
public void setInitialCapacity(int valueCount)
ValueVector
setInitialCapacity
in interface ValueVector
valueCount
- the initial record capacity.public void allocateNew()
ValueVector
allocateNew
in interface ValueVector
public boolean allocateNewSafe()
ValueVector
allocateNewSafe
in interface ValueVector
public void allocateNew(int totalBytes, int valueCount)
VariableWidthVector
allocateNew
in interface VariableWidthVector
totalBytes
- Desired size of the underlying data buffer.valueCount
- Number of values in the vector.public void reset()
BaseDataValueVector
reset
in class BaseDataValueVector
public void reAlloc()
ValueVector
reAlloc
in interface ValueVector
public void decrementAllocationMonitor()
public VarCharVector.Accessor getAccessor()
getAccessor
in interface ValueVector
getAccessor
in interface VariableWidthVector
accessor
that is used to read from this vector
instance.public VarCharVector.Mutator getMutator()
getMutator
in interface ValueVector
getMutator
in interface VariableWidthVector
mutator
that is used to write to this vector
instance.Copyright © 2017 The Apache Software Foundation. All rights reserved.