Class ExternalFieldExtractExec
- All Implemented Interfaces:
NamedWriteable,Writeable
ExternalSourceExec.
Inserted by InsertExternalFieldExtraction immediately above the TopN when the source's
format supports column
extraction. The rule narrows the source to sort-key + predicate columns (plus a synthetic
_rowPosition); this node consumes the narrow output and loads the remaining columns
for the at-most-LIMIT rows the TopN selected. The _rowPosition channel is stripped
from the output so downstream operators see the same shape as if no late materialization had
happened.
NOT serialized. Created by the local physical optimizer on the data node after the
plan fragment arrives over the wire; consumed by LocalExecutionPlanner on the same
JVM. Same lifecycle as ExternalSourceExec.pushedFilter and
ExternalSourceExec.pushedLimit.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.xpack.esql.core.tree.Node
Node.NodeStringFormatNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
Fields inherited from class org.elasticsearch.xpack.esql.core.tree.Node
TO_STRING_MAX_LINES, TO_STRING_MAX_WIDTH -
Constructor Summary
ConstructorsConstructorDescriptionExternalFieldExtractExec(Source source, PhysicalPlan child, List<Attribute> attributesToExtract, Attribute rowPositionAttribute) -
Method Summary
Modifier and TypeMethodDescriptionprotected AttributeSetThe only attribute this node requires from its child output is_rowPosition— the key into the per-driversource-extractor registry.booleaninthashCode()protected NodeInfo<? extends ExternalFieldExtractExec> info()Normally, you want to use one of the staticcreatemethods to implement this.output()The ordered list of attributes (i.e.replaceChild(PhysicalPlan newChild) voidwriteTo(StreamOutput out) Methods inherited from class org.elasticsearch.xpack.esql.plan.physical.UnaryExec
child, inputSet, outputSet, replaceChildrenMethods inherited from class org.elasticsearch.xpack.esql.plan.QueryPlan
computeExpressions, expressions, forEachExpression, forEachExpression, forEachExpressionDown, forEachExpressionUp, references, transformExpressionsDown, transformExpressionsDown, transformExpressionsOnly, transformExpressionsOnly, transformExpressionsOnlyUp, transformExpressionsUp, transformExpressionsUpMethods inherited from class org.elasticsearch.xpack.esql.core.tree.Node
allMatch, anyMatch, children, collect, collect, collect, collectFirstChildren, collectLeaves, doCollectFirst, forEachDown, forEachDown, forEachDownMayReturnEarly, forEachProperty, forEachPropertyDown, forEachPropertyOnly, forEachPropertyUp, forEachUp, forEachUp, nodeName, nodeProperties, nodeString, nodeString, propertiesToString, replaceChildrenSameSize, source, sourceLocation, sourceText, toString, toString, toString, transformChildren, transformChildren, transformDown, transformDown, transformDown, transformDown, transformDownSkipBranch, transformNodeProps, transformPropertiesDown, transformPropertiesOnly, transformPropertiesUp, transformUp, transformUp, transformUp
-
Constructor Details
-
ExternalFieldExtractExec
public ExternalFieldExtractExec(Source source, PhysicalPlan child, List<Attribute> attributesToExtract, Attribute rowPositionAttribute)
-
-
Method Details
-
attributesToExtract
-
rowPositionAttribute
-
output
Description copied from class:QueryPlanThe ordered list of attributes (i.e. columns) this plan produces when executed. Must be called only on resolved plans, otherwise may throw an exception or return wrong results. -
replaceChild
- Specified by:
replaceChildin classUnaryExec
-
computeReferences
The only attribute this node requires from its child output is_rowPosition— the key into the per-driversource-extractor registry.attributesToExtractare produced by this node, not consumed from the child; advertising them as references would mislead column-pruning rules into pinning them on the (narrowed) source.- Overrides:
computeReferencesin classQueryPlan<PhysicalPlan>
-
info
Description copied from class:NodeNormally, you want to use one of the staticcreatemethods to implement this.For
QueryPlans, it is very important that the properties contain all of the expressions and references relevant to this node, and that all the properties are used in the provided constructor; otherwise query plan transformations likeQueryPlan#transformExpressionsOnly(Function)will not have an effect.- Specified by:
infoin classNode<PhysicalPlan>
-
writeTo
- Throws:
IOException
-
getWriteableName
-
hashCode
public int hashCode() -
equals
-