Class IntArrowBufVector

All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.lucene.util.Accountable, IntVector, Vector, org.elasticsearch.core.RefCounted, org.elasticsearch.core.Releasable

public final class IntArrowBufVector extends AbstractArrowBufVector<IntVector,IntBlock> implements IntVector
Implementation of IntVector backed by an Arrow buffer holding 32 bits signed integers.

This class is generated. Edit X-ArrowBufVector.java.st instead.

  • Constructor Details

    • IntArrowBufVector

      public IntArrowBufVector(org.apache.arrow.memory.ArrowBuf valueBuffer, int positionCount, BlockFactory blockFactory)
      Create an ArrowBuf vector based on the constituents of an Arrow ValueVector. The caller must retain the buffers if they are shared with other blocks or Arrow vectors.
  • Method Details

    • of

      public static IntArrowBufVector of(org.apache.arrow.vector.FixedWidthVector arrowVector, BlockFactory blockFactory)
    • vectorConstructor

      protected ArrowBufVectorConstructor<IntVector> vectorConstructor()
      Specified by:
      vectorConstructor in class AbstractArrowBufVector<IntVector,IntBlock>
    • blockConstructor

      protected ArrowBufBlockConstructor<IntBlock> blockConstructor()
      Specified by:
      blockConstructor in class AbstractArrowBufVector<IntVector,IntBlock>
    • getInt

      public int getInt(int valueIndex)
      Specified by:
      getInt in interface IntVector
    • byteSize

      protected int byteSize()
      Specified by:
      byteSize in class AbstractArrowBufVector<IntVector,IntBlock>
    • elementType

      public ElementType elementType()
      Description copied from interface: Vector
      Returns the element type of this vector.
      Specified by:
      elementType in interface Vector
      Returns:
      the element type of this vector
    • lookup

      public org.elasticsearch.core.ReleasableIterator<IntBlock> lookup(IntBlock positions, ByteSizeValue targetBlockSize)
      Description copied from interface: Vector
      Builds an Iterator of new Blocks with the same Vector.elementType() as this Vector whose values are copied from positions in this Vector. It has the same number of positions as the positions parameter.

      For example, if this vector contained [a, b, c] and were called with the block [0, 1, 1, [1, 2]] then the result would be [a, b, b, [b, c]].

      This process produces count(positions) values per positions which could be quite large. Instead of returning a single Block, this returns an Iterator of Blocks containing all of the promised values.

      The returned ReleasableIterator may retain a reference to the positions parameter. Close it to release those references.

      This block is built using the same BlockFactory as was used to build the positions parameter.

      Specified by:
      lookup in interface IntVector
      Specified by:
      lookup in interface Vector
    • slice

      public IntVector slice(int beginInclusive, int endExclusive)
      Description copied from interface: IntVector
      Return a subset of this vector from beginInclusive to endExclusive. This may return the same instance if the range covers all positions, but if it does it will RefCounted.incRef() it.
      Specified by:
      slice in interface IntVector
      Specified by:
      slice in interface Vector
    • min

      public int min()
      Description copied from interface: IntVector
      The minimum value in the Vector. An empty Vector will return Integer.MAX_VALUE.
      Specified by:
      min in interface IntVector
    • max

      public int max()
      Description copied from interface: IntVector
      The maximum value in the Vector. An empty Vector will return Integer.MIN_VALUE.
      Specified by:
      max in interface IntVector