track projection nullability through expressions
Since we now have a basic support for NULLs I imagine it must be pretty easy to propagate information about nullability through expressions. The rules are quite simple: other than functions/operators specifically operating on nulls, everything else should be nullable if one of the operands is nullable.
NULLIF(X, Y) is always nullable
IFNULL(Xn... ) and COALESCE(Xn...) are nullable if every Xn is nullable
IS [NOT] DISTINCT FROM and <=> are not nullable
all (?) aggregate functions except for COUNT() are nullable.
The current state is all works as it needs besides <=>
I like the OP "pretty easy" claim :joy_cat:
t turned out that it wasn't just that, there were still small inaccuracies in the functions https://github.com/ygrek/sqlgg/pull/228