Github user felixcheung commented on a diff in the pull request: https://github.com/apache/spark/pull/22227#discussion_r219714851 --- Diff: R/pkg/R/functions.R --- @@ -3404,19 +3404,27 @@ setMethod("collect_set", #' Equivalent to \code{split} SQL function. #' #' @rdname column_string_functions +#' @param limit determines the length of the returned array. +#' \itemize{ +#' \item \code{limit > 0}: length of the array will be at most \code{limit} +#' \item \code{limit <= 0}: the returned array can have any length +#' } +#' #' @aliases split_string split_string,Column-method #' @examples #' #' \dontrun{ #' head(select(df, split_string(df$Sex, "a"))) #' head(select(df, split_string(df$Class, "\\d"))) +#' head(select(df, split_string(df$Class, "\\d", 2))) #' # This is equivalent to the following SQL expression #' head(selectExpr(df, "split(Class, '\\\\d')"))} --- End diff -- good point - also the example should run in the order documented.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org