diff options
author | Sun Rui <rui.sun@intel.com> | 2015-10-30 10:56:06 -0700 |
---|---|---|
committer | Shivaram Venkataraman <shivaram@cs.berkeley.edu> | 2015-10-30 10:56:06 -0700 |
commit | 40c77fb23a1ee0a4e69d735ee6247f83b7e13b92 (patch) | |
tree | 316592c9adced89216c64d2e4d8fab0cf1f96529 /R/pkg/inst | |
parent | fab710a9171932f01ac81d100db8523dbd314925 (diff) | |
download | spark-40c77fb23a1ee0a4e69d735ee6247f83b7e13b92.tar.gz spark-40c77fb23a1ee0a4e69d735ee6247f83b7e13b92.tar.bz2 spark-40c77fb23a1ee0a4e69d735ee6247f83b7e13b92.zip |
[SPARK-11210][SPARKR] Add window functions into SparkR [step 2].
Author: Sun Rui <rui.sun@intel.com>
Closes #9196 from sun-rui/SPARK-11210.
Diffstat (limited to 'R/pkg/inst')
-rw-r--r-- | R/pkg/inst/tests/test_sparkSQL.R | 5 |
1 files changed, 5 insertions, 0 deletions
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))) |