eta.plan.merge_plan_nodes

merge_plan_nodes(plan_node_start, plan_node_end, new_plan_node)[source]

Merge a sequence of plan nodes (bounded between a given start and end node) into a given subplan node.

Parameters:
  • plan_node_start (PlanNode) – The first node in the plan sequence to merge.

  • plan_node_end (PlanNode) – The last node in the plan sequence to merge.

  • new_plan_node (PlanNode) – The new subplan node that should replace the merged sequence.

Returns:

The new subplan node that replaced the merged sequence.

Return type:

PlanNode

Notes

TODO: this may need to be extended to deal with cases where the plan nodes to merge are discontiguous in the plan.