Skip to content

CSHARP-6223: Fix client-side projection crash on member-init projections - #2123

Merged
damieng merged 1 commit into
mongodb:mainfrom
damieng:CSHARP-6223
Sep 17, 2026
Merged

damieng merged 1 commit into
mongodb:mainfrom
damieng:CSHARP-6223

Conversation

@damieng

@damieng damieng commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@damieng
damieng requested a review from a team as a code owner September 11, 2026 09:36
@damieng
damieng requested review from BorisDog and a lite review from Copilot September 11, 2026 09:36
@damieng damieng added the bug Fixes issues or unintended behavior. label Sep 11, 2026

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.

🟢 Approval recommended

No unresolved review issues were identified, and targeted regression coverage was added.

Pull request overview

Fixes LINQ3 client-side projection crashes involving member and collection initializers.

Changes:

  • Preserves constructor expressions while rewriting initializer children.
  • Adds regression coverage for nested and collection initializer projections.
File summaries
File Summary
tests/MongoDB.Driver.Tests/Linq/Integration/ClientSideProjectionWithMemberInitTests.cs Adds regression tests for client-side projection scenarios.
src/MongoDB.Driver/Linq/Linq3Implementation/Translators/ExpressionToAggregationExpressionTranslators/ClientSideProjectionRewriter.cs Safely rewrites member and list initializer expressions.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@damieng
damieng removed the request for review from BorisDog September 11, 2026 11:48

@sanych-sun sanych-sun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@damieng
damieng merged commit 132f0a9 into mongodb:main Sep 17, 2026
28 of 34 checks passed
@damieng
damieng deleted the CSHARP-6223 branch September 17, 2026 12:46
sanych-sun

This comment was marked as duplicate.

damieng added a commit that referenced this pull request Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Fixes issues or unintended behavior.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants