Skip to main content

lower_and_optimize

Function lower_and_optimize 

Source
pub fn lower_and_optimize(plan: &GraphPlan) -> Result<LogicalPlan, GfError>
Expand description

Lower a GraphPlan and run DataFusion’s analyzer + optimizer over it.

Uses a transient SessionContext with no registered catalog — the lowered plan is self-contained (scans use LogicalTableSource with static schemas), so optimisation needs no external state. Lowering runs in exploratory mode (catalog = None, ontology = None).

§Errors

Returns GfError::Plan if lowering fails or the analyzer/optimizer rejects the plan (e.g. unresolved $param placeholders).