The Sail tour · Real production code
Five stops through a
real query engine.
Sail is a Spark-compatible distributed query engine, written entirely in Rust, running both as a library and as a server. Reading Sail teaches idiomatic Rust at production scale: crate composition, DataFusion integration, async boundaries, error type design, and how to organize a real query engine. Every snippet on this tour is pulled from live source.
- 01Architecture map
Sail at altitude. Five layers from common types to the gRPC entry points.
36 crates, mapped - 02DataFrame ops
How Sail models a query plan as a 50-variant Rust enum.
Plan enum · Box recursion - 03Error types
The error pattern repeated across every Sail crate.
thiserror · #[from] - 04Async boundaries
A real Spark Connect handler and the async generics behind retry.
Tokio · gRPC · retry - 05Trait design
One trait, many backends. The ingredients of an extension point.
CatalogProvider · Arc<dyn>