Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15432#discussion_r83814907
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/randomExpressions.scala
 ---
    @@ -77,18 +86,28 @@ case class Rand(seed: Long) extends RDG {
       }
     }
     
    +object Rand {
    +  def apply(seed: Long): Rand = Rand(Literal(seed))
    +}
    +
     /** Generate a random column with i.i.d. gaussian random distribution. */
    +// scalastyle:off line.size.limit
     @ExpressionDescription(
    -  usage = "_FUNC_(a) - Returns a random column with i.i.d. gaussian random 
distribution.")
    -case class Randn(seed: Long) extends RDG {
    -  override protected def evalInternal(input: InternalRow): Double = 
rng.nextGaussian()
    +  usage =
    +    """
    +      _FUNC_() - Returns a random column with i.i.d. gaussian random 
distribution.
    --- End diff --
    
    Nit: gaussian -> Gaussian. Well, really we need to specify that it has mean 
0 and stdev 1. And that's called the standard normal distribution. And I assume 
the 'n' in 'randn' is for normal. So maybe better to say "Returns a random 
column with i.i.d. values drawn from the standard normal distribution" 
everywhere including the comment.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to