public class UnionVector extends AbstractContainerVector implements FieldVector
| Modifier and Type | Field and Description |
|---|---|
static byte |
TYPE_WIDTH |
protected ArrowBuf |
typeBuffer |
allocator, callBack, name| Constructor and Description |
|---|
UnionVector(String name,
BufferAllocator allocator,
CallBack callBack)
Deprecated.
|
UnionVector(String name,
BufferAllocator allocator,
FieldType fieldType,
CallBack callBack) |
addOrGetFixedSizeList, addOrGetList, addOrGetMap, addOrGetStruct, addOrGetUnion, getChild, supportsDirectRead, typeifyclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorprotected ArrowBuf typeBuffer
public static final byte TYPE_WIDTH
@Deprecated public UnionVector(String name, BufferAllocator allocator, CallBack callBack)
public UnionVector(String name, BufferAllocator allocator, FieldType fieldType, CallBack callBack)
public static UnionVector empty(String name, BufferAllocator allocator)
public BufferAllocator getAllocator()
getAllocator in interface ValueVectorgetAllocator in class AbstractContainerVectorpublic Types.MinorType getMinorType()
getMinorType in interface ValueVectorpublic 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 FieldVector@Deprecated public List<BufferBacked> getFieldInnerVectors()
FieldVectorgetFieldInnerVectors in interface FieldVectorpublic long getValidityBufferAddress()
FieldVectorgetValidityBufferAddress in interface FieldVectorpublic long getTypeBufferAddress()
public long getDataBufferAddress()
FieldVectorgetDataBufferAddress in interface FieldVectorpublic long getOffsetBufferAddress()
FieldVectorgetOffsetBufferAddress in interface FieldVectorpublic ArrowBuf getTypeBuffer()
public ArrowBuf getValidityBuffer()
ValueVectorgetValidityBuffer in interface ValueVectorpublic ArrowBuf getDataBuffer()
ValueVectorgetDataBuffer in interface ValueVectorpublic ArrowBuf getOffsetBuffer()
ValueVectorgetOffsetBuffer in interface ValueVectorpublic StructVector getStruct()
public TinyIntVector getTinyIntVector()
public TinyIntVector getTinyIntVector(String name)
public UInt1Vector getUInt1Vector()
public UInt1Vector getUInt1Vector(String name)
public UInt2Vector getUInt2Vector()
public UInt2Vector getUInt2Vector(String name)
public SmallIntVector getSmallIntVector()
public SmallIntVector getSmallIntVector(String name)
public IntVector getIntVector()
public UInt4Vector getUInt4Vector()
public UInt4Vector getUInt4Vector(String name)
public Float4Vector getFloat4Vector()
public Float4Vector getFloat4Vector(String name)
public DateDayVector getDateDayVector()
public DateDayVector getDateDayVector(String name)
public IntervalYearVector getIntervalYearVector()
public IntervalYearVector getIntervalYearVector(String name)
public TimeSecVector getTimeSecVector()
public TimeSecVector getTimeSecVector(String name)
public TimeMilliVector getTimeMilliVector()
public TimeMilliVector getTimeMilliVector(String name)
public BigIntVector getBigIntVector()
public BigIntVector getBigIntVector(String name)
public UInt8Vector getUInt8Vector()
public UInt8Vector getUInt8Vector(String name)
public Float8Vector getFloat8Vector()
public Float8Vector getFloat8Vector(String name)
public DateMilliVector getDateMilliVector()
public DateMilliVector getDateMilliVector(String name)
public TimeStampSecVector getTimeStampSecVector()
public TimeStampSecVector getTimeStampSecVector(String name)
public TimeStampMilliVector getTimeStampMilliVector()
public TimeStampMilliVector getTimeStampMilliVector(String name)
public TimeStampMicroVector getTimeStampMicroVector()
public TimeStampMicroVector getTimeStampMicroVector(String name)
public TimeStampNanoVector getTimeStampNanoVector()
public TimeStampNanoVector getTimeStampNanoVector(String name)
public TimeMicroVector getTimeMicroVector()
public TimeMicroVector getTimeMicroVector(String name)
public TimeNanoVector getTimeNanoVector()
public TimeNanoVector getTimeNanoVector(String name)
public IntervalDayVector getIntervalDayVector()
public IntervalDayVector getIntervalDayVector(String name)
public Decimal256Vector getDecimal256Vector(ArrowType arrowType)
public Decimal256Vector getDecimal256Vector(String name, ArrowType arrowType)
public Decimal256Vector getDecimal256Vector()
public DecimalVector getDecimalVector(ArrowType arrowType)
public DecimalVector getDecimalVector(String name, ArrowType arrowType)
public DecimalVector getDecimalVector()
public VarBinaryVector getVarBinaryVector()
public VarBinaryVector getVarBinaryVector(String name)
public VarCharVector getVarCharVector()
public VarCharVector getVarCharVector(String name)
public LargeVarCharVector getLargeVarCharVector()
public LargeVarCharVector getLargeVarCharVector(String name)
public LargeVarBinaryVector getLargeVarBinaryVector()
public LargeVarBinaryVector getLargeVarBinaryVector(String name)
public BitVector getBitVector()
public ListVector getList()
public MapVector getMap()
public int getTypeValue(int index)
public void allocateNew()
throws OutOfMemoryException
ValueVectorallocateNew in interface ValueVectorallocateNew in class AbstractContainerVectorOutOfMemoryException - Thrown if no memory can be allocated.public boolean allocateNewSafe()
ValueVectorallocateNewSafe in interface ValueVectorpublic void reAlloc()
ValueVectorreAlloc in interface ValueVectorpublic void setInitialCapacity(int numRecords)
ValueVectorsetInitialCapacity in interface ValueVectornumRecords - the initial record capacity.public int getValueCapacity()
ValueVectorgetValueCapacity in interface ValueVectorpublic void close()
AbstractContainerVectorclose in interface Closeableclose in interface AutoCloseableclose in interface ValueVectorclose in class AbstractContainerVectorpublic void clear()
ValueVectorclear in interface ValueVectorpublic void reset()
ValueVectorreset in interface ValueVectorpublic Field getField()
ValueVectorgetField in interface ValueVectorpublic TransferPair getTransferPair(BufferAllocator allocator)
ValueVectorgetTransferPair in interface ValueVectorallocator - 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 getTransferPair(String ref, BufferAllocator allocator, CallBack callBack)
getTransferPair in interface ValueVectorpublic TransferPair makeTransferPair(ValueVector target)
ValueVectormakeTransferPair in interface ValueVectortarget - the target for the transfertransfer pair that is used to transfer underlying
buffers into the target vector.public void copyFrom(int inIndex,
int outIndex,
ValueVector from)
ValueVectorcopyFrom in interface ValueVectorcopyFrom in class AbstractContainerVectorinIndex - position to copy from in source vectoroutIndex - position to copy to in this vectorfrom - source vectorpublic void copyFromSafe(int inIndex,
int outIndex,
ValueVector from)
ValueVectorValueVector.copyFrom(int, int, ValueVector) except that
it handles the case when the capacity of the vector needs to be expanded
before copy.copyFromSafe in interface ValueVectorcopyFromSafe in class AbstractContainerVectorinIndex - position to copy from in source vectoroutIndex - position to copy to in this vectorfrom - source vectorpublic FieldVector addVector(FieldVector v)
public void directAddVector(FieldVector v)
public FieldReader getReader()
ValueVectorgetReader in interface ValueVectorfield reader that supports reading values
from this vector.public FieldWriter getWriter()
public int getBufferSize()
ValueVectorgetBufferSize in interface ValueVectorpublic int getBufferSizeFor(int valueCount)
ValueVectorgetBufferSizeFor in interface ValueVectorvalueCount - the number of values to assume this vector containspublic 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 Iterator<ValueVector> iterator()
iterator in interface Iterable<ValueVector>public ValueVector getVector(int index)
public ValueVector getVector(int index, ArrowType arrowType)
public ValueVector getVectorByType(int typeId)
public ValueVector getVectorByType(int typeId, ArrowType arrowType)
public Object getObject(int index)
ValueVectorgetObject in interface ValueVectorindex - index of object to getpublic byte[] get(int index)
public void get(int index,
ComplexHolder holder)
public void get(int index,
UnionHolder holder)
public int getValueCount()
ValueVectorgetValueCount in interface ValueVectorpublic boolean isNull(int index)
isNull in interface ValueVectorindex - index to check for nullpublic int getNullCount()
ValueVectorgetNullCount in interface ValueVectorpublic int isSet(int index)
public void setValueCount(int valueCount)
ValueVectorsetValueCount in interface ValueVectorpublic void setSafe(int index,
UnionHolder holder)
public void setSafe(int index,
UnionHolder holder,
ArrowType arrowType)
public void setSafe(int index,
NullableTinyIntHolder holder)
public void setSafe(int index,
NullableUInt1Holder holder)
public void setSafe(int index,
NullableUInt2Holder holder)
public void setSafe(int index,
NullableSmallIntHolder holder)
public void setSafe(int index,
NullableIntHolder holder)
public void setSafe(int index,
NullableUInt4Holder holder)
public void setSafe(int index,
NullableFloat4Holder holder)
public void setSafe(int index,
NullableDateDayHolder holder)
public void setSafe(int index,
NullableIntervalYearHolder holder)
public void setSafe(int index,
NullableTimeSecHolder holder)
public void setSafe(int index,
NullableTimeMilliHolder holder)
public void setSafe(int index,
NullableBigIntHolder holder)
public void setSafe(int index,
NullableUInt8Holder holder)
public void setSafe(int index,
NullableFloat8Holder holder)
public void setSafe(int index,
NullableDateMilliHolder holder)
public void setSafe(int index,
NullableTimeStampSecHolder holder)
public void setSafe(int index,
NullableTimeStampMilliHolder holder)
public void setSafe(int index,
NullableTimeStampMicroHolder holder)
public void setSafe(int index,
NullableTimeStampNanoHolder holder)
public void setSafe(int index,
NullableTimeMicroHolder holder)
public void setSafe(int index,
NullableTimeNanoHolder holder)
public void setSafe(int index,
NullableIntervalDayHolder holder)
public void setSafe(int index,
NullableDecimal256Holder holder,
ArrowType arrowType)
public void setSafe(int index,
NullableDecimalHolder holder,
ArrowType arrowType)
public void setSafe(int index,
NullableVarBinaryHolder holder)
public void setSafe(int index,
NullableVarCharHolder holder)
public void setSafe(int index,
NullableLargeVarCharHolder holder)
public void setSafe(int index,
NullableLargeVarBinaryHolder holder)
public void setSafe(int index,
NullableBitHolder holder)
public void setType(int index,
Types.MinorType type)
public int hashCode(int index)
ValueVectorhashCode in interface ValueVectorpublic int hashCode(int index,
ArrowBufHasher hasher)
ValueVectorhashCode in interface ValueVectorpublic <OUT,IN> OUT accept(VectorVisitor<OUT,IN> visitor, IN value)
ValueVectorVectorVisitor and return the result.accept in interface ValueVectorOUT - the output result type.IN - the input data together with visitor.public String getName()
ValueVectorgetName in interface ValueVectorgetName in class AbstractContainerVectorpublic <T extends FieldVector> T addOrGet(String name, FieldType fieldType, Class<T> clazz)
addOrGet in class AbstractContainerVectorpublic <T extends FieldVector> T getChild(String name, Class<T> clazz)
getChild in class AbstractContainerVectorpublic VectorWithOrdinal getChildVectorWithOrdinal(String name)
getChildVectorWithOrdinal in class AbstractContainerVectorpublic int size()
size in class AbstractContainerVectorpublic void setInitialCapacity(int valueCount,
double density)
DensityAwareVectorsetInitialCapacity in interface DensityAwareVectorvalueCount - the number of values in this vectordensity - the density of the vectorCopyright © 2021 The Apache Software Foundation. All rights reserved.