Package org.apache.druid.segment.vector
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.
-
-
Field Summary
-
Fields inherited from interface org.apache.druid.segment.vector.ReadableVectorInspector
NULL_ID
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int[]
getOffsets()
If "isContiguous" is false, this method returns a batch of offsets.int
getStartOffset()
If "isContiguous" is true, this method returns the start offset of the range.boolean
isContiguous()
Checks if the current batch is a contiguous range or not.-
Methods inherited from interface org.apache.druid.segment.vector.ReadableVectorInspector
getId
-
Methods inherited from interface org.apache.druid.segment.vector.VectorSizeInspector
getCurrentVectorSize, getMaxVectorSize
-
-
-
-
Method Detail
-
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.
-
-