Jim Apple has posted comments on this change. ( http://gerrit.cloudera.org:8080/8355 )
Change subject: IMPALA-5754: Improve randomness of rand()/random() ...................................................................... Patch Set 14: (1 comment) http://gerrit.cloudera.org:8080/#/c/8355/14/be/src/exprs/math-functions-ir.cc File be/src/exprs/math-functions-ir.cc: http://gerrit.cloudera.org:8080/#/c/8355/14/be/src/exprs/math-functions-ir.cc@165 PS14, Line 165: mt19937* generator = ctx->Allocate<mt19937>(); > That does increase the chance of query failure. It might take a while. It initializes a state of 624 32-bit values, as you can see here: (for loop with state_size) https://github.com/gcc-mirror/gcc/blob/846deaf01bfe46e0db44402858ab1b7ee43f4023/libstdc%2B%2B-v3/include/bits/random.tcc#L326 (state_size definition depends on __n) https://github.com/gcc-mirror/gcc/blob/846deaf01bfe46e0db44402858ab1b7ee43f4023/libstdc%2B%2B-v3/include/bits/random.h#L472 (__n is 624) https://github.com/gcc-mirror/gcc/blob/846deaf01bfe46e0db44402858ab1b7ee43f4023/libstdc%2B%2B-v3/include/bits/random.h#L1524 See also: https://godbolt.org/g/n4ieAN -- To view, visit http://gerrit.cloudera.org:8080/8355 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Idafdd5fe7502ff242c76a91a815c565146108684 Gerrit-Change-Number: 8355 Gerrit-PatchSet: 14 Gerrit-Owner: Kim Jin Chul <[email protected]> Gerrit-Reviewer: Attila Jeges <[email protected]> Gerrit-Reviewer: Impala Public Jenkins Gerrit-Reviewer: Jim Apple <[email protected]> Gerrit-Reviewer: Kim Jin Chul <[email protected]> Gerrit-Reviewer: Michael Ho <[email protected]> Gerrit-Comment-Date: Fri, 17 Nov 2017 04:32:31 +0000 Gerrit-HasComments: Yes
