Skip to content

feat: aggregates, GROUP BY/HAVING, expression type-checking, and CI - #39

Merged
Aybavs merged 7 commits into
mainfrom
codex/m3-aggregates
Aug 4, 2026
Merged

feat: aggregates, GROUP BY/HAVING, expression type-checking, and CI#39
Aybavs merged 7 commits into
mainfrom
codex/m3-aggregates

Conversation

@Aybavs

@Aybavs Aybavs commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Adds M3 to the engine.

Aggregates

  • Parse GROUP BY, HAVING, and aggregate calls (COUNT, SUM, AVG, MIN, MAX)
  • New Aggregate operator with a group-key encoder
  • Planner lowers aggregate expressions and plans grouped queries end to end
  • Correct NULL semantics: AVG over an all-NULL group is NULL, COUNT ignores NULLs

Correctness fixes found while building this

  • Type-check planned expressions, so type errors surface before execution rather than producing garbage at runtime
  • Compare large numeric values exactly instead of routing everything through float64, which lost precision for big integers

Infrastructure

  • Minimal GitHub Actions workflow running vet and race tests

All packages pass go vet ./... and go test -race ./....

Closes #32, closes #33, closes #34, closes #35, closes #36, closes #37, closes #38

@Aybavs
Aybavs merged commit d75f51f into main Aug 4, 2026
1 check passed
@Aybavs
Aybavs deleted the codex/m3-aggregates branch August 4, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant