otter-sql
otter-sql copied to clipboard
`GROUP BY` support
Overview
This is a tracking issue for adding support for the GROUP BY clause of a SELECT statement. This allows aggregations over unique values of a column.
Tasks
- [x] add instructions for
GROUP BYand aggregations- See the
GroupByinstruction - Aggregations are defined in the
exprforProjectorFilterjust like normal non-grouped aggregations - Note: this is most likely subject to change
- See the
- [x] add
GROUP BYcodegen to the generic dialect - [ ] evaluating
GroupByinstructions and aggregations- from #16, we saw that
GroupByshould probably haveinputandoutputregisters likeProject- we need a different table with an efficient index implementation to look up the grouped columns
- the
HAVINGclause can re-use aggregations that are already computed and it might be difficult to perform common sub-expression elimination here
- from #16, we saw that