mirror of https://github.com/apache/druid.git
rename method
This commit is contained in:
parent
4a4cccf10e
commit
e84bcca40f
|
@ -65,11 +65,11 @@ public interface AggregatorFactory
|
||||||
public AggregatorFactory getCombiningFactory();
|
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<AggregatorFactory> getBaseFactories();
|
public List<AggregatorFactory> getRequiredColumns();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A method that knows how to "deserialize" the object from whatever form it might have been put into
|
* A method that knows how to "deserialize" the object from whatever form it might have been put into
|
||||||
|
|
|
@ -78,7 +78,7 @@ public class CountAggregatorFactory implements AggregatorFactory
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<AggregatorFactory> getBaseFactories()
|
public List<AggregatorFactory> getRequiredColumns()
|
||||||
{
|
{
|
||||||
return Arrays.<AggregatorFactory>asList(new CountAggregatorFactory(name));
|
return Arrays.<AggregatorFactory>asList(new CountAggregatorFactory(name));
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,7 +86,7 @@ public class DoubleSumAggregatorFactory implements AggregatorFactory
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<AggregatorFactory> getBaseFactories()
|
public List<AggregatorFactory> getRequiredColumns()
|
||||||
{
|
{
|
||||||
return Arrays.<AggregatorFactory>asList(new DoubleSumAggregatorFactory(fieldName, fieldName));
|
return Arrays.<AggregatorFactory>asList(new DoubleSumAggregatorFactory(fieldName, fieldName));
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,7 +101,7 @@ public class HistogramAggregatorFactory implements AggregatorFactory
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<AggregatorFactory> getBaseFactories()
|
public List<AggregatorFactory> getRequiredColumns()
|
||||||
{
|
{
|
||||||
return Arrays.<AggregatorFactory>asList(new HistogramAggregatorFactory(fieldName, fieldName, breaksList));
|
return Arrays.<AggregatorFactory>asList(new HistogramAggregatorFactory(fieldName, fieldName, breaksList));
|
||||||
}
|
}
|
||||||
|
|
|
@ -141,7 +141,7 @@ public class JavaScriptAggregatorFactory implements AggregatorFactory
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<AggregatorFactory> getBaseFactories()
|
public List<AggregatorFactory> getRequiredColumns()
|
||||||
{
|
{
|
||||||
return Lists.transform(
|
return Lists.transform(
|
||||||
fieldNames,
|
fieldNames,
|
||||||
|
|
|
@ -86,7 +86,7 @@ public class LongSumAggregatorFactory implements AggregatorFactory
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<AggregatorFactory> getBaseFactories()
|
public List<AggregatorFactory> getRequiredColumns()
|
||||||
{
|
{
|
||||||
return Arrays.<AggregatorFactory>asList(new LongSumAggregatorFactory(fieldName, fieldName));
|
return Arrays.<AggregatorFactory>asList(new LongSumAggregatorFactory(fieldName, fieldName));
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,7 +83,7 @@ public class MaxAggregatorFactory implements AggregatorFactory
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<AggregatorFactory> getBaseFactories()
|
public List<AggregatorFactory> getRequiredColumns()
|
||||||
{
|
{
|
||||||
return Arrays.<AggregatorFactory>asList(new MaxAggregatorFactory(fieldName, fieldName));
|
return Arrays.<AggregatorFactory>asList(new MaxAggregatorFactory(fieldName, fieldName));
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,7 +83,7 @@ public class MinAggregatorFactory implements AggregatorFactory
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<AggregatorFactory> getBaseFactories()
|
public List<AggregatorFactory> getRequiredColumns()
|
||||||
{
|
{
|
||||||
return Arrays.<AggregatorFactory>asList(new MinAggregatorFactory(fieldName, fieldName));
|
return Arrays.<AggregatorFactory>asList(new MinAggregatorFactory(fieldName, fieldName));
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,9 +66,9 @@ public class ToLowerCaseAggregatorFactory implements AggregatorFactory
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<AggregatorFactory> getBaseFactories()
|
public List<AggregatorFactory> getRequiredColumns()
|
||||||
{
|
{
|
||||||
return baseAggregatorFactory.getBaseFactories();
|
return baseAggregatorFactory.getRequiredColumns();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -147,7 +147,7 @@ public class CardinalityAggregatorFactory implements AggregatorFactory
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<AggregatorFactory> getBaseFactories()
|
public List<AggregatorFactory> getRequiredColumns()
|
||||||
{
|
{
|
||||||
return Lists.transform(
|
return Lists.transform(
|
||||||
fieldNames,
|
fieldNames,
|
||||||
|
|
|
@ -132,7 +132,7 @@ public class HyperUniquesAggregatorFactory implements AggregatorFactory
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<AggregatorFactory> getBaseFactories()
|
public List<AggregatorFactory> getRequiredColumns()
|
||||||
{
|
{
|
||||||
return Arrays.<AggregatorFactory>asList(new HyperUniquesAggregatorFactory(fieldName, fieldName));
|
return Arrays.<AggregatorFactory>asList(new HyperUniquesAggregatorFactory(fieldName, fieldName));
|
||||||
}
|
}
|
||||||
|
|
|
@ -111,7 +111,7 @@ public class GroupByQueryQueryToolChest extends QueryToolChest<Row, GroupByQuery
|
||||||
final Sequence<Row> subqueryResult = mergeGroupByResults(subquery, runner);
|
final Sequence<Row> subqueryResult = mergeGroupByResults(subquery, runner);
|
||||||
final List<AggregatorFactory> aggs = Lists.newArrayList();
|
final List<AggregatorFactory> aggs = Lists.newArrayList();
|
||||||
for (AggregatorFactory aggregatorFactory : query.getAggregatorSpecs()) {
|
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
|
// We need the inner incremental index to have all the columns required by the outer query
|
||||||
|
|
Loading…
Reference in New Issue