diff options
author | Sun Rui <rui.sun@intel.com> | 2015-10-09 23:05:38 -0700 |
---|---|---|
committer | Shivaram Venkataraman <shivaram@cs.berkeley.edu> | 2015-10-09 23:05:38 -0700 |
commit | 864de3bf4041c829e95d278b9569e91448bab0cc (patch) | |
tree | 2ad745e4536cedbb2373c112ab7c06ac1a3714ac /R/pkg/inst/tests/test_sparkSQL.R | |
parent | c1b4ce43264fa8b9945df3c599a51d4d2a675705 (diff) | |
download | spark-864de3bf4041c829e95d278b9569e91448bab0cc.tar.gz spark-864de3bf4041c829e95d278b9569e91448bab0cc.tar.bz2 spark-864de3bf4041c829e95d278b9569e91448bab0cc.zip |
[SPARK-10079] [SPARKR] Make 'column' and 'col' functions be S4 functions.
1. Add a "col" function into DataFrame.
2. Move the current "col" function in Column.R to functions.R, convert it to S4 function.
3. Add a s4 "column" function in functions.R.
4. Convert the "column" function in Column.R to S4 function. This is for private use.
Author: Sun Rui <rui.sun@intel.com>
Closes #8864 from sun-rui/SPARK-10079.
Diffstat (limited to 'R/pkg/inst/tests/test_sparkSQL.R')
-rw-r--r-- | R/pkg/inst/tests/test_sparkSQL.R | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/R/pkg/inst/tests/test_sparkSQL.R b/R/pkg/inst/tests/test_sparkSQL.R index 4804ecf177..3a04edbb4c 100644 --- a/R/pkg/inst/tests/test_sparkSQL.R +++ b/R/pkg/inst/tests/test_sparkSQL.R @@ -787,7 +787,7 @@ test_that("test HiveContext", { }) test_that("column operators", { - c <- SparkR:::col("a") + c <- column("a") c2 <- (- c + 1 - 2) * 3 / 4.0 c3 <- (c + c2 - c2) * c2 %% c2 c4 <- (c > c2) & (c2 <= c3) | (c == c2) & (c2 != c3) @@ -795,7 +795,7 @@ test_that("column operators", { }) test_that("column functions", { - c <- SparkR:::col("a") + c <- column("a") c1 <- abs(c) + acos(c) + approxCountDistinct(c) + ascii(c) + asin(c) + atan(c) c2 <- avg(c) + base64(c) + bin(c) + bitwiseNOT(c) + cbrt(c) + ceil(c) + cos(c) c3 <- cosh(c) + count(c) + crc32(c) + exp(c) |