Module org.elasticsearch.compute
Class OrdinalsGroupingOperator
java.lang.Object
org.elasticsearch.compute.operator.OrdinalsGroupingOperator
- All Implemented Interfaces:
Closeable,AutoCloseable,Operator,org.elasticsearch.core.Releasable
Unlike
HashAggregationOperator, this hash operator also extracts values or ordinals of the input documents.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordNested classes/interfaces inherited from interface org.elasticsearch.compute.operator.Operator
Operator.OperatorFactory, Operator.Status -
Field Summary
Fields inherited from interface org.elasticsearch.compute.operator.Operator
MIN_TARGET_PAGE_SIZE, NOT_BLOCKED, TARGET_PAGE_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionOrdinalsGroupingOperator(IntFunction<BlockLoader> blockLoaders, List<ValuesSourceReaderOperator.ShardContext> shardContexts, ElementType groupingElementType, int docChannel, String groupingField, List<GroupingAggregator.Factory> aggregatorFactories, int maxPageSize, DriverContext driverContext) -
Method Summary
Modifier and TypeMethodDescriptionvoidadds an input page to the operator.voidclose()notifies the operator that it won't be used anymore (i.e.voidfinish()notifies the operator that it won't receive any more input pagesreturns non-null if output page available.booleanwhether the operator has finished processing all input pages and made the corresponding output pages availablebooleanwhether the given operator can accept more input pagestoString()
-
Constructor Details
-
OrdinalsGroupingOperator
public OrdinalsGroupingOperator(IntFunction<BlockLoader> blockLoaders, List<ValuesSourceReaderOperator.ShardContext> shardContexts, ElementType groupingElementType, int docChannel, String groupingField, List<GroupingAggregator.Factory> aggregatorFactories, int maxPageSize, DriverContext driverContext)
-
-
Method Details
-
needsInput
public boolean needsInput()Description copied from interface:Operatorwhether the given operator can accept more input pages- Specified by:
needsInputin interfaceOperator
-
addInput
Description copied from interface:Operatoradds an input page to the operator. only called when needsInput() == true and isFinished() == false -
getOutput
Description copied from interface:Operatorreturns non-null if output page available. Only called when isFinished() == false -
finish
public void finish()Description copied from interface:Operatornotifies the operator that it won't receive any more input pages -
isFinished
public boolean isFinished()Description copied from interface:Operatorwhether the operator has finished processing all input pages and made the corresponding output pages available- Specified by:
isFinishedin interfaceOperator
-
close
public void close()Description copied from interface:Operatornotifies the operator that it won't be used anymore (i.e. none of the other methods called), and its resources can be cleaned up -
toString
-