Class ExternalSourceExec
java.lang.Object
org.elasticsearch.xpack.esql.core.tree.Node<PhysicalPlan>
org.elasticsearch.xpack.esql.plan.QueryPlan<PhysicalPlan>
org.elasticsearch.xpack.esql.plan.physical.PhysicalPlan
org.elasticsearch.xpack.esql.plan.physical.LeafExec
org.elasticsearch.xpack.esql.plan.physical.ExternalSourceExec
- All Implemented Interfaces:
NamedWriteable,Writeable,DataSourceExec,EstimatesRowSize
Generic physical plan node for reading from external data sources (e.g., Iceberg tables, Parquet files).
This is the unified physical plan node for all external sources, replacing source-specific nodes. It uses generic maps for configuration and metadata to avoid leaking source-specific types (like S3Configuration) into core ESQL code.
Key design principles:
- Generic configuration: Uses
Map<String, Object>for config instead of source-specific classes like S3Configuration - Opaque metadata: Source-specific data (native schema, etc.) is stored in
sourceMetadata()and passed through without core understanding it - Opaque pushed filter: The
pushedFilter()is an opaque Object that only the source-specific operator factory interprets. It is NOT serialized; it is created locally on each data node by the LocalPhysicalPlanOptimizer via FilterPushdownRegistry - Data node execution: Created on data nodes by LocalMapper from
ExternalRelationinside FragmentExec
-
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.xpack.esql.plan.physical.EstimatesRowSize
EstimatesRowSize.StateNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsFields inherited from class org.elasticsearch.xpack.esql.core.tree.Node
TO_STRING_MAX_LINES, TO_STRING_MAX_WIDTH -
Constructor Summary
ConstructorsConstructorDescriptionExternalSourceExec(Source source, String sourcePath, String sourceType, List<Attribute> attributes, Map<String, Object> config, Map<String, Object> sourceMetadata, Integer estimatedRowSize) ExternalSourceExec(Source source, String sourcePath, String sourceType, List<Attribute> attributes, Map<String, Object> config, Map<String, Object> sourceMetadata, Object pushedFilter, int pushedLimit, Integer estimatedRowSize, FileList fileList, List<ExternalSplit> splits) ExternalSourceExec(Source source, String sourcePath, String sourceType, List<Attribute> attributes, Map<String, Object> config, Map<String, Object> sourceMetadata, Object pushedFilter, Integer estimatedRowSize) ExternalSourceExec(Source source, String sourcePath, String sourceType, List<Attribute> attributes, Map<String, Object> config, Map<String, Object> sourceMetadata, Object pushedFilter, Integer estimatedRowSize, FileList fileList) ExternalSourceExec(Source source, String sourcePath, String sourceType, List<Attribute> attributes, Map<String, Object> config, Map<String, Object> sourceMetadata, Object pushedFilter, List<Expression> pushedExpressions, int pushedLimit, Integer estimatedRowSize, FileList fileList, List<ExternalSplit> splits) -
Method Summary
Modifier and TypeMethodDescriptionconfig()booleanEstimate the number of bytes that'll be loaded per position before the stream of pages is consumed.fileList()inthashCode()protected NodeInfo<? extends PhysicalPlan> info()Normally, you want to use one of the staticcreatemethods to implement this.voidnodeString(StringBuilder sb, Node.NodeStringFormat format) Append thisNode's string representation tosb.output()The ordered list of attributes (i.e.intsplits()protected ExternalSourceExecwithEstimatedRowSize(Integer newEstimatedRowSize) withPushedFilter(Object newFilter) withPushedFilterAndExpressions(Object newFilter, List<Expression> newPushedExpressions) withPushedLimit(int newLimit) withSplits(List<ExternalSplit> newSplits) voidwriteTo(StreamOutput out) Methods inherited from class org.elasticsearch.xpack.esql.plan.physical.LeafExec
computeReferences, replaceChildrenMethods inherited from class org.elasticsearch.xpack.esql.plan.QueryPlan
computeExpressions, expressions, forEachExpression, forEachExpression, forEachExpressionDown, forEachExpressionUp, inputSet, outputSet, 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, propertiesToString, replaceChildrenSameSize, source, sourceLocation, sourceText, toString, toString, transformChildren, transformChildren, transformDown, transformDown, transformDown, transformDown, transformDownSkipBranch, transformNodeProps, transformPropertiesDown, transformPropertiesOnly, transformPropertiesUp, transformUp, transformUp, transformUpMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.xpack.esql.plan.physical.DataSourceExec
source
-
Field Details
-
ENTRY
-
-
Constructor Details
-
ExternalSourceExec
-
ExternalSourceExec
-
ExternalSourceExec
public ExternalSourceExec(Source source, String sourcePath, String sourceType, List<Attribute> attributes, Map<String, Object> config, Map<String, Object> sourceMetadata, Object pushedFilter, List<Expression> pushedExpressions, int pushedLimit, Integer estimatedRowSize, FileList fileList, List<ExternalSplit> splits) -
ExternalSourceExec
-
ExternalSourceExec
-
-
Method Details
-
writeTo
- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
getWriteableName
- Specified by:
getWriteableNamein interfaceNamedWriteable
-
sourcePath
-
sourceType
-
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.- Specified by:
outputin interfaceDataSourceExec- Specified by:
outputin classQueryPlan<PhysicalPlan>
-
config
-
sourceMetadata
-
pushedFilter
-
pushedExpressions
-
pushedLimit
public int pushedLimit() -
estimatedRowSize
-
fileList
-
splits
-
withSplits
-
withPushedFilter
-
withPushedFilterAndExpressions
public ExternalSourceExec withPushedFilterAndExpressions(Object newFilter, List<Expression> newPushedExpressions) -
withPushedLimit
-
estimateRowSize
Description copied from interface:EstimatesRowSizeEstimate the number of bytes that'll be loaded per position before the stream of pages is consumed.- Specified by:
estimateRowSizein interfaceEstimatesRowSize
-
withEstimatedRowSize
-
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>
-
hashCode
public int hashCode()- Specified by:
hashCodein classPhysicalPlan
-
equals
- Specified by:
equalsin classPhysicalPlan
-
nodeString
Description copied from class:Node- Overrides:
nodeStringin classNode<PhysicalPlan>- Parameters:
sb- target for the stringformat- configuration for rendering the string representation
-