[ 
https://issues.apache.org/jira/browse/TRAFODION-3042?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16452585#comment-16452585
 ] 

ASF GitHub Bot commented on TRAFODION-3042:
-------------------------------------------

Github user asfgit closed the pull request at:

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


> RAND() function is not always random
> ------------------------------------
>
>                 Key: TRAFODION-3042
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-3042
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: sql-exe
>    Affects Versions: 2.2.0
>            Reporter: Hans Zeller
>            Assignee: Hans Zeller
>            Priority: Major
>
> When trying the RAND() function, I found that it does not always behave as I 
> would expect. I tried this example:
> {noformat}
> >>select rand(), rand(), rand() from dual;
> (EXPR)      (EXPR)      (EXPR)    
> ----------  ----------  ----------
>   78242471    78511383    78612225
> --- 1 row(s) selected.
> >>select rand(), rand(), rand() from dual;
> (EXPR)      (EXPR)      (EXPR)    
> ----------  ----------  ----------
> 1589208276  1589460381  1589561223
> --- 1 row(s) selected.
> >>select rand(), rand(), rand() from dual;
> (EXPR)      (EXPR)      (EXPR)    
> ----------  ----------  ----------
> 134371215   134724162   134858618
> --- 1 row(s) selected.
> >>
> {noformat}
> So, it seems that if we call rand() within a very short time, the value will 
> be non-random.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to