Skip to content

garfield-dev-team/miniduck

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MiniDuck

A tiny educational OLAP engine built in ~700 lines of Rust. It accompanies a six-chapter tutorial on how a real columnar engine like DuckDB is put together.

Layout

Chapter Module Idea
1 src/storage.rs Columnar batches over arrow2
2 src/exec.rs Pull-based Volcano operators
3 src/expr.rs Scalar expression trees
4 src/agg.rs Hash aggregation with hashbrown + ahash
5 src/catalog.rs + src/planner.rs Catalog + tiny SQL planner
6 benches/ Synthetic micro-benchmark

Run an example

cargo run --example ch1_table
cargo run --example ch2_scan
cargo run --example ch3_filter
cargo run --example ch4_agg
cargo run --example ch5_sql

Run tests

cargo test

Run the benchmark

cargo bench --bench tpch_lite

A like-for-like comparison against duckdb is described in chapter 6 of the tutorial, but the dependency is intentionally omitted from Cargo.toml so that this teaching crate stays light.

About

A tiny educational OLAP engine built in ~700 lines of Rust. It accompanies a six-chapter tutorial on how a real columnar engine like DuckDB is put together.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages