-
Type: New Feature
-
Resolution: Duplicate
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Querying
-
None
-
Query
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.
Unable to find source-code formatter for language: javascript. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
{$rand: null}
or
Unable to find source-code formatter for language: javascript. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
{$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.
- duplicates
-
SERVER-30405 add expression to generate a random number
- Closed