https://github.com/risinglightdb/sql-optimizer-labs
🚧 Build a SQL optimizer in 1000 lines of Rust using egg.
https://github.com/risinglightdb/sql-optimizer-labs
equality-saturation optimizer sql
Last synced: 10 months ago
JSON representation
🚧 Build a SQL optimizer in 1000 lines of Rust using egg.
- Host: GitHub
- URL: https://github.com/risinglightdb/sql-optimizer-labs
- Owner: risinglightdb
- License: apache-2.0
- Created: 2022-12-26T05:51:30.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-06T16:18:32.000Z (about 3 years ago)
- Last Synced: 2025-04-01T13:37:50.628Z (11 months ago)
- Topics: equality-saturation, optimizer, sql
- Language: Rust
- Homepage:
- Size: 37.1 KB
- Stars: 77
- Watchers: 7
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SQL Optimizer Labs
Build a SQL optimizer in 1000 lines of Rust using [egg](https://egraphs-good.github.io).
🚧 Under construction 🚧 Stay tuned 👀
## Tasks
Fill the code in `src` and pass the tests in `tests`!
```sh
cargo test --test 1_language
cargo test --test 2_rewrite
cargo test --test 3_conditional_rewrite
cargo test --test 4_constant_folding
cargo test --test 5_sql_plan
cargo test --test 6_plan_elimination
cargo test --test 7_predicate_pushdown
cargo test --test 8_projection_pushdown
cargo test --test 9_agg_extraction
cargo test --test 10_index_resolving
```
## What's Next
These labs are taken from the [RisingLight] project.
[Check out] how it works in a real database system!
[RisingLight]: https://github.com/risinglightdb/risinglight
[Check out]: https://github.com/risinglightdb/risinglight/blob/main/src/planner/mod.rs