Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/15073#discussion_r79122430
--- Diff:
sql/hive/src/test/scala/org/apache/spark/sql/hive/MetastoreDataSourcesSuite.scala
---
@@ -1151,6 +1152,56 @@ class MetastoreDataSourcesSuite extends QueryTest
with SQLTestUtils with TestHiv
}
}
+ test("save API - format hive") {
+ withTempDir { dir =>
+ val path = dir.getCanonicalPath
+ val e = intercept[AnalysisException] {
+
spark.range(10).write.format("hive").mode(SaveMode.Ignore).save(path)
+ }.getMessage
+ assert(e.contains("Failed to find data source: hive"))
+ }
+ }
+
+ test("saveAsTable API - format hive") {
+ val tableName = "tab1"
+ withTable(tableName) {
+ val e = intercept[AnalysisException] {
+
spark.range(10).write.format("hive").mode(SaveMode.Overwrite).saveAsTable(tableName)
+ }.getMessage
+ assert(e.contains("Failed to find data source: hive"))
--- End diff --
after we address
https://github.com/apache/spark/pull/15073/files#r79122288, we should follow
https://github.com/apache/spark/pull/15073/files#diff-463cb1b0f60d87ada075a820f18e1104R262
to generate error message for this case
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]