ulysses-you commented on a change in pull request #30923:
URL: https://github.com/apache/spark/pull/30923#discussion_r548830032
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/randomExpressions.scala
##########
@@ -49,8 +48,6 @@ abstract class RDG extends UnaryExpression with
ExpectsInputTypes with Stateful
@transient protected lazy val seed: Long = seedExpression match {
case Literal(s, IntegerType) => s.asInstanceOf[Int]
case Literal(s, LongType) => s.asInstanceOf[Long]
Review comment:
It might a little diffcult to fix this in a separate PR. We always need
check seed is foldable first if we use `eval` instead of `match`, otherwise the
seed can be something like `udf(): Int` which is not unpected.
----------------------------------------------------------------
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]