srowen commented on a change in pull request #20793: [WIP][SPARK-23643]
Shrinking the buffer in hashSeed up to size of the seed parameter
URL: https://github.com/apache/spark/pull/20793#discussion_r255303100
##########
File path:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/RandomSuite.scala
##########
@@ -25,17 +25,17 @@ import org.apache.spark.sql.types.{IntegerType, LongType}
class RandomSuite extends SparkFunSuite with ExpressionEvalHelper {
test("random") {
- checkDoubleEvaluation(Rand(30), 0.31429268272540556 +- 0.001)
- checkDoubleEvaluation(Randn(30), -0.4798519469521663 +- 0.001)
+ checkDoubleEvaluation(Rand(30), 0.2762195585886885 +- 0.001)
+ checkDoubleEvaluation(Randn(30), -1.0451987154313813 +- 0.001)
Review comment:
Likewise this test didn't make sense. We can assert maybe that the random
number is within 3 standard deviations, as that is very likely to be true, in
which case this should be `0.0 +- 3.0`. Same below.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]