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

    https://github.com/apache/spark/pull/21313#discussion_r192627948
  
    --- Diff: R/pkg/R/functions.R ---
    @@ -3006,6 +3008,27 @@ setMethod("array_contains",
                 column(jc)
               })
     
    +#' @details
    +#' \code{array_join}: Concatenates the elements of column using the 
delimiter.
    +#' Null values are replaced with nullReplacement if set, otherwise they 
are ignored.
    +#'
    +#' @param delimiter a character string that is used to concatenate the 
elements of column.
    +#' @param nullReplacement a character string that is used to replace the 
Null values.
    +#' @rdname column_collection_functions
    +#' @aliases array_join array_join,Column-method
    +#' @note array_join since 2.4.0
    +setMethod("array_join",
    +         signature(x = "Column", delimiter = "character"),
    +         function(x, delimiter, nullReplacement = NULL) {
    +           jc <- if (is.null(nullReplacement)) {
    +             callJStatic("org.apache.spark.sql.functions", "array_join", 
x@jc, delimiter)
    +           } else {
    +             callJStatic("org.apache.spark.sql.functions", "array_join", 
x@jc, delimiter,
    +                         nullReplacement)
    --- End diff --
    
    re https://github.com/apache/spark/pull/21313#discussion_r192578750
     so what's the behavior if delimiter is more than one character?
    like `array_join(df$a, "#Foo", "Beautiful")`?


---

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

Reply via email to