cloud-fan commented on code in PR #50957: URL: https://github.com/apache/spark/pull/50957#discussion_r2101482697
########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/randomExpressions.scala: ########## @@ -114,6 +115,8 @@ case class Rand(child: Expression, hideSeed: Boolean = false) extends Nondetermi override def withNewSeed(seed: Long): Rand = Rand(Literal(seed, LongType), hideSeed) + override def withShiftedSeed(shift: Long): Rand = Rand(Add(child, Literal(shift)), hideSeed) Review Comment: ```suggestion override def withShiftedSeed(shift: Long): Rand = Rand(Add(child, Literal(shift), evalMode = EvalMode.LEGACY), hideSeed) ``` ########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/randomExpressions.scala: ########## @@ -114,6 +115,8 @@ case class Rand(child: Expression, hideSeed: Boolean = false) extends Nondetermi override def withNewSeed(seed: Long): Rand = Rand(Literal(seed, LongType), hideSeed) + override def withShiftedSeed(shift: Long): Rand = Rand(Add(child, Literal(shift)), hideSeed) Review Comment: to make sure it won't cause overflow error -- 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. To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org