Details
-
Task
-
Resolution: Fixed
-
Major - P3
-
None
-
None
Description
Description
Downstream Change Summary
We added a new expression, {$rand:{}} which generates a random number between 0 and 1 (as a float). It takes no arguments.
$rand returns a different value every time it is called. If instead you want to pick a single random number to use for the whole query, you can call $rand in a command-level let variable.
Description of Linked Ticket
For generating a random number during aggregation or something like SERVER-22225 it would be nice to have a way to generate a (pseudo-)random number, either as an expression or an a system variable.
Scope of changes
Impact to Other Docs
MVP (Work and Date)
Resources (Scope or Design Docs, Invision, etc.)
Attachments
Issue Links
- documents
-
SERVER-30405 add expression to generate a random number
-
- Closed
-