[SERVER-41198] Translate $out tests in jstests/aggregation/sources/out to use $merge Created: 17/May/19  Updated: 29/Oct/23  Resolved: 23/May/19

Status: Closed
Project: Core Server
Component/s: Aggregation Framework
Affects Version/s: None
Fix Version/s: 4.1.12

Type: Task Priority: Major - P3
Reporter: Charlie Swanson Assignee: Nicholas Zolnierz
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-41201 Add replacement for "withEachOutMode" Closed
is depended on by SERVER-41197 De-duplicate $out and $merge testing Closed
is depended on by SERVER-40432 Undo 4.2 changes to $out Closed
Related
related to SERVER-41200 Translate tests in other directories ... Closed
is related to SERVER-41199 Translate $out tests in jstests/shard... Closed
Backwards Compatibility: Fully Compatible
Sprint: Query 2019-06-03
Participants:

 Description   

For this task we just want to translate tests of modes "insertDocuments" and "replaceDocuments". Don't worry about removing duplicate coverage, that will be done by SERVER-41197.

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"
}}



 Comments   
Comment by Githook User [ 23/May/19 ]

Author:

{'name': 'Nick Zolnierz', 'email': 'nicholas.zolnierz@mongodb.com', 'username': 'nzolnierzmdb'}

Message: SERVER-41198 Translate $out tests in jstests/aggregation/sources/out to use $merge
Branch: master
https://github.com/mongodb/mongo/commit/f2b7b6ecde3f3e6d164609163129ccbebb1426d7

Generated at Thu Feb 08 04:57:05 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.