Skip to content

LogicalPlan

type LogicalPlan =
| ReadPlan
| ReadTablePlan
| LocalRelationPlan
| SqlPlan
| FilterPlan
| ProjectPlan
| AggregatePlan
| LimitPlan
| SortPlan
| JoinPlan
| DropPlan
| WithColumnsPlan
| DeduplicatePlan
| OffsetPlan
| CatalogPlan
| SetOperationPlan
| SamplePlan
| NAFillPlan
| NADropPlan
| ToDFPlan
| DescribePlan
| RangePlan
| WithColumnsRenamedPlan
| SubqueryAliasPlan
| HintPlan
| TailPlan
| RepartitionPlan
| RepartitionByExpressionPlan
| UnpivotPlan
| SummaryPlan
| NAReplacePlan
| StatCorrPlan
| StatCovPlan
| StatCrosstabPlan
| StatFreqItemsPlan
| StatApproxQuantilePlan;

Defined in: plan/logical-plan.ts:94

The logical plan tree, mirroring Spark Catalyst’s internal representation. Every DataFrame transformation appends a new node to the tree; the full tree serializes to protobuf for Spark Connect when an action runs.

The plan that spark-connect-js builds is the unresolved form: column references are strings, nothing is bound to a catalog yet. The Spark Connect server runs the remaining Catalyst phases (analysis, optimization, physical planning, codegen) before executing.

A malformed unresolved plan produces cryptic AnalysisExceptions on the server, so the shape here matters. Each variant maps one-to-one to a Spark Connect Relation protobuf message.