Module org.elasticsearch.compute
Class FromPartialAggregatorFunction
java.lang.Object
org.elasticsearch.compute.aggregation.FromPartialAggregatorFunction
- All Implemented Interfaces:
Closeable,AutoCloseable,AggregatorFunction,org.elasticsearch.core.Releasable
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionFromPartialAggregatorFunction(DriverContext driverContext, GroupingAggregatorFunction groupingAggregator, int inputChannel) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddIntermediateInput(Page page) Add a pre-aggregated page worth of "intermediate" input.voidaddRawInput(Page page, BooleanVector mask) Add a page worth of data to the aggregation.voidclose()voidevaluateFinal(Block[] blocks, int offset, DriverContext driverContext) Build the final results from running this agg.voidevaluateIntermediate(Block[] blocks, int offset, DriverContext driverContext) Build pre-aggregated "intermediate" data to pass to theAggregatorFunction.addIntermediateInput(org.elasticsearch.compute.data.Page).intThe number of blocks used by intermediate state.static List<IntermediateStateDesc> toString()
-
Constructor Details
-
FromPartialAggregatorFunction
public FromPartialAggregatorFunction(DriverContext driverContext, GroupingAggregatorFunction groupingAggregator, int inputChannel)
-
-
Method Details
-
intermediateStateDesc
-
addRawInput
Description copied from interface:AggregatorFunctionAdd a page worth of data to the aggregation.- Specified by:
addRawInputin interfaceAggregatorFunction- Parameters:
mask- a mask to apply to the positions. If the position isfalsethen the aggregation should skip it.
-
addIntermediateInput
Description copied from interface:AggregatorFunctionAdd a pre-aggregated page worth of "intermediate" input. This intermediate input will have been created by callingAggregatorFunction.evaluateIntermediate(org.elasticsearch.compute.data.Block[], int, org.elasticsearch.compute.operator.DriverContext)on this agg, though likely in a differentDriverand maybe on a different physical node.- Specified by:
addIntermediateInputin interfaceAggregatorFunction
-
evaluateIntermediate
Description copied from interface:AggregatorFunctionBuild pre-aggregated "intermediate" data to pass to theAggregatorFunction.addIntermediateInput(org.elasticsearch.compute.data.Page).- Specified by:
evaluateIntermediatein interfaceAggregatorFunction- Parameters:
blocks- write the output into this arrayoffset- write the firstBlockat this offset inblocks
-
evaluateFinal
Description copied from interface:AggregatorFunctionBuild the final results from running this agg.- Specified by:
evaluateFinalin interfaceAggregatorFunction- Parameters:
blocks- write the output into this arrayoffset- write the firstBlockat this offset inblocks
-
intermediateBlockCount
public int intermediateBlockCount()Description copied from interface:AggregatorFunctionThe number of blocks used by intermediate state.- Specified by:
intermediateBlockCountin interfaceAggregatorFunction
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceorg.elasticsearch.core.Releasable
-
toString
-