Class NoFilterVectorOffset

java.lang.Object
org.apache.druid.segment.vector.NoFilterVectorOffset
All Implemented Interfaces:
ReadableVectorInspector, ReadableVectorOffset, VectorOffset, VectorSizeInspector

public class NoFilterVectorOffset extends Object implements VectorOffset
  • Field Summary

    Fields inherited from interface org.apache.druid.segment.vector.ReadableVectorInspector

    NULL_ID
  • Constructor Summary

    Constructors
    Constructor
    Description
    NoFilterVectorOffset(int maxVectorSize, int start, int end)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Advances by one batch.
    int
    Returns the current vector size for this cursor.
    int
    Returns an integer that uniquely identifies the current vector.
    int
    Returns the maximum vector size for this cursor.
    int[]
    If "isContiguous" is false, this method returns a batch of offsets.
    int
    If "isContiguous" is true, this method returns the start offset of the range.
    boolean
    Checks if the current batch is a contiguous range or not.
    boolean
    Checks if iteration is "done", meaning the current batch of offsets is empty, and there are no more coming.
    void
    Resets the object back to its original state.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.apache.druid.segment.vector.ReadableVectorOffset

    getOffset
  • Constructor Details

    • NoFilterVectorOffset

      public NoFilterVectorOffset(int maxVectorSize, int start, int end)
  • Method Details

    • getId

      public int getId()
      Description copied from interface: ReadableVectorInspector
      Returns an integer that uniquely identifies the current vector. This is useful for caching: it is safe to assume nothing has changed in the vector so long as the id remains the same.
      Specified by:
      getId in interface ReadableVectorInspector
    • advance

      public void advance()
      Description copied from interface: VectorOffset
      Advances by one batch.
      Specified by:
      advance in interface VectorOffset
    • isDone

      public boolean isDone()
      Description copied from interface: VectorOffset
      Checks if iteration is "done", meaning the current batch of offsets is empty, and there are no more coming.
      Specified by:
      isDone in interface VectorOffset
    • isContiguous

      public boolean isContiguous()
      Description copied from interface: ReadableVectorOffset
      Checks if the current batch is a contiguous range or not. This is only good for one batch at a time, since the same object may return some contiguous batches and some non-contiguous batches. So, callers must check this method each time they want to retrieve the current batch of offsets.
      Specified by:
      isContiguous in interface ReadableVectorOffset
    • getMaxVectorSize

      public int getMaxVectorSize()
      Description copied from interface: VectorSizeInspector
      Returns the maximum vector size for this cursor. It will not change for the lifetime of this cursor, and is generally used to allocate scratch arrays for later processing. Will always be greater than zero.
      Specified by:
      getMaxVectorSize in interface VectorSizeInspector
    • getCurrentVectorSize

      public int getCurrentVectorSize()
      Description copied from interface: VectorSizeInspector
      Returns the current vector size for this cursor. Will never be larger than the max size returned by VectorSizeInspector.getMaxVectorSize().
      Specified by:
      getCurrentVectorSize in interface VectorSizeInspector
    • getStartOffset

      public int getStartOffset()
      Description copied from interface: ReadableVectorOffset
      If "isContiguous" is true, this method returns the start offset of the range. The length of the range is given by "getCurrentVectorSize". Throws an exception if "isContiguous" is false.
      Specified by:
      getStartOffset in interface ReadableVectorOffset
    • getOffsets

      public int[] getOffsets()
      Description copied from interface: ReadableVectorOffset
      If "isContiguous" is false, this method returns a batch of offsets. The array may be longer than the number of valid offsets, so callers need to check "getCurrentVectorSize" too. Throws an exception if "isContiguous" is true.
      Specified by:
      getOffsets in interface ReadableVectorOffset
    • reset

      public void reset()
      Description copied from interface: VectorOffset
      Resets the object back to its original state. Once this is done, iteration can begin anew.
      Specified by:
      reset in interface VectorOffset