aboutsummaryrefslogtreecommitdiff
path: root/R/pkg/inst/tests/testthat/test_sparkSQL.R
diff options
context:
space:
mode:
authorSun Rui <sunrui2016@gmail.com>2016-07-14 09:38:42 -0700
committerShivaram Venkataraman <shivaram@cs.berkeley.edu>2016-07-14 09:38:42 -0700
commit093ebbc628699b40f091b5b7083c119fffa9314b (patch)
tree9cff696fa8f7de20c67a28b9e0087ece85a634b7 /R/pkg/inst/tests/testthat/test_sparkSQL.R
parent56183b84fb64ea13977d89ec55a9dd3997b4dacf (diff)
downloadspark-093ebbc628699b40f091b5b7083c119fffa9314b.tar.gz
spark-093ebbc628699b40f091b5b7083c119fffa9314b.tar.bz2
spark-093ebbc628699b40f091b5b7083c119fffa9314b.zip
[SPARK-16509][SPARKR] Rename window.partitionBy and window.orderBy to windowPartitionBy and windowOrderBy.
## What changes were proposed in this pull request? Rename window.partitionBy and window.orderBy to windowPartitionBy and windowOrderBy to pass CRAN package check. ## How was this patch tested? SparkR unit tests. Author: Sun Rui <sunrui2016@gmail.com> Closes #14192 from sun-rui/SPARK-16509.
Diffstat (limited to 'R/pkg/inst/tests/testthat/test_sparkSQL.R')
-rw-r--r--R/pkg/inst/tests/testthat/test_sparkSQL.R8
1 files changed, 4 insertions, 4 deletions
diff --git a/R/pkg/inst/tests/testthat/test_sparkSQL.R b/R/pkg/inst/tests/testthat/test_sparkSQL.R
index e61fa41cdd..87868230eb 100644
--- a/R/pkg/inst/tests/testthat/test_sparkSQL.R
+++ b/R/pkg/inst/tests/testthat/test_sparkSQL.R
@@ -2376,7 +2376,7 @@ test_that("gapply() and gapplyCollect() on a DataFrame", {
test_that("Window functions on a DataFrame", {
df <- createDataFrame(list(list(1L, "1"), list(2L, "2"), list(1L, "1"), list(2L, "2")),
schema = c("key", "value"))
- ws <- orderBy(window.partitionBy("key"), "value")
+ ws <- orderBy(windowPartitionBy("key"), "value")
result <- collect(select(df, over(lead("key", 1), ws), over(lead("value", 1), ws)))
names(result) <- c("key", "value")
expected <- data.frame(key = c(1L, NA, 2L, NA),
@@ -2384,17 +2384,17 @@ test_that("Window functions on a DataFrame", {
stringsAsFactors = FALSE)
expect_equal(result, expected)
- ws <- orderBy(window.partitionBy(df$key), df$value)
+ ws <- orderBy(windowPartitionBy(df$key), df$value)
result <- collect(select(df, over(lead("key", 1), ws), over(lead("value", 1), ws)))
names(result) <- c("key", "value")
expect_equal(result, expected)
- ws <- partitionBy(window.orderBy("value"), "key")
+ ws <- partitionBy(windowOrderBy("value"), "key")
result <- collect(select(df, over(lead("key", 1), ws), over(lead("value", 1), ws)))
names(result) <- c("key", "value")
expect_equal(result, expected)
- ws <- partitionBy(window.orderBy(df$value), df$key)
+ ws <- partitionBy(windowOrderBy(df$value), df$key)
result <- collect(select(df, over(lead("key", 1), ws), over(lead("value", 1), ws)))
names(result) <- c("key", "value")
expect_equal(result, expected)