4 ms·
We should really standardize a core language for SQL. Rust has MIR, Clang is making a CIR for C/C++. Once we have that, we'll be able to to communicate much bet
by Ericson2314 2y ago
We should really standardize a core language for SQL. Rust has MIR, Clang is making a CIR for C/C++. Once we have that, we'll be able to to communicate much better.
Right now, it's everyone faffing around with different mental models and ugly single pass compilers (my understanding is that parsing-->query planning is not nearly as well-separated in most DBs as parsing-->optomize-->codegen in most compilers).
- anothername12 2y ago> We should really standardize a core language for SQL Do you mean something other than ISO/IEC 9075:2023 (the 9th edition of the SQL standard)?
- roenxi 2y agoIt costs 194 CHF to read. There is room for improvement.
- Ericson2314 2y agoA core language is a minimal AST without surface syntax (and thus no bikeshedding of that) that distills the surface language to its essence.
- Ericson2314 2y agoSQL is basically the list monad, with various quotients / refinements: - Sometimes the order doesn't matter - Sometimes there are functional dependencies - Sometimes one knows the length of the list in question is 1 (foreign key constraints)
- rrrrrrrrrrrryan 2y agoANSI SQL is very much a thing, and you should strive to keep your queries as close as possible to standard SQL as your database engine allows, if you want those queries to be portable to other database technology in the future.
- yencabulator 2y agoYou might enjoy https://substrait.io/ https://substrait.io/