Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
Add RAND function, returning DOUBLE values in the range 0..1. It has variants RAND() and RAND(seed).
Also, add RAND_INTEGER(seed, bound), support for a seed when generating random integers.
To support seeds, the random function needs to have state. The random number generator is initialized, using the seed, on first use, and subsequent calls use the same random number generator. So, we are building on CALCITE-1548.
Attachments
Issue Links
- depends upon
-
CALCITE-1548 Instantiate function objects once per query
- Closed
- is related to
-
CALCITE-2142 Set rand() function as non-deterministic.
- Open