diff options
author | Oscar D. Lara Yejas <olarayej@mail.usf.edu> | 2015-09-30 18:03:31 -0700 |
---|---|---|
committer | Shivaram Venkataraman <shivaram@cs.berkeley.edu> | 2015-09-30 18:03:31 -0700 |
commit | f21e2da03fbf8041fece476e3d5c699aef819451 (patch) | |
tree | 5e9d949731b60b599b444bea906167bba2e23ed3 /R/pkg/inst/tests/test_sparkSQL.R | |
parent | 89ea0041ae5a701ce8d211ed08f1f059b7f9c396 (diff) | |
download | spark-f21e2da03fbf8041fece476e3d5c699aef819451.tar.gz spark-f21e2da03fbf8041fece476e3d5c699aef819451.tar.bz2 spark-f21e2da03fbf8041fece476e3d5c699aef819451.zip |
[SPARK-10807] [SPARKR] Added as.data.frame as a synonym for collect
Created method as.data.frame as a synonym for collect().
Author: Oscar D. Lara Yejas <olarayej@mail.usf.edu>
Author: olarayej <oscar.lara.yejas@us.ibm.com>
Author: Oscar D. Lara Yejas <oscar.lara.yejas@us.ibm.com>
Closes #8908 from olarayej/SPARK-10807.
Diffstat (limited to 'R/pkg/inst/tests/test_sparkSQL.R')
-rw-r--r-- | R/pkg/inst/tests/test_sparkSQL.R | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/R/pkg/inst/tests/test_sparkSQL.R b/R/pkg/inst/tests/test_sparkSQL.R index e159a69584..8f85eecbc4 100644 --- a/R/pkg/inst/tests/test_sparkSQL.R +++ b/R/pkg/inst/tests/test_sparkSQL.R @@ -1327,6 +1327,13 @@ test_that("SQL error message is returned from JVM", { expect_equal(grepl("Table Not Found: blah", retError), TRUE) }) +test_that("Method as.data.frame as a synonym for collect()", { + irisDF <- createDataFrame(sqlContext, iris) + expect_equal(as.data.frame(irisDF), collect(irisDF)) + irisDF2 <- irisDF[irisDF$Species == "setosa", ] + expect_equal(as.data.frame(irisDF2), collect(irisDF2)) +}) + unlink(parquetPath) unlink(jsonPath) -unlink(jsonPathNa) +unlink(jsonPathNa)
\ No newline at end of file |