Replies: 1 comment
-
Hi @tyt2y3 ! Thanks a lot for you message! It's greatly appreciate it! With that in mind I created a discord server for the project so we can discuss it better and more actively. Check it out: https://discord.gg/zHXUG66X Hope to see you there. Cheers. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Woah! First of all this is an ambitious project and it's great that you've made the first step in this direction.
I have been dreaming of seeing a SQL implementation in pure Rust for some time.
But this is no simple feat, and definitely very difficult to be done by one man.
We should think about the architecture, how can it be designed in a way where multiple parties can collaborate?
Below are my two cents:
First of all, there is already a pretty good sqlparser in Rust, so we should not implement our own.
https://github.com/ballista-compute/sqlparser-rs
Next, for storage engine, https://github.com/spacejam/sled is probably a good candidate. As a reference, CockroachDB https://www.cockroachlabs.com/docs/stable/architecture/storage-layer.html executes relational query on top of a (distributed) key-value store.
So, the most important part left is actually the code generator and the virtual machine.
I have been looking at SQLite's design https://www.sqlite.org/opcode.html
But it does not fit well with the key-value storage engine architecture.
I am imagining a High Level IR that translates the syntax tree and describes the operations in simpler concepts.
And a Low Level IR to be executed by the virtual machine (with the help of the key-value store).
What sits between, is the query planner (aka optimizer) that compile the HIR into LIR.
Hope what I said makes sense.
What do you think? What are your goals and vision for this project?
Beta Was this translation helpful? Give feedback.
All reactions