mirror of https://github.com/apache/druid.git
remove min/max aggregator factory which are replaced by double[min/max] aggregator factories
This commit is contained in:
parent
b661f00dc8
commit
431469e9c1
|
@ -34,8 +34,6 @@ import io.druid.query.aggregation.JavaScriptAggregatorFactory;
|
|||
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 class AggregatorsModule extends SimpleModule
|
|||
@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),
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -111,14 +111,6 @@ public class DoubleMaxAggregationTest
|
|||
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();
|
||||
|
|
|
@ -111,14 +111,6 @@ public class DoubleMinAggregationTest
|
|||
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();
|
||||
|
|
Loading…
Reference in New Issue