Module org.elasticsearch.compute
Class AbstractPageMappingOperator
java.lang.Object
org.elasticsearch.compute.operator.AbstractPageMappingOperator
- All Implemented Interfaces:
Closeable,AutoCloseable,Operator,org.elasticsearch.core.Releasable
- Direct Known Subclasses:
ColumnExtractOperator,DistinctByOperator,EvalOperator,FilterOperator,ProjectOperator,RrfScoreEvalOperator,ScoreOperator,StringExtractOperator
Abstract superclass for operators that accept a single page, modify it, and then return it.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.elasticsearch.compute.operator.Operator
Operator.OperatorFactory -
Field Summary
Fields inherited from interface org.elasticsearch.compute.operator.Operator
MIN_TARGET_PAGE_SIZE, NOT_BLOCKED, TARGET_PAGE_SIZE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidadds an input page to the operator.booleanReturns true if the operator can produce more output pages without requiring additional input pages.voidclose()notifies the operator that it won't be used anymore (i.e.final voidfinish()notifies the operator that it won't receive any more input pagesfinal Pagereturns non-null if output page available.final booleanwhether the operator has finished processing all input pages and made the corresponding output pages availablefinal booleanwhether the given operator can accept more input pagesprotected abstract Pagestatus()The status of the operator.protected AbstractPageMappingOperator.Statusstatus(long processNanos, int pagesProcessed, long rowsReceived, long rowsEmitted) abstract StringtoString()
-
Constructor Details
-
AbstractPageMappingOperator
public AbstractPageMappingOperator()
-
-
Method Details
-
process
-
toString
-
needsInput
public final 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 -
finish
public final void finish()Description copied from interface:Operatornotifies the operator that it won't receive any more input pages -
isFinished
public final 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
-
canProduceMoreDataWithoutExtraInput
public boolean canProduceMoreDataWithoutExtraInput()Description copied from interface:OperatorReturns true if the operator can produce more output pages without requiring additional input pages. This is useful for operators that buffer data or have internal state that can produce multiple output pages.Operators that do not buffer data should return
false- they cannot produce pages out of thin air. Examples of operators that may returntrue:- Operators with internal buffers (e.g.,
AsyncOperatorwith pending results) - Operators processing a single input page into multiple output pages
- Aggregation operators that buffer partial results
- Specified by:
canProduceMoreDataWithoutExtraInputin interfaceOperator- Returns:
trueif the operator has buffered data that can produce output,falseotherwise
- Operators with internal buffers (e.g.,
-
getOutput
Description copied from interface:Operatorreturns non-null if output page available. Only called when isFinished() == false -
status
Description copied from interface:OperatorThe status of the operator. -
status
protected AbstractPageMappingOperator.Status status(long processNanos, int pagesProcessed, long rowsReceived, long rowsEmitted) -
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
-