[SERVER-32928] $rand function Created: 26/Jan/18 Updated: 06/Dec/22 Resolved: 29/Jan/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Minor - P4 |
| Reporter: | Patrick Meredith | Assignee: | Backlog - Query Team (Inactive) |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Query
|
||||||||
| Participants: | |||||||||
| 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.
or
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. |
| Comments |
| Comment by Callum Gare [ 18/Nov/20 ] |
|
I believe this is not actually the same and should be reopened. The ticket it has been marked as a duplicate of does not include the ability to seed random which is what I need. |
| Comment by David Storch [ 29/Jan/18 ] |
|
Closing as a duplicate of |