[GitHub] spark pull request #21244: [SPARK-24185][SparkR][SQL]add flatten function to...
Github user felixcheung commented on a diff in the pull request: https://github.com/apache/spark/pull/21244#discussion_r186278752 --- Diff: R/pkg/R/generics.R --- @@ -918,6 +918,10 @@ setGeneric("explode_outer", function(x) { standardGeneric("explode_outer") }) #' @name NULL setGeneric("expr", function(x) { standardGeneric("expr") }) +#' @rdname column_collection_functions +#' @name NULL +setGeneric("flatten", function(x, value) { standardGeneric("flatten") }) --- End diff -- great catch! --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request #21244: [SPARK-24185][SparkR][SQL]add flatten function to...
Github user asfgit closed the pull request at: https://github.com/apache/spark/pull/21244 --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request #21244: [SPARK-24185][SparkR][SQL]add flatten function to...
Github user HyukjinKwon commented on a diff in the pull request: https://github.com/apache/spark/pull/21244#discussion_r186276706 --- Diff: R/pkg/R/functions.R --- @@ -3035,6 +3036,19 @@ setMethod("array_position", column(jc) }) +#' @details +#' \code{flatten}: Transforms an array of arrays into a single array. --- End diff -- not a big deal but let's match the doc too with Python and Scala (not to SQL one) since that's usual so far. Please fix it in the PRs for other functions later. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request #21244: [SPARK-24185][SparkR][SQL]add flatten function to...
Github user HyukjinKwon commented on a diff in the pull request: https://github.com/apache/spark/pull/21244#discussion_r186276677 --- Diff: R/pkg/tests/fulltests/test_sparkSQL.R --- @@ -1502,6 +1502,12 @@ test_that("column functions", { result <- collect(select(df, sort_array(df[[1]])))[[1]] expect_equal(result, list(list(1L, 2L, 3L), list(4L, 5L, 6L))) + # Test flattern --- End diff -- not a big deal at all but I'd say `flattern()` for consistency. I think detail and consistency are the key .. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request #21244: [SPARK-24185][SparkR][SQL]add flatten function to...
Github user huaxingao commented on a diff in the pull request: https://github.com/apache/spark/pull/21244#discussion_r186275756 --- Diff: R/pkg/R/generics.R --- @@ -918,6 +918,10 @@ setGeneric("explode_outer", function(x) { standardGeneric("explode_outer") }) #' @name NULL setGeneric("expr", function(x) { standardGeneric("expr") }) +#' @rdname column_collection_functions +#' @name NULL +setGeneric("flatten", function(x, value) { standardGeneric("flatten") }) --- End diff -- Thanks for catching the problem. Will correct. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org