You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by rx...@apache.org on 2015/07/29 18:36:30 UTC

spark git commit: [SPARK-9127][SQL] Rand/Randn codegen fails with long seed.

Repository: spark
Updated Branches:
  refs/heads/master 708794e8a -> 97906944e


[SPARK-9127][SQL] Rand/Randn codegen fails with long seed.

Author: Reynold Xin <rx...@databricks.com>

Closes #7747 from rxin/SPARK-9127 and squashes the following commits:

e851418 [Reynold Xin] [SPARK-9127][SQL] Rand/Randn codegen fails with long seed.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/97906944
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/97906944
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/97906944

Branch: refs/heads/master
Commit: 97906944e133dec13068f16520b6abbcdc79e84f
Parents: 708794e
Author: Reynold Xin <rx...@databricks.com>
Authored: Wed Jul 29 09:36:22 2015 -0700
Committer: Reynold Xin <rx...@databricks.com>
Committed: Wed Jul 29 09:36:22 2015 -0700

----------------------------------------------------------------------
 .../apache/spark/sql/catalyst/expressions/RandomSuite.scala   | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/97906944/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/RandomSuite.scala
----------------------------------------------------------------------
diff --git a/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/RandomSuite.scala b/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/RandomSuite.scala
index 698c81b..5db9926 100644
--- a/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/RandomSuite.scala
+++ b/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/RandomSuite.scala
@@ -20,8 +20,6 @@ package org.apache.spark.sql.catalyst.expressions
 import org.scalatest.Matchers._
 
 import org.apache.spark.SparkFunSuite
-import org.apache.spark.sql.catalyst.dsl.expressions._
-import org.apache.spark.sql.types.DoubleType
 
 
 class RandomSuite extends SparkFunSuite with ExpressionEvalHelper {
@@ -30,4 +28,9 @@ class RandomSuite extends SparkFunSuite with ExpressionEvalHelper {
     checkDoubleEvaluation(Rand(30), 0.7363714192755834 +- 0.001)
     checkDoubleEvaluation(Randn(30), 0.5181478766595276 +- 0.001)
   }
+
+  test("SPARK-9127 codegen with long seed") {
+    checkDoubleEvaluation(Rand(5419823303878592871L), 0.4061913198963727 +- 0.001)
+    checkDoubleEvaluation(Randn(5419823303878592871L), -0.24417152005343168 +- 0.001)
+  }
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org