public class ArithmeticPostAggregator extends Object implements PostAggregator
| Modifier and Type | Class and Description |
|---|---|
static class |
ArithmeticPostAggregator.Ordering |
| Modifier and Type | Field and Description |
|---|---|
static Comparator |
DEFAULT_COMPARATOR |
| Constructor and Description |
|---|
ArithmeticPostAggregator(String name,
String fnName,
List<PostAggregator> fields) |
ArithmeticPostAggregator(String name,
String fnName,
List<PostAggregator> fields,
String ordering) |
| Modifier and Type | Method and Description |
|---|---|
Object |
compute(Map<String,Object> values) |
ArithmeticPostAggregator |
decorate(Map<String,AggregatorFactory> aggregators)
Allows returning an enriched post aggregator, built from contextual information available from the given map of
AggregatorFactory keyed by their names. |
boolean |
equals(Object o) |
byte[] |
getCacheKey() |
Comparator |
getComparator() |
Set<String> |
getDependentFields() |
List<PostAggregator> |
getFields() |
String |
getFnName() |
String |
getName() |
String |
getOrdering() |
ValueType |
getType()
Return the output type of a row processed with this post aggregator.
|
int |
hashCode() |
String |
toString() |
public static final Comparator DEFAULT_COMPARATOR
public ArithmeticPostAggregator(String name, String fnName, List<PostAggregator> fields)
public Set<String> getDependentFields()
getDependentFields in interface PostAggregatorpublic Comparator getComparator()
getComparator in interface PostAggregatorpublic Object compute(Map<String,Object> values)
compute in interface PostAggregatorpublic String getName()
getName in interface PostAggregatorpublic ValueType getType()
PostAggregatorValueType javadocs
for details on the implications of choosing a type.getType in interface PostAggregatorpublic ArithmeticPostAggregator decorate(Map<String,AggregatorFactory> aggregators)
PostAggregatorAggregatorFactory keyed by their names. Callers must call this method before calling PostAggregator.compute(java.util.Map<java.lang.String, java.lang.Object>) or
PostAggregator.getComparator(). This is typically done in the constructor of queries which support post aggregators, via
Queries.prepareAggregations(java.util.List<org.apache.druid.query.aggregation.AggregatorFactory>, java.util.List<org.apache.druid.query.aggregation.PostAggregator>).decorate in interface PostAggregatorpublic byte[] getCacheKey()
getCacheKey in interface Cacheablepublic String getFnName()
public String getOrdering()
public List<PostAggregator> getFields()
Copyright © 2011–2021 The Apache Software Foundation. All rights reserved.