Skip to main content

execute

Function execute 

Source
pub fn execute(
    view: &GraphView<'_>,
    plan: &[PlanOp],
    params: &Params<'_>,
) -> Result<ResultSet, String>
Expand description

Execute a plan against a view. Row order before OrderBy is deterministic (scan order = dense ids; expand order = expand()’s sorted order).

Precondition: OrderBy items produced by plan() use OrderTarget::Alias only; other variants are accepted defensively but non-standard.

When the plan has a Limit and no OrderBy, the executor switches to a demand-driven (pull-based) strategy: all producer stages terminate as soon as SKIP + LIMIT final rows have been collected. No intermediate table is ever fully materialised for the bounded path — the 1 M cap is the safety net for unbounded queries only.