First complete release of the SQL query engine.
The engine
- Lexer and recursive-descent parser for a
SELECTsubset, with precedence-climbing expressions - Volcano (pull-based) execution: every operator pulls rows from its child, so
LIMITstops the scan early without any operator knowingLIMITexists INNER JOINexecuted by a hash join (build/probe), handling duplicate keys and dropping NULL keys per SQL semantics- Aggregates —
COUNT,SUM,AVG,MIN,MAX— withGROUP BYandHAVING - Three-valued NULL logic throughout: unknown comparisons are excluded by
WHERE, whileGROUP BYcollapses NULL keys into one group - Plan-time name resolution and type checking, so bad queries fail before a row is read
- A REPL over CSV-backed tables described by a small schema file
Correctness
- Differential testing against SQLite with a seeded query generator: 50,000 comparisons across ten seeds, about 15,000 of them joins, with no disagreements
- A NULL semantics suite stating three-valued behaviour as executable specification
- Golden tests per package;
go vetand race-detector tests run in CI
Deliberate divergences from SQLite (integer division, cross-type comparison, booleans) are documented in the README rather than hidden. See docs/design-notes.md for the reasoning behind the execution model, the join, and the testing approach.