diff options
author | Felix Cheung <felixcheung_m@hotmail.com> | 2016-06-20 11:24:41 -0700 |
---|---|---|
committer | Shivaram Venkataraman <shivaram@cs.berkeley.edu> | 2016-06-20 11:24:41 -0700 |
commit | 36e812d4b695566437c6bac991ef06a0f81fb1c5 (patch) | |
tree | d8d983465410469221e9fd1ce29d929587aac233 /R/pkg/inst/tests/testthat/test_sparkSQL.R | |
parent | 9613424898fd2a586156bc4eb48e255749774f20 (diff) | |
download | spark-36e812d4b695566437c6bac991ef06a0f81fb1c5.tar.gz spark-36e812d4b695566437c6bac991ef06a0f81fb1c5.tar.bz2 spark-36e812d4b695566437c6bac991ef06a0f81fb1c5.zip |
[SPARK-16029][SPARKR] SparkR add dropTempView and deprecate dropTempTable
## What changes were proposed in this pull request?
Add dropTempView and deprecate dropTempTable
## How was this patch tested?
unit tests
shivaram liancheng
Author: Felix Cheung <felixcheung_m@hotmail.com>
Closes #13753 from felixcheung/rdroptempview.
Diffstat (limited to 'R/pkg/inst/tests/testthat/test_sparkSQL.R')
-rw-r--r-- | R/pkg/inst/tests/testthat/test_sparkSQL.R | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/R/pkg/inst/tests/testthat/test_sparkSQL.R b/R/pkg/inst/tests/testthat/test_sparkSQL.R index c5c5a069a8..ceba0d138e 100644 --- a/R/pkg/inst/tests/testthat/test_sparkSQL.R +++ b/R/pkg/inst/tests/testthat/test_sparkSQL.R @@ -472,8 +472,8 @@ test_that("test tableNames and tables", { suppressWarnings(registerTempTable(df, "table2")) tables <- tables() expect_equal(count(tables), 2) - dropTempTable("table1") - dropTempTable("table2") + suppressWarnings(dropTempTable("table1")) + dropTempView("table2") tables <- tables() expect_equal(count(tables), 0) @@ -486,7 +486,7 @@ test_that( newdf <- sql("SELECT * FROM table1 where name = 'Michael'") expect_is(newdf, "SparkDataFrame") expect_equal(count(newdf), 1) - dropTempTable("table1") + dropTempView("table1") }) test_that("test cache, uncache and clearCache", { @@ -495,7 +495,7 @@ test_that("test cache, uncache and clearCache", { cacheTable("table1") uncacheTable("table1") clearCache() - dropTempTable("table1") + dropTempView("table1") }) test_that("insertInto() on a registered table", { @@ -516,13 +516,13 @@ test_that("insertInto() on a registered table", { insertInto(dfParquet2, "table1") expect_equal(count(sql("select * from table1")), 5) expect_equal(first(sql("select * from table1 order by age"))$name, "Michael") - dropTempTable("table1") + dropTempView("table1") createOrReplaceTempView(dfParquet, "table1") insertInto(dfParquet2, "table1", overwrite = TRUE) expect_equal(count(sql("select * from table1")), 2) expect_equal(first(sql("select * from table1 order by age"))$name, "Bob") - dropTempTable("table1") + dropTempView("table1") unlink(jsonPath2) unlink(parquetPath2) @@ -536,7 +536,7 @@ test_that("tableToDF() returns a new DataFrame", { expect_equal(count(tabledf), 3) tabledf2 <- tableToDF("table1") expect_equal(count(tabledf2), 3) - dropTempTable("table1") + dropTempView("table1") }) test_that("toRDD() returns an RRDD", { |