diff --git a/processing/src/main/java/io/druid/jackson/AggregatorsModule.java b/processing/src/main/java/io/druid/jackson/AggregatorsModule.java index 0583b4cbf681..2e9582da89c6 100644 --- a/processing/src/main/java/io/druid/jackson/AggregatorsModule.java +++ b/processing/src/main/java/io/druid/jackson/AggregatorsModule.java @@ -34,8 +34,6 @@ import io.druid.query.aggregation.LongMaxAggregatorFactory; import io.druid.query.aggregation.LongMinAggregatorFactory; import io.druid.query.aggregation.LongSumAggregatorFactory; -import io.druid.query.aggregation.MaxAggregatorFactory; -import io.druid.query.aggregation.MinAggregatorFactory; import io.druid.query.aggregation.PostAggregator; import io.druid.query.aggregation.cardinality.CardinalityAggregatorFactory; import io.druid.query.aggregation.hyperloglog.HyperUniqueFinalizingPostAggregator; @@ -70,10 +68,6 @@ public AggregatorsModule() @JsonSubTypes.Type(name = "doubleSum", value = DoubleSumAggregatorFactory.class), @JsonSubTypes.Type(name = "doubleMax", value = DoubleMaxAggregatorFactory.class), @JsonSubTypes.Type(name = "doubleMin", value = DoubleMinAggregatorFactory.class), - //Note: max/min are exactly same as doubleMax/doubleMin, max/min are still here only - //to be backward compatible with 0.7.2 and before - @JsonSubTypes.Type(name = "max", value = MaxAggregatorFactory.class), - @JsonSubTypes.Type(name = "min", value = MinAggregatorFactory.class), @JsonSubTypes.Type(name = "longMax", value = LongMaxAggregatorFactory.class), @JsonSubTypes.Type(name = "longMin", value = LongMinAggregatorFactory.class), @JsonSubTypes.Type(name = "javascript", value = JavaScriptAggregatorFactory.class), diff --git a/processing/src/main/java/io/druid/query/aggregation/MaxAggregatorFactory.java b/processing/src/main/java/io/druid/query/aggregation/MaxAggregatorFactory.java deleted file mode 100644 index 3ea3a131f049..000000000000 --- a/processing/src/main/java/io/druid/query/aggregation/MaxAggregatorFactory.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Licensed to Metamarkets Group Inc. (Metamarkets) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. Metamarkets licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package io.druid.query.aggregation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * This class can be removed when we dont need "max" aggregator backward compatibility - */ -public class MaxAggregatorFactory extends DoubleMaxAggregatorFactory -{ - public MaxAggregatorFactory( - @JsonProperty("name") String name, - @JsonProperty("fieldName") String fieldName - ) - { - super(name, fieldName); - } -} diff --git a/processing/src/main/java/io/druid/query/aggregation/MinAggregatorFactory.java b/processing/src/main/java/io/druid/query/aggregation/MinAggregatorFactory.java deleted file mode 100644 index 4ec318ee71b4..000000000000 --- a/processing/src/main/java/io/druid/query/aggregation/MinAggregatorFactory.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Licensed to Metamarkets Group Inc. (Metamarkets) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. Metamarkets licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package io.druid.query.aggregation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * This class can be removed when we dont need "min" aggregator backward compatibility - */ -public class MinAggregatorFactory extends DoubleMinAggregatorFactory -{ - public MinAggregatorFactory( - @JsonProperty("name") String name, - @JsonProperty("fieldName") String fieldName - ) - { - super(name, fieldName); - } -} diff --git a/processing/src/test/java/io/druid/query/aggregation/DoubleMaxAggregationTest.java b/processing/src/test/java/io/druid/query/aggregation/DoubleMaxAggregationTest.java index 5a9aa2d8de2e..b1b52ed6acfc 100644 --- a/processing/src/test/java/io/druid/query/aggregation/DoubleMaxAggregationTest.java +++ b/processing/src/test/java/io/druid/query/aggregation/DoubleMaxAggregationTest.java @@ -111,14 +111,6 @@ public void testEqualsAndHashCode() throws Exception Assert.assertFalse(one.equals(two)); } - @Test - public void testMaxDeserialization() throws Exception - { - String aggSpecJson = "{\"type\": \"max\", \"name\": \"billy\", \"fieldName\": \"nilly\"}"; - MaxAggregatorFactory agg = new DefaultObjectMapper().readValue(aggSpecJson , MaxAggregatorFactory.class); - Assert.assertNotNull(agg); - } - private void aggregate(TestFloatColumnSelector selector, DoubleMaxAggregator agg) { agg.aggregate(); diff --git a/processing/src/test/java/io/druid/query/aggregation/DoubleMinAggregationTest.java b/processing/src/test/java/io/druid/query/aggregation/DoubleMinAggregationTest.java index 0569eb164885..7b89d88801ee 100644 --- a/processing/src/test/java/io/druid/query/aggregation/DoubleMinAggregationTest.java +++ b/processing/src/test/java/io/druid/query/aggregation/DoubleMinAggregationTest.java @@ -111,14 +111,6 @@ public void testEqualsAndHashCode() throws Exception Assert.assertFalse(one.equals(two)); } - @Test - public void testMinDeserialization() throws Exception - { - String aggSpecJson = "{\"type\": \"min\", \"name\": \"billy\", \"fieldName\": \"nilly\"}"; - MinAggregatorFactory agg = new DefaultObjectMapper().readValue(aggSpecJson , MinAggregatorFactory.class); - Assert.assertNotNull(agg); - } - private void aggregate(TestFloatColumnSelector selector, DoubleMinAggregator agg) { agg.aggregate();