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, toString
public boolean isByRow()
public String getFieldName()
getFieldName
in class Aggregation
public String getType()
Aggregation
getType
in class Aggregation
public Set<Dimension> getDependentDimensions()
MetricField
getDependentDimensions
in interface MetricField
getDependentDimensions
in class Aggregation
public CardinalityAggregation withName(String name)
Aggregation
withName
in class Aggregation
name
- Name for the new aggregationpublic CardinalityAggregation withFieldName(String fieldName)
withFieldName
in class Aggregation
fieldName
- 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 Aggregation
public boolean equals(Object o)
equals
in class Aggregation
public int hashCode()
hashCode
in class Aggregation
Copyright © 2016–2018 Yahoo! Inc.. All rights reserved.