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

    https://github.com/apache/spark/pull/9764#discussion_r45124823
  
    --- Diff: R/pkg/R/functions.R ---
    @@ -2365,3 +2333,74 @@ setMethod("rowNumber",
                 jc <- callJStatic("org.apache.spark.sql.functions", 
"rowNumber")
                 column(jc)
               })
    +
    +###################### Collection functions######################
    +
    +#' array_contains
    +#'
    +#' Returns true if the array contain the value.
    +#'
    +#' @rdname array_contains
    +#' @name array_contains
    +#' @family collection_funcs
    +#' @export
    +#' @examples \dontrun{array_contains(df$c, 1)}
    +setMethod("array_contains",
    +          signature(x = "Column", value = "ANY"),
    +          function(x, value) {
    +            jc <- callJStatic("org.apache.spark.sql.functions", 
"array_contains", x@jc, value)
    +            column(jc)
    +          })
    +
    +#' explode
    +#'
    +#' Creates a new row for each element in the given array or map column.
    +#'
    +#' @rdname explode
    +#' @name explode
    +#' @family collection_funcs
    +#' @export
    +#' @examples \dontrun{explode(df$c)}
    +setMethod("explode",
    +          signature(x = "Column"),
    +          function(x) {
    +            jc <- callJStatic("org.apache.spark.sql.functions", "explode", 
x@jc)
    +            column(jc)
    +          })
    +
    +#' size
    +#'
    +#' Returns length of array or map.
    +#'
    +#' @rdname size
    +#' @name size
    +#' @family collection_funcs
    +#' @export
    +#' @examples \dontrun{size(df$c)}
    +setMethod("size",
    +          signature(x = "Column"),
    +          function(x) {
    +            jc <- callJStatic("org.apache.spark.sql.functions", "size", 
x@jc)
    +            column(jc)
    +          })
    +
    +#' sort_array
    +#'
    +#' Sorts the input array for the given column in ascending order,
    +#' according to the natural ordering of the array elements.
    +#'
    +#' @rdname sort_array
    --- End diff --
    
    could you add @param for `asc`?


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