Class SplitDiscoveryPhase
java.lang.Object
org.elasticsearch.xpack.esql.datasources.SplitDiscoveryPhase
Walks the physical plan tree, discovers splits for each
ExternalSourceExec,
and replaces them with split-enriched copies via ExternalSourceExec.withSplits(java.util.List<org.elasticsearch.xpack.esql.datasources.spi.ExternalSplit>).
Filter expressions from FilterExec ancestors are collected per-source so that
each ExternalSourceExec only receives filters from its own ancestor chain, not
from unrelated branches of the plan tree.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordPost-prune "scanned" accounting collected while resolving splits, surfaced at the root of the query profile. -
Method Summary
Modifier and TypeMethodDescriptionstatic PhysicalPlanresolveExternalSplits(PhysicalPlan plan, Map<String, ExternalSourceFactory> sourceFactories) static PhysicalPlanresolveExternalSplits(PhysicalPlan plan, Map<String, ExternalSourceFactory> sourceFactories, int maxRecordBytes) static SplitDiscoveryPhase.ResultresolveExternalSplitsWithStats(PhysicalPlan plan, Map<String, ExternalSourceFactory> sourceFactories, int maxRecordBytes) LikeresolveExternalSplits(org.elasticsearch.xpack.esql.plan.physical.PhysicalPlan, java.util.Map<java.lang.String, org.elasticsearch.xpack.esql.datasources.spi.ExternalSourceFactory>), but also returns the post-prune scanned counts aggregated across everyExternalSourceExecin the plan.static SplitDiscoveryPhase.ResultresolveExternalSplitsWithStats(PhysicalPlan plan, Map<String, ExternalSourceFactory> sourceFactories, int maxRecordBytes, BooleanSupplier isCancelled) LikeresolveExternalSplitsWithStats(PhysicalPlan, Map, int), but threads a cancellation signal into eachSplitDiscoveryContextso a long-running discovery aborts promptly on cancel.
-
Method Details
-
resolveExternalSplits
public static PhysicalPlan resolveExternalSplits(PhysicalPlan plan, Map<String, ExternalSourceFactory> sourceFactories) -
resolveExternalSplits
public static PhysicalPlan resolveExternalSplits(PhysicalPlan plan, Map<String, ExternalSourceFactory> sourceFactories, int maxRecordBytes) -
resolveExternalSplitsWithStats
public static SplitDiscoveryPhase.Result resolveExternalSplitsWithStats(PhysicalPlan plan, Map<String, ExternalSourceFactory> sourceFactories, int maxRecordBytes) LikeresolveExternalSplits(org.elasticsearch.xpack.esql.plan.physical.PhysicalPlan, java.util.Map<java.lang.String, org.elasticsearch.xpack.esql.datasources.spi.ExternalSourceFactory>), but also returns the post-prune scanned counts aggregated across everyExternalSourceExecin the plan. -
resolveExternalSplitsWithStats
public static SplitDiscoveryPhase.Result resolveExternalSplitsWithStats(PhysicalPlan plan, Map<String, ExternalSourceFactory> sourceFactories, int maxRecordBytes, BooleanSupplier isCancelled) LikeresolveExternalSplitsWithStats(PhysicalPlan, Map, int), but threads a cancellation signal into eachSplitDiscoveryContextso a long-running discovery aborts promptly on cancel.
-