I am not quite sure if or how this is fixable but if COALESCE is called with multiple arguments and one of them is not nullable then the value should also not be nullable.
Example:
Table:
CREATE TABLE ak (
akid int NOT NULL DEFAULT 0,
eladaid int DEFAULT NULL,
eadavk decimal(12,2) NOT NULL
);
Query:
SELECT COALESCE(eladaid, akid) as id FROM ak
I would expect that the value for id is always int