Skip to main content

Module compiler

Module compiler 

Source
Expand description

Plan compiler infrastructure for Ring 0 event processing.

This module provides the foundation for compiling DataFusion logical plans into native functions that operate on a fixed-layout row format.

§Components

§JIT Compilation (requires jit feature)

  • error: Error types and compiled function pointer wrappers
  • expr: Cranelift-based expression compiler
  • fold: Constant folding pre-pass
  • jit: Cranelift JIT context management
  • pipeline: Pipeline types and compiled pipeline wrapper
  • extractor: Pipeline extraction from DataFusion logical plans
  • pipeline_compiler: Cranelift codegen for fused pipelines
  • cache: Compiler cache for compiled pipelines
  • fallback: Fallback mechanism for uncompilable pipelines
  • query: StreamingQuery lifecycle management
  • breaker_executor: Compiled stateful pipeline bridge (Ring 1 operator wiring)

Re-exports§

pub use batch_reader::BatchRowReader;
pub use bridge::BridgeError;
pub use bridge::RowBatchBridge;
pub use compilation_metrics::CacheSnapshot;
pub use compilation_metrics::CompilationMetrics;
pub use compilation_metrics::MetricsSnapshot;
pub use event_time::EventTimeConfig;
pub use event_time::RowEventTimeExtractor;
pub use metrics::QueryConfig;
pub use metrics::QueryError;
pub use metrics::QueryId;
pub use metrics::QueryMetadata;
pub use metrics::QueryMetrics;
pub use metrics::QueryState;
pub use metrics::StateStoreConfig;
pub use metrics::SubmitResult;
pub use pipeline_bridge::create_pipeline_bridge;
pub use pipeline_bridge::BridgeConsumer;
pub use pipeline_bridge::BridgeMessage;
pub use pipeline_bridge::BridgeStats;
pub use pipeline_bridge::BridgeStatsSnapshot;
pub use pipeline_bridge::PipelineBridge;
pub use pipeline_bridge::PipelineBridgeError;
pub use pipeline_bridge::Ring1Action;
pub use policy::BackpressureStrategy;
pub use policy::BatchPolicy;
pub use row::EventRow;
pub use row::FieldLayout;
pub use row::FieldType;
pub use row::MutableEventRow;
pub use row::RowError;
pub use row::RowSchema;
pub use error::CompileError;
pub use error::CompiledExpr;
pub use error::ExtractError;
pub use error::FilterFn;
pub use error::MaybeCompiledExpr;
pub use error::ScalarFn;
pub use expr::ExprCompiler;
pub use jit::JitContext;
pub use cache::CompilerCache;
pub use extractor::ExtractedPlan;
pub use extractor::PipelineExtractor;
pub use fallback::ExecutablePipeline;
pub use pipeline::CompiledPipeline;
pub use pipeline::Pipeline;
pub use pipeline::PipelineAction;
pub use pipeline::PipelineBreaker;
pub use pipeline::PipelineFn;
pub use pipeline::PipelineId;
pub use pipeline::PipelineStage;
pub use pipeline::PipelineStats;
pub use pipeline_compiler::PipelineCompiler;
pub use query::StreamingQuery;
pub use query::StreamingQueryBuilder;
pub use orchestrate::compile_streaming_query;
pub use orchestrate::CompiledStreamingQuery;
pub use breaker_executor::BreakerExecutor;
pub use breaker_executor::CompiledQueryGraph;
pub use breaker_executor::Ring1Operator;

Modules§

batch_reader
Arrow RecordBatchEventRow bridge for Ring 0 input.
breaker_executor
Compiled stateful pipeline bridge — wires pipeline breakers to Ring 1 operators.
bridge
Bridge between row-oriented Ring 0 events and columnar Arrow RecordBatch.
cache
Compiler cache for compiled pipelines.
compilation_metrics
Compilation metrics and observability for the JIT pipeline.
error
Error types and compiled expression wrappers for the JIT compiler.
event_time
Schema-aware event time extraction for compiled queries.
expr
Compiled expression evaluator using Cranelift JIT.
extractor
Pipeline extraction from DataFusion logical plans.
fallback
Fallback mechanism for pipeline compilation.
fold
Constant folding pre-pass for expression compilation.
jit
Cranelift JIT compilation context.
metrics
Streaming query lifecycle types: identifiers, states, configuration, errors, and metrics.
orchestrate
SQL compiler orchestrator — single entry point for LogicalPlanStreamingQuery.
pipeline
Pipeline abstraction for compiled Ring 0 event processing.
pipeline_bridge
Ring 0 / Ring 1 pipeline bridge via lock-free SPSC queue.
pipeline_compiler
Cranelift code generation for compiled pipelines.
policy
Batching and backpressure policies for the Ring 0 / Ring 1 pipeline bridge.
query
Streaming query lifecycle management.
row
Fixed-layout row format for compiled Ring 0 event processing.