Module org.elasticsearch.compute
Class RateDoubleGroupingAggregatorFunction
java.lang.Object
org.elasticsearch.compute.aggregation.RateDoubleGroupingAggregatorFunction
- All Implemented Interfaces:
Closeable,AutoCloseable,GroupingAggregatorFunction,org.elasticsearch.core.Releasable
public final class RateDoubleGroupingAggregatorFunction
extends Object
implements GroupingAggregatorFunction
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classNested classes/interfaces inherited from interface org.elasticsearch.compute.aggregation.GroupingAggregatorFunction
GroupingAggregatorFunction.AddInput -
Constructor Summary
ConstructorsConstructorDescriptionRateDoubleGroupingAggregatorFunction(List<Integer> channels, DriverContext driverContext, boolean isRateOverTime) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddIntermediateInput(int positionOffset, IntArrayBlock groups, Page page) voidaddIntermediateInput(int positionOffset, IntBigArrayBlock groups, Page page) voidaddIntermediateInput(int positionOffset, IntVector groups, Page page) voidclose()voidevaluateFinal(Block[] blocks, int offset, IntVector selected, GroupingAggregatorEvaluationContext evalContext) Build the final results for this aggregation.voidevaluateIntermediate(Block[] blocks, int offset, IntVector selected) Build the intermediate results for this aggregation.intThe number of blocks used by intermediate state.prepareProcessRawInputPage(SeenGroupIds seenGroupIds, Page page) Prepare to process a single page of raw input.voidselectedMayContainUnseenGroups(SeenGroupIds seenGroupIds) Call this to signal to the aggregation that theselectedparameter that's passed toGroupingAggregatorFunction.evaluateIntermediate(org.elasticsearch.compute.data.Block[], int, org.elasticsearch.compute.data.IntVector)orGroupingAggregatorFunction.evaluateFinal(org.elasticsearch.compute.data.Block[], int, org.elasticsearch.compute.data.IntVector, org.elasticsearch.compute.aggregation.GroupingAggregatorEvaluationContext)may reference groups that haven't been seen.toString()
-
Constructor Details
-
RateDoubleGroupingAggregatorFunction
public RateDoubleGroupingAggregatorFunction(List<Integer> channels, DriverContext driverContext, boolean isRateOverTime)
-
-
Method Details
-
selectedMayContainUnseenGroups
Description copied from interface:GroupingAggregatorFunctionCall this to signal to the aggregation that theselectedparameter that's passed toGroupingAggregatorFunction.evaluateIntermediate(org.elasticsearch.compute.data.Block[], int, org.elasticsearch.compute.data.IntVector)orGroupingAggregatorFunction.evaluateFinal(org.elasticsearch.compute.data.Block[], int, org.elasticsearch.compute.data.IntVector, org.elasticsearch.compute.aggregation.GroupingAggregatorEvaluationContext)may reference groups that haven't been seen. This puts the underlying storage into a mode where it'll track which group ids have been seen, even if that increases the overhead.- Specified by:
selectedMayContainUnseenGroupsin interfaceGroupingAggregatorFunction
-
prepareProcessRawInputPage
public GroupingAggregatorFunction.AddInput prepareProcessRawInputPage(SeenGroupIds seenGroupIds, Page page) Description copied from interface:GroupingAggregatorFunctionPrepare to process a single page of raw input.This should load the input
Blocks and check their types and select an optimal path and return that path as anGroupingAggregatorFunction.AddInput.- Specified by:
prepareProcessRawInputPagein interfaceGroupingAggregatorFunction
-
intermediateBlockCount
public int intermediateBlockCount()Description copied from interface:GroupingAggregatorFunctionThe number of blocks used by intermediate state.- Specified by:
intermediateBlockCountin interfaceGroupingAggregatorFunction
-
addIntermediateInput
Description copied from interface:GroupingAggregatorFunctionAdd data produced byGroupingAggregatorFunction.evaluateIntermediate(org.elasticsearch.compute.data.Block[], int, org.elasticsearch.compute.data.IntVector).- Specified by:
addIntermediateInputin interfaceGroupingAggregatorFunction
-
addIntermediateInput
Description copied from interface:GroupingAggregatorFunctionAdd data produced byGroupingAggregatorFunction.evaluateIntermediate(org.elasticsearch.compute.data.Block[], int, org.elasticsearch.compute.data.IntVector).- Specified by:
addIntermediateInputin interfaceGroupingAggregatorFunction
-
addIntermediateInput
Description copied from interface:GroupingAggregatorFunctionAdd data produced byGroupingAggregatorFunction.evaluateIntermediate(org.elasticsearch.compute.data.Block[], int, org.elasticsearch.compute.data.IntVector).- Specified by:
addIntermediateInputin interfaceGroupingAggregatorFunction
-
evaluateIntermediate
Description copied from interface:GroupingAggregatorFunctionBuild the intermediate results for this aggregation.- Specified by:
evaluateIntermediatein interfaceGroupingAggregatorFunction- Parameters:
selected- the groupIds that have been selected to be included in the results. Always ascending.
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceorg.elasticsearch.core.Releasable
-
evaluateFinal
public void evaluateFinal(Block[] blocks, int offset, IntVector selected, GroupingAggregatorEvaluationContext evalContext) Description copied from interface:GroupingAggregatorFunctionBuild the final results for this aggregation.- Specified by:
evaluateFinalin interfaceGroupingAggregatorFunction- Parameters:
selected- the groupIds that have been selected to be included in the results. Always ascending.This function is called in the coordinator node after all intermediate results have been gathered from the worker nodes, and aggregated into intermediate blocks.
-
toString
-