diff options
author | felixcheung <felixcheung_m@hotmail.com> | 2016-05-26 11:20:20 -0700 |
---|---|---|
committer | Shivaram Venkataraman <shivaram@cs.berkeley.edu> | 2016-05-26 11:20:20 -0700 |
commit | c76457c8e422ce6fbf72a8fe5db94565783b12d0 (patch) | |
tree | 32ff6361643f6d2cd6e1e0b2118528e3c5c5109f /R/pkg/inst/tests/testthat/test_context.R | |
parent | 6d506c9ae9a2519d1a93e788ae5316d4f942d35d (diff) | |
download | spark-c76457c8e422ce6fbf72a8fe5db94565783b12d0.tar.gz spark-c76457c8e422ce6fbf72a8fe5db94565783b12d0.tar.bz2 spark-c76457c8e422ce6fbf72a8fe5db94565783b12d0.zip |
[SPARK-10903][SPARKR] R - Simplify SQLContext method signatures and use a singleton
Eliminate the need to pass sqlContext to method since it is a singleton - and we don't want to support multiple contexts in a R session.
Changes are done in a back compat way with deprecation warning added. Method signature for S3 methods are added in a concise, clean approach such that in the next release the deprecated signature can be taken out easily/cleanly (just delete a few lines per method).
Custom method dispatch is implemented to allow for multiple JVM reference types that are all 'jobj' in R and to avoid having to add 30 new exports.
Author: felixcheung <felixcheung_m@hotmail.com>
Closes #9192 from felixcheung/rsqlcontext.
Diffstat (limited to 'R/pkg/inst/tests/testthat/test_context.R')
-rw-r--r-- | R/pkg/inst/tests/testthat/test_context.R | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/R/pkg/inst/tests/testthat/test_context.R b/R/pkg/inst/tests/testthat/test_context.R index 95258babbf..c1f1a8932d 100644 --- a/R/pkg/inst/tests/testthat/test_context.R +++ b/R/pkg/inst/tests/testthat/test_context.R @@ -58,7 +58,7 @@ test_that("repeatedly starting and stopping SparkR SQL", { for (i in 1:4) { sc <- sparkR.init() sqlContext <- sparkRSQL.init(sc) - df <- createDataFrame(sqlContext, data.frame(a = 1:20)) + df <- createDataFrame(data.frame(a = 1:20)) expect_equal(count(df), 20) sparkR.stop() } |