[DOCS-14310] Call out non-guaranteed order of $unionWith Created: 24/Mar/21  Updated: 13/Nov/23  Resolved: 08/Feb/22

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: 4.4.0, 5.0.0, 5.2.0, Server_Docs_20231030, Server_Docs_20231106, Server_Docs_20231105, Server_Docs_20231113

Type: Improvement Priority: Major - P3
Reporter: David Percy Assignee: Sarah Olson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Days since reply: 2 years, 1 day ago
Epic Link: DOCSP-11701

 Description   

Description

Currently, $unionWith outputs documents in a predictable order. But it's not guaranteed: users should assume that $unionWith can output documents in any order.

The page for $unionWith doesn't mention ordering one way or the other. It would be good to explicitly warn people that the order is not guaranteed. (We've done this for other operators, like $addToSet.)

The Versioned API Scope talks about why we don't want to promise the output order will stay predictable: it leaves the door open for us to optimize it better in the future.

Scope of changes

Impact to Other Docs

MVP (Work and Date)

Resources (Scope or Design Docs, Invision, etc.)



 Comments   
Comment by Sarah Olson [ 08/Feb/22 ]

This has been reviewed, backported, and merged. Closing as fixed. Please feel free to give a shout with any additional comments.

Comment by Githook User [ 08/Feb/22 ]

Author:

{'name': 'Sarah Olson', 'email': '98367156+sarah-olson-mongodb@users.noreply.github.com', 'username': 'sarah-olson-mongodb'}

Message: DOCS-14310: Add output order disclaimer. (#495) (#563)

Co-authored-by: Sarah Olson <sarah.olson@Sarahs-MacBook-Pro.local>

Co-authored-by: Sarah Olson <sarah.olson@Sarahs-MacBook-Pro.local>
Branch: v4.4
https://github.com/10gen/docs-mongodb-internal/commit/91b05200fd62e2ca79731a3e39059c351ef4a08c

Comment by Githook User [ 08/Feb/22 ]

Author:

{'name': 'Sarah Olson', 'email': '98367156+sarah-olson-mongodb@users.noreply.github.com', 'username': 'sarah-olson-mongodb'}

Message: DOCS-14310: Add output order disclaimer. (#495) (#562)

Co-authored-by: Sarah Olson <sarah.olson@Sarahs-MacBook-Pro.local>

Co-authored-by: Sarah Olson <sarah.olson@Sarahs-MacBook-Pro.local>
Branch: v5.0
https://github.com/10gen/docs-mongodb-internal/commit/75f2054a5fcc422bd0d2c352d8dc58c2e147b91a

Comment by Githook User [ 08/Feb/22 ]

Author:

{'name': 'Sarah Olson', 'email': '98367156+sarah-olson-mongodb@users.noreply.github.com', 'username': 'sarah-olson-mongodb'}

Message: DOCS-14310: Add output order disclaimer. (#495) (#561)

Co-authored-by: Sarah Olson <sarah.olson@Sarahs-MacBook-Pro.local>

Co-authored-by: Sarah Olson <sarah.olson@Sarahs-MacBook-Pro.local>
Branch: v5.2
https://github.com/10gen/docs-mongodb-internal/commit/4ba75133bcec88e83135045e62e660ee148eb008

Comment by Githook User [ 03/Feb/22 ]

Author:

{'name': 'Sarah Olson', 'email': '98367156+sarah-olson-mongodb@users.noreply.github.com', 'username': 'sarah-olson-mongodb'}

Message: DOCS-14310: Add output order disclaimer. (#495)

Co-authored-by: Sarah Olson <sarah.olson@Sarahs-MacBook-Pro.local>
Branch: master
https://github.com/10gen/docs-mongodb-internal/commit/10cc64e606a5f35188881e801c72301849fe003f

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