new SelectQueryQueryToolChest( JSON_MAPPER, QueryBenchmarkUtil.NoopIntervalChunkingQueryRunnerDecorator(),
.postMergeQueryDecoration(toolChest.mergeResults(toolChest.preMergeQueryDecoration(runner))) .run(QueryPlus.wrap(query), new HashMap<>()) .toList();
@Test public void testComputeCacheKeyWithDifferentSortOrer() { final SelectQuery query1 = Druids.newSelectQueryBuilder() .dataSource("dummy") .dimensions(Collections.singletonList("testDim")) .intervals(SelectQueryRunnerTest.I_0112_0114_SPEC) .granularity(QueryRunnerTestHelper.allGran) .pagingSpec(PagingSpec.newSpec(3)) .descending(false) .build(); final SelectQuery query2 = Druids.newSelectQueryBuilder() .dataSource("dummy") .dimensions(Collections.singletonList("testDim")) .intervals(SelectQueryRunnerTest.I_0112_0114_SPEC) .granularity(QueryRunnerTestHelper.allGran) .pagingSpec(PagingSpec.newSpec(3)) .descending(true) .build(); final CacheStrategy<Result<SelectResultValue>, Object, SelectQuery> strategy1 = toolChest.getCacheStrategy(query1); Assert.assertNotNull(strategy1); final CacheStrategy<Result<SelectResultValue>, Object, SelectQuery> strategy2 = toolChest.getCacheStrategy(query2); Assert.assertNotNull(strategy2); Assert.assertFalse(Arrays.equals(strategy1.computeCacheKey(query1), strategy2.computeCacheKey(query2))); } }
new SelectQueryQueryToolChest( objectMapper, QueryRunnerTestHelper.NoopIntervalChunkingQueryRunnerDecorator(),
new SelectQueryQueryToolChest( JSON_MAPPER, QueryRunnerTestHelper.NoopIntervalChunkingQueryRunnerDecorator(),
new SelectQueryQueryToolChest( JSON_MAPPER, QueryRunnerTestHelper.NoopIntervalChunkingQueryRunnerDecorator(),
SelectQueryQueryToolChest toolchest = new SelectQueryQueryToolChest( TestHelper.makeJsonMapper(), QueryRunnerTestHelper.NoopIntervalChunkingQueryRunnerDecorator(), new SelectQueryQueryToolChest( TestHelper.makeJsonMapper(), QueryRunnerTestHelper.NoopIntervalChunkingQueryRunnerDecorator(),
SelectQuery.class, new SelectQueryRunnerFactory( new SelectQueryQueryToolChest( TestHelper.makeJsonMapper(), QueryRunnerTestHelper.NoopIntervalChunkingQueryRunnerDecorator(),