Interface FieldVector

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

public interface FieldVector extends ValueVector
A vector corresponding to a Field in the schema. It has inner vectors backed by buffers (validity, offsets, data, ...)
  • Method Details

    • initializeChildrenFromFields

      void initializeChildrenFromFields(List<Field> children)
      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

      void loadFieldBuffers(ArrowFieldNode fieldNode, List<ArrowBuf> ownBuffers)
      Loads data in the vectors. (ownBuffers must be the same size as getFieldVectors())
      Parameters:
      fieldNode - the fieldNode
      ownBuffers - the buffers for this Field (own buffers only, children not included)
    • getFieldBuffers

      List<ArrowBuf> 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 export
      buffers - the list of buffers
      buffersPtr - the pointer to the list of buffers
      nullValue - the null value to use for null buffer
      retain - whether to retain the buffer when exporting
    • exportCDataBuffers

      default void exportCDataBuffers(List<ArrowBuf> buffers, ArrowBuf buffersPtr, long nullValue)
      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 List<BufferBacked> 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