Github user viirya commented on a diff in the pull request:
https://github.com/apache/spark/pull/19436#discussion_r142902434
--- Diff: R/pkg/tests/fulltests/test_sparkSQL.R ---
@@ -3075,6 +3075,11 @@ test_that("gapply() and gapplyCollect() on a
DataFrame", {
df1Collect <- gapplyCollect(df, list("a"), function(key, x) { x })
expect_identical(df1Collect, expected)
+ # gapply on empty grouping columns.
+ dfTwoPartition <- repartition(df, 2L)
+ df1TwoPartition <- gapply(dfTwoPartition, c(), function(key, x) { x },
schema(dfTwoPartition))
+ expect_identical(sort(collect(df1TwoPartition)), sort(expected))
--- End diff --
hmm, I think it should work. `repartition` is not necessary. I'm just
wondering how to test this in R...
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]