public class ArithmeticMaker extends MetricMaker
metrics, NO_OP_MAP_PROVIDER, NO_OP_MAPPER| Constructor and Description |
|---|
ArithmeticMaker(MetricDictionary metricDictionary,
ArithmeticPostAggregation.ArithmeticPostAggregationFunction function)
Build an ArithmeticMaker with SketchRoundUpMapper as the ResultSetMapper for building the LogicalMetric.
|
ArithmeticMaker(MetricDictionary metricDictionary,
ArithmeticPostAggregation.ArithmeticPostAggregationFunction function,
ColumnMapper resultSetMapper)
Deprecated.
to override default mapping, use the Function constructor
|
ArithmeticMaker(MetricDictionary metricDictionary,
ArithmeticPostAggregation.ArithmeticPostAggregationFunction function,
Function<String,ResultSetMapper> resultSetMapperSupplier)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
assertRequiredDependentMetricCount(String dictionaryName,
List<String> dependentMetrics)
Unlike most other metrics, Arithmetic metrics require at least DEPENDENT_METRICS_REQUIRED dependent metrics,
rather than exactly DEPENDENT_METRICS_REQUIRED.
|
protected int |
getDependentMetricsRequired()
Get the number of dependent metrics the maker requires for making the metric.
|
protected LogicalMetric |
makeInner(LogicalMetricInfo logicalMetricInfo,
List<String> dependentMetrics)
Delegated to for actually making the metric.
|
assertDependentMetricsExist, getDependentQuery, getMergedQuery, getNumericField, getNumericField, getSketchField, getSketchField, make, make, make, makeInnerpublic ArithmeticMaker(MetricDictionary metricDictionary, ArithmeticPostAggregation.ArithmeticPostAggregationFunction function, Function<String,ResultSetMapper> resultSetMapperSupplier)
metricDictionary - The dictionary used to resolve dependent metrics when building the LogicalMetricfunction - The arithmetic operation performed by the LogicalMetrics constructed by this makerresultSetMapperSupplier - A function that takes a metric column name and produces at build time, a result
set mapper.@Deprecated public ArithmeticMaker(MetricDictionary metricDictionary, ArithmeticPostAggregation.ArithmeticPostAggregationFunction function, ColumnMapper resultSetMapper)
metricDictionary - The dictionary used to resolve dependent metrics when building the LogicalMetricfunction - The arithmetic operation performed by the LogicalMetrics constructed by this makerresultSetMapper - The mapping function to be applied to the result that is returned by the query that is
built from the LogicalMetric which is built by this maker.public ArithmeticMaker(MetricDictionary metricDictionary, ArithmeticPostAggregation.ArithmeticPostAggregationFunction function)
metricDictionary - The dictionary used to resolve dependent metrics when building the LogicalMetricfunction - The arithmetic operation performed by the LogicalMetrics constructed by this makerprotected LogicalMetric makeInner(LogicalMetricInfo logicalMetricInfo, List<String> dependentMetrics)
MetricMakermakeInner in class MetricMakerlogicalMetricInfo - Logical metric info providerdependentMetrics - Metrics this metric depends onprotected int getDependentMetricsRequired()
MetricMakergetDependentMetricsRequired in class MetricMakerprotected void assertRequiredDependentMetricCount(String dictionaryName, List<String> dependentMetrics)
assertRequiredDependentMetricCount in class MetricMakerdictionaryName - Name of the metric being madedependentMetrics - List of dependent metrics needed to make the metricCopyright © 2016–2018 Yahoo! Inc.. All rights reserved.