Class ExplainPlanTransformer
java.lang.Object
org.elasticsearch.xpack.esql.planner.ExplainPlanTransformer
Transforms a physical plan for EXPLAIN mode by replacing data source nodes
with empty local sources. This makes execution essentially free while
preserving the plan structure for profiling.
-
Method Summary
Modifier and TypeMethodDescriptionstatic PhysicalPlanTransforms the plan by replacing data source nodes with empty LocalSourceExec.
-
Method Details
-
replaceDataSourcesWithEmpty
Transforms the plan by replacing data source nodes with empty LocalSourceExec. This preserves the plan structure but makes execution cheap since no data is read. Handles both ES data sources and external data sources (Iceberg, Parquet, S3, etc.).- Parameters:
plan- the original physical plan- Returns:
- a transformed plan with empty data sources
-