Package org.apache.druid.query.vector
Class VectorCursorGranularizer
java.lang.Object
org.apache.druid.query.vector.VectorCursorGranularizer
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 Summary
Modifier and TypeMethodDescriptionbooleanReturn true, and advances the cursor, if it can be advanced within the current time bucket.static VectorCursorGranularizercreate(VectorCursor cursor, TimeBoundaryInspector timeBoundaryInspector, Order timeOrder, Granularity granularity, org.joda.time.Interval queryInterval) Iterable<org.joda.time.Interval> intintvoidsetCurrentOffsets(org.joda.time.Interval bucketInterval)
-
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
-
getStartOffset
public int getStartOffset() -
getEndOffset
public int getEndOffset()
-