News for hackers. Stuff that matters.
Re:We Can Do Better Than SQL by ldb on Thursday May 09, 2019 @05:47PM (#19872758)
I am still a bit unclear about this. Assume we have three actor records where two records have age=30 and for the remaining one the age is not set. From what I understand then "SELECT sum(age) FROM Actor;" returns "60" while "SELECT 30 + 30 + {}" returns "{}". This appears to be an inconsistent handling of empty sets (thought it would be the same as in SQL).
Re:We Can Do Better Than SQL by RedCrowbar on Thursday May 09, 2019 @06:08PM (#19872926)
The difference is that `+` is defined as a strict function (returns empty on empty input): plus(a, b), whereas sum() is an aggregate that is specifically defined as 0 on empty input.