Skip to content

EF-322: Add native LINQ query provider project design docs#319

Merged
ajcvickers merged 3 commits into
mongodb:mainfrom
ajcvickers:EF-322-native-query
Jun 25, 2026
Merged

EF-322: Add native LINQ query provider project design docs#319
ajcvickers merged 3 commits into
mongodb:mainfrom
ajcvickers:EF-322-native-query

Conversation

@ajcvickers

Copy link
Copy Markdown
Collaborator

Design docs for the ground-up native LINQ query provider rebuild (EF-322): the provider will translate EF queries to MongoDB aggregation pipelines itself via a canonical query AST and use the C# driver only for low-level execution, replacing delegation to the driver's LINQ provider.

  • Add 2026-06-23-native-query-provider-overview.md — terse review entry point (what + why) with a drill-in map to the full design.
  • Add 2026-06-23-native-query-provider-design.md — full agent-facing design: motivation, spike learnings, target architecture (AST -> stage IR -> pipeline, compile-time generation, user-level query-mode config option), keep-vs-rebuild inventory, and the seven sub-project plan.
  • Remove the superseded spike handoff docs (program + AST-foundation handoff); their durable content is folded into the design docs.

The spike proof-of-concept remains on branch spike/low-level-provider for reference. Sub-project designs/plans land separately.

Design docs for the ground-up native LINQ query provider rebuild (EF-322):
the provider will translate EF queries to MongoDB aggregation pipelines
itself via a canonical query AST and use the C# driver only for low-level
execution, replacing delegation to the driver's LINQ provider.

- Add 2026-06-23-native-query-provider-overview.md — terse review entry
  point (what + why) with a drill-in map to the full design.
- Add 2026-06-23-native-query-provider-design.md — full agent-facing design:
  motivation, spike learnings, target architecture (AST -> stage IR ->
  pipeline, compile-time generation, user-level query-mode config option),
  keep-vs-rebuild inventory, and the seven sub-project plan.
- Remove the superseded spike handoff docs (program + AST-foundation
  handoff); their durable content is folded into the design docs.

The spike proof-of-concept remains on branch spike/low-level-provider for
reference. Sub-project designs/plans land separately.
@ajcvickers
ajcvickers requested a review from damieng June 23, 2026 10:00
@ajcvickers
ajcvickers requested a review from a team as a code owner June 23, 2026 10:00
Copilot AI review requested due to automatic review settings June 23, 2026 10:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

…ct 0 (benchmarks)

Two clarifications surfaced while planning the first stage:

- The spike is reference-only — nothing is ported; everything is rebuilt fresh
  on main. Reword the "keep / carry forward" framing accordingly: the
  keep-vs-rebuild inventory now distinguishes "reuse as-is (already on main)"
  from "reproduce fresh on main (spike-only, design is sound)", and notes the
  chain re-walkers are spike-only and never reproduced.
- Add sub-project 0 (benchmark harness + perf baseline + conformance-baseline
  snapshot), done before any product code, as the measurement yardstick.
  Expand sub-project 1's scope to state it stands up the native execution path,
  materializer, and config-option gate fresh (none exist on main), not only the
  translation. Fix the stale "Auto mode" -> "Native mode".
- Drop "AST" for EF-Core terms (query expression tree / stage IR / query
  translation); make explicit it's built the EF way (custom Expression types).
- Rename MongoStage -> MongoPipelineStage; NativeStrict -> NativeOnly.
- Soften the conformance argument (the driver is extensible, e.g. LeftJoin — not
  a hard blocker); elevate the EF-idiomatic-behavior win (MQL logging + parameter
  redaction via the compiled pipeline, proper async).
- Unspecified-result-order tests are fixed (upstream EF Core PRs where needed),
  not accepted as a limit.
- Retitle the AST-named sections to inclusive names and restore the dropped
  "Keep vs rebuild inventory" heading.

@ajcvickers ajcvickers left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ajcvickers

Copy link
Copy Markdown
Collaborator Author

@damieng Updates are in--can I get your sign-off.

@ajcvickers
ajcvickers merged commit b74fac1 into mongodb:main Jun 25, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants