$ show risingwavelabs/risingwave
RisingWave is a production-grade distributed streaming SQL database. The codebase implements a multi-node cluster composed of SQL frontend nodes (parser, binder, optimizer, planner), compute nodes running both streaming executors and batch execution, a meta service for catalog/scheduling/checkpoint coordination, and a custom LSM-tree storage engine (Hummock) over object storage. It speaks the PostgreSQL wire protocol, supports incremental CREATE MATERIALIZED VIEW over streaming inputs, and serves real-time queries and sinks. The repository is primarily an application, despite containing extensive benchmarks and deterministic simulation testing: those artifacts validate distributed-system correctness rather than performing data research.
The LLM identified 4 files worth highlighting for reuse:
A standalone SQL parser crate with a PostgreSQL-compatible dialect. It produces a typed AST and is decoupled from the rest of RisingWave's planning machinery, making it one of the few components that could be lifted directly into other SQL tooling, linters, or database projects.
Provides EstimatedHashMap, EstimatedHashSet, and EstimatedVecDeque, plus the EstimateSize trait. These memory-aware collections solve a recurring systems problem: tracking heap usage inside stateful streaming operators. The trait pattern is generic enough to be extracted into any Rust service needing memory-bounded caches or state.
A complete PostgreSQL wire protocol server implementation, handling startup, authentication, query messages, row encoding, and error mapping. This is the kind of component that would save months of work for anyone building a Postgres-compatible database, proxy, or gateway; it demonstrates non-trivial protocol engineering.
The #[function] attribute macro behind RisingWave's expression framework. It turns Rust function declarations into registration-aware scalar/aggregate/window functions with type inference and metadata. The macro is an elegant example of compile-time code generation for expression extensibility and is a reusable pattern for any Rust SQL engine that wants ergonomic UDF authoring.