GitHub user zellerh opened a pull request:

    https://github.com/apache/trafodion/pull/1539

    [TRAFODION-3042] RAND() function is not always random

    When called without a seed, we use a seed based on the system timestamp. 
The random generator we use generates similar output values for seeds that are 
close together. Adding another randomization step to avoid that.
    
    Also switched from a microsecond to a nanosecond-based timestamp.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/zellerh/trafodion bug/R23a

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/trafodion/pull/1539.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1539
    
----
commit 36e21b2c9c722bbcb551c35a761f069811051ea0
Author: Hans Zeller <hzeller@...>
Date:   2018-04-24T21:39:16Z

    [TRAFODION-3042] RAND() function is not always random
    
    When called without a seed, we use a seed based on the
    system timestamp. The random generator we use generates similar
    output values for seeds that are close together. Adding another
    randomization step to avoid that.

commit 4f834729efa2c9ae74922f1f32226a29b6f8d7d0
Author: Hans Zeller <hzeller@...>
Date:   2018-04-24T22:01:37Z

    [TRAFODION-3042] Switch to nanosecond-resolution time
    
    Getting ready for the day where we can do two RAND() calls
    in a microsecond - hopefully soon :-)

----


---

Reply via email to