Native query: remaining SP6 relational operators (SelectMany, set ops, Distinct, OfType, non-canonical Skip/Take)

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • Dotnet Drivers
    • None
    • None
    • None
    • None
    • None
    • None

      Native LINQ query rewrite sub-project (epic EF-322) — the remainder of the roadmap's SP6 "remaining operators" bucket. EF-344 already delivered the GroupBy slice of SP6; this ticket covers the remaining relational operators, pushing more shapes onto the provider's native aggregation-pipeline path instead of falling back to the driver-LINQ provider.

      Candidate operators (the roadmap's SP6 line, minus GroupBy [shipped in EF-344] and VectorSearch [split out to EF-348]):

      • SelectMany (correlated / collection-selector projections)
      • Set operations: Intersect / Except / proper Union (vs the current UnionWith fallback)
      • Distinct
      • OfType / type tests (discriminator narrowing)
      • Non-canonical Skip/Take (pushdown-into-subquery — the documented extension of the canonical-order rule)

      Discipline (same as prior native sub-projects): zero regressions, no coverage shrink, driver-LINQ fallback kept behind each shape; unsupported shapes fall back cleanly (throw only under NativeOnly). Native becoming the default path and the exact emitted MQL are implementation details, not breaking changes (per the provider's versioning rubric) — query results unchanged.

      Scope note: this is a heterogeneous grab-bag and will be SEQUENCED / SPLIT into shippable slices during brainstorming/design — the exact first slice is decided at kickoff. Likely clustering: Distinct/OfType/set-ops (share $group/$unionWith machinery), SelectMany (correlated projection), non-canonical Skip/Take (small, self-contained). Ships as stacked branch(es) on top of SP6/GroupBy (EF-344, currently origin/NativeQueryOngoing tip), one squashed commit per shippable slice, per the native-rewrite stacked-PR workflow.

      Comes before SP7 (materializer perf — one-pass stream→POCO). VectorSearch split to EF-348 (distinct feature, own reviewer; orthogonal ordering).

      Roadmap: docs/superpowers/specs/2026-06-23-native-query-provider-design.md, "Sub-projects 2–7", item 6. GroupBy slice: EF-344.

            Assignee:
            Unassigned
            Reporter:
            Arthur Vickers
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: