diff options
-rw-r--r-- | sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/randomExpressions.scala | 2 | ||||
-rw-r--r-- | sql/core/src/main/scala/org/apache/spark/sql/functions.scala | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/randomExpressions.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/randomExpressions.scala index 2e703671fc..6be3cbcae6 100644 --- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/randomExpressions.scala +++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/randomExpressions.scala @@ -85,7 +85,7 @@ case class Randn(seed: Long) extends RDG { def this(seed: Expression) = this(seed match { case IntegerLiteral(s) => s - case _ => throw new AnalysisException("Input argument to rand must be an integer literal.") + case _ => throw new AnalysisException("Input argument to randn must be an integer literal.") }) override def genCode(ctx: CodegenContext, ev: ExprCode): String = { diff --git a/sql/core/src/main/scala/org/apache/spark/sql/functions.scala b/sql/core/src/main/scala/org/apache/spark/sql/functions.scala index e4ab6b4f23..97c6992e18 100644 --- a/sql/core/src/main/scala/org/apache/spark/sql/functions.scala +++ b/sql/core/src/main/scala/org/apache/spark/sql/functions.scala @@ -1052,6 +1052,8 @@ object functions extends LegacyFunctions { /** * Generate a random column with i.i.d. samples from U[0.0, 1.0]. * + * Note that this is indeterministic when data partitions are not fixed. + * * @group normal_funcs * @since 1.4.0 */ @@ -1068,6 +1070,8 @@ object functions extends LegacyFunctions { /** * Generate a column with i.i.d. samples from the standard normal distribution. * + * Note that this is indeterministic when data partitions are not fixed. + * * @group normal_funcs * @since 1.4.0 */ |