You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/12/22 14:27:16 UTC
[GitHub] [spark] ulysses-you commented on a change in pull request #30864: [SPARK-33857][SQL] Unify the default seed of random functions
ulysses-you commented on a change in pull request #30864:
URL: https://github.com/apache/spark/pull/30864#discussion_r547307289
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/randomExpressions.scala
##########
@@ -62,9 +64,19 @@ abstract class RDG extends UnaryExpression with ExpectsInputTypes with Stateful
* Usually the random seed needs to be renewed at each execution under streaming queries.
*/
trait ExpressionWithRandomSeed {
+ def seedExpression: Expression
def withNewSeed(seed: Long): Expression
}
+/**
+ * A place holder expression used in random functions, will be replaced after analyze.
+ */
+case class DefaultSeed() extends Expression with Unevaluable {
Review comment:
yes, it's better.
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org