Package org.apache.druid.query
Class BySegmentQueryRunner<T>
- java.lang.Object
-
- org.apache.druid.query.BySegmentQueryRunner<T>
-
- All Implemented Interfaces:
QueryRunner<T>
public class BySegmentQueryRunner<T> extends Object implements QueryRunner<T>
Query runner that wraps a base single-segment query runner, and wraps its results in aBySegmentResultValueClass
object if the "bySegment" query context parameter is set. Otherwise, it delegates to the base runner without any behavior modification. Note that despite the type parameter "T", this runner may not actually return sequences with type T. They may really be of typeResult<BySegmentResultValue<T>>
, if "bySegment" is set. Downstream consumers of the returned sequence must be aware of this, and can useQueryContext.isBySegment()
to know what to expect.
-
-
Constructor Summary
Constructors Constructor Description BySegmentQueryRunner(SegmentId segmentId, org.joda.time.DateTime timestamp, QueryRunner<T> base)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Sequence<T>
run(QueryPlus<T> queryPlus, ResponseContext responseContext)
Runs the given query and returns results in a time-ordered sequence.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.druid.query.QueryRunner
run
-
-
-
-
Constructor Detail
-
BySegmentQueryRunner
public BySegmentQueryRunner(SegmentId segmentId, org.joda.time.DateTime timestamp, QueryRunner<T> base)
-
-
Method Detail
-
run
public Sequence<T> run(QueryPlus<T> queryPlus, ResponseContext responseContext)
Description copied from interface:QueryRunner
Runs the given query and returns results in a time-ordered sequence.- Specified by:
run
in interfaceQueryRunner<T>
-
-