Package org.apache.druid.query.topn
Class TimeExtractionTopNAlgorithm
java.lang.Object
org.apache.druid.query.topn.BaseTopNAlgorithm<int[],Map<Object,Aggregator[]>,TopNParams>
org.apache.druid.query.topn.TimeExtractionTopNAlgorithm
- All Implemented Interfaces:
TopNAlgorithm<int[],TopNParams>
public class TimeExtractionTopNAlgorithm
extends BaseTopNAlgorithm<int[],Map<Object,Aggregator[]>,TopNParams>
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.druid.query.topn.BaseTopNAlgorithm
BaseTopNAlgorithm.AggregatorArrayProvider, BaseTopNAlgorithm.BaseArrayProvider<T> -
Field Summary
Fields inherited from class org.apache.druid.query.topn.BaseTopNAlgorithm
cursorInspectorFields inherited from interface org.apache.druid.query.topn.TopNAlgorithm
EMPTY_ARRAY, INIT_POSITION_VALUE, SKIP_POSITION_VALUE -
Constructor Summary
ConstructorsConstructorDescriptionTimeExtractionTopNAlgorithm(TopNQuery query, TopNCursorInspector cursorInspector) -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanup(TopNParams params) protected Map<Object,Aggregator[]> makeDimValAggregateStore(TopNParams params) protected int[]makeDimValSelector(TopNParams params, int numProcessed, int numToProcess) makeInitParams(ColumnSelectorPlus selectorPlus, Cursor cursor, CursorGranularizer granularizer) protected voidresetAggregators(Map<Object, Aggregator[]> stringMap) protected longscanAndAggregate(TopNParams params, int[] dimValSelector, Map<Object, Aggregator[]> aggregatesStore) Returns the number of processed rows (i.protected int[]updateDimValSelector(int[] dimValSelector, int numProcessed, int numToProcess) protected voidupdateResults(TopNParams params, int[] dimValSelector, Map<Object, Aggregator[]> aggregatesStore, TopNResultBuilder resultBuilder) Methods inherited from class org.apache.druid.query.topn.BaseTopNAlgorithm
computeNewLength, makeAggregators, makeBufferAggregators, makeResultBuilder, run
-
Constructor Details
-
TimeExtractionTopNAlgorithm
-
-
Method Details
-
makeInitParams
public TopNParams makeInitParams(ColumnSelectorPlus selectorPlus, Cursor cursor, CursorGranularizer granularizer) -
makeDimValSelector
- Specified by:
makeDimValSelectorin classBaseTopNAlgorithm<int[],Map<Object, Aggregator[]>, TopNParams>
-
updateDimValSelector
protected int[] updateDimValSelector(int[] dimValSelector, int numProcessed, int numToProcess) - Specified by:
updateDimValSelectorin classBaseTopNAlgorithm<int[],Map<Object, Aggregator[]>, TopNParams>
-
makeDimValAggregateStore
- Specified by:
makeDimValAggregateStorein classBaseTopNAlgorithm<int[],Map<Object, Aggregator[]>, TopNParams>
-
scanAndAggregate
protected long scanAndAggregate(TopNParams params, int[] dimValSelector, Map<Object, Aggregator[]> aggregatesStore) Description copied from class:BaseTopNAlgorithmReturns the number of processed rows (i. e. after postFilters are applied inside the cursor being processed).- Specified by:
scanAndAggregatein classBaseTopNAlgorithm<int[],Map<Object, Aggregator[]>, TopNParams>
-
updateResults
protected void updateResults(TopNParams params, int[] dimValSelector, Map<Object, Aggregator[]> aggregatesStore, TopNResultBuilder resultBuilder) - Specified by:
updateResultsin classBaseTopNAlgorithm<int[],Map<Object, Aggregator[]>, TopNParams>
-
resetAggregators
- Specified by:
resetAggregatorsin classBaseTopNAlgorithm<int[],Map<Object, Aggregator[]>, TopNParams>
-
cleanup
-