-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Aggregation Framework
-
None
-
Fully Compatible
-
Query 2019-05-06, Query 2019-05-20, Query 2019-06-03, Query 2019-06-17
Remove any special kind of $out stage, translate existing tests to use $merge:
Written as | Translates to | |
---|---|---|
{$out: { to: "x", uniqueKey: {x_id: 1}, mode: "insertDocuments" }} |
⟶ | {$merge: { into: "x", on: "x_id" whenMatched: "fail", whenNotMatched: "insert" }} |
{$out: { to: "x", uniqueKey: {x_id: 1}, mode: "replaceDocuments" }} |
⟶ | {$merge: { into: "x", on: "x_id", whenMatched: "replaceWithNew", whenNotMatched: "insert" }} |
- depends on
-
SERVER-41198 Translate $out tests in jstests/aggregation/sources/out to use $merge
- Closed
-
SERVER-41199 Translate $out tests in jstests/sharding to use $merge
- Closed
-
SERVER-41200 Translate tests in other directories to use $merge
- Closed
-
SERVER-40430 Add $merge support for whenMatched: 'merge'
- Closed
-
SERVER-40431 Add $merge support for whenMatched: pipeline
- Closed