public class FilteredAggregation extends Aggregation
Constructor and Description |
---|
FilteredAggregation(String name,
Aggregation aggregation,
Filter filter)
Constructor.
|
FilteredAggregation(String name,
String fieldName,
Aggregation aggregation,
Filter filter)
Deprecated.
Filtered Aggregations do not have their own field name, they use the one from their aggregator
|
Modifier and Type | Method and Description |
---|---|
Aggregation |
getAggregation() |
Set<Dimension> |
getDependentDimensions()
Get the dimensions, if any, this metric depends on.
|
String |
getFieldName()
The field name for aggregation.
|
Filter |
getFilter() |
String |
getName()
Get the name of the metric field in the response.
|
String |
getType()
The Type name for the aggregation in the druid configuration.
|
boolean |
isFloatingPoint()
Indicate if the MetricField is a floating-point value.
|
boolean |
isSketch()
Indicate if the MetricField is based on a sketch.
|
org.apache.commons.lang3.tuple.Pair<Aggregation,Aggregation> |
nest()
Splits an Aggregation for 2-pass aggregation into an inner filtered aggregation & outer aggregation.
|
Aggregation |
withAggregation(Aggregation aggregation)
Creates a new Filtered Aggregation with the provided aggregation.
|
Aggregation |
withFieldName(String fieldName)
Creates a new Aggregation with the provided field name.
|
Aggregation |
withFilter(Filter filter)
Creates a new Filtered Aggregation with the provided filter.
|
Aggregation |
withName(String name)
Creates a new Aggregation with the provided name.
|
equals, hashCode, toString
public FilteredAggregation(@NotNull String name, Aggregation aggregation, Filter filter)
name
- Name of the filtered aggregatoraggregation
- Existing aggregator being filteredfilter
- filter to apply to that aggregator@Deprecated public FilteredAggregation(@NotNull String name, String fieldName, Aggregation aggregation, Filter filter)
name
- Name of the filtered aggregatorfieldName
- Field name to be considered to apply the metric filteraggregation
- Existing aggregator being filteredfilter
- filter to apply to that aggregatorpublic org.apache.commons.lang3.tuple.Pair<Aggregation,Aggregation> nest()
nest
in class Aggregation
public Set<Dimension> getDependentDimensions()
MetricField
getDependentDimensions
in interface MetricField
getDependentDimensions
in class Aggregation
public String getFieldName()
Aggregation
getFieldName
in class Aggregation
public String getName()
MetricField
getName
in interface MetricField
getName
in class Aggregation
public Aggregation getAggregation()
public Filter getFilter()
public String getType()
Aggregation
getType
in class Aggregation
public Aggregation withFieldName(String fieldName)
Aggregation
withFieldName
in class Aggregation
fieldName
- Field name for the new aggregationpublic Aggregation withName(String name)
Aggregation
withName
in class Aggregation
name
- Name for the new aggregationpublic Aggregation withFilter(Filter filter)
filter
- metricFilter Filter objectpublic Aggregation withAggregation(Aggregation aggregation)
aggregation
- aggregation of the logical metricpublic boolean isSketch()
MetricField
isSketch
in interface MetricField
isSketch
in class Aggregation
public boolean isFloatingPoint()
MetricField
isFloatingPoint
in interface MetricField
isFloatingPoint
in class Aggregation
Copyright © 2016–2018 Yahoo! Inc.. All rights reserved.