Skip to content

main: the guard's NULLIF arm is described as an EF Core 11 shape, but EF Core 10.0.0 already writes NULLIF #314

Open

Description

@CaffeinatedCoder

Problem

On main, the guard's NULLIF arm (added in PR #292 for #103) is described as an EF Core 11 shape, in these places:

  • ValueSetSqlGuard.cs:43 and :262: "which EF Core 11 writes".
  • EfCore11ShapeTests.cs:6 and :40: "Two shapes EF Core 11 gives a query".
  • EfCore11RetargetTests.cs:127.

EF Core 10 already writes a == b ? null : a as NULLIF(a, b). Measured 2026-10-19 on EF Core 10.0.0 and 10.0.13: Select(b => b.Id == 5 ? (int?)null : b.Id).ToQueryString() gives SELECT NULLIF(b."Id", 5). Without the arm, a NULLIF over a server-side Union was refused as "This use of it" on 10.x too, which is why PR #313 ports the arm to release/10.x (#303).

Nothing answers wrongly. But the wrong attribution will mislead the next person who reads these files to decide what is 11-only, e.g. which tests to keep when the 10.x line closes.

Change

Say "EF Core" (or "EF Core 10 and later") in the guard's two comments. Move NullIf_OverAServerSideUnion_IsRefusedAsEquality out of EfCore11ShapeTests beside the other Union refusals in SetQueryTranslationTests, where 10.x has it. Correct the remark in EfCore11RetargetTests.

Done when

No comment or test name on main calls NULLIF an EF Core 11 shape. The test lives where 10.x keeps it, so later ports between the lines line up.

Activity

  1. added this to the 11.0.0 milestone on Oct 19, 2026
  2. added
    choreBuild, CI, packaging, refactoring with no behaviour change
    area/value-setsValue set families and wrapper arities
    package/efcoreAffects CodoMetis.ValueRanges.EFCore.PostgreSQL
    on Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/value-setsValue set families and wrapper aritieschoreBuild, CI, packaging, refactoring with no behaviour changepackage/efcoreAffects CodoMetis.ValueRanges.EFCore.PostgreSQL

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions