Module org.elasticsearch.compute
Class DenseVectorCountAggregatorFunction
java.lang.Object
org.elasticsearch.compute.aggregation.CountAggregatorFunction
org.elasticsearch.compute.aggregation.DenseVectorCountAggregatorFunction
- All Implemented Interfaces:
Closeable,AutoCloseable,AggregatorFunction,org.elasticsearch.core.Releasable
Specialized CountAggregatorFunction for dense_vectors. dense_vectors are represented as multivalued fields,
so we should only count 1 value for each dense_vector row instead of counting the number of values
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.compute.aggregation.CountAggregatorFunction
CountAggregatorFunction.CountAggregatorFunctionSupplier -
Method Summary
Modifier and TypeMethodDescriptionprotected 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 blockstatic AggregatorFunctionSuppliersupplier()Methods inherited from class org.elasticsearch.compute.aggregation.CountAggregatorFunction
addIntermediateInput, addRawInput, close, evaluateFinal, evaluateIntermediate, intermediateBlockCount, intermediateStateDesc, toString
-
Method Details
-
supplier
-
getBlockTotalValueCount
Description copied from class:CountAggregatorFunctionReturns the number of total values in a block- Overrides:
getBlockTotalValueCountin classCountAggregatorFunction- Parameters:
block- block to count values for- Returns:
- number of total values present in the block
-
getBlockValueCountAtPosition
Description copied from class:CountAggregatorFunctionReturns the number of values at a given position in a block- Overrides:
getBlockValueCountAtPositionin classCountAggregatorFunction- Parameters:
block- blockposition- position to get the number of values- Returns:
-