Class FrameCursorFactory
- java.lang.Object
-
- org.apache.druid.frame.segment.columnar.FrameCursorFactory
-
- All Implemented Interfaces:
CursorFactory
public class FrameCursorFactory extends Object implements CursorFactory
ACursorFactory
implementation based on a single columnarFrame
. This class is only used for columnar frames. It is not used for row-based frames.- See Also:
the row-based version
-
-
Constructor Summary
Constructors Constructor Description FrameCursorFactory(Frame frame, RowSignature signature, List<FrameColumnReader> columnReaders)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canVectorize(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).VectorCursor
makeVectorCursor(Filter filter, org.joda.time.Interval interval, VirtualColumns virtualColumns, boolean descending, int vectorSize, QueryMetrics<?> queryMetrics)
Creates a VectorCursor.
-
-
-
Constructor Detail
-
FrameCursorFactory
public FrameCursorFactory(Frame frame, RowSignature signature, List<FrameColumnReader> columnReaders)
-
-
Method Detail
-
canVectorize
public boolean canVectorize(@Nullable Filter filter, VirtualColumns virtualColumns, boolean descending)
Description copied from interface:CursorFactory
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.- Specified by:
canVectorize
in interfaceCursorFactory
-
makeCursors
public Sequence<Cursor> makeCursors(@Nullable Filter filter, org.joda.time.Interval interval, VirtualColumns virtualColumns, Granularity gran, boolean descending, @Nullable QueryMetrics<?> queryMetrics)
Description copied from interface:CursorFactory
Creates a sequence of Cursors, one for each time-granular bucket (based on the provided Granularity).- Specified by:
makeCursors
in interfaceCursorFactory
-
makeVectorCursor
@Nullable public VectorCursor makeVectorCursor(@Nullable Filter filter, org.joda.time.Interval interval, VirtualColumns virtualColumns, boolean descending, int vectorSize, @Nullable QueryMetrics<?> queryMetrics)
Description copied from interface:CursorFactory
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).- Specified by:
makeVectorCursor
in interfaceCursorFactory
-
-