Module org.elasticsearch.compute
Class CountAggregatorFunction
java.lang.Object
org.elasticsearch.compute.aggregation.CountAggregatorFunction
- All Implemented Interfaces:
Closeable,AutoCloseable,AggregatorFunction,org.elasticsearch.core.Releasable
- Direct Known Subclasses:
DenseVectorCountAggregatorFunction
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class -
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).protected intgetBlockTotalValueCount(Block block) Returns the number of total values in a blockprotected intgetBlockValueCountAtPosition(Block block, int position) Returns the number of values at a given position in a blockintThe number of blocks used by intermediate state.static List<IntermediateStateDesc> static AggregatorFunctionSuppliersupplier()toString()
-
Method Details
-
intermediateStateDesc
-
intermediateBlockCount
public int intermediateBlockCount()Description copied from interface:AggregatorFunctionThe number of blocks used by intermediate state.- Specified by:
intermediateBlockCountin interfaceAggregatorFunction
-
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.
-
getBlockTotalValueCount
Returns the number of total values in a block- Parameters:
block- block to count values for- Returns:
- number of total values present in the block
-
getBlockValueCountAtPosition
Returns the number of values at a given position in a block- Parameters:
block- blockposition- position to get the number of values- Returns:
-
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
-
toString
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceorg.elasticsearch.core.Releasable
-
supplier
-