Package org.apache.druid.query
Class FinalizeResultsQueryRunner<T>
- java.lang.Object
-
- org.apache.druid.query.FinalizeResultsQueryRunner<T>
-
- All Implemented Interfaces:
QueryRunner<T>
public class FinalizeResultsQueryRunner<T> extends Object implements QueryRunner<T>
Query runner that appliesQueryToolChest.makePostComputeManipulatorFn(Query, MetricManipulationFn)
to the result stream. It is expected to be the last runner in the pipeline, after results are fully merged. Note that despite the type parameter "T", this runner may not actually return sequences with type T. This most commonly happens when an upstreamBySegmentQueryRunner
changes the result stream to typeResult<BySegmentResultValue<T>>
, in which case this class will retain the structure, but call the finalizer function on each result in the by-segment list (which may change their type from T to something else).
-
-
Constructor Summary
Constructors Constructor Description FinalizeResultsQueryRunner(QueryRunner<T> baseRunner, QueryToolChest<T,Query<T>> toolChest)
-
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
-
FinalizeResultsQueryRunner
public FinalizeResultsQueryRunner(QueryRunner<T> baseRunner, QueryToolChest<T,Query<T>> toolChest)
-
-
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>
-
-