Module org.elasticsearch.compute
Class DenseVectorCountApproximateAggregatorFunction
java.lang.Object
org.elasticsearch.compute.aggregation.CountApproximateAggregatorFunction
org.elasticsearch.compute.aggregation.DenseVectorCountApproximateAggregatorFunction
- All Implemented Interfaces:
Closeable,AutoCloseable,AggregatorFunction,org.elasticsearch.core.Releasable
public class DenseVectorCountApproximateAggregatorFunction
extends CountApproximateAggregatorFunction
Specialized
CountApproximateAggregatorFunction 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 dimensions.-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.compute.aggregation.CountApproximateAggregatorFunction
CountApproximateAggregatorFunction.CountApproximateAggregatorFunctionSupplier -
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.CountApproximateAggregatorFunction
addIntermediateInput, addRawInput, close, evaluateFinal, evaluateIntermediate, intermediateBlockCount, intermediateStateDesc, toString
-
Method Details
-
supplier
-
getBlockTotalValueCount
Description copied from class:CountApproximateAggregatorFunctionReturns the number of total values in a block- Overrides:
getBlockTotalValueCountin classCountApproximateAggregatorFunction- Parameters:
block- block to count values for- Returns:
- number of total values present in the block
-
getBlockValueCountAtPosition
Description copied from class:CountApproximateAggregatorFunctionReturns the number of values at a given position in a block- Overrides:
getBlockValueCountAtPositionin classCountApproximateAggregatorFunction- Parameters:
block- blockposition- position to get the number of values- Returns:
-