XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Minor - P4
    • Resolution: Duplicate
    • None
    • None
    • Querying
    • None
    • Query

    Description

      Various dialects of SQL have a rand function. We need a pseudo-random function that takes a seed (or not) and produces a pseudo-random sequence.

      {$rand: null}
      

      or

      {$rand: seed}
      

      where seed is an integer. If null is passed, a random seed (up to the implementor) should be choses at the beginning of aggregation. If an integer seed is chosen, the same random sequence (per seed) should be used for each aggregation run, this allows for reproducibility.

      Attachments

        Issue Links

          Activity

            People

              backlog-server-query Backlog - Query Team (Inactive)
              patrick.meredith@mongodb.com Patrick Meredith
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: