WithCTEStrategy Execution Planning Strategy
WithCTEStrategy is an execution planning strategy to plan WithCTE and CTERelationRef logical operators.
plan: LogicalPlan): Seq[SparkPlan]
apply plans WithCTE and CTERelationRef logical operators.
apply removes the
WithCTE layer by adding the CTERelationDefs to the (thread-local) collection of
CTERelationDefs (by their IDs) and marking the logical plan to plan later.
apply finds the logical plan for the cteId (in the (thread-local) collection of
CTERelationDefs) and creates a Project logical operator (over
In the end,
apply creates a ShuffleExchangeExec physical operator with the
Project (to plan later),
RoundRobinPartitioning output partitioning and
REPARTITION_BY_COL shuffle origin.
apply is part of the GenericStrategy abstraction.