Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/7593#discussion_r35193814
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/random.scala
 ---
    @@ -85,7 +85,7 @@ case class Randn(seed: Long) extends RDG {
         val rngTerm = ctx.freshName("rng")
         val className = classOf[XORShiftRandom].getName
         ctx.addMutableState(className, rngTerm,
    -      s"$rngTerm = new $className($seed + 
org.apache.spark.TaskContext.getPartitionId());")
    +      s"$rngTerm = new $className(${seed}L + 
org.apache.spark.TaskContext.getPartitionId());")
    --- End diff --
    
    this is an existing and small bug, sometimes `seed` is large and can not be 
represented as int literal, add a `L` at end to make it a long literal.


---
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]

Reply via email to