aboutsummaryrefslogtreecommitdiff
path: root/R/pkg/inst/tests/testthat/test_sparkSQL.R
diff options
context:
space:
mode:
authorFelix Cheung <felixcheung_m@hotmail.com>2016-09-02 10:12:10 -0700
committerShivaram Venkataraman <shivaram@cs.berkeley.edu>2016-09-02 10:12:10 -0700
commit812333e4336113e44d2c9473bcba1cee4a989d2c (patch)
tree9b111f43edad88b891462127553c9ba2208464c0 /R/pkg/inst/tests/testthat/test_sparkSQL.R
parentea662286561aa9fe321cb0a0e10cdeaf60440b90 (diff)
downloadspark-812333e4336113e44d2c9473bcba1cee4a989d2c.tar.gz
spark-812333e4336113e44d2c9473bcba1cee4a989d2c.tar.bz2
spark-812333e4336113e44d2c9473bcba1cee4a989d2c.zip
[SPARK-17376][SPARKR] Spark version should be available in R
## What changes were proposed in this pull request? Add sparkR.version() API. ``` > sparkR.version() [1] "2.1.0-SNAPSHOT" ``` ## How was this patch tested? manual, unit tests Author: Felix Cheung <felixcheung_m@hotmail.com> Closes #14935 from felixcheung/rsparksessionversion.
Diffstat (limited to 'R/pkg/inst/tests/testthat/test_sparkSQL.R')
-rw-r--r--R/pkg/inst/tests/testthat/test_sparkSQL.R6
1 files changed, 6 insertions, 0 deletions
diff --git a/R/pkg/inst/tests/testthat/test_sparkSQL.R b/R/pkg/inst/tests/testthat/test_sparkSQL.R
index 683a15cb4f..aac3f62204 100644
--- a/R/pkg/inst/tests/testthat/test_sparkSQL.R
+++ b/R/pkg/inst/tests/testthat/test_sparkSQL.R
@@ -2507,6 +2507,12 @@ test_that("enableHiveSupport on SparkSession", {
expect_equal(value, "hive")
})
+test_that("Spark version from SparkSession", {
+ ver <- callJMethod(sc, "version")
+ version <- sparkR.version()
+ expect_equal(ver, version)
+})
+
unlink(parquetPath)
unlink(orcPath)
unlink(jsonPath)