From 40c77fb23a1ee0a4e69d735ee6247f83b7e13b92 Mon Sep 17 00:00:00 2001 From: Sun Rui Date: Fri, 30 Oct 2015 10:56:06 -0700 Subject: [SPARK-11210][SPARKR] Add window functions into SparkR [step 2]. Author: Sun Rui Closes #9196 from sun-rui/SPARK-11210. --- R/pkg/inst/tests/test_sparkSQL.R | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'R/pkg/inst/tests/test_sparkSQL.R') diff --git a/R/pkg/inst/tests/test_sparkSQL.R b/R/pkg/inst/tests/test_sparkSQL.R index e1d4499925..b4a4d03b26 100644 --- a/R/pkg/inst/tests/test_sparkSQL.R +++ b/R/pkg/inst/tests/test_sparkSQL.R @@ -831,6 +831,11 @@ test_that("column functions", { c11 <- to_date(c) + trim(c) + unbase64(c) + unhex(c) + upper(c) c12 <- lead("col", 1) + lead(c, 1) + lag("col", 1) + lag(c, 1) c13 <- cumeDist() + ntile(1) + c14 <- denseRank() + percentRank() + rank() + rowNumber() + + # Test if base::rank() is exposed + expect_equal(class(rank())[[1]], "Column") + expect_equal(rank(1:3), as.numeric(c(1:3))) df <- jsonFile(sqlContext, jsonPath) df2 <- select(df, between(df$age, c(20, 30)), between(df$age, c(10, 20))) -- cgit v1.2.3