Source:
<code>private void setupQueries() { Map<String, Druids.SearchQueryBuilder> basicQueries = new LinkedHashMap<>(); BenchmarkSchemaInfo basicSchema = BenchmarkSchemas.SCHEMA_MAP.get("basic"); { QuerySegmentSpec intervalSpec = new MultipleIntervalSegmentSpec(Arrays.asList(basicSchema.getDataInterval())); Druids.SearchQueryBuilder queryBuilderA = Druids.newSearchQueryBuilder() .dataSource("blah") .granularity(QueryGranularities.ALL) .intervals(intervalSpec) .query("123"); basicQueries.put("A", queryBuilderA); } <START> { END> QuerySegmentSpec intervalSpec = new MultipleIntervalSegmentSpec(Arrays.asList(basicSchema.getDataInterval())); List<String> dimUniformFilterVals = Lists.newArrayList(); int resultNum = (int) (100000 * 0.5); int step = 100000 / resultNum; for (int i = 1; i < 100001 && dimUniformFilterVals.size() < resultNum; i += step) { dimUniformFilterVals.add(String.valueOf(i)); } List<String> dimHyperUniqueFilterVals = Lists.newArrayList(); resultNum = (int) (100000 * 1.0); step = 100000 / resultNum; for (int i = 0; i < 100001 && dimHyperUniqueFilterVals.size() < resultNum; i += step) { dimHyperUniqueFilterVals.add(String.valueOf(i)); } final List<DimFilter> dimFilters = Lists.newArrayList(); dimFilters.add(new InDimFilter("dimUniform", dimUniformFilterVals, null)); dimFilters.add(new InDimFilter("dimHyperUnique", dimHyperUniqueFilterVals, null)); Druids.SearchQueryBuilder queryBuilderB = Druids.newSearchQueryBuilder() .dataSource("blah") .granularity(QueryGranularities.ALL) .intervals(intervalSpec) .query("") .dimensions(Lists.newArrayList("dimUniform", "dimHyperUnique")) .filters(new AndDimFilter(dimFilters)); basicQueries.put("B", queryBuilderB); } SCHEMA_QUERY_MAP.put("basic", basicQueries); }</code><technical_language>please attach results of this benchmark patch</technical_language>

Target:
private void setupQueries() { Map<String, Druids.SearchQueryBuilder> basicQueries = new LinkedHashMap<>(); BenchmarkSchemaInfo basicSchema = BenchmarkSchemas.SCHEMA_MAP.get("basic"); { QuerySegmentSpec intervalSpec = new MultipleIntervalSegmentSpec(Arrays.asList(basicSchema.getDataInterval())); Druids.SearchQueryBuilder queryBuilderA = Druids.newSearchQueryBuilder() .dataSource("blah") .granularity(QueryGranularities.ALL) .intervals(intervalSpec) .query("123"); basicQueries.put("A", queryBuilderA); } { QuerySegmentSpec intervalSpec = new MultipleIntervalSegmentSpec(Arrays.asList(basicSchema.getDataInterval())); List<String> dimUniformFilterVals = Lists.newArrayList(); int resultNum = (int) (100000 * 0.1); int step = 100000 / resultNum; for (int i = 1; i < 100001 && dimUniformFilterVals.size() < resultNum; i += step) { dimUniformFilterVals.add(String.valueOf(i)); } List<String> dimHyperUniqueFilterVals = Lists.newArrayList(); resultNum = (int) (100000 * 0.1); step = 100000 / resultNum; for (int i = 0; i < 100001 && dimHyperUniqueFilterVals.size() < resultNum; i += step) { dimHyperUniqueFilterVals.add(String.valueOf(i)); } final List<DimFilter> dimFilters = Lists.newArrayList(); dimFilters.add(new InDimFilter("dimUniform", dimUniformFilterVals, null)); dimFilters.add(new InDimFilter("dimHyperUnique", dimHyperUniqueFilterVals, null)); Druids.SearchQueryBuilder queryBuilderB = Druids.newSearchQueryBuilder() .dataSource("blah") .granularity(QueryGranularities.ALL) .intervals(intervalSpec) .query("") .dimensions(Lists.newArrayList("dimUniform", "dimHyperUnique")) .filters(new AndDimFilter(dimFilters)); basicQueries.put("B", queryBuilderB); } SCHEMA_QUERY_MAP.put("basic", basicQueries); }