Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
change default value to NULL
  • Loading branch information
huaxingao committed Jun 3, 2018
commit 901ff32a03c6ec0c16a0ff7c625781ccf2355a54
10 changes: 5 additions & 5 deletions R/pkg/R/functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -3012,15 +3012,15 @@ setMethod("array_contains",
#' \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 character(s) to use to concatenate the elements of column.
#' @param nullReplacement character(s) to use to replace the Null values.
#' @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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you change this to
nullReplacement an optional character string

#' @rdname column_collection_functions
#' @aliases array_join array_join,Column-method
#' @note array_join since 2.4.0
setMethod("array_join",
signature(x = "Column"),
function(x, delimiter, nullReplacement = NA) {
jc <- if (is.na(nullReplacement)) {
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,
Expand Down