Class VectorCursorGranularizer

java.lang.Object
org.apache.druid.query.vector.VectorCursorGranularizer

public class VectorCursorGranularizer extends Object
Class that helps vectorized query engines handle "granularity" parameters. Given a set of intervals, this class provides mechansims to advance a cursor to the start of an interval (setCurrentOffsets(Interval)), advance a cursor within a bucket interval (advanceCursorWithinBucket()), and check the offsets of the current vector that are within the bucket (getStartOffset(), getEndOffset()).
See Also:
  • Method Details

    • create

      @Nullable public static VectorCursorGranularizer create(VectorCursor cursor, @Nullable TimeBoundaryInspector timeBoundaryInspector, Order timeOrder, Granularity granularity, org.joda.time.Interval queryInterval)
    • setCurrentOffsets

      public void setCurrentOffsets(org.joda.time.Interval bucketInterval)
    • advanceCursorWithinBucket

      public boolean advanceCursorWithinBucket()
      Return true, and advances the cursor, if it can be advanced within the current time bucket. Otherwise, returns false and does nothing else.
    • getBucketIterable

      public Iterable<org.joda.time.Interval> getBucketIterable()
    • getStartOffset

      public int getStartOffset()
    • getEndOffset

      public int getEndOffset()