database-stream-processor
database-stream-processor copied to clipboard
[JIT] Design document
Document JIT architecture and API. The doc should serve two purposes:
- Explain the semantics of the bytecode supported by the JIT compiler and the architecture of the compiler. This should give the reader enough information to be able to understand the source code of the compiler.
- Explain how a frontend (e.g., the SQL compiler) and a runtime (e.g., the DBSP pipeline runner) should interact with JIT.
- Topics to cover
- [ ] String allocation and string lifetimes
- [ ] Block parameters and arguments
- [ ] How to run a JIT program
- [ ] How nested tuples can be implemented using the JIT
- [ ] How to call functions which are not built-in into the JIT (if there will be such functions), e.g., from the SQL runtime library
- [ ] How datatypes such as DECIMAL can be implemented
- [ ] How to pass tuples as function arguments