Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-14310

Call out non-guaranteed order of $unionWith

    XMLWordPrintableJSON

Details

    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.)

      Attachments

        Activity

          People

            sarah.olson@mongodb.com Sarah Olson
            david.percy@mongodb.com David Percy
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              1 year, 41 weeks, 6 days ago