Skip to main content

Module orchestrate

Module orchestrate 

Source
Expand description

SQL compiler orchestrator — single entry point for LogicalPlanStreamingQuery.

compile_streaming_query coordinates the full compilation pipeline:

  1. Extract pipelines from a DataFusion [LogicalPlan]
  2. Detect breakers (stateful operators) → return None for plans that can’t be fully compiled
  3. Compile each pipeline segment via ExecutablePipeline::try_compile
  4. Wire each compiled pipeline to a super::PipelineBridge + super::BridgeConsumer
  5. Assemble into a StreamingQuery ready for execution

§Usage

use laminar_core::compiler::orchestrate::compile_streaming_query;
use laminar_core::compiler::{CompilerCache, QueryConfig};

let mut cache = CompilerCache::new(64)?;
let config = QueryConfig::default();
match compile_streaming_query(sql, &logical_plan, &mut cache, &config)? {
    Some(compiled) => { /* use compiled.query, compiled.source_plan, etc. */ }
    None => { /* fall back to DataFusion interpreted execution */ }
}

Structs§

CompiledStreamingQuery
Result of successful compilation — ready for execution.

Functions§

compile_streaming_query
Attempts to compile a DataFusion [LogicalPlan] into a StreamingQuery.