pub fn compile_streaming_query(
sql: &str,
plan: &LogicalPlan,
cache: &mut CompilerCache,
config: &QueryConfig,
) -> Result<Option<CompiledStreamingQuery>, CompileError>Expand description
Attempts to compile a DataFusion [LogicalPlan] into a StreamingQuery.
Returns Ok(None) when the plan contains stateful operators (aggregations,
sorts, joins) that cannot be compiled — the caller should fall back to
DataFusion interpreted execution.
Returns Ok(Some(compiled)) with a ready-to-start StreamingQuery, the
source scan plan for DataFusion to execute, and the input/output schemas
for RecordBatch ↔ EventRow conversion.
§Errors
Returns CompileError only on hard failures (e.g., Cranelift context
initialization failure, or the plan has no source scan). Soft failures
(unsupported expressions) result in fallback pipelines within the query.