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
10.x: the empty-root rewrite casts EF Core's _ord column to the range type on EF Core 10.0.2 and later (port of #319) #325
The same defect as #319, on release/10.x. When EF Core replaces an empty captured list with its own SELECT … WHERE FALSE (10.0.2 and later, dotnet/efcore#37216), TypeTheNulls casts EF Core's _ord ordering column to the range type.
Measured on release/10.x at 3ed738e with -p:EfFloat=10.0.13 -p:NpgsqlEfFloat=10.0.3, for db.Bookings.Select(b => empty.Where(w => w.Overlaps(b.Seats)).FirstOrDefault()):
FROM (
SELECTNULL::int4range AS _ord, NULL::int4range AS"Value"WHERE FALSE
) AS e
WHERE e."Value" && b."Seats"ORDER BYe._ord
On the EF Core 10.0.0 floor, OneRowOfNulls writes the same column as 0: FROM (VALUES (0, NULL::int4range)) AS e(_ord, "Value").
This is latent, as described in #319: no row exists and ORDER BY over a range NULL is valid, so nothing fails today. It shipped in 10.1.0 with the #302 fix.
Change
Cherry-pick the #319 fix with -x, with its test. On this branch the test runs on the newest-patch leg (#297), since the floor never reaches TypeTheNulls.
Release
Not silent; no answer changes. It goes to whichever 10.x release picks it up.
PR #390 cherry-picks the #319 fix (PR #389) with -x. The test pins both EF Core paths. On 10.0.13 it fails with the fix stripped; on the floor it can't, because the floor never reaches TypeTheNulls. Close this by hand after the merge, since Closes doesn't act on release/10.x.
Fixed on release/10.x by PR #390, merge commit 9af5842 (a cherry-pick of 474fc44 from PR #389, which fixed #319 on main). It ships in 10.2.0 (#358). Closed by hand, since Closes doesn't act on release/10.x.
Activity
CaffeinatedCoder commentedon Oct 24, 2026
Moved into 10.2.0 (epic #358) on 2026-10-24. The fix is small, and #319 lands on
mainfirst.CaffeinatedCoder commentedon Oct 24, 2026
PR #390 cherry-picks the #319 fix (PR #389) with
-x. The test pins both EF Core paths. On 10.0.13 it fails with the fix stripped; on the floor it can't, because the floor never reachesTypeTheNulls. Close this by hand after the merge, sinceClosesdoesn't act onrelease/10.x.Merge pull request #390 from CaffeinatedCoder/fix/325-ord-cast-10.x
CaffeinatedCoder commentedon Oct 24, 2026
Fixed on
release/10.xby PR #390, merge commit 9af5842 (a cherry-pick of 474fc44 from PR #389, which fixed #319 onmain). It ships in 10.2.0 (#358). Closed by hand, sinceClosesdoesn't act onrelease/10.x.