Skip to content

Repeated-execution sweep: one query run with its parameters walked through null, finite, empty and infinite, and compiled queries #378

Closed

Description

@CaffeinatedCoder

Problem

Every sweep runs each query once. EF Core caches the compiled query by its expression shape and sniffs some parameter values (a null parameter, an empty collection) when it builds the SQL, so a query that is right for the first value it sees can be reused for a value it no longer fits. No EF test project in this repository uses EF.CompileQuery or EF.CompileAsyncQuery.

Change

A sweep, RepeatedExecutionProbeTests (integration project, a database of its own). The same query objects run with a captured range, RangeSet and value set parameter walked through null → finite → empty → infinite → null and back, and with captured lists walked through empty → one element → duplicates → empty. Each execution is compared with memory over the loaded rows, with rule (c) for a null operand. The same queries also run as EF.CompileQuery and EF.CompileAsyncQuery delegates with the values passed as arguments. Disagreements go through Candidates.Verdict, naming the value sequence position.

Done when

Registered in test/oracles/oracles.json with a seed it is shown to catch; every disagreement is an issue and a candidates.json entry.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/range-setRangeSet and multirange algebraarea/rangesRange unions, variants and the shape enginesarea/value-setsValue set families and wrapper aritiespackage/efcoreAffects CodoMetis.ValueRanges.EFCore.PostgreSQLtestsAdds or changes tests only (oracles, harnesses); no library code

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions