From e84bcca40f868b0738f60fc49ccaf3e39d969366 Mon Sep 17 00:00:00 2001 From: fjy Date: Thu, 12 Jun 2014 13:36:40 -0700 Subject: [PATCH] rename method --- .../java/io/druid/query/aggregation/AggregatorFactory.java | 6 +++--- .../io/druid/query/aggregation/CountAggregatorFactory.java | 2 +- .../druid/query/aggregation/DoubleSumAggregatorFactory.java | 2 +- .../druid/query/aggregation/HistogramAggregatorFactory.java | 2 +- .../query/aggregation/JavaScriptAggregatorFactory.java | 2 +- .../druid/query/aggregation/LongSumAggregatorFactory.java | 2 +- .../io/druid/query/aggregation/MaxAggregatorFactory.java | 2 +- .../io/druid/query/aggregation/MinAggregatorFactory.java | 2 +- .../query/aggregation/ToLowerCaseAggregatorFactory.java | 4 ++-- .../cardinality/CardinalityAggregatorFactory.java | 2 +- .../hyperloglog/HyperUniquesAggregatorFactory.java | 2 +- .../io/druid/query/groupby/GroupByQueryQueryToolChest.java | 2 +- 12 files changed, 15 insertions(+), 15 deletions(-) diff --git a/processing/src/main/java/io/druid/query/aggregation/AggregatorFactory.java b/processing/src/main/java/io/druid/query/aggregation/AggregatorFactory.java index e236e683d08..ad355c71b6b 100644 --- a/processing/src/main/java/io/druid/query/aggregation/AggregatorFactory.java +++ b/processing/src/main/java/io/druid/query/aggregation/AggregatorFactory.java @@ -65,11 +65,11 @@ public interface AggregatorFactory public AggregatorFactory getCombiningFactory(); /** - * Gets a list of aggregator factories using the actual column names of the data + * Gets a list of all columns that this AggregatorFactory will scan * - * @return Base AggregatorFactories for different fields of this AggregatorFactory + * @return AggregatorFactories for the columns to scan of the parent AggregatorFactory */ - public List getBaseFactories(); + public List getRequiredColumns(); /** * A method that knows how to "deserialize" the object from whatever form it might have been put into 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 1d1e2e149d7..9549015f687 100644 --- a/processing/src/main/java/io/druid/query/aggregation/CountAggregatorFactory.java +++ b/processing/src/main/java/io/druid/query/aggregation/CountAggregatorFactory.java @@ -78,7 +78,7 @@ public class CountAggregatorFactory implements AggregatorFactory } @Override - public List getBaseFactories() + public List getRequiredColumns() { return Arrays.asList(new CountAggregatorFactory(name)); } diff --git a/processing/src/main/java/io/druid/query/aggregation/DoubleSumAggregatorFactory.java b/processing/src/main/java/io/druid/query/aggregation/DoubleSumAggregatorFactory.java index 7e395c3c3ca..083a16589dc 100644 --- a/processing/src/main/java/io/druid/query/aggregation/DoubleSumAggregatorFactory.java +++ b/processing/src/main/java/io/druid/query/aggregation/DoubleSumAggregatorFactory.java @@ -86,7 +86,7 @@ public class DoubleSumAggregatorFactory implements AggregatorFactory } @Override - public List getBaseFactories() + public List getRequiredColumns() { return Arrays.asList(new DoubleSumAggregatorFactory(fieldName, fieldName)); } diff --git a/processing/src/main/java/io/druid/query/aggregation/HistogramAggregatorFactory.java b/processing/src/main/java/io/druid/query/aggregation/HistogramAggregatorFactory.java index 76809eb39a4..422d8279a2e 100644 --- a/processing/src/main/java/io/druid/query/aggregation/HistogramAggregatorFactory.java +++ b/processing/src/main/java/io/druid/query/aggregation/HistogramAggregatorFactory.java @@ -101,7 +101,7 @@ public class HistogramAggregatorFactory implements AggregatorFactory } @Override - public List getBaseFactories() + public List getRequiredColumns() { return Arrays.asList(new HistogramAggregatorFactory(fieldName, fieldName, breaksList)); } diff --git a/processing/src/main/java/io/druid/query/aggregation/JavaScriptAggregatorFactory.java b/processing/src/main/java/io/druid/query/aggregation/JavaScriptAggregatorFactory.java index 9f84c320702..fc5603f2fe9 100644 --- a/processing/src/main/java/io/druid/query/aggregation/JavaScriptAggregatorFactory.java +++ b/processing/src/main/java/io/druid/query/aggregation/JavaScriptAggregatorFactory.java @@ -141,7 +141,7 @@ public class JavaScriptAggregatorFactory implements AggregatorFactory } @Override - public List getBaseFactories() + public List getRequiredColumns() { return Lists.transform( fieldNames, 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 0eaae184e9f..963d9458beb 100644 --- a/processing/src/main/java/io/druid/query/aggregation/LongSumAggregatorFactory.java +++ b/processing/src/main/java/io/druid/query/aggregation/LongSumAggregatorFactory.java @@ -86,7 +86,7 @@ public class LongSumAggregatorFactory implements AggregatorFactory } @Override - public List getBaseFactories() + public List getRequiredColumns() { return Arrays.asList(new LongSumAggregatorFactory(fieldName, fieldName)); } diff --git a/processing/src/main/java/io/druid/query/aggregation/MaxAggregatorFactory.java b/processing/src/main/java/io/druid/query/aggregation/MaxAggregatorFactory.java index 78abafa3d76..56e6de5f56e 100644 --- a/processing/src/main/java/io/druid/query/aggregation/MaxAggregatorFactory.java +++ b/processing/src/main/java/io/druid/query/aggregation/MaxAggregatorFactory.java @@ -83,7 +83,7 @@ public class MaxAggregatorFactory implements AggregatorFactory } @Override - public List getBaseFactories() + public List getRequiredColumns() { return Arrays.asList(new MaxAggregatorFactory(fieldName, 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 index 6c373eded4b..e7256d0ccb9 100644 --- a/processing/src/main/java/io/druid/query/aggregation/MinAggregatorFactory.java +++ b/processing/src/main/java/io/druid/query/aggregation/MinAggregatorFactory.java @@ -83,7 +83,7 @@ public class MinAggregatorFactory implements AggregatorFactory } @Override - public List getBaseFactories() + public List getRequiredColumns() { return Arrays.asList(new MinAggregatorFactory(fieldName, fieldName)); } diff --git a/processing/src/main/java/io/druid/query/aggregation/ToLowerCaseAggregatorFactory.java b/processing/src/main/java/io/druid/query/aggregation/ToLowerCaseAggregatorFactory.java index b649f1fa5b3..a884bb9be4d 100644 --- a/processing/src/main/java/io/druid/query/aggregation/ToLowerCaseAggregatorFactory.java +++ b/processing/src/main/java/io/druid/query/aggregation/ToLowerCaseAggregatorFactory.java @@ -66,9 +66,9 @@ public class ToLowerCaseAggregatorFactory implements AggregatorFactory } @Override - public List getBaseFactories() + public List getRequiredColumns() { - return baseAggregatorFactory.getBaseFactories(); + return baseAggregatorFactory.getRequiredColumns(); } @Override diff --git a/processing/src/main/java/io/druid/query/aggregation/cardinality/CardinalityAggregatorFactory.java b/processing/src/main/java/io/druid/query/aggregation/cardinality/CardinalityAggregatorFactory.java index e8c414913f4..12da44bea07 100644 --- a/processing/src/main/java/io/druid/query/aggregation/cardinality/CardinalityAggregatorFactory.java +++ b/processing/src/main/java/io/druid/query/aggregation/cardinality/CardinalityAggregatorFactory.java @@ -147,7 +147,7 @@ public class CardinalityAggregatorFactory implements AggregatorFactory } @Override - public List getBaseFactories() + public List getRequiredColumns() { return Lists.transform( fieldNames, diff --git a/processing/src/main/java/io/druid/query/aggregation/hyperloglog/HyperUniquesAggregatorFactory.java b/processing/src/main/java/io/druid/query/aggregation/hyperloglog/HyperUniquesAggregatorFactory.java index 2193be3419e..26449929703 100644 --- a/processing/src/main/java/io/druid/query/aggregation/hyperloglog/HyperUniquesAggregatorFactory.java +++ b/processing/src/main/java/io/druid/query/aggregation/hyperloglog/HyperUniquesAggregatorFactory.java @@ -132,7 +132,7 @@ public class HyperUniquesAggregatorFactory implements AggregatorFactory } @Override - public List getBaseFactories() + public List getRequiredColumns() { return Arrays.asList(new HyperUniquesAggregatorFactory(fieldName, fieldName)); } diff --git a/processing/src/main/java/io/druid/query/groupby/GroupByQueryQueryToolChest.java b/processing/src/main/java/io/druid/query/groupby/GroupByQueryQueryToolChest.java index 09cf7e431a8..025af21a2d7 100644 --- a/processing/src/main/java/io/druid/query/groupby/GroupByQueryQueryToolChest.java +++ b/processing/src/main/java/io/druid/query/groupby/GroupByQueryQueryToolChest.java @@ -111,7 +111,7 @@ public class GroupByQueryQueryToolChest extends QueryToolChest subqueryResult = mergeGroupByResults(subquery, runner); final List aggs = Lists.newArrayList(); for (AggregatorFactory aggregatorFactory : query.getAggregatorSpecs()) { - aggs.addAll(aggregatorFactory.getBaseFactories()); + aggs.addAll(aggregatorFactory.getRequiredColumns()); } // We need the inner incremental index to have all the columns required by the outer query