public class HeapBasedTopNAlgorithm extends BaseTopNAlgorithm<Aggregator[][],TopNColumnAggregatesProcessor,TopNParams>
BaseTopNAlgorithm.AggregatorArrayProvider, BaseTopNAlgorithm.BaseArrayProvider<T>storageAdapterEMPTY_ARRAY, INIT_POSITION_VALUE, SKIP_POSITION_VALUE| Constructor and Description |
|---|
HeapBasedTopNAlgorithm(StorageAdapter storageAdapter,
TopNQuery query) |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanup(TopNParams params) |
protected void |
closeAggregators(TopNColumnAggregatesProcessor processor) |
protected TopNColumnAggregatesProcessor |
makeDimValAggregateStore(TopNParams params) |
protected Aggregator[][] |
makeDimValSelector(TopNParams params,
int numProcessed,
int numToProcess) |
TopNParams |
makeInitParams(ColumnSelectorPlus<TopNColumnAggregatesProcessor> selectorPlus,
Cursor cursor) |
protected long |
scanAndAggregate(TopNParams params,
Aggregator[][] rowSelector,
TopNColumnAggregatesProcessor processor)
Returns the number of processed rows (i.
|
protected Aggregator[][] |
updateDimValSelector(Aggregator[][] aggregators,
int numProcessed,
int numToProcess) |
protected void |
updateResults(TopNParams params,
Aggregator[][] aggregators,
TopNColumnAggregatesProcessor processor,
TopNResultBuilder resultBuilder) |
computeNewLength, makeAggregators, makeBufferAggregators, makeResultBuilder, runpublic HeapBasedTopNAlgorithm(StorageAdapter storageAdapter, TopNQuery query)
public TopNParams makeInitParams(ColumnSelectorPlus<TopNColumnAggregatesProcessor> selectorPlus, Cursor cursor)
protected Aggregator[][] makeDimValSelector(TopNParams params, int numProcessed, int numToProcess)
makeDimValSelector in class BaseTopNAlgorithm<Aggregator[][],TopNColumnAggregatesProcessor,TopNParams>protected Aggregator[][] updateDimValSelector(Aggregator[][] aggregators, int numProcessed, int numToProcess)
updateDimValSelector in class BaseTopNAlgorithm<Aggregator[][],TopNColumnAggregatesProcessor,TopNParams>protected TopNColumnAggregatesProcessor makeDimValAggregateStore(TopNParams params)
makeDimValAggregateStore in class BaseTopNAlgorithm<Aggregator[][],TopNColumnAggregatesProcessor,TopNParams>protected long scanAndAggregate(TopNParams params, Aggregator[][] rowSelector, TopNColumnAggregatesProcessor processor)
BaseTopNAlgorithmscanAndAggregate in class BaseTopNAlgorithm<Aggregator[][],TopNColumnAggregatesProcessor,TopNParams>protected void updateResults(TopNParams params, Aggregator[][] aggregators, TopNColumnAggregatesProcessor processor, TopNResultBuilder resultBuilder)
updateResults in class BaseTopNAlgorithm<Aggregator[][],TopNColumnAggregatesProcessor,TopNParams>protected void closeAggregators(TopNColumnAggregatesProcessor processor)
closeAggregators in class BaseTopNAlgorithm<Aggregator[][],TopNColumnAggregatesProcessor,TopNParams>public void cleanup(TopNParams params)
Copyright © 2011–2020 The Apache Software Foundation. All rights reserved.