Skip to content

Lambda translator: the 5.x port with null compensation, templates and the parity sweep #26

Open
4 of 6 issues completed

Description

@CaffeinatedCoder

2026-11-12, merged (PR #75, closed #74): the parity sweep. 5.x's sweep is ported as files and was green on its first run with 5.x's waivers: 2,575 rows, 1,199 agree with EF Core's ToQueryString(), 349 differ and are waived with their reasons, and the rows claimed to answer alike do so on PostgreSQL 18.

Still open here: members of a JSON document in the sweep (ParityCatalogue.JsonMembers, with the rendering, #43); [SchemaFunction] markers for other packages; SQL Server's spellings (with #29).


2026-11-12, merged (PR #72, closed #71): the first slice. 5.x's translator is in the kernel, internal, with its rules unchanged and its tables kept: expressions and predicates, null compensation included. It writes templates in the resolver's grammar, so 5.x's brace escape is gone. It comes before the PostgreSQL package (#25) by the maintainer's decision.

Still open here: the parity sweep against EF Core's ToQueryString() and the answers-alike run on PostgreSQL 18, ported from 5.x as files; [SchemaFunction] markers for other packages; and SQL Server's spellings (with #29). Until the sweep is here, nothing checks that a template is what EF Core's queries write.


Before any preview with typed predicates. Plan, section 3.9.

Change

  • Port NpgsqlLinqIndexTranslator from CaffeinatedCoder/EFCore.ComplexIndexes into the kernel, in full. The prototype renders x.Tag != "blocked" as "Tag" <> 'blocked', which leaves out rows whose tag is null where C# keeps them; under a partial unique index that admits duplicates.
  • The output is provider-specific placeholder text, stored as written at declaration.
  • [SchemaFunction] markers for other packages; a function not marked immutable is refused in an index.
  • The parity sweep and its answers-alike test on a live server come with it, read from the translator's own tables.

Done when

The sweep is green against EF Core's ToQueryString() and on PostgreSQL 18, and every waiver has its reason.

Sub-issues

Sub-issues

4 of 6 Issues completed
Loading 6 sub-issues

Activity

  1. added this to the 11.0.0 milestone on Nov 11, 2026
  2. added
    enhancement
    package/core
    area/expression-indexes
    on Nov 11, 2026
  3. CaffeinatedCoder commented on Nov 14, 2026

    @CaffeinatedCoder
    OwnerAuthor

    From the pre-preview sweep of main @ 948496a, 2026-11-14. #103 is the narrowing cast. Two more that were read and not filed, since each is a limit of translating without a model rather than a defect of a rule:

    • Nullability is the CLR annotation's. string Code with .IsRequired(false) gets no null compensation for x.Code != "blocked", and EF Core's query for the same lambda does, because it reads the column. Oblivious code counts as nullable, so this takes an annotation and a configuration that disagree. To decide: a documented limit, or the resolver checks each compared path's column against what the template assumed, which needs the template to say what it assumed.
    • x.Code.Replace("a", null) is written as replace(code, 'a', NULL), which is NULL where .NET returns the string without a. A captured null argument to a method of the tables should be refused or written as ''.

    The round-trip lens ran 15 filters stored by the published 5.6.0 against the same lambdas declared here (nullable !=, ||, negations, ??, Trim, Substring, a converted member, literals with \, " and a newline): zero operations for each.

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/expression-indexesenhancementpackage/core

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions