Drivers should add a new let option to aggregate helper methods and sync CRUD unified spec tests with mongodb/specifications@3a58fc6.
For MongoDB 5.0+, the aggregate command accepts a let option of type object. This object consists of any amount of parameter names each followed by definitions of constants in the MQL Aggregate Expression language. Each parameter name is then usable to access the value of the corresponding MQL Expression with the "$$" syntax within Aggregate Expression contexts which may require the use of $expr or a pipeline.
Note: this ticket only pertains to changes for aggregate. Support for let in other commands (involving pipelines or $expr) will be handled by DRIVERS-1788.
Description of Linked Ticket
Summary
Deprecate the MR command and ensure its functionality is fully supported by Agg. The backend of the command has already been replaced by “MapReduce in Agg” (PM-776), we need to make sure all necessary concepts can be expressed in MQL.
Motivation
One objective of the query team is to consolidate dialects of all existing query commands into a single language. This project enables users to write their MR tasks directly in Agg, which provides a more capable and clear syntax. We want to move users away from legacy ways of interacting with the system. Independently, from MR jobs, some extensions are valuable for the users.
Documentation
Scope Document
Technical Design Document
- depends on
-
SERVER-57403 Serialization error in let variables in a sharded cluster
- Closed
-
SERVER-46707 Support 'let' variables in aggregate command in sharded deployments
- Closed
-
SERVER-46115 Implement 'let' parameters to aggregate commands
- Closed
-
SERVER-46998 Support 'let' variables used within $merge custom pipeline update
- Closed
- split to
-
JAVA-4186 Support 'let' option for aggregate command
- Closed
-
PHPLIB-663 Support 'let' option for aggregate command
- Closed
-
RUST-836 Support 'let' option for aggregate command
- Closed
-
CDRIVER-4010 Support 'let' option for aggregate command
- Closed
-
CSHARP-3700 Support 'let' option for aggregate command
- Closed
-
CXX-2274 Support 'let' option for aggregate command
- Closed
-
GODRIVER-2033 Support 'let' option for aggregate command
- Closed
-
MOTOR-745 Support 'let' option for aggregate command
- Closed
-
NODE-3325 Support 'let' option for aggregate command
- Closed
-
PYTHON-2741 Support 'let' option for aggregate command
- Closed
-
RUBY-2659 Support 'let' option for aggregate command
- Closed
-
NODE-3353 Test for aggregate $out stage using the let option
- Closed