The broken test case does not pass on SQLite so it's wrong. I suspect
the test was written before commit e377e09 ("Fix avg(), total(), count()
default value on empty set") when Limbo showed this behavior.
- Returns 0.0 when called on non integer / non float columns
- Always returns floating point number
- fix: default for sum() should be NULL when there is no non-NULL row
per docs
Values in sqlite3, as expected, can be stored in different formats to
optimize disk usage. In this case, a 79.0 float will be transformed to a
u8.
sqlite3 deals with this by adding a RealAffinity op after each column
that might need it. Therefore, in this pr we do exactly that :).
Signed-off-by: Pere Diaz Bou <pere-altea@hotmail.com>