Designing a query language where clauses read in execution order — what trade-offs have you hit? #211197
Replies: 1 comment
|
Nice project. A few thoughts from someone who writes a lot of SQL and Python against DuckDB. You are in good company, and it is worth saying so in the README. "Stages in execution order" is exactly what PRQL does (it also compiles to SQL, DuckDB dialect included), what KQL does in Azure Data Explorer ( Discoverability vs familiarity. Pipeline order wins in two places. First, teaching: it matches SQL's logical evaluation order (FROM, WHERE, GROUP BY, HAVING, SELECT, ORDER BY, LIMIT), which is the thing beginners trip over. Second, tooling: once A concrete grammar suggestion: you may not need What I would add next, in this order:
What makes me try a new query language instead of a SQL generator I already have:
I would hold off on anything that does not compile to a plain SQL string, because that is what keeps the language a thin layer rather than a new database. |
Uh oh!
There was an error while loading. Please reload this page.
🏷️ Discussion Type
Question
Body
I'm building UNSeQueL, a query language where a program is a pipeline of stages in the order they execute: from, filter, join, group by + aggregate, having, sort, take. It compiles to DuckDB SQL. The motivation is that SQL's keyword order (SELECT before FROM, HAVING after GROUP BY) doesn't match how you reason about a query.
I'd like the community's perspective on the design trade-offs:
Background and grammar: https://github.com/absterjr/UNSeQueL (docs at https://absterjr.github.io/UNSeQueL/).
Guidelines
All reactions