Package org.apache.druid.segment
Interface CursorFactory
-
- All Known Subinterfaces:
StorageAdapter
- All Known Implementing Classes:
FilteredStorageAdapter,FrameCursorFactory,FrameCursorFactory,FrameStorageAdapter,HashJoinSegmentStorageAdapter,IncrementalIndexStorageAdapter,QueryableIndexStorageAdapter,RowBasedStorageAdapter,UnnestStorageAdapter
public interface CursorFactoryInterface extended byStorageAdapter, which gives them the power to create cursors.- See Also:
StorageAdapter
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default booleancanVectorize(Filter filter, VirtualColumns virtualColumns, boolean descending)Returns true if the provided combination of parameters can be handled by "makeVectorCursor".Sequence<Cursor>makeCursors(Filter filter, org.joda.time.Interval interval, VirtualColumns virtualColumns, Granularity gran, boolean descending, QueryMetrics<?> queryMetrics)Creates a sequence of Cursors, one for each time-granular bucket (based on the provided Granularity).default VectorCursormakeVectorCursor(Filter filter, org.joda.time.Interval interval, VirtualColumns virtualColumns, boolean descending, int vectorSize, QueryMetrics<?> queryMetrics)Creates a VectorCursor.
-
-
-
Method Detail
-
canVectorize
default boolean canVectorize(@Nullable Filter filter, VirtualColumns virtualColumns, boolean descending)
Returns true if the provided combination of parameters can be handled by "makeVectorCursor". Query engines should use this before running in vectorized mode, and be prepared to fall back to non-vectorized mode if this method returns false.
-
makeCursors
Sequence<Cursor> makeCursors(@Nullable Filter filter, org.joda.time.Interval interval, VirtualColumns virtualColumns, Granularity gran, boolean descending, @Nullable QueryMetrics<?> queryMetrics)
Creates a sequence of Cursors, one for each time-granular bucket (based on the provided Granularity).
-
makeVectorCursor
@Nullable default VectorCursor makeVectorCursor(@Nullable Filter filter, org.joda.time.Interval interval, VirtualColumns virtualColumns, boolean descending, int vectorSize, @Nullable QueryMetrics<?> queryMetrics)
Creates a VectorCursor. Unlike the Cursor returned by "makeCursor", there is just one of these. Hence, this method does not take a "granularity" parameter. Before calling this method, check "canVectorize" to see if the call you are about to make will throw an error or not. Returns null if there is no data to walk over (for example, if the "interval" does not overlap the data interval of this segment).
-
-