public class UnionVector extends Object implements FieldVector
Modifier and Type | Class and Description |
---|---|
class |
UnionVector.Accessor |
class |
UnionVector.Mutator |
Constructor and Description |
---|
UnionVector(String name,
BufferAllocator allocator,
CallBack callBack) |
public UnionVector(String name, BufferAllocator allocator, CallBack callBack)
public BufferAllocator getAllocator()
getAllocator
in interface ValueVector
public Types.MinorType getMinorType()
getMinorType
in interface ValueVector
public void initializeChildrenFromFields(List<Field> children)
FieldVector
initializeChildrenFromFields
in interface FieldVector
children
- the schemapublic List<FieldVector> getChildrenFromFields()
FieldVector
getChildrenFromFields
in interface FieldVector
public void loadFieldBuffers(ArrowFieldNode fieldNode, List<ArrowBuf> ownBuffers)
FieldVector
loadFieldBuffers
in interface FieldVector
fieldNode
- the fieldNodeownBuffers
- the buffers for this Field (own buffers only, children not included)public List<ArrowBuf> getFieldBuffers()
FieldVector
getFieldBuffers
in interface FieldVector
public List<BufferBacked> getFieldInnerVectors()
getFieldInnerVectors
in interface FieldVector
public NullableMapVector getMap()
public NullableTinyIntVector getTinyIntVector()
public NullableUInt1Vector getUInt1Vector()
public NullableUInt2Vector getUInt2Vector()
public NullableSmallIntVector getSmallIntVector()
public NullableIntVector getIntVector()
public NullableUInt4Vector getUInt4Vector()
public NullableFloat4Vector getFloat4Vector()
public NullableDateDayVector getDateDayVector()
public NullableIntervalYearVector getIntervalYearVector()
public NullableTimeSecVector getTimeSecVector()
public NullableTimeMilliVector getTimeMilliVector()
public NullableBigIntVector getBigIntVector()
public NullableUInt8Vector getUInt8Vector()
public NullableFloat8Vector getFloat8Vector()
public NullableDateMilliVector getDateMilliVector()
public NullableTimeStampSecVector getTimeStampSecVector()
public NullableTimeStampMilliVector getTimeStampMilliVector()
public NullableTimeStampMicroVector getTimeStampMicroVector()
public NullableTimeStampNanoVector getTimeStampNanoVector()
public NullableTimeMicroVector getTimeMicroVector()
public NullableTimeNanoVector getTimeNanoVector()
public NullableIntervalDayVector getIntervalDayVector()
public NullableVarBinaryVector getVarBinaryVector()
public NullableVarCharVector getVarCharVector()
public NullableBitVector getBitVector()
public ListVector getList()
public int getTypeValue(int index)
public UInt1Vector getTypeVector()
public void allocateNew() throws OutOfMemoryException
ValueVector
allocateNew
in interface ValueVector
OutOfMemoryException
- Thrown if no memory can be allocated.public boolean allocateNewSafe()
ValueVector
allocateNewSafe
in interface ValueVector
public void reAlloc()
ValueVector
reAlloc
in interface ValueVector
public void setInitialCapacity(int numRecords)
ValueVector
setInitialCapacity
in interface ValueVector
numRecords
- the initial record capacity.public int getValueCapacity()
ValueVector
getValueCapacity
in interface ValueVector
public void close()
ValueVector
close
in interface Closeable
close
in interface AutoCloseable
close
in interface ValueVector
public void clear()
ValueVector
clear
in interface ValueVector
public Field getField()
ValueVector
getField
in interface ValueVector
public TransferPair getTransferPair(BufferAllocator allocator)
ValueVector
getTransferPair
in interface ValueVector
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 getTransferPair(String ref, BufferAllocator allocator, CallBack callBack)
getTransferPair
in interface ValueVector
public TransferPair makeTransferPair(ValueVector target)
ValueVector
makeTransferPair
in interface ValueVector
target
- the target for the transfertransfer pair
that is used to transfer underlying
buffers into the target vector.public void copyFrom(int inIndex, int outIndex, UnionVector from)
public void copyFromSafe(int inIndex, int outIndex, UnionVector from)
public FieldVector addVector(FieldVector v)
public UnionVector.Accessor getAccessor()
getAccessor
in interface ValueVector
accessor
that is used to read from this vector
instance.public UnionVector.Mutator getMutator()
getMutator
in interface ValueVector
mutator
that is used to write to this vector
instance.public FieldReader getReader()
getReader
in interface ValueVector
field reader
that supports reading values
from this vector.public FieldWriter getWriter()
public int getBufferSize()
getBufferSize
in interface ValueVector
public int getBufferSizeFor(int valueCount)
ValueVector
getBufferSizeFor
in interface ValueVector
valueCount
- the number of values to assume this vector containspublic ArrowBuf[] getBuffers(boolean clear)
ValueVector
getBuffers
in interface ValueVector
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 Iterator<ValueVector> iterator()
iterator
in interface Iterable<ValueVector>
Copyright © 2017 The Apache Software Foundation. All rights reserved.