Repository: spark
Updated Branches:
  refs/heads/branch-2.0 78387ce05 -> 794d09969


[SPARK-16233][R][TEST] ORC test should be enabled only when HiveContext is 
available.

## What changes were proposed in this pull request?

ORC test should be enabled only when HiveContext is available.

## How was this patch tested?

Manual.
```
$ R/run-tests.sh
...
1. create DataFrame from RDD (test_sparkSQL.R#200) - Hive is not build with 
SparkSQL, skipped

2. test HiveContext (test_sparkSQL.R#1021) - Hive is not build with SparkSQL, 
skipped

3. read/write ORC files (test_sparkSQL.R#1728) - Hive is not build with 
SparkSQL, skipped

4. enableHiveSupport on SparkSession (test_sparkSQL.R#2448) - Hive is not build 
with SparkSQL, skipped

5. sparkJars tag in SparkContext (test_Windows.R#21) - This test is only for 
Windows, skipped

DONE ===========================================================================
Tests passed.
```

Author: Dongjoon Hyun <dongj...@apache.org>

Closes #14019 from dongjoon-hyun/SPARK-16233.

(cherry picked from commit d17e5f2f123eecd5a7a1d87f5ce75a0fc44552b4)
Signed-off-by: Shivaram Venkataraman <shiva...@cs.berkeley.edu>


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/794d0996
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/794d0996
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/794d0996

Branch: refs/heads/branch-2.0
Commit: 794d099691c3ef71b25178992086b4f25e4019e6
Parents: 78387ce
Author: Dongjoon Hyun <dongj...@apache.org>
Authored: Fri Jul 1 15:35:19 2016 -0700
Committer: Shivaram Venkataraman <shiva...@cs.berkeley.edu>
Committed: Fri Jul 1 15:35:27 2016 -0700

----------------------------------------------------------------------
 R/pkg/inst/tests/testthat/test_sparkSQL.R | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/794d0996/R/pkg/inst/tests/testthat/test_sparkSQL.R
----------------------------------------------------------------------
diff --git a/R/pkg/inst/tests/testthat/test_sparkSQL.R 
b/R/pkg/inst/tests/testthat/test_sparkSQL.R
index e05e5c4..d22baf6 100644
--- a/R/pkg/inst/tests/testthat/test_sparkSQL.R
+++ b/R/pkg/inst/tests/testthat/test_sparkSQL.R
@@ -1717,6 +1717,7 @@ test_that("mutate(), transform(), rename() and names()", {
 })
 
 test_that("read/write ORC files", {
+  setHiveContext(sc)
   df <- read.df(jsonPath, "json")
 
   # Test write.df and read.df
@@ -1733,6 +1734,7 @@ test_that("read/write ORC files", {
   expect_equal(count(orcDF), count(df))
 
   unlink(orcPath2)
+  unsetHiveContext()
 })
 
 test_that("read/write Parquet files", {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to