Planner
Methods
- __construct() : mixed
- cut() : array<int, Pipeline>
- $steps cut after every breaker - a processor that breaks, a hash join - into pipelines numbered from $firstId, each reading the one before it; the first reads $input, or is fed batch by batch when $input is null.
- node() : PlannedNode
- Plans $node and everything under it, each node once by identity: translated to steps, then bound to the schema of its input. A prefix several consumers share is planned once; a joined frame is planned apart.
- optimize() : LogicalPlan
- pipelines() : PhysicalPlan
- The spine's pipelines, cut at every breaker, with every write attached to the spine node it reads.
- plan() : PhysicalPlan
- The optimizer rewrites the plan first, so the one walk that translates and binds sees the final tree. A frame this one joined is part of the plan: nothing is planned with another frame's planner.
Methods
__construct()
public
__construct(Optimizer $optimizer, NodeTranslator $translator, Backend $backend) : mixed
Parameters
- $optimizer : Optimizer
- $translator : NodeTranslator
- $backend : Backend
cut()
$steps cut after every breaker - a processor that breaks, a hash join - into pipelines numbered from $firstId, each reading the one before it; the first reads $input, or is fed batch by batch when $input is null.
public
static cut(Read|null $input, array<int, JoinStep|Loader|Processor|BranchPipeline|TransactionGroup|Transformer> $steps, int $firstId) : array<int, Pipeline>
Parameters
- $input : Read|null
- $steps : array<int, JoinStep|Loader|Processor|BranchPipeline|TransactionGroup|Transformer>
- $firstId : int
Return values
array<int, Pipeline> —leaf first
node()
Plans $node and everything under it, each node once by identity: translated to steps, then bound to the schema of its input. A prefix several consumers share is planned once; a joined frame is planned apart.
public
node(Node $node, PlannedNodes $planned) : PlannedNode
Parameters
- $node : Node
- $planned : PlannedNodes
Return values
PlannedNodeoptimize()
public
optimize(LogicalPlan $logical) : LogicalPlan
Parameters
- $logical : LogicalPlan
Return values
LogicalPlanpipelines()
The spine's pipelines, cut at every breaker, with every write attached to the spine node it reads.
public
pipelines(LogicalPlan $logical, PlannedNodes $planned) : PhysicalPlan
Parameters
- $logical : LogicalPlan
-
a whole frame's plan, or a join's right side
- $planned : PlannedNodes
-
every node of the plan already planned
Tags
Return values
PhysicalPlanplan()
The optimizer rewrites the plan first, so the one walk that translates and binds sees the final tree. A frame this one joined is part of the plan: nothing is planned with another frame's planner.
public
plan(LogicalPlan $logical) : PhysicalPlan
Parameters
- $logical : LogicalPlan