mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-04 00:44:19 +01:00
Simple implementation for aggregation functions. The code added is purposely so that we can add things like `CEILING(avg(n))` in the future. Aggregation function impose a higher level of complexity that requires us to plan ahead several things: * simple avg: `select avg(id) from users` * nested avg: `select ceiling(avg(id)) from users` * avg with other columns: `select ceiling(avg(id)), * from users` (yes, this is valid sqllite). For now I'm nullifying extra columns for simplicity. * avg with other agg functions: `select avg(id), sum(id) from users`. This should be supported. * At last -- Order By is a painful enough case to treat alone (not done in this pr) Signed-off-by: Pere Diaz Bou <pere-altea@hotmail.com>