public class DruidSqlAggregationConverter extends Object implements BiFunction<Aggregation,ApiToFieldMapper,Optional<SqlAggregation>>
Aggregation to a SqlAggregation.| Constructor and Description |
|---|
DruidSqlAggregationConverter()
Constructors a map from druid to sql aggregations using
getDefaultDruidToSqlAggregation(). |
DruidSqlAggregationConverter(Map<String,SqlAggregationType> druidToSqlAggregation)
Use the given map for converting from druid to sql aggregations.
|
| Modifier and Type | Method and Description |
|---|---|
Optional<SqlAggregation> |
apply(Aggregation aggregation,
ApiToFieldMapper apiToFieldMapper)
Finds the corresponding
SqlAggregation from a druid aggregation. |
static Map<String,SqlAggregationType> |
getDefaultDruidToSqlAggregation()
The default mapping from druid to sql aggregations defined by
DefaultSqlAggregationType. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitandThenpublic DruidSqlAggregationConverter()
getDefaultDruidToSqlAggregation().public DruidSqlAggregationConverter(Map<String,SqlAggregationType> druidToSqlAggregation)
druidToSqlAggregation - The mapping from Druid aggregation name to Sql aggregation type.public static Map<String,SqlAggregationType> getDefaultDruidToSqlAggregation()
DefaultSqlAggregationType.public Optional<SqlAggregation> apply(Aggregation aggregation, ApiToFieldMapper apiToFieldMapper)
SqlAggregation from a druid aggregation.apply in interface BiFunction<Aggregation,ApiToFieldMapper,Optional<SqlAggregation>>aggregation - The druid aggregation, i.e.
LongSumAggregation.apiToFieldMapper - the mapping from api name to field name of the aggregation.Copyright © 2016–2018 Yahoo! Inc.. All rights reserved.