Flow PHP

Executor

Read onlyYes
FinalYes

Methods

__construct()  : mixed
execute()  : Generator<mixed, PhysicalPlan>
Plans and runs a whole plan inside one DataFrame span of $context: a planning failure closes the span as failed.
executePipeline()  : Generator<int, Rows>
Drives one pipeline and the pipelines it reads, all in this process, with no DataFrame span.
executePlan()  : Generator<int, Rows>
Drives a plan with no DataFrame span - $context belongs to whoever runs it. The config's launcher may launch the head of the plan's chain; without one, or when the launch does not pay, the plan runs here.
fetch()  : Rows
Executes $logical and merges every batch into one Rows.
merge()  : Rows
Merges every batch into one Rows. An empty result still carries the schema of the plan the generator returns, or an empty one when that plan cannot describe its rows.

Methods

__construct()

public __construct() : mixed

execute()

Plans and runs a whole plan inside one DataFrame span of $context: a planning failure closes the span as failed.

public execute(LogicalPlan $logical, FlowContext $context[, null|RunCounts $counts = null ]) : Generator<mixed, PhysicalPlan>
Parameters
$logical : LogicalPlan
$context : FlowContext
$counts : null|RunCounts = null

counts the rows every source yields, a joined frame's included, and the peak of every launched worker

Tags
throws
InvalidLogicException

when $context is already being advanced

Return values
Generator<mixed, PhysicalPlan> —

returns the physical plan it ran

executePipeline()

Drives one pipeline and the pipelines it reads, all in this process, with no DataFrame span.

public executePipeline(Pipeline $pipeline, FlowContext $context[, null|Extractor $source = null ][, StepRunner $runner = new StepRunner() ]) : Generator<int, Rows>
Parameters
$pipeline : Pipeline
$context : FlowContext
$source : null|Extractor = null

feeds the chain's first pipeline when it reads no source of its own

$runner : StepRunner = new StepRunner()

a branch's own, so the steps its writes become stay the same across its fibers

Tags
throws
InvalidLogicException

when the chain reads no source and none is given

Return values
Generator<int, Rows>

executePlan()

Drives a plan with no DataFrame span - $context belongs to whoever runs it. The config's launcher may launch the head of the plan's chain; without one, or when the launch does not pay, the plan runs here.

public executePlan(PhysicalPlan $plan, FlowContext $context[, null|RunCounts $counts = null ]) : Generator<int, Rows>
Parameters
$plan : PhysicalPlan
$context : FlowContext
$counts : null|RunCounts = null

counts the rows the plan's source yields and the peak of every launched worker

Return values
Generator<int, Rows>

merge()

Merges every batch into one Rows. An empty result still carries the schema of the plan the generator returns, or an empty one when that plan cannot describe its rows.

public merge(Generator<mixed, PhysicalPlan> $batches, Backend $backend) : Rows
Parameters
$batches : Generator<mixed, PhysicalPlan>

what execute() yields

$backend : Backend
Return values
Rows
On this page

Search results