public class CardinalityAggregation extends Aggregation
Cardinality aggregators target dimension columns and not metric columns in their underlying data source, counting either dimension cardinality sums, or sums of dimension tuples
Does not support DimensionSpecs, only accept Strings as fieldNames
| Constructor and Description |
|---|
CardinalityAggregation(String name,
Set<Dimension> dimensions,
boolean byRow)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
Set<Dimension> |
getDependentDimensions()
Get the dimensions, if any, this metric depends on.
|
String |
getFieldName()
Field name is not part of the Cardinality aggregation model in druid.
|
String |
getType()
The Type name for the aggregation in the druid configuration.
|
int |
hashCode() |
boolean |
isByRow() |
org.apache.commons.lang3.tuple.Pair<Aggregation,Aggregation> |
nest()
Cardinality aggregators cannot be safely nested due to correctness constraints which Bard does not currently
support.
|
CardinalityAggregation |
withByRow(boolean byRow)
Build a copy with a given byRow values.
|
CardinalityAggregation |
withDimensions(Set<Dimension> dimensions)
Build a copy with a modified base set of dimensions.
|
CardinalityAggregation |
withFieldName(String fieldName)
Field name copy constructor is unsupported because cardinality metrics are built using dimensions backed by
dimension druid names.
|
CardinalityAggregation |
withName(String name)
Creates a new Aggregation with the provided name.
|
getName, isFloatingPoint, isSketch, toStringpublic boolean isByRow()
public String getFieldName()
getFieldName in class Aggregationpublic String getType()
AggregationgetType in class Aggregationpublic Set<Dimension> getDependentDimensions()
MetricFieldgetDependentDimensions in interface MetricFieldgetDependentDimensions in class Aggregationpublic CardinalityAggregation withName(String name)
AggregationwithName in class Aggregationname - Name for the new aggregationpublic CardinalityAggregation withFieldName(String fieldName)
withFieldName in class AggregationfieldName - Field name for the new aggregationpublic CardinalityAggregation withDimensions(Set<Dimension> dimensions)
dimensions - The dimensions for the new Cardinality Aggregationpublic CardinalityAggregation withByRow(boolean byRow)
byRow - The by row value to change topublic org.apache.commons.lang3.tuple.Pair<Aggregation,Aggregation> nest()
nest in class Aggregationpublic boolean equals(Object o)
equals in class Aggregationpublic int hashCode()
hashCode in class AggregationCopyright © 2016–2018 Yahoo! Inc.. All rights reserved.