use of org.apache.druid.segment.QueryableIndexSegment in project druid by druid-io.
the class DumpSegment method executeQuery.
@VisibleForTesting
static <T> Sequence<T> executeQuery(final Injector injector, final QueryableIndex index, final Query<T> query) {
final QueryRunnerFactoryConglomerate conglomerate = injector.getInstance(QueryRunnerFactoryConglomerate.class);
final QueryRunnerFactory<T, Query<T>> factory = conglomerate.findFactory(query);
final QueryRunner<T> runner = factory.createRunner(new QueryableIndexSegment(index, SegmentId.dummy("segment")));
return factory.getToolchest().mergeResults(factory.mergeRunners(DirectQueryProcessingPool.INSTANCE, ImmutableList.of(runner))).run(QueryPlus.wrap(query), ResponseContext.createEmpty());
}
Aggregations