Interface ReadableVectorOffset

All Superinterfaces:
ReadableVectorInspector, VectorSizeInspector
All Known Subinterfaces:
VectorOffset
All Known Implementing Classes:
BitmapVectorOffset, FilteredVectorOffset, NoFilterVectorOffset

public interface ReadableVectorOffset extends ReadableVectorInspector
Provides a batch of offsets, ostensibly as indexes into an array. A ReadableVectorOffset should be given to classes (e.g. column selector objects) by something which keeps a reference to the base VectorOffset object and increments it.
  • Method Details

    • isContiguous

      boolean isContiguous()
      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.
    • getStartOffset

      int getStartOffset()
      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.
    • getOffsets

      int[] getOffsets()
      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.
    • getOffset

      default int getOffset(int index)
      Gets the offset at a certain index. To be used in situations where the caller has no optimized path available for contiguous processing.