Describe the bug
I might have created a bit of an edge case I think ;)
In my code, I am using a statement like this:
-- after generation, value is an int?
SELECT CAST(NULL AS INT) AS value;
Which, as expected, results in value being an int? equal to null. If I fill it with a value that is guaranteed to be non-null, it becomes an int, also in line with expectations.
But once I use a UNION, things get a bit unexpected:
-- after generation, value is an int
SELECT CAST(NULL AS INT) AS value
UNION
SELECT CAST(NULL AS INT);
Now, the type of value is int, and Drift believes it can no longer be null.
Describe the bug I might have created a bit of an edge case I think ;)
In my code, I am using a statement like this:
Which, as expected, results in
value
being anint?
equal tonull
. If I fill it with a value that is guaranteed to be non-null, it becomes anint
, also in line with expectations.But once I use a
UNION
, things get a bit unexpected:Now, the type of
value
isint
, and Drift believes it can no longer benull
.