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/02/05 16:11:25 UTC

[GitHub] [spark] dongjoon-hyun commented on a change in pull request #27449: [SPARK-27297][DOC][FOLLOW-UP] Improve documentation for various Scala functions

dongjoon-hyun commented on a change in pull request #27449: [SPARK-27297][DOC][FOLLOW-UP] Improve documentation for various Scala functions
URL: https://github.com/apache/spark/pull/27449#discussion_r375353743
 
 

 ##########
 File path: sql/core/src/main/scala/org/apache/spark/sql/functions.scala
 ##########
 @@ -3488,6 +3511,16 @@ object functions {
    * Applies a binary operator to an initial state and all elements in the array,
    * and reduces this to a single state. The final state is converted into the final result
    * by applying a finish function.
+   * {{{
+   *   df.select(aggregate(col("i"), lit(0), (acc, x) => acc + x, _ * 10))
+   * }}}
+   *
+   * @param expr the input array column
+   * @param zero the initial value
 
 Review comment:
   Since this are polishing this part, can we rename this column from `zero` to a more meaningful name (e.g. `initialValue`)?

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


With regards,
Apache Git Services

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