public final class NullableSmallIntVector extends BaseDataValueVector implements FixedWidthVector, NullableVector, FieldVector
| Modifier and Type | Class and Description |
|---|---|
class |
NullableSmallIntVector.Accessor |
class |
NullableSmallIntVector.Mutator |
BaseValueVector.BaseAccessor, BaseValueVector.BaseMutatordata, emptyByteArrayallocator, INITIAL_VALUE_ALLOCATION, MAX_ALLOCATION_SIZE, MAX_ALLOCATION_SIZE_PROPERTY, name| Constructor and Description |
|---|
NullableSmallIntVector(String name,
BufferAllocator allocator) |
| Modifier and Type | Method and Description |
|---|---|
void |
allocateNew()
Allocate new buffers.
|
void |
allocateNew(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,
NullableSmallIntVector from) |
void |
copyFromSafe(int fromIndex,
int thisIndex,
NullableSmallIntVector from) |
void |
copyFromSafe(int fromIndex,
int thisIndex,
SmallIntVector from) |
NullableSmallIntVector.Accessor |
getAccessor()
Returns an
accessor that is used to read from this vector
instance. |
ArrowBuf |
getBuffer() |
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.
|
List<FieldVector> |
getChildrenFromFields()
the returned list is the same size as the list passed to initializeChildrenFromFields
|
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() |
NullableSmallIntVector.Mutator |
getMutator()
Returns an
mutator that is used to write to this vector
instance. |
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.
|
SmallIntVector |
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)
Returns a new
transfer pair that is used to transfer underlying
buffers into the target vector. |
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,
NullableSmallIntVector target) |
void |
transferTo(NullableSmallIntVector target) |
void |
zeroVector()
Zero out the underlying buffer backing this vector.
|
load, load, unLoad, unloadcheckBufRefs, getAllocator, iterator, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetAllocatorpublic NullableSmallIntVector(String name, BufferAllocator allocator)
public 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()
ValueVectorfield reader that supports reading values
from this vector.getReader in interface ValueVectorpublic int getValueCapacity()
ValueVectorgetValueCapacity in interface ValueVectorpublic 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 void close()
ValueVectorclose in interface Closeableclose in interface AutoCloseableclose in interface ValueVectorclose in class BaseDataValueVectorpublic void clear()
ValueVectorclear in interface ValueVectorclear in class BaseDataValueVectorpublic 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 ArrowBuf getBuffer()
getBuffer in class BaseDataValueVectorpublic SmallIntVector 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 allocateNew(int valueCount)
FixedWidthVectorallocateNew in interface FixedWidthVectorvalueCount - Number of values in the vector.public void reset()
BaseDataValueVectorreset in class BaseDataValueVectorpublic void zeroVector()
zeroVector in interface FixedWidthVectorpublic 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(NullableSmallIntVector target)
public void splitAndTransferTo(int startIndex,
int length,
NullableSmallIntVector target)
public NullableSmallIntVector.Accessor getAccessor()
ValueVectoraccessor that is used to read from this vector
instance.getAccessor in interface ValueVectorpublic NullableSmallIntVector.Mutator getMutator()
ValueVectormutator that is used to write to this vector
instance.getMutator in interface ValueVectorpublic void copyFrom(int fromIndex,
int thisIndex,
NullableSmallIntVector from)
public void copyFromSafe(int fromIndex,
int thisIndex,
SmallIntVector from)
public void copyFromSafe(int fromIndex,
int thisIndex,
NullableSmallIntVector from)
Copyright © 2016 The Apache Software Foundation. All rights reserved.