ulysses-you commented on a change in pull request #30864:
URL: https://github.com/apache/spark/pull/30864#discussion_r548340045
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/randomExpressions.scala
##########
@@ -83,14 +87,13 @@ trait ExpressionWithRandomSeed {
""",
since = "1.5.0")
// scalastyle:on line.size.limit
-case class Rand(child: Expression, hideSeed: Boolean = false)
- extends RDG with ExpressionWithRandomSeed {
+case class Rand(child: Expression, hideSeed: Boolean = false) extends RDG {
- def this() = this(Literal(Utils.random.nextLong(), LongType), true)
+ def this() = this(UnresolvedSeed, true)
def this(child: Expression) = this(child, false)
- override def withNewSeed(seed: Long): Rand = Rand(Literal(seed, LongType))
+ override def withNewSeed(seed: Long): Rand = Rand(Literal(seed, LongType),
hideSeed)
Review comment:
@dongjoon-hyun thanks for the carefully check. Yes, it could be thought
as bug fix. See the [jenkins test
result](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/133209/testReport/org.apache.spark.sql/SQLQuerySuite/SPARK_31594__Do_not_display_the_seed_of_rand_randn_with_no_argument_in_output_schema/)
before this commit
[a3c9f0b](https://github.com/apache/spark/pull/30864/commits/a3c9f0b1410f0b3b367c70dc534b1c0d0b08e137).
And I think for early branch, we just need to backport this place and leave
this PR for master. But also, I'm OK to send a PR to fix this first, then go
back to this PR.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]