- All Superinterfaces:
AutoCloseable
,Closeable
,Iterable<ValueVector>
,ValueVector
- All Known Subinterfaces:
BaseIntVector
,BaseListVector
,VariableWidthFieldVector
- All Known Implementing Classes:
BaseFixedWidthVector
,BaseLargeRepeatedValueViewVector
,BaseLargeVariableWidthVector
,BaseRepeatedValueVector
,BaseRepeatedValueViewVector
,BaseVariableWidthVector
,BaseVariableWidthViewVector
,BigIntVector
,BitVector
,DateDayVector
,DateMilliVector
,Decimal256Vector
,DecimalVector
,DenseUnionVector
,DurationVector
,ExtensionTypeVector
,FixedSizeBinaryVector
,FixedSizeListVector
,Float2Vector
,Float4Vector
,Float8Vector
,IntervalDayVector
,IntervalMonthDayNanoVector
,IntervalYearVector
,IntVector
,LargeListVector
,LargeListViewVector
,LargeVarBinaryVector
,LargeVarCharVector
,ListVector
,ListViewVector
,MapVector
,NullVector
,OpaqueVector
,RunEndEncodedVector
,SmallIntVector
,StructVector
,TimeMicroVector
,TimeMilliVector
,TimeNanoVector
,TimeSecVector
,TimeStampMicroTZVector
,TimeStampMicroVector
,TimeStampMilliTZVector
,TimeStampMilliVector
,TimeStampNanoTZVector
,TimeStampNanoVector
,TimeStampSecTZVector
,TimeStampSecVector
,TimeStampVector
,TinyIntVector
,UInt1Vector
,UInt2Vector
,UInt4Vector
,UInt8Vector
,UnionVector
,VarBinaryVector
,VarCharVector
,ViewVarBinaryVector
,ViewVarCharVector
,ZeroVector
A vector corresponding to a Field in the schema. It has inner vectors backed by buffers
(validity, offsets, data, ...)
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
exportBuffer
(ArrowBuf buffer, List<ArrowBuf> buffers, ArrowBuf buffersPtr, long nullValue, boolean retain) Export a given buffer and its memory address into a list of buffers and a pointer to the list of buffers.default void
exportCDataBuffers
(List<ArrowBuf> buffers, ArrowBuf buffersPtr, long nullValue) Export the buffers of the fields for C Data Interface.The returned list is the same size as the list passed to initializeChildrenFromFields.long
Gets the starting address of the underlying buffer associated with data vector.default int
Retrieves the export buffer count for the C Data Interface.Get the buffers of the fields, (same size as getFieldVectors() since it is their content).Deprecated.This API will be removed as the current implementations no longer support inner vectors.long
Gets the starting address of the underlying buffer associated with offset vector.long
Gets the starting address of the underlying buffer associated with validity vector.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.void
setNull
(int index) Set the element at the given index to null.Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
Methods inherited from interface org.apache.arrow.vector.ValueVector
accept, allocateNew, allocateNewSafe, clear, close, copyFrom, copyFromSafe, getAllocator, getBuffers, getBufferSize, getBufferSizeFor, getDataBuffer, getField, getMinorType, getName, getNullCount, getObject, getOffsetBuffer, getReader, getTransferPair, getTransferPair, getTransferPair, getTransferPair, getTransferPair, getValidityBuffer, getValueCapacity, getValueCount, hashCode, hashCode, isNull, makeTransferPair, reAlloc, reset, setInitialCapacity, setValueCount, validate, validateFull
-
Method Details
-
initializeChildrenFromFields
Initializes the child vectors to be later loaded with loadBuffers.- Parameters:
children
- the schema
-
getChildrenFromFields
List<FieldVector> getChildrenFromFields()The returned list is the same size as the list passed to initializeChildrenFromFields.- Returns:
- the children according to schema (empty for primitive types)
-
loadFieldBuffers
Loads data in the vectors. (ownBuffers must be the same size as getFieldVectors())- Parameters:
fieldNode
- the fieldNodeownBuffers
- the buffers for this Field (own buffers only, children not included)
-
getFieldBuffers
Get the buffers of the fields, (same size as getFieldVectors() since it is their content).- Returns:
- the buffers containing the data for this vector (ready for reading)
-
getExportedCDataBufferCount
default int getExportedCDataBufferCount()Retrieves the export buffer count for the C Data Interface.- Returns:
- the number of variadic buffers
-
exportBuffer
default void exportBuffer(ArrowBuf buffer, List<ArrowBuf> buffers, ArrowBuf buffersPtr, long nullValue, boolean retain) Export a given buffer and its memory address into a list of buffers and a pointer to the list of buffers.- Parameters:
buffer
- the buffer to exportbuffers
- the list of buffersbuffersPtr
- the pointer to the list of buffersnullValue
- the null value to use for null bufferretain
- whether to retain the buffer when exporting
-
exportCDataBuffers
Export the buffers of the fields for C Data Interface. This method traverse the buffers and export buffer and buffer's memory address into a list of buffers and a pointer to the list of buffers.By default, when exporting a buffer, it will increase ref count for exported buffer that counts the usage at imported side.
-
getFieldInnerVectors
Deprecated.This API will be removed as the current implementations no longer support inner vectors.Get the inner vectors.- Returns:
- the inner vectors for this field as defined by the TypeLayout
-
getValidityBufferAddress
long getValidityBufferAddress()Gets the starting address of the underlying buffer associated with validity vector.- Returns:
- buffer address
-
getDataBufferAddress
long getDataBufferAddress()Gets the starting address of the underlying buffer associated with data vector.- Returns:
- buffer address
-
getOffsetBufferAddress
long getOffsetBufferAddress()Gets the starting address of the underlying buffer associated with offset vector.- Returns:
- buffer address
-
setNull
void setNull(int index) Set the element at the given index to null.- Parameters:
index
- the value to change
-