public class StringTopNColumnSelectorStrategy extends Object implements TopNColumnSelectorStrategy<DimensionSelector,Map<String,Aggregator[]>>
CARDINALITY_UNKNOWN| Constructor and Description |
|---|
StringTopNColumnSelectorStrategy() |
| Modifier and Type | Method and Description |
|---|---|
long |
dimExtractionScanAndAggregate(TopNQuery query,
DimensionSelector selector,
Cursor cursor,
Aggregator[][] rowSelector,
Map<String,Aggregator[]> aggregatesStore)
Used by DimExtractionTopNAlgorithm.
|
int |
getCardinality(DimensionSelector selector) |
Aggregator[][] |
getDimExtractionRowSelector(TopNQuery query,
TopNParams params,
Capabilities capabilities)
Used by DimExtractionTopNAlgorithm.
|
ValueType |
getValueType() |
Map<String,Aggregator[]> |
makeDimExtractionAggregateStore()
Used by DimExtractionTopNAlgorithm.
|
void |
updateDimExtractionResults(Map<String,Aggregator[]> aggregatesStore,
com.google.common.base.Function<Object,Object> valueTransformer,
TopNResultBuilder resultBuilder)
Used by DimExtractionTopNAlgorithm.
|
public int getCardinality(DimensionSelector selector)
getCardinality in interface TopNColumnSelectorStrategy<DimensionSelector,Map<String,Aggregator[]>>public ValueType getValueType()
getValueType in interface TopNColumnSelectorStrategy<DimensionSelector,Map<String,Aggregator[]>>public Aggregator[][] getDimExtractionRowSelector(TopNQuery query, TopNParams params, Capabilities capabilities)
TopNColumnSelectorStrategygetDimExtractionRowSelector in interface TopNColumnSelectorStrategy<DimensionSelector,Map<String,Aggregator[]>>query - The TopN query being servedparams - Parameters for the TopN query being servedcapabilities - Object indicating if dimension values are sortedpublic Map<String,Aggregator[]> makeDimExtractionAggregateStore()
TopNColumnSelectorStrategymakeDimExtractionAggregateStore in interface TopNColumnSelectorStrategy<DimensionSelector,Map<String,Aggregator[]>>public long dimExtractionScanAndAggregate(TopNQuery query, DimensionSelector selector, Cursor cursor, Aggregator[][] rowSelector, Map<String,Aggregator[]> aggregatesStore)
TopNColumnSelectorStrategydimExtractionScanAndAggregate in interface TopNColumnSelectorStrategy<DimensionSelector,Map<String,Aggregator[]>>query - The TopN query being served.selector - Dimension value selectorcursor - Cursor for the segment being queriedrowSelector - Integer lookup containing aggregatorsaggregatesStore - Map containing aggregatorspublic void updateDimExtractionResults(Map<String,Aggregator[]> aggregatesStore, com.google.common.base.Function<Object,Object> valueTransformer, TopNResultBuilder resultBuilder)
TopNColumnSelectorStrategyupdateDimExtractionResults in interface TopNColumnSelectorStrategy<DimensionSelector,Map<String,Aggregator[]>>aggregatesStore - Map created by makeDimExtractionAggregateStore()valueTransformer - Converts keys to different types, if null no conversion is neededresultBuilder - TopN result builderCopyright © 2011–2018. All rights reserved.