From 093ebbc628699b40f091b5b7083c119fffa9314b Mon Sep 17 00:00:00 2001 From: Sun Rui Date: Thu, 14 Jul 2016 09:38:42 -0700 Subject: [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 Closes #14192 from sun-rui/SPARK-16509. --- R/pkg/inst/tests/testthat/test_sparkSQL.R | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'R/pkg/inst/tests') 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) -- cgit v1.2.3