public class ExpressionPostAggregator extends Object implements PostAggregator
| Modifier and Type | Class and Description |
|---|---|
static class |
ExpressionPostAggregator.Ordering |
| Constructor and Description |
|---|
ExpressionPostAggregator(String name,
String expression,
String ordering,
ExprMacroTable macroTable)
Constructor for serialization.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
compute(Map<String,Object> values) |
ExpressionPostAggregator |
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() |
String |
getExpression() |
String |
getName() |
String |
getOrdering() |
ColumnType |
getType(ColumnInspector signature)
Return the output type of a row processed with this post aggregator.
|
int |
hashCode() |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetTypepublic ExpressionPostAggregator(String name, String expression, @Nullable String ordering, ExprMacroTable macroTable)
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 ColumnType getType(ColumnInspector signature)
PostAggregatorColumnType javadocs
for details on the implications of choosing a type.getType in interface PostAggregatorpublic ExpressionPostAggregator 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 String getExpression()
public byte[] getCacheKey()
getCacheKey in interface CacheableCopyright © 2011–2022 The Apache Software Foundation. All rights reserved.