aboutsummaryrefslogtreecommitdiff
path: root/R/pkg
diff options
context:
space:
mode:
authorReynold Xin <rxin@databricks.com>2016-04-23 12:49:36 -0700
committerReynold Xin <rxin@databricks.com>2016-04-23 12:49:36 -0700
commit890abd1279014d692548c9f3b557483644a0ee32 (patch)
tree128e27e4b2b2a2ba63c70124b94605038a8860f5 /R/pkg
parent5c8a0ec99bded2271481f8d6cf5443fea5da4bbd (diff)
downloadspark-890abd1279014d692548c9f3b557483644a0ee32.tar.gz
spark-890abd1279014d692548c9f3b557483644a0ee32.tar.bz2
spark-890abd1279014d692548c9f3b557483644a0ee32.zip
[SPARK-14869][SQL] Don't mask exceptions in ResolveRelations
## What changes were proposed in this pull request? In order to support running SQL directly on files, we added some code in ResolveRelations to catch the exception thrown by catalog.lookupRelation and ignore it. This unfortunately masks all the exceptions. This patch changes the logic to simply test the table's existence. ## How was this patch tested? I manually hacked some bugs into Spark and made sure the exceptions were being propagated up. Author: Reynold Xin <rxin@databricks.com> Closes #12634 from rxin/SPARK-14869.
Diffstat (limited to 'R/pkg')
-rw-r--r--R/pkg/inst/tests/testthat/test_sparkSQL.R2
1 files changed, 1 insertions, 1 deletions
diff --git a/R/pkg/inst/tests/testthat/test_sparkSQL.R b/R/pkg/inst/tests/testthat/test_sparkSQL.R
index 9bd3975405..9244c5621b 100644
--- a/R/pkg/inst/tests/testthat/test_sparkSQL.R
+++ b/R/pkg/inst/tests/testthat/test_sparkSQL.R
@@ -1858,7 +1858,7 @@ test_that("approxQuantile() on a DataFrame", {
test_that("SQL error message is returned from JVM", {
retError <- tryCatch(sql(sqlContext, "select * from blah"), error = function(e) e)
- expect_equal(grepl("Table or View not found", retError), TRUE)
+ expect_equal(grepl("Table or view not found", retError), TRUE)
expect_equal(grepl("blah", retError), TRUE)
})