[CSHARP-4863] Refactor AggregateMethodToAggregationExpressionTranslator to produce simpler translations when possible Created: 05/Dec/23  Updated: 07/Dec/23  Resolved: 07/Dec/23

Status: Closed
Project: C# Driver
Component/s: LINQ3
Affects Version/s: None
Fix Version/s: 2.23.0

Type: Improvement Priority: Unknown
Reporter: Robert Stam Assignee: Robert Stam
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by CSHARP-4859 Support nested AsQueryable Closed
Backwards Compatibility: Fully Compatible
Documentation Changes: Not Needed
Documentation Changes Summary:

1. What would you like to communicate to the user about this feature?
2. Would you like the user to see examples of the syntax and/or executable code and its output?
3. Which versions of the driver/connector does this apply to?


 Description   

The Aggregate method translator uses $let to assign the source expression to a source variable.

But when the source expression is something simple like a field name the $let can be omitted and the field used directly.



 Comments   
Comment by Githook User [ 07/Dec/23 ]

Author:

{'name': 'rstam', 'email': 'robert@robertstam.org', 'username': 'rstam'}

Message: CSHARP-4863: Refactor AggregateMethodToAggregationExpressionTranslator to produce simpler translations when possible.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/a322f26e3d9a8d2dacaba01e840abc57e204979e

Generated at Wed Feb 07 21:49:36 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.