Application and compute boundaries
The calling application owns the engine: it plans SQL, executes relational operators, schedules AI work, and manages its durable result cache and ephemeral nearest-neighbor indexes. The Python API controls the engine and consumes its Arrow batches. Local AI compute uses model runtimes on the same machine, which may run in separate worker processes. Remote AI compute runs supported parsing, inference, embedding, and transcription operations on the selected server. Arrow Flight carries the bounded compute requests, input data, and result batches between them. A self-hosted server is operated by you; Chowder Cloud provides fully managed AI compute. Both use the remote client in the embedded engine. Core concepts introduces these deployment choices, and Connect to remote AI compute covers client setup. Server operators can follow Self-host AI compute in Advanced.Columnar execution foundation
Chowder’s Rust execution core extends Apache DataFusion with multimodal readers, inference-aware operators, and result reuse. Source readers expose typed columns in Arrow record batches. The columnar plan executes SQL projections, filters, joins, and aggregations over those batches, while Chowder’s inference-aware operators integrate model work into the physical plan. A PDF page, image, or media window defines a logical input record. Its fields occupy positions in column arrays; the source’s row grain does not change the columnar execution model. See Core concepts for source grains.Execution layers
Query lifecycle
1
Plan
Engine.sql() parses and plans the query. Type and syntax errors surface before source or model work begins.2
Pull columnar batches
Read-only execution starts when you iterate or materialize the returned
Relation. Readers supply the requested fields as Arrow column arrays.3
Apply pushdown
Readers receive the projected columns, structural predicates, and static or dynamic limits they can honor.
4
Run AI operators
Inference-aware operators schedule
infer and embed with bounded concurrency, deduplicate eligible work, and keep typed results aligned with their inputs.5
Return Arrow
The plan yields typed columns in Arrow record batches until the query completes or the consumer stops early.
AI-aware execution
Columnar execution and model-call scheduling solve different parts of the workload. Ordinary SQL predicates evaluate column arrays; inference-aware operators control which inputs reach a model and how many calls are in flight. Models may handle individual inputs or batches depending on the runtime. Chowder usesAiFilterExec and AiProjectExec to integrate that scheduling into the columnar plan. For supported query shapes, execution can stop requesting model work when the query has enough matches, rather than evaluating an entire upstream batch first.
For a query such as:
page_number column first, schedule inference for a bounded set of candidate pages, and request more candidates only if it still needs two matches. The page is the logical inference input; Arrow batches remain the data exchanged between query operators.
Remote compute
Engine(remote=True) or Engine(location=...) selects remote AI compute while keeping the in-process columnar SQL engine and inference-aware control in your application. Supported parsing, inference, embedding, and transcription calls cross Arrow Flight to a self-hosted chowder.serve() endpoint or Chowder Cloud. The SQL expressions and Arrow-native result interface stay the same.