diff --git a/indexing-service/src/test/java/io/druid/indexing/common/task/TaskSerdeTest.java b/indexing-service/src/test/java/io/druid/indexing/common/task/TaskSerdeTest.java index daa35c792fb..94c76d3c339 100644 --- a/indexing-service/src/test/java/io/druid/indexing/common/task/TaskSerdeTest.java +++ b/indexing-service/src/test/java/io/druid/indexing/common/task/TaskSerdeTest.java @@ -19,7 +19,6 @@ package io.druid.indexing.common.task; -import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.databind.InjectableValues; import com.fasterxml.jackson.databind.Module; import com.fasterxml.jackson.databind.ObjectMapper; @@ -104,7 +103,7 @@ public class TaskSerdeTest DataSegment.builder().dataSource("foo").interval(new Interval("2010-01-01/P1D")).version("1234").build() ), ImmutableList.of( - new CountAggregatorFactory("cnt") + new CountAggregatorFactory("cnt", null) ) ); diff --git a/processing/src/main/java/io/druid/query/aggregation/CountAggregatorFactory.java b/processing/src/main/java/io/druid/query/aggregation/CountAggregatorFactory.java index 9549015f687..83baa4fd41b 100644 --- a/processing/src/main/java/io/druid/query/aggregation/CountAggregatorFactory.java +++ b/processing/src/main/java/io/druid/query/aggregation/CountAggregatorFactory.java @@ -35,16 +35,22 @@ import java.util.List; public class CountAggregatorFactory implements AggregatorFactory { private static final byte[] CACHE_KEY = new byte[]{0x0}; + private static final String DEFAULT_VALUE_TYPE = "long"; + private static final List supportedTypes = Arrays.asList("float", "long"); private final String name; + private final String valueType; + @JsonCreator public CountAggregatorFactory( - @JsonProperty("name") String name + @JsonProperty("name") String name, + @JsonProperty("valueType") String valueType ) { Preconditions.checkNotNull(name, "Must have a valid, non-null aggregator name"); - this.name = name; + this.valueType = valueType == null ? DEFAULT_VALUE_TYPE : valueType; + Preconditions.checkArgument(supportedTypes.contains(this.valueType)); } @Override @@ -74,13 +80,13 @@ public class CountAggregatorFactory implements AggregatorFactory @Override public AggregatorFactory getCombiningFactory() { - return new LongSumAggregatorFactory(name, name); + return new LongSumAggregatorFactory(name, name, valueType); } @Override public List getRequiredColumns() { - return Arrays.asList(new CountAggregatorFactory(name)); + return Arrays.asList(new CountAggregatorFactory(name, valueType)); } @Override @@ -117,7 +123,7 @@ public class CountAggregatorFactory implements AggregatorFactory @Override public String getTypeName() { - return "float"; + return "long"; } @Override diff --git a/processing/src/main/java/io/druid/query/aggregation/LongSumAggregatorFactory.java b/processing/src/main/java/io/druid/query/aggregation/LongSumAggregatorFactory.java index acf16e9e7af..bbac473f5de 100644 --- a/processing/src/main/java/io/druid/query/aggregation/LongSumAggregatorFactory.java +++ b/processing/src/main/java/io/druid/query/aggregation/LongSumAggregatorFactory.java @@ -35,14 +35,18 @@ import java.util.List; public class LongSumAggregatorFactory implements AggregatorFactory { private static final byte CACHE_TYPE_ID = 0x1; + private static final String DEFAULT_VALUE_TYPE = "long"; + private static final List supportedTypes = Arrays.asList("float", "long"); private final String fieldName; private final String name; + private final String valueType; @JsonCreator public LongSumAggregatorFactory( @JsonProperty("name") String name, - @JsonProperty("fieldName") final String fieldName + @JsonProperty("fieldName") final String fieldName, + @JsonProperty("valueType") String valueType ) { Preconditions.checkNotNull(name, "Must have a valid, non-null aggregator name"); @@ -50,6 +54,8 @@ public class LongSumAggregatorFactory implements AggregatorFactory this.name = name; this.fieldName = fieldName; + this.valueType = valueType == null ? DEFAULT_VALUE_TYPE : valueType; + Preconditions.checkArgument(supportedTypes.contains(this.valueType)); } @Override @@ -82,13 +88,13 @@ public class LongSumAggregatorFactory implements AggregatorFactory @Override public AggregatorFactory getCombiningFactory() { - return new LongSumAggregatorFactory(name, name); + return new LongSumAggregatorFactory(name, name, valueType); } @Override public List getRequiredColumns() { - return Arrays.asList(new LongSumAggregatorFactory(fieldName, fieldName)); + return Arrays.asList(new LongSumAggregatorFactory(fieldName, fieldName, valueType)); } @Override diff --git a/processing/src/test/java/io/druid/query/ChainedExecutionQueryRunnerTest.java b/processing/src/test/java/io/druid/query/ChainedExecutionQueryRunnerTest.java index 489c36e799f..8a704e635a9 100644 --- a/processing/src/test/java/io/druid/query/ChainedExecutionQueryRunnerTest.java +++ b/processing/src/test/java/io/druid/query/ChainedExecutionQueryRunnerTest.java @@ -107,7 +107,7 @@ public class ChainedExecutionQueryRunnerTest Druids.newTimeseriesQueryBuilder() .dataSource("test") .intervals("2014/2015") - .aggregators(Lists.newArrayList(new CountAggregatorFactory("count"))) + .aggregators(Lists.newArrayList(new CountAggregatorFactory("count", null))) .build(), context ); @@ -215,7 +215,7 @@ public class ChainedExecutionQueryRunnerTest Druids.newTimeseriesQueryBuilder() .dataSource("test") .intervals("2014/2015") - .aggregators(Lists.newArrayList(new CountAggregatorFactory("count"))) + .aggregators(Lists.newArrayList(new CountAggregatorFactory("count", null))) .context(ImmutableMap.of("timeout", 100, "queryId", "test")) .build(), context diff --git a/processing/src/test/java/io/druid/query/DataSourceTest.java b/processing/src/test/java/io/druid/query/DataSourceTest.java index 368ece5634c..1c48ff6231f 100644 --- a/processing/src/test/java/io/druid/query/DataSourceTest.java +++ b/processing/src/test/java/io/druid/query/DataSourceTest.java @@ -73,7 +73,7 @@ public class DataSourceTest .setAggregatorSpecs( Arrays.asList( QueryRunnerTestHelper.rowsCount, - new LongSumAggregatorFactory("idx", "index") + new LongSumAggregatorFactory("idx", "index", null) ) ) .setGranularity(QueryRunnerTestHelper.dayGran) diff --git a/processing/src/test/java/io/druid/query/QueriesTest.java b/processing/src/test/java/io/druid/query/QueriesTest.java index 763aeb135fd..d212f660529 100644 --- a/processing/src/test/java/io/druid/query/QueriesTest.java +++ b/processing/src/test/java/io/druid/query/QueriesTest.java @@ -40,7 +40,7 @@ public class QueriesTest public void testVerifyAggregations() throws Exception { List aggFactories = Arrays.asList( - new CountAggregatorFactory("count"), + new CountAggregatorFactory("count", null), new DoubleSumAggregatorFactory("idx", "index"), new DoubleSumAggregatorFactory("rev", "revenue") ); @@ -72,7 +72,7 @@ public class QueriesTest public void testVerifyAggregationsMissingVal() throws Exception { List aggFactories = Arrays.asList( - new CountAggregatorFactory("count"), + new CountAggregatorFactory("count", null), new DoubleSumAggregatorFactory("idx", "index"), new DoubleSumAggregatorFactory("rev", "revenue") ); @@ -104,7 +104,7 @@ public class QueriesTest public void testVerifyAggregationsMultiLevel() throws Exception { List aggFactories = Arrays.asList( - new CountAggregatorFactory("count"), + new CountAggregatorFactory("count", null), new DoubleSumAggregatorFactory("idx", "index"), new DoubleSumAggregatorFactory("rev", "revenue") ); @@ -158,7 +158,7 @@ public class QueriesTest public void testVerifyAggregationsMultiLevelMissingVal() throws Exception { List aggFactories = Arrays.asList( - new CountAggregatorFactory("count"), + new CountAggregatorFactory("count", null), new DoubleSumAggregatorFactory("idx", "index"), new DoubleSumAggregatorFactory("rev", "revenue") ); diff --git a/processing/src/test/java/io/druid/query/QueryRunnerTestHelper.java b/processing/src/test/java/io/druid/query/QueryRunnerTestHelper.java index deeaff563e8..5592a299b4a 100644 --- a/processing/src/test/java/io/druid/query/QueryRunnerTestHelper.java +++ b/processing/src/test/java/io/druid/query/QueryRunnerTestHelper.java @@ -90,8 +90,8 @@ public class QueryRunnerTestHelper public static final String uniqueMetric = "uniques"; public static final String addRowsIndexConstantMetric = "addRowsIndexConstant"; public static String dependentPostAggMetric = "dependentPostAgg"; - public static final CountAggregatorFactory rowsCount = new CountAggregatorFactory("rows"); - public static final LongSumAggregatorFactory indexLongSum = new LongSumAggregatorFactory("index", "index"); + public static final CountAggregatorFactory rowsCount = new CountAggregatorFactory("rows", null); + public static final LongSumAggregatorFactory indexLongSum = new LongSumAggregatorFactory("index", "index", null); public static final DoubleSumAggregatorFactory indexDoubleSum = new DoubleSumAggregatorFactory("index", "index"); public static final JavaScriptAggregatorFactory jsIndexSumIfPlacementishA = new JavaScriptAggregatorFactory( "nindex", diff --git a/processing/src/test/java/io/druid/query/RetryQueryRunnerTest.java b/processing/src/test/java/io/druid/query/RetryQueryRunnerTest.java index 16c8a51504a..76e31558674 100644 --- a/processing/src/test/java/io/druid/query/RetryQueryRunnerTest.java +++ b/processing/src/test/java/io/druid/query/RetryQueryRunnerTest.java @@ -36,7 +36,8 @@ public class RetryQueryRunnerTest QueryRunnerTestHelper.rowsCount, new LongSumAggregatorFactory( "idx", - "index" + "index", + null ), QueryRunnerTestHelper.qualityUniques ) diff --git a/processing/src/test/java/io/druid/query/aggregation/CountAggregatorTest.java b/processing/src/test/java/io/druid/query/aggregation/CountAggregatorTest.java index 2ca8584c939..24fe633f67c 100644 --- a/processing/src/test/java/io/druid/query/aggregation/CountAggregatorTest.java +++ b/processing/src/test/java/io/druid/query/aggregation/CountAggregatorTest.java @@ -56,7 +56,7 @@ public class CountAggregatorTest Object first = agg.get(); agg.aggregate(); - Comparator comp = new CountAggregatorFactory("null").getComparator(); + Comparator comp = new CountAggregatorFactory("null", null).getComparator(); Assert.assertEquals(-1, comp.compare(first, agg.get())); Assert.assertEquals(0, comp.compare(first, first)); diff --git a/processing/src/test/java/io/druid/query/aggregation/LongSumAggregatorTest.java b/processing/src/test/java/io/druid/query/aggregation/LongSumAggregatorTest.java index 046e836248b..0e57cce691f 100644 --- a/processing/src/test/java/io/druid/query/aggregation/LongSumAggregatorTest.java +++ b/processing/src/test/java/io/druid/query/aggregation/LongSumAggregatorTest.java @@ -66,7 +66,7 @@ public class LongSumAggregatorTest Object first = agg.get(); agg.aggregate(); - Comparator comp = new LongSumAggregatorFactory("null", "null").getComparator(); + Comparator comp = new LongSumAggregatorFactory("null", "null", null).getComparator(); Assert.assertEquals(-1, comp.compare(first, agg.get())); Assert.assertEquals(0, comp.compare(first, first)); diff --git a/processing/src/test/java/io/druid/query/groupby/GroupByQueryRunnerTest.java b/processing/src/test/java/io/druid/query/groupby/GroupByQueryRunnerTest.java index 4d7f285d13f..0009173d5b8 100644 --- a/processing/src/test/java/io/druid/query/groupby/GroupByQueryRunnerTest.java +++ b/processing/src/test/java/io/druid/query/groupby/GroupByQueryRunnerTest.java @@ -191,7 +191,7 @@ public class GroupByQueryRunnerTest .setAggregatorSpecs( Arrays.asList( QueryRunnerTestHelper.rowsCount, - new LongSumAggregatorFactory("idx", "index") + new LongSumAggregatorFactory("idx", "index", null) ) ) .setGranularity(QueryRunnerTestHelper.dayGran) @@ -302,7 +302,7 @@ public class GroupByQueryRunnerTest .setAggregatorSpecs( Arrays.asList( QueryRunnerTestHelper.rowsCount, - new LongSumAggregatorFactory("idx", "index") + new LongSumAggregatorFactory("idx", "index", null) ) ) .setGranularity(QueryRunnerTestHelper.dayGran) @@ -353,7 +353,8 @@ public class GroupByQueryRunnerTest QueryRunnerTestHelper.rowsCount, new LongSumAggregatorFactory( "idx", - "index" + "index", + null ) ) ) @@ -403,7 +404,7 @@ public class GroupByQueryRunnerTest .setAggregatorSpecs( Arrays.asList( QueryRunnerTestHelper.rowsCount, - new LongSumAggregatorFactory("idx", "index") + new LongSumAggregatorFactory("idx", "index", null) ) ) .setGranularity(new PeriodGranularity(new Period("P1M"), null, null)); @@ -479,7 +480,7 @@ public class GroupByQueryRunnerTest .setAggregatorSpecs( Arrays.asList( QueryRunnerTestHelper.rowsCount, - new LongSumAggregatorFactory("idx", "index") + new LongSumAggregatorFactory("idx", "index", null) ) ) .setGranularity(new PeriodGranularity(new Period("P1M"), null, null)) @@ -517,7 +518,7 @@ public class GroupByQueryRunnerTest .setAggregatorSpecs( Arrays.asList( QueryRunnerTestHelper.rowsCount, - new LongSumAggregatorFactory("idx", "index") + new LongSumAggregatorFactory("idx", "index", null) ) ) .setGranularity(new PeriodGranularity(new Period("P1M"), null, null)) @@ -596,7 +597,7 @@ public class GroupByQueryRunnerTest .setAggregatorSpecs( Arrays.asList( QueryRunnerTestHelper.rowsCount, - new LongSumAggregatorFactory("idx", "index") + new LongSumAggregatorFactory("idx", "index", null) ) ) .setGranularity(new PeriodGranularity(new Period("P1M"), null, null)) @@ -636,7 +637,7 @@ public class GroupByQueryRunnerTest .setAggregatorSpecs( Arrays.asList( QueryRunnerTestHelper.rowsCount, - new LongSumAggregatorFactory("idx", "index") + new LongSumAggregatorFactory("idx", "index", null) ) ) .addOrderByColumn("rows") @@ -677,7 +678,7 @@ public class GroupByQueryRunnerTest .setAggregatorSpecs( Arrays.asList( QueryRunnerTestHelper.rowsCount, - new LongSumAggregatorFactory("idx", "index") + new LongSumAggregatorFactory("idx", "index", null) ) ) .addOrderByColumn("rows", "desc") @@ -763,7 +764,7 @@ public class GroupByQueryRunnerTest .setAggregatorSpecs( Arrays.asList( QueryRunnerTestHelper.rowsCount, - new LongSumAggregatorFactory("idx", "index") + new LongSumAggregatorFactory("idx", "index", null) ) ) .setGranularity(new PeriodGranularity(new Period("P1M"), null, null)) @@ -954,7 +955,7 @@ public class GroupByQueryRunnerTest .setAggregatorSpecs( Arrays.asList( QueryRunnerTestHelper.rowsCount, - new LongSumAggregatorFactory("idx", "index") + new LongSumAggregatorFactory("idx", "index", null) ) ) .setGranularity(QueryRunnerTestHelper.dayGran) @@ -967,8 +968,8 @@ public class GroupByQueryRunnerTest .setDimensions(Lists.newArrayList(new DefaultDimensionSpec("alias", "alias"))) .setAggregatorSpecs( Arrays.asList( - new LongSumAggregatorFactory("rows", "rows"), - new LongSumAggregatorFactory("idx", "idx") + new LongSumAggregatorFactory("rows", "rows", null), + new LongSumAggregatorFactory("idx", "idx", null) ) ) .setGranularity(QueryRunnerTestHelper.dayGran) @@ -1012,7 +1013,7 @@ public class GroupByQueryRunnerTest .setAggregatorSpecs( Arrays.asList( QueryRunnerTestHelper.rowsCount, - new LongSumAggregatorFactory("idx", "index") + new LongSumAggregatorFactory("idx", "index", null) ) ) .setGranularity(QueryRunnerTestHelper.dayGran) @@ -1050,7 +1051,7 @@ public class GroupByQueryRunnerTest .setAggregatorSpecs( Arrays.asList( QueryRunnerTestHelper.rowsCount, - new LongSumAggregatorFactory("idx", "index") + new LongSumAggregatorFactory("idx", "index", null) ) ) .setGranularity(QueryRunnerTestHelper.dayGran) @@ -1087,7 +1088,7 @@ public class GroupByQueryRunnerTest .setAggregatorSpecs( Arrays.asList( QueryRunnerTestHelper.rowsCount, - new LongSumAggregatorFactory("idx", "index") + new LongSumAggregatorFactory("idx", "index", null) ) ) .setGranularity(QueryRunnerTestHelper.dayGran) @@ -1121,7 +1122,7 @@ public class GroupByQueryRunnerTest .setAggregatorSpecs( Arrays.asList( QueryRunnerTestHelper.rowsCount, - new LongSumAggregatorFactory("idx_subagg", "index") + new LongSumAggregatorFactory("idx_subagg", "index", null) ) ) .setPostAggregatorSpecs( @@ -1145,8 +1146,8 @@ public class GroupByQueryRunnerTest .setDimensions(Lists.newArrayList(new DefaultDimensionSpec("alias", "alias"))) .setAggregatorSpecs( Arrays.asList( - new LongSumAggregatorFactory("rows", "rows"), - new LongSumAggregatorFactory("idx", "idx_subpostagg") + new LongSumAggregatorFactory("rows", "rows", null), + new LongSumAggregatorFactory("idx", "idx_subpostagg", null) ) ) .setPostAggregatorSpecs( @@ -1202,7 +1203,7 @@ public class GroupByQueryRunnerTest .setAggregatorSpecs( Arrays.asList( QueryRunnerTestHelper.rowsCount, - new LongSumAggregatorFactory("idx_subagg", "index") + new LongSumAggregatorFactory("idx_subagg", "index", null) ) ) .setPostAggregatorSpecs( @@ -1245,8 +1246,8 @@ public class GroupByQueryRunnerTest .setDimensions(Lists.newArrayList(new DefaultDimensionSpec("alias", "alias"))) .setAggregatorSpecs( Arrays.asList( - new LongSumAggregatorFactory("rows", "rows"), - new LongSumAggregatorFactory("idx", "idx_subpostagg") + new LongSumAggregatorFactory("rows", "rows", null), + new LongSumAggregatorFactory("idx", "idx_subpostagg", null) ) ) .setPostAggregatorSpecs( @@ -1350,8 +1351,8 @@ public class GroupByQueryRunnerTest .setDimensions(Lists.newArrayList(new DefaultDimensionSpec("alias", "alias"))) .setAggregatorSpecs( Arrays.asList( - new LongSumAggregatorFactory("rows", "rows"), - new LongSumAggregatorFactory("idx", "idx_subpostagg"), + new LongSumAggregatorFactory("rows", "rows", null), + new LongSumAggregatorFactory("idx", "idx_subpostagg", null), new DoubleSumAggregatorFactory("js_outer_agg", "js_agg") ) ) diff --git a/processing/src/test/java/io/druid/query/groupby/GroupByQueryTest.java b/processing/src/test/java/io/druid/query/groupby/GroupByQueryTest.java index 8557ba04c24..036f4a5ed9a 100644 --- a/processing/src/test/java/io/druid/query/groupby/GroupByQueryTest.java +++ b/processing/src/test/java/io/druid/query/groupby/GroupByQueryTest.java @@ -24,12 +24,10 @@ package io.druid.query.groupby; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.collect.Lists; import io.druid.jackson.DefaultObjectMapper; -import io.druid.query.Druids; import io.druid.query.Query; import io.druid.query.QueryRunnerTestHelper; import io.druid.query.aggregation.AggregatorFactory; import io.druid.query.aggregation.LongSumAggregatorFactory; -import io.druid.query.aggregation.PostAggregator; import io.druid.query.dimension.DefaultDimensionSpec; import io.druid.query.dimension.DimensionSpec; import org.junit.Assert; @@ -53,7 +51,7 @@ public class GroupByQueryTest .setAggregatorSpecs( Arrays.asList( QueryRunnerTestHelper.rowsCount, - new LongSumAggregatorFactory("idx", "index") + new LongSumAggregatorFactory("idx", "index", null) ) ) .setGranularity(QueryRunnerTestHelper.dayGran) diff --git a/processing/src/test/java/io/druid/query/timeseries/TimeSeriesUnionQueryRunnerTest.java b/processing/src/test/java/io/druid/query/timeseries/TimeSeriesUnionQueryRunnerTest.java index 8ad6c40dbec..f091134f7d7 100644 --- a/processing/src/test/java/io/druid/query/timeseries/TimeSeriesUnionQueryRunnerTest.java +++ b/processing/src/test/java/io/druid/query/timeseries/TimeSeriesUnionQueryRunnerTest.java @@ -77,7 +77,8 @@ public class TimeSeriesUnionQueryRunnerTest QueryRunnerTestHelper.rowsCount, new LongSumAggregatorFactory( "idx", - "index" + "index", + null ), QueryRunnerTestHelper.qualityUniques ) diff --git a/processing/src/test/java/io/druid/query/timeseries/TimeseriesBinaryFnTest.java b/processing/src/test/java/io/druid/query/timeseries/TimeseriesBinaryFnTest.java index ff3266f303c..90fb7c327d9 100644 --- a/processing/src/test/java/io/druid/query/timeseries/TimeseriesBinaryFnTest.java +++ b/processing/src/test/java/io/druid/query/timeseries/TimeseriesBinaryFnTest.java @@ -36,8 +36,8 @@ import java.util.List; */ public class TimeseriesBinaryFnTest { - final CountAggregatorFactory rowsCount = new CountAggregatorFactory("rows"); - final LongSumAggregatorFactory indexLongSum = new LongSumAggregatorFactory("index", "index"); + final CountAggregatorFactory rowsCount = new CountAggregatorFactory("rows", null); + final LongSumAggregatorFactory indexLongSum = new LongSumAggregatorFactory("index", "index", null); final List aggregatorFactories = Arrays.asList( rowsCount, indexLongSum diff --git a/processing/src/test/java/io/druid/query/timeseries/TimeseriesQueryRunnerBonusTest.java b/processing/src/test/java/io/druid/query/timeseries/TimeseriesQueryRunnerBonusTest.java index 95d654b9153..ae1a6f8e3c5 100644 --- a/processing/src/test/java/io/druid/query/timeseries/TimeseriesQueryRunnerBonusTest.java +++ b/processing/src/test/java/io/druid/query/timeseries/TimeseriesQueryRunnerBonusTest.java @@ -109,7 +109,7 @@ public class TimeseriesQueryRunnerBonusTest .intervals(ImmutableList.of(new Interval("2012-01-01T00:00:00Z/P1D"))) .aggregators( ImmutableList.of( - new CountAggregatorFactory("rows") + new CountAggregatorFactory("rows", null) ) ) .build(); diff --git a/processing/src/test/java/io/druid/query/timeseries/TimeseriesQueryRunnerTest.java b/processing/src/test/java/io/druid/query/timeseries/TimeseriesQueryRunnerTest.java index 1d1fcb21b00..88f2fbb51e1 100644 --- a/processing/src/test/java/io/druid/query/timeseries/TimeseriesQueryRunnerTest.java +++ b/processing/src/test/java/io/druid/query/timeseries/TimeseriesQueryRunnerTest.java @@ -260,7 +260,8 @@ public class TimeseriesQueryRunnerTest QueryRunnerTestHelper.rowsCount, new LongSumAggregatorFactory( "idx", - "index" + "index", + null ), QueryRunnerTestHelper.qualityUniques ) @@ -301,7 +302,8 @@ public class TimeseriesQueryRunnerTest QueryRunnerTestHelper.rowsCount, new LongSumAggregatorFactory( "idx", - "index" + "index", + null ) ) ) @@ -355,7 +357,8 @@ public class TimeseriesQueryRunnerTest QueryRunnerTestHelper.rowsCount, new LongSumAggregatorFactory( "idx", - "index" + "index", + null ), QueryRunnerTestHelper.qualityUniques ) @@ -392,7 +395,8 @@ public class TimeseriesQueryRunnerTest QueryRunnerTestHelper.rowsCount, new LongSumAggregatorFactory( "idx", - "index" + "index", + null ), QueryRunnerTestHelper.qualityUniques ) @@ -440,7 +444,8 @@ public class TimeseriesQueryRunnerTest QueryRunnerTestHelper.rowsCount, new LongSumAggregatorFactory( "idx", - "index" + "index", + null ) ) ) @@ -487,7 +492,8 @@ public class TimeseriesQueryRunnerTest QueryRunnerTestHelper.rowsCount, new LongSumAggregatorFactory( "idx", - "index" + "index", + null ), QueryRunnerTestHelper.qualityUniques ) @@ -525,7 +531,8 @@ public class TimeseriesQueryRunnerTest QueryRunnerTestHelper.rowsCount, new LongSumAggregatorFactory( "idx", - "index" + "index", + null ), QueryRunnerTestHelper.qualityUniques ) @@ -568,7 +575,8 @@ public class TimeseriesQueryRunnerTest QueryRunnerTestHelper.rowsCount, new LongSumAggregatorFactory( "idx", - "index" + "index", + null ) ) ) diff --git a/processing/src/test/java/io/druid/query/topn/TopNBinaryFnBenchmark.java b/processing/src/test/java/io/druid/query/topn/TopNBinaryFnBenchmark.java index 65ab16ad19b..eb97d72e4c5 100644 --- a/processing/src/test/java/io/druid/query/topn/TopNBinaryFnBenchmark.java +++ b/processing/src/test/java/io/druid/query/topn/TopNBinaryFnBenchmark.java @@ -67,10 +67,10 @@ public class TopNBinaryFnBenchmark extends SimpleBenchmark final List aggregatorFactories = new ArrayList<>(); - aggregatorFactories.add(new CountAggregatorFactory("rows")); - aggregatorFactories.add(new LongSumAggregatorFactory("index", "index")); + aggregatorFactories.add(new CountAggregatorFactory("rows", null)); + aggregatorFactories.add(new LongSumAggregatorFactory("index", "index", null)); for (int i = 1; i < aggCount; i++) { - aggregatorFactories.add(new CountAggregatorFactory("rows" + i)); + aggregatorFactories.add(new CountAggregatorFactory("rows" + i, null)); } final List postAggregators = new ArrayList<>(); for (int i = 0; i < postAggCount; i++) { diff --git a/processing/src/test/java/io/druid/query/topn/TopNBinaryFnTest.java b/processing/src/test/java/io/druid/query/topn/TopNBinaryFnTest.java index c8958dc6580..0b8d0c93c08 100644 --- a/processing/src/test/java/io/druid/query/topn/TopNBinaryFnTest.java +++ b/processing/src/test/java/io/druid/query/topn/TopNBinaryFnTest.java @@ -45,8 +45,8 @@ import java.util.Map; */ public class TopNBinaryFnTest { - final CountAggregatorFactory rowsCount = new CountAggregatorFactory("rows"); - final LongSumAggregatorFactory indexLongSum = new LongSumAggregatorFactory("index", "index"); + final CountAggregatorFactory rowsCount = new CountAggregatorFactory("rows", null); + final LongSumAggregatorFactory indexLongSum = new LongSumAggregatorFactory("index", "index", null); final ConstantPostAggregator constant = new ConstantPostAggregator("const", 1L, null); final FieldAccessPostAggregator rowsPostAgg = new FieldAccessPostAggregator("rows", "rows"); final FieldAccessPostAggregator indexPostAgg = new FieldAccessPostAggregator("index", "index"); diff --git a/processing/src/test/java/io/druid/segment/AppendTest.java b/processing/src/test/java/io/druid/segment/AppendTest.java index 017f99c293e..e32d5a11410 100644 --- a/processing/src/test/java/io/druid/segment/AppendTest.java +++ b/processing/src/test/java/io/druid/segment/AppendTest.java @@ -69,12 +69,12 @@ public class AppendTest { private static final AggregatorFactory[] METRIC_AGGS = new AggregatorFactory[]{ new DoubleSumAggregatorFactory("index", "index"), - new CountAggregatorFactory("count"), + new CountAggregatorFactory("count", null), new HyperUniquesAggregatorFactory("quality_uniques", "quality") }; private static final AggregatorFactory[] METRIC_AGGS_NO_UNIQ = new AggregatorFactory[]{ new DoubleSumAggregatorFactory("index", "index"), - new CountAggregatorFactory("count") + new CountAggregatorFactory("count", null) }; final String dataSource = "testing"; @@ -86,7 +86,7 @@ public class AppendTest final String placementDimension = "placement"; final String placementishDimension = "placementish"; final String indexMetric = "index"; - final CountAggregatorFactory rowsCount = new CountAggregatorFactory("rows"); + final CountAggregatorFactory rowsCount = new CountAggregatorFactory("rows", null); final DoubleSumAggregatorFactory indexDoubleSum = new DoubleSumAggregatorFactory("index", "index"); final HyperUniquesAggregatorFactory uniques = new HyperUniquesAggregatorFactory("uniques", "quality_uniques"); final ConstantPostAggregator constant = new ConstantPostAggregator("const", 1L, null); diff --git a/processing/src/test/java/io/druid/segment/SchemalessIndex.java b/processing/src/test/java/io/druid/segment/SchemalessIndex.java index 823fd83774a..9c03f107658 100644 --- a/processing/src/test/java/io/druid/segment/SchemalessIndex.java +++ b/processing/src/test/java/io/druid/segment/SchemalessIndex.java @@ -68,12 +68,12 @@ public class SchemalessIndex private static final List METRICS = Arrays.asList("index"); private static final AggregatorFactory[] METRIC_AGGS = new AggregatorFactory[]{ new DoubleSumAggregatorFactory("index", "index"), - new CountAggregatorFactory("count"), + new CountAggregatorFactory("count", null), new HyperUniquesAggregatorFactory("quality_uniques", "quality") }; private static final AggregatorFactory[] METRIC_AGGS_NO_UNIQ = new AggregatorFactory[]{ new DoubleSumAggregatorFactory("index", "index"), - new CountAggregatorFactory("count") + new CountAggregatorFactory("count", null) }; private static final List> events = Lists.newArrayList(); diff --git a/processing/src/test/java/io/druid/segment/SchemalessTestFull.java b/processing/src/test/java/io/druid/segment/SchemalessTestFull.java index 58a391c7515..1f3dbd3af24 100644 --- a/processing/src/test/java/io/druid/segment/SchemalessTestFull.java +++ b/processing/src/test/java/io/druid/segment/SchemalessTestFull.java @@ -76,7 +76,7 @@ public class SchemalessTestFull final String placementDimension = "placement"; final String placementishDimension = "placementish"; final String indexMetric = "index"; - final CountAggregatorFactory rowsCount = new CountAggregatorFactory("rows"); + final CountAggregatorFactory rowsCount = new CountAggregatorFactory("rows", null); final DoubleSumAggregatorFactory indexDoubleSum = new DoubleSumAggregatorFactory("index", "index"); final HyperUniquesAggregatorFactory uniques = new HyperUniquesAggregatorFactory("uniques", "quality_uniques"); final ConstantPostAggregator constant = new ConstantPostAggregator("const", 1L, null); diff --git a/processing/src/test/java/io/druid/segment/SchemalessTestSimple.java b/processing/src/test/java/io/druid/segment/SchemalessTestSimple.java index 153a1226619..14909e3a5fe 100644 --- a/processing/src/test/java/io/druid/segment/SchemalessTestSimple.java +++ b/processing/src/test/java/io/druid/segment/SchemalessTestSimple.java @@ -103,7 +103,7 @@ public class SchemalessTestSimple final String placementDimension = "placement"; final String placementishDimension = "placementish"; final String indexMetric = "index"; - final CountAggregatorFactory rowsCount = new CountAggregatorFactory("rows"); + final CountAggregatorFactory rowsCount = new CountAggregatorFactory("rows", null); final DoubleSumAggregatorFactory indexDoubleSum = new DoubleSumAggregatorFactory("index", "index"); final HyperUniquesAggregatorFactory uniques = new HyperUniquesAggregatorFactory("uniques", "quality_uniques"); final ConstantPostAggregator constant = new ConstantPostAggregator("const", 1L, null); diff --git a/processing/src/test/java/io/druid/segment/data/IncrementalIndexTest.java b/processing/src/test/java/io/druid/segment/data/IncrementalIndexTest.java index 7a131901501..4bf0638f0fd 100644 --- a/processing/src/test/java/io/druid/segment/data/IncrementalIndexTest.java +++ b/processing/src/test/java/io/druid/segment/data/IncrementalIndexTest.java @@ -109,7 +109,7 @@ public class IncrementalIndexTest final IncrementalIndex index = new IncrementalIndex( 0L, QueryGranularity.NONE, - new AggregatorFactory[]{new CountAggregatorFactory("count")}, + new AggregatorFactory[]{new CountAggregatorFactory("count", null)}, TestQueryRunners.pool ); final int threadCount = 10; diff --git a/processing/src/test/java/io/druid/segment/filter/SpatialFilterBonusTest.java b/processing/src/test/java/io/druid/segment/filter/SpatialFilterBonusTest.java index 12c3ca633f1..6992c531105 100644 --- a/processing/src/test/java/io/druid/segment/filter/SpatialFilterBonusTest.java +++ b/processing/src/test/java/io/druid/segment/filter/SpatialFilterBonusTest.java @@ -51,7 +51,6 @@ import io.druid.segment.QueryableIndex; import io.druid.segment.QueryableIndexSegment; import io.druid.segment.Segment; import io.druid.segment.TestHelper; -import io.druid.segment.column.ColumnConfig; import io.druid.segment.incremental.IncrementalIndex; import io.druid.segment.incremental.IncrementalIndexSchema; import org.joda.time.DateTime; @@ -75,8 +74,8 @@ public class SpatialFilterBonusTest { private static Interval DATA_INTERVAL = new Interval("2013-01-01/2013-01-07"); private static AggregatorFactory[] METRIC_AGGS = new AggregatorFactory[]{ - new CountAggregatorFactory("rows"), - new LongSumAggregatorFactory("val", "val") + new CountAggregatorFactory("rows", null), + new LongSumAggregatorFactory("val", "val", null) }; private static List DIMS = Lists.newArrayList("dim", "dim.geo"); private final Segment segment; @@ -445,8 +444,8 @@ public class SpatialFilterBonusTest ) .aggregators( Arrays.asList( - new CountAggregatorFactory("rows"), - new LongSumAggregatorFactory("val", "val") + new CountAggregatorFactory("rows", null), + new LongSumAggregatorFactory("val", "val", null) ) ) .build(); @@ -496,8 +495,8 @@ public class SpatialFilterBonusTest ) .aggregators( Arrays.asList( - new CountAggregatorFactory("rows"), - new LongSumAggregatorFactory("val", "val") + new CountAggregatorFactory("rows", null), + new LongSumAggregatorFactory("val", "val", null) ) ) .build(); diff --git a/processing/src/test/java/io/druid/segment/filter/SpatialFilterTest.java b/processing/src/test/java/io/druid/segment/filter/SpatialFilterTest.java index f9693bdabf8..d9b815a3235 100644 --- a/processing/src/test/java/io/druid/segment/filter/SpatialFilterTest.java +++ b/processing/src/test/java/io/druid/segment/filter/SpatialFilterTest.java @@ -51,7 +51,6 @@ import io.druid.segment.QueryableIndex; import io.druid.segment.QueryableIndexSegment; import io.druid.segment.Segment; import io.druid.segment.TestHelper; -import io.druid.segment.column.ColumnConfig; import io.druid.segment.incremental.IncrementalIndex; import io.druid.segment.incremental.IncrementalIndexSchema; import org.joda.time.DateTime; @@ -75,8 +74,8 @@ public class SpatialFilterTest { private static Interval DATA_INTERVAL = new Interval("2013-01-01/2013-01-07"); private static AggregatorFactory[] METRIC_AGGS = new AggregatorFactory[]{ - new CountAggregatorFactory("rows"), - new LongSumAggregatorFactory("val", "val") + new CountAggregatorFactory("rows", null), + new LongSumAggregatorFactory("val", "val", null) }; private static List DIMS = Lists.newArrayList("dim", "lat", "long"); private final Segment segment; @@ -473,8 +472,8 @@ public class SpatialFilterTest ) .aggregators( Arrays.asList( - new CountAggregatorFactory("rows"), - new LongSumAggregatorFactory("val", "val") + new CountAggregatorFactory("rows", null), + new LongSumAggregatorFactory("val", "val", null) ) ) .build(); @@ -524,8 +523,8 @@ public class SpatialFilterTest ) .aggregators( Arrays.asList( - new CountAggregatorFactory("rows"), - new LongSumAggregatorFactory("val", "val") + new CountAggregatorFactory("rows", null), + new LongSumAggregatorFactory("val", "val", null) ) ) .build(); diff --git a/processing/src/test/java/io/druid/segment/incremental/IncrementalIndexStorageAdapterTest.java b/processing/src/test/java/io/druid/segment/incremental/IncrementalIndexStorageAdapterTest.java index 1eee18fe782..8fd1446a8d3 100644 --- a/processing/src/test/java/io/druid/segment/incremental/IncrementalIndexStorageAdapterTest.java +++ b/processing/src/test/java/io/druid/segment/incremental/IncrementalIndexStorageAdapterTest.java @@ -53,7 +53,6 @@ import org.junit.Test; import java.nio.ByteBuffer; import java.util.ArrayList; -import java.util.List; /** */ @@ -63,7 +62,7 @@ public class IncrementalIndexStorageAdapterTest public void testSanity() throws Exception { IncrementalIndex index = new IncrementalIndex( - 0, QueryGranularity.MINUTE, new AggregatorFactory[]{new CountAggregatorFactory("cnt")}, + 0, QueryGranularity.MINUTE, new AggregatorFactory[]{new CountAggregatorFactory("cnt", null)}, TestQueryRunners.pool ); @@ -110,7 +109,7 @@ public class IncrementalIndexStorageAdapterTest .setInterval(new Interval(0, new DateTime().getMillis())) .addDimension("billy") .addDimension("sally") - .addAggregator(new LongSumAggregatorFactory("cnt", "cnt")) + .addAggregator(new LongSumAggregatorFactory("cnt", "cnt", null)) .build(), new IncrementalIndexStorageAdapter(index) ); @@ -129,7 +128,7 @@ public class IncrementalIndexStorageAdapterTest @Test public void testResetSanity() { IncrementalIndex index = new IncrementalIndex( - 0, QueryGranularity.MINUTE, new AggregatorFactory[]{new CountAggregatorFactory("cnt")}, + 0, QueryGranularity.MINUTE, new AggregatorFactory[]{new CountAggregatorFactory("cnt", null)}, TestQueryRunners.pool ); @@ -182,7 +181,7 @@ public class IncrementalIndexStorageAdapterTest public void testSingleValueTopN() { IncrementalIndex index = new IncrementalIndex( - 0, QueryGranularity.MINUTE, new AggregatorFactory[]{new CountAggregatorFactory("cnt")}, + 0, QueryGranularity.MINUTE, new AggregatorFactory[]{new CountAggregatorFactory("cnt", null)}, TestQueryRunners.pool ); @@ -220,7 +219,8 @@ public class IncrementalIndexStorageAdapterTest Lists.newArrayList( new LongSumAggregatorFactory( "cnt", - "cnt" + "cnt", + null ) ) ) @@ -238,7 +238,7 @@ public class IncrementalIndexStorageAdapterTest public void testFilterByNull() throws Exception { IncrementalIndex index = new IncrementalIndex( - 0, QueryGranularity.MINUTE, new AggregatorFactory[]{new CountAggregatorFactory("cnt")}, + 0, QueryGranularity.MINUTE, new AggregatorFactory[]{new CountAggregatorFactory("cnt", null)}, TestQueryRunners.pool ); @@ -285,7 +285,7 @@ public class IncrementalIndexStorageAdapterTest .setInterval(new Interval(0, new DateTime().getMillis())) .addDimension("billy") .addDimension("sally") - .addAggregator(new LongSumAggregatorFactory("cnt", "cnt")) + .addAggregator(new LongSumAggregatorFactory("cnt", "cnt", null)) .setDimFilter(DimFilters.dimEquals("sally", (String) null)) .build(), new IncrementalIndexStorageAdapter(index) diff --git a/server/src/main/antlr4/io/druid/sql/antlr4/DruidSQL.g4 b/server/src/main/antlr4/io/druid/sql/antlr4/DruidSQL.g4 index 37716ab6673..ed810051070 100644 --- a/server/src/main/antlr4/io/druid/sql/antlr4/DruidSQL.g4 +++ b/server/src/main/antlr4/io/druid/sql/antlr4/DruidSQL.g4 @@ -72,7 +72,7 @@ import java.util.Map; case SUM: return new DoubleSumAggregatorFactory("sum("+name+")", name); case MIN: return new MinAggregatorFactory("min("+name+")", name); case MAX: return new MaxAggregatorFactory("max("+name+")", name); - case COUNT: return new CountAggregatorFactory(name); + case COUNT: return new CountAggregatorFactory(name, null); } throw new IllegalArgumentException("Unknown function [" + fn + "]"); } diff --git a/server/src/test/java/io/druid/client/CachingClusteredClientTest.java b/server/src/test/java/io/druid/client/CachingClusteredClientTest.java index 0834a0d9f8b..edd1e307179 100644 --- a/server/src/test/java/io/druid/client/CachingClusteredClientTest.java +++ b/server/src/test/java/io/druid/client/CachingClusteredClientTest.java @@ -150,9 +150,9 @@ public class CachingClusteredClientTest */ private static final int RANDOMNESS = 10; private static final List AGGS = Arrays.asList( - new CountAggregatorFactory("rows"), - new LongSumAggregatorFactory("imps", "imps"), - new LongSumAggregatorFactory("impers", "imps") + new CountAggregatorFactory("rows", null), + new LongSumAggregatorFactory("imps", "imps", null), + new LongSumAggregatorFactory("impers", "imps", null) ); private static final List POST_AGGS = Arrays.asList( new ArithmeticPostAggregator( @@ -181,9 +181,9 @@ public class CachingClusteredClientTest ) ); private static final List RENAMED_AGGS = Arrays.asList( - new CountAggregatorFactory("rows2"), - new LongSumAggregatorFactory("imps", "imps"), - new LongSumAggregatorFactory("impers2", "imps") + new CountAggregatorFactory("rows2", null), + new LongSumAggregatorFactory("imps", "imps", null), + new LongSumAggregatorFactory("impers2", "imps", null) ); private static final DimFilter DIM_FILTER = null; private static final List RENAMED_POST_AGGS = Arrays.asList(); diff --git a/server/src/test/java/io/druid/client/CachingQueryRunnerTest.java b/server/src/test/java/io/druid/client/CachingQueryRunnerTest.java index a358ec44798..c64996e6bc3 100644 --- a/server/src/test/java/io/druid/client/CachingQueryRunnerTest.java +++ b/server/src/test/java/io/druid/client/CachingQueryRunnerTest.java @@ -66,9 +66,9 @@ public class CachingQueryRunnerTest { private static final List AGGS = Arrays.asList( - new CountAggregatorFactory("rows"), - new LongSumAggregatorFactory("imps", "imps"), - new LongSumAggregatorFactory("impers", "imps") + new CountAggregatorFactory("rows", null), + new LongSumAggregatorFactory("imps", "imps", null), + new LongSumAggregatorFactory("impers", "imps", null) ); private static final Object[] objects = new Object[]{ diff --git a/server/src/test/java/io/druid/segment/realtime/FireDepartmentTest.java b/server/src/test/java/io/druid/segment/realtime/FireDepartmentTest.java index 5fca643fc08..f812c24b974 100644 --- a/server/src/test/java/io/druid/segment/realtime/FireDepartmentTest.java +++ b/server/src/test/java/io/druid/segment/realtime/FireDepartmentTest.java @@ -66,7 +66,7 @@ public class FireDepartmentTest null, null, null, null ), new AggregatorFactory[]{ - new CountAggregatorFactory("count") + new CountAggregatorFactory("count", null) }, new UniformGranularitySpec(Granularity.HOUR, QueryGranularity.MINUTE, null, Granularity.HOUR) ), diff --git a/server/src/test/java/io/druid/segment/realtime/RealtimeManagerTest.java b/server/src/test/java/io/druid/segment/realtime/RealtimeManagerTest.java index cb464a9ff8f..3142efa29e8 100644 --- a/server/src/test/java/io/druid/segment/realtime/RealtimeManagerTest.java +++ b/server/src/test/java/io/druid/segment/realtime/RealtimeManagerTest.java @@ -73,7 +73,7 @@ public class RealtimeManagerTest schema = new DataSchema( "test", null, - new AggregatorFactory[]{new CountAggregatorFactory("rows")}, + new AggregatorFactory[]{new CountAggregatorFactory("rows", null)}, new UniformGranularitySpec(Granularity.HOUR, QueryGranularity.NONE, null, Granularity.HOUR) ); RealtimeIOConfig ioConfig = new RealtimeIOConfig( diff --git a/server/src/test/java/io/druid/segment/realtime/plumber/RealtimePlumberSchoolTest.java b/server/src/test/java/io/druid/segment/realtime/plumber/RealtimePlumberSchoolTest.java index b580e83d3c5..9a57b78c462 100644 --- a/server/src/test/java/io/druid/segment/realtime/plumber/RealtimePlumberSchoolTest.java +++ b/server/src/test/java/io/druid/segment/realtime/plumber/RealtimePlumberSchoolTest.java @@ -41,7 +41,6 @@ import io.druid.query.Query; import io.druid.query.QueryRunnerFactory; import io.druid.query.aggregation.AggregatorFactory; import io.druid.query.aggregation.CountAggregatorFactory; -import io.druid.segment.column.ColumnConfig; import io.druid.segment.indexing.DataSchema; import io.druid.segment.indexing.RealtimeTuningConfig; import io.druid.segment.indexing.granularity.UniformGranularitySpec; @@ -102,7 +101,7 @@ public class RealtimePlumberSchoolTest return null; } }, - new AggregatorFactory[]{new CountAggregatorFactory("rows")}, + new AggregatorFactory[]{new CountAggregatorFactory("rows", null)}, new UniformGranularitySpec(Granularity.HOUR, QueryGranularity.NONE, null, Granularity.HOUR) ); diff --git a/server/src/test/java/io/druid/segment/realtime/plumber/SinkTest.java b/server/src/test/java/io/druid/segment/realtime/plumber/SinkTest.java index 0ebb59d4410..c2cc0d9517e 100644 --- a/server/src/test/java/io/druid/segment/realtime/plumber/SinkTest.java +++ b/server/src/test/java/io/druid/segment/realtime/plumber/SinkTest.java @@ -49,7 +49,7 @@ public class SinkTest final DataSchema schema = new DataSchema( "test", null, - new AggregatorFactory[]{new CountAggregatorFactory("rows")}, + new AggregatorFactory[]{new CountAggregatorFactory("rows", null)}, new UniformGranularitySpec(Granularity.HOUR, QueryGranularity.MINUTE, null, Granularity.HOUR) ); diff --git a/server/src/test/java/io/druid/server/router/TieredBrokerHostSelectorTest.java b/server/src/test/java/io/druid/server/router/TieredBrokerHostSelectorTest.java index 5c2320f9885..0004679b79a 100644 --- a/server/src/test/java/io/druid/server/router/TieredBrokerHostSelectorTest.java +++ b/server/src/test/java/io/druid/server/router/TieredBrokerHostSelectorTest.java @@ -113,7 +113,7 @@ public class TieredBrokerHostSelectorTest Druids.newTimeseriesQueryBuilder() .dataSource("test") .granularity("all") - .aggregators(Arrays.asList(new CountAggregatorFactory("rows"))) + .aggregators(Arrays.asList(new CountAggregatorFactory("rows", null))) .intervals(Arrays.asList(new Interval("2011-08-31/2011-09-01"))) .build() ).lhs; @@ -129,7 +129,7 @@ public class TieredBrokerHostSelectorTest Druids.newTimeseriesQueryBuilder() .dataSource("test") .granularity("all") - .aggregators(Arrays.asList(new CountAggregatorFactory("rows"))) + .aggregators(Arrays.asList(new CountAggregatorFactory("rows", null))) .intervals(Arrays.asList(new Interval("2013-08-31/2013-09-01"))) .build() ).lhs; @@ -144,7 +144,7 @@ public class TieredBrokerHostSelectorTest Druids.newTimeseriesQueryBuilder() .dataSource("test") .granularity("all") - .aggregators(Arrays.asList(new CountAggregatorFactory("rows"))) + .aggregators(Arrays.asList(new CountAggregatorFactory("rows", null))) .intervals(Arrays.asList(new Interval("2010-08-31/2010-09-01"))) .build() ).lhs; @@ -158,7 +158,7 @@ public class TieredBrokerHostSelectorTest String brokerName = (String) brokerSelector.select( Druids.newTimeseriesQueryBuilder() .dataSource("test") - .aggregators(Arrays.asList(new CountAggregatorFactory("count"))) + .aggregators(Arrays.asList(new CountAggregatorFactory("count", null))) .intervals( new MultipleIntervalSegmentSpec( Arrays.asList( @@ -179,7 +179,7 @@ public class TieredBrokerHostSelectorTest String brokerName = (String) brokerSelector.select( Druids.newTimeseriesQueryBuilder() .dataSource("test") - .aggregators(Arrays.asList(new CountAggregatorFactory("count"))) + .aggregators(Arrays.asList(new CountAggregatorFactory("count", null))) .intervals( new MultipleIntervalSegmentSpec( Arrays.asList( @@ -200,7 +200,7 @@ public class TieredBrokerHostSelectorTest String brokerName = (String) brokerSelector.select( Druids.newTimeseriesQueryBuilder() .dataSource("test") - .aggregators(Arrays.asList(new CountAggregatorFactory("count"))) + .aggregators(Arrays.asList(new CountAggregatorFactory("count", null))) .intervals( new MultipleIntervalSegmentSpec( Arrays.asList( @@ -223,7 +223,7 @@ public class TieredBrokerHostSelectorTest String brokerName = (String) brokerSelector.select( Druids.newTimeseriesQueryBuilder() .dataSource("test") - .aggregators(Arrays.asList(new CountAggregatorFactory("count"))) + .aggregators(Arrays.asList(new CountAggregatorFactory("count", null))) .intervals( new MultipleIntervalSegmentSpec( Arrays.asList(