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 05:30:09 UTC

[GitHub] [spark] ueshin commented on a change in pull request #27336: [SPARK-28962][SQL][FOLLOW-UP] Add the parameter description for the Scala function API filter

ueshin commented on a change in pull request #27336: [SPARK-28962][SQL][FOLLOW-UP] Add the parameter description for the Scala function API filter
URL: https://github.com/apache/spark/pull/27336#discussion_r375065772
 
 

 ##########
 File path: sql/core/src/main/scala/org/apache/spark/sql/functions.scala
 ##########
 @@ -3465,6 +3472,14 @@ object functions {
 
   /**
    * Returns an array of elements for which a predicate holds in a given array.
+   * {{{
+   *   df.select(filter(col("s"), (x, i) => i % 2 === 0))
+   *   df.selectExpr("filter(col, (x, i) -> i % 2 == 0)")
+   * }}}
+   *
+   * @param column: the input array column
+   * @param f: (col, index) => predicate, the boolean predicate to filter the input column
+   *           given the index. Indices start at 0.
 
 Review comment:
   `ArrayTransform` with index argument starts with `0`.
   We might need to change it from `1`?

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