Github user HyukjinKwon commented on a diff in the pull request:
https://github.com/apache/spark/pull/15432#discussion_r86658562
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/randomExpressions.scala
---
@@ -97,17 +101,15 @@ case class Rand(seed: Long) extends RDG {
-0.3254147983080288
> SELECT _FUNC_(0);
1.1164209726833079
+ > SELECT _FUNC_(null);
+ 1.1164209726833079
""")
// scalastyle:on line.size.limit
-case class Randn(seed: Long) extends RDG {
- override protected def evalInternal(input: InternalRow): Double =
rng.nextGaussian()
+case class Randn(child: Expression) extends RDG {
- def this() = this(Utils.random.nextLong())
+ def this() = this(Literal(Utils.random.nextLong()))
--- End diff --
If you meant something like `Literal(Long: Utils.random.nextLong()))`, I
guess both are fine assuming from the discussion in the PR 12452.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]