DataFusion SQL + Arrow frontend for MongrelDB.
[MongrelProvider] implements DataFusion's TableProvider: each scan()
takes an MVCC snapshot of the table, materializes the visible columns, and
hands DataFusion a streaming MongrelScanExec (see scan.rs) that emits one
RecordBatch per 65 536-row chunk. DataFusion then runs the SQL —
projection, filter, aggregation, limit — with its own vectorized kernels,
pipelined across those small batches so a LIMIT short-circuits and peak
memory stays bounded. MongrelDB owns storage/writes/indexes; DataFusion owns
the vectorized execution.
Example (skipped from doctests; see tests/sql.rs for runnable ones):
# use mongreldb_core::Table;
# use mongreldb_query::MongrelSession;
# async fn run() -> anyhow::Result<()> {
let db = Table::create("travel.mongreldb", /* schema */ unimplemented!(), 1)?;
let session = MongrelSession::new(db);
session.register("travel_trips").await?;
let batches = session.run("select * from travel_trips where cost < 300").await?;
# Ok(()) }