Class ExternalFieldExtractOperator
- All Implemented Interfaces:
Closeable,AutoCloseable,Operator,Releasable
Reads the _rowPosition channel from each incoming page — these are encoded row
references (extractor id packed with file-local position) written by the source factory. Calls
SourceExtractors.materialize(long[], int, List, List, BlockFactory) to materialize the
deferred columns, then assembles an output page that:
- Keeps every input block except the
_rowPositionchannel. - Appends the deferred columns in the order requested at construction.
The registry is owned by the upstream AsyncExternalSourceOperatorFactory and resolved
per-driver via a Function<DriverContext, SourceExtractors> supplied at construction.
The source populates the registry as it opens files; this operator reads it after TopN
finishes. Single-threaded — same driver thread.
Implements Operator directly rather than extending AbstractPageMappingOperator
because the latter short-circuits zero-position pages — that would propagate the input shape
(including _rowPosition) instead of our declared output shape, breaking downstream
channel indexing.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuildsExternalFieldExtractOperators for each driver.static classPer-driver counters forExternalFieldExtractOperator, surfaced as the operator'sstatusin the profile: pages processed, rows whose deferred columns were materialized, and wall time inmaterialize(...).Nested 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 -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.compute.operator.Operator
isBlocked, tryPromote
-
Method Details
-
needsInput
public boolean needsInput()- Specified by:
needsInputin interfaceOperator
-
canProduceMoreDataWithoutExtraInput
public boolean canProduceMoreDataWithoutExtraInput()- Specified by:
canProduceMoreDataWithoutExtraInputin interfaceOperator
-
addInput
-
finish
public void finish() -
isFinished
public boolean isFinished()- Specified by:
isFinishedin interfaceOperator
-
getOutput
-
status
-
toString
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceOperator- Specified by:
closein interfaceReleasable
-