-
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 SP6 (epic EF-322).
Pushes LINQ GroupBy aggregation onto the provider's native aggregation-pipeline path ($group), so grouping queries no longer round-trip through the driver-LINQ provider (or fall back to it).
Scope (SP6 = GroupBy slice of the roadmap's "remaining operators"):
- GroupBy with key selector + aggregate result selector translated to a $group stage ($sum/$avg/$min/$max/$count accumulators over the group).
- Grouping key rendering (scalar and composite/anonymous keys).
- Retire the relevant driver-LINQ cutout for supported GroupBy shapes; unsupported shapes continue to fall back to driver-LINQ (correct results; throw under NativeOnly).
Out of scope / deferred to a later SP: SelectMany, set operations (Intersect/Except/Union), Distinct, OfType/type tests, VectorSearch, non-canonical Skip/Take. These are the rest of the roadmap's SP6 grab-bag and get their own ticket(s).
Discipline (same as prior native sub-projects): zero regressions, no coverage shrink, driver-LINQ fallback kept behind the feature. Native becoming the default path and the changed emitted MQL are implementation details, not breaking changes (per the provider's versioning rubric) — query results are unchanged.
Ships as a stacked branch on top of SP5 (EF-339), one squashed commit with a full PR-style message, per the native-rewrite stacked-PR workflow.
Design + plan: to be added under docs/superpowers/specs|plans/ during the design-review step.
Roadmap reference: docs/superpowers/specs/2026-06-23-native-query-provider-design.md, "Sub-projects 2–7", item 6.