Github user felixcheung commented on a diff in the pull request:
https://github.com/apache/spark/pull/21434#discussion_r191090863
--- Diff: R/pkg/R/functions.R ---
@@ -3048,6 +3048,26 @@ setMethod("array_position",
column(jc)
})
+#' @details
+#' \code{array_repeat}: Creates an array containing the left argument
repeated the number of times
+#' given by the right argument.
+#'
+#' @param count Column or constant determining the number of repetitions.
+#' @rdname column_collection_functions
+#' @aliases array_repeat array_repeat,Column,numericOrColumn-method
+#' @note array_repeat since 2.4.0
+setMethod("array_repeat",
+ signature(x = "Column", count = "numericOrColumn"),
+ function(x, count) {
+ if (class(count) == "Column") {
+ count <- count@jc
+ } else {
+ count <- as.integer(count)
--- End diff --
indent is 2 space actually, could you update this and line L3063
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]