You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A projected raw CompareTo against a null range throws; memory answers 1 #253
area/rangesRange unions, variants and the shape enginesbugSomething isn't workingpackage/efcoreAffects CodoMetis.ValueRanges.EFCore.PostgreSQLseverity/lowCosmetic, message or documentation-level difference
Select(r => r.Seats.CompareTo(none)) with none == null translates to CASE WHEN r."Seats" > NULL THEN 1 WHEN r."Seats" < NULL THEN -1 END. That yields SQL NULL, and materializing it throws "Nullable object must have a value". In memory the call answers 1 (null sorts first). #227's rewriter covers only comparisons with 0. A non-null operand gives the right values. Confirmed live on PostgreSQL 17 by the final pre-release analysis on add665c. It fails loudly.
Change
Apply the same null test the #227 rewriter uses to a raw CompareTo in a projection (CASE WHEN @p IS NULL THEN 1 ELSE … END), or document that a null operand in a projected raw CompareTo throws.
Done when
The projection returns memory's answers for a null and a non-null operand (live test), or the docs and a claim state the exception.
area/rangesRange unions, variants and the shape enginesbugSomething isn't workingpackage/efcoreAffects CodoMetis.ValueRanges.EFCore.PostgreSQLseverity/lowCosmetic, message or documentation-level difference
Activity