public final class NullableVar16CharVector extends BaseDataValueVector implements VariableWidthVector, NullableVector
Modifier and Type | Class and Description |
---|---|
class |
NullableVar16CharVector.Accessor |
class |
NullableVar16CharVector.Mutator |
BaseValueVector.BaseAccessor, BaseValueVector.BaseMutator
VariableWidthVector.VariableWidthAccessor, VariableWidthVector.VariableWidthMutator
data, emptyByteArray
allocator, field, INITIAL_VALUE_ALLOCATION, MAX_ALLOCATION_SIZE
DEFAULT_RECORD_BYTE_COUNT, MIN_BYTE_COUNT, offsetsField
bitsField
BITS_VECTOR_NAME, MAX_BUFFER_SIZE, MAX_ROW_COUNT, MIN_ROW_COUNT, OFFSETS_VECTOR_NAME, VALUES_VECTOR_NAME
Constructor and Description |
---|
NullableVar16CharVector(MaterializedField field,
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 DrillBuf and reset the ValueVector to empty.
|
void |
close()
Alternative to clear().
|
void |
collectLedgers(Set<AllocationManager.BufferLedger> ledgers)
Add the ledgers underlying the buffers underlying the components of the
vector to the set provided.
|
Var16CharVector |
convertToRequiredVector() |
void |
copyEntry(int toIndex,
ValueVector from,
int fromIndex) |
void |
copyFrom(int fromIndex,
int thisIndex,
NullableVar16CharVector from) |
void |
copyFromSafe(int fromIndex,
int thisIndex,
NullableVar16CharVector from) |
void |
copyFromSafe(int fromIndex,
int thisIndex,
Var16CharVector from) |
void |
exchange(ValueVector other)
Exchange state with another value vector of the same type.
|
NullableVar16CharVector.Accessor |
getAccessor()
Returns an
accessor that is used to read from this vector
instance. |
int |
getAllocatedSize()
Returns the total size of buffers allocated by this vector.
|
int |
getBitsValueCapacity() |
UInt1Vector |
getBitsVector() |
DrillBuf |
getBuffer() |
DrillBuf[] |
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 int his vector.
|
int |
getCurrentSizeInBytes() |
UserBitShared.SerializedField.Builder |
getMetadataBuilder() |
NullableVar16CharVector.Mutator |
getMutator()
Returns an
mutator that is used to write to this vector
instance. |
UInt4Vector |
getOffsetVector() |
int |
getPayloadByteCount(int valueCount)
Return the number of value bytes consumed by actual data.
|
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.
|
Var16CharVector |
getValuesVector() |
void |
load(UserBitShared.SerializedField metadata,
DrillBuf buffer)
Load the data provided in the buffer.
|
TransferPair |
makeTransferPair(ValueVector to)
Returns a new
transfer pair that is used to transfer underlying
buffers into the target vector. |
DrillBuf |
reallocRaw(int newAllocationSize)
Core of vector allocation.
|
void |
reset()
This method has a similar effect of allocateNew() without actually clearing and reallocating
the value vector.
|
void |
setInitialCapacity(int numRecords)
Set the initial record capacity
|
void |
splitAndTransferTo(int startIndex,
int length,
NullableVar16CharVector target) |
void |
transferTo(NullableVar16CharVector target) |
checkBufRefs, fillBitsVector, getAllocator, getField, getField, getMetadata, iterator, toNullable, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAllocator, getField, getMetadata, toNullable
forEach, iterator, spliterator
public NullableVar16CharVector(MaterializedField field, BufferAllocator allocator)
public FieldReader getReader()
ValueVector
field reader
that supports reading values
from this vector.getReader
in interface ValueVector
public int getValueCapacity()
ValueVector
getValueCapacity
in interface ValueVector
public DrillBuf[] 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 void close()
ValueVector
close
in interface Closeable
close
in interface AutoCloseable
close
in interface ValueVector
close
in class BaseDataValueVector
public void clear()
ValueVector
clear
in interface ValueVector
clear
in class BaseDataValueVector
public int getBufferSize()
ValueVector
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 getAllocatedSize()
ValueVector
getAllocatedSize
in interface ValueVector
getAllocatedSize
in class BaseDataValueVector
public DrillBuf getBuffer()
getBuffer
in class BaseDataValueVector
public Var16CharVector getValuesVector()
getValuesVector
in interface NullableVector
public UInt1Vector getBitsVector()
getBitsVector
in interface NullableVector
public UInt4Vector getOffsetVector()
getOffsetVector
in interface VariableWidthVector
public void setInitialCapacity(int numRecords)
ValueVector
setInitialCapacity
in interface ValueVector
public UserBitShared.SerializedField.Builder getMetadataBuilder()
getMetadataBuilder
in class BaseValueVector
public void allocateNew()
ValueVector
allocateNew
in interface ValueVector
public boolean allocateNewSafe()
ValueVector
allocateNewSafe
in interface ValueVector
public DrillBuf reallocRaw(int newAllocationSize)
BaseDataValueVector
reallocRaw
in class BaseDataValueVector
newAllocationSize
- new buffer size as a power of twopublic void collectLedgers(Set<AllocationManager.BufferLedger> ledgers)
ValueVector
collectLedgers
in interface ValueVector
collectLedgers
in class BaseDataValueVector
ledgers
- set of ledgers to which to add ledgers for this vectorpublic int getPayloadByteCount(int valueCount)
ValueVector
getPayloadByteCount
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 int getByteCapacity()
VariableWidthVector
getByteCapacity
in interface VariableWidthVector
public int getCurrentSizeInBytes()
getCurrentSizeInBytes
in interface VariableWidthVector
public void load(UserBitShared.SerializedField metadata, DrillBuf buffer)
ValueVector
load
in interface ValueVector
metadata
- Metadata used to decode the incoming buffer.buffer
- The buffer that contains the ValueVector.public TransferPair getTransferPair(BufferAllocator allocator)
ValueVector
transfer pair
, creating a new target vector of
the same type.getTransferPair
in interface ValueVector
getTransferPair
in class BaseValueVector
public TransferPair getTransferPair(String ref, BufferAllocator allocator)
getTransferPair
in interface ValueVector
public TransferPair makeTransferPair(ValueVector to)
ValueVector
transfer pair
that is used to transfer underlying
buffers into the target vector.makeTransferPair
in interface ValueVector
public void transferTo(NullableVar16CharVector target)
public void splitAndTransferTo(int startIndex, int length, NullableVar16CharVector target)
public NullableVar16CharVector.Accessor getAccessor()
ValueVector
accessor
that is used to read from this vector
instance.getAccessor
in interface ValueVector
getAccessor
in interface VariableWidthVector
public NullableVar16CharVector.Mutator getMutator()
ValueVector
mutator
that is used to write to this vector
instance.getMutator
in interface ValueVector
getMutator
in interface VariableWidthVector
public Var16CharVector convertToRequiredVector()
public int getBitsValueCapacity()
public void copyFrom(int fromIndex, int thisIndex, NullableVar16CharVector from)
public void copyFromSafe(int fromIndex, int thisIndex, Var16CharVector from)
public void copyFromSafe(int fromIndex, int thisIndex, NullableVar16CharVector from)
public void copyEntry(int toIndex, ValueVector from, int fromIndex)
copyEntry
in interface ValueVector
public void exchange(ValueVector other)
ValueVector
exchange
in interface ValueVector
exchange
in class BaseDataValueVector
Copyright © 1970 The Apache Software Foundation. All rights reserved.