beliefer commented on a change in pull request #23841: [SPARK-26936][SQL] Fix 
bug of insert overwrite local dir and inconsistent behavior with Hive
URL: https://github.com/apache/spark/pull/23841#discussion_r260170187
 
 

 ##########
 File path: sql/hive/src/test/scala/org/apache/spark/sql/hive/InsertSuite.scala
 ##########
 @@ -581,6 +581,38 @@ class InsertSuite extends QueryTest with 
TestHiveSingleton with BeforeAndAfter
     }
   }
 
+  test("insert overwrite to not exists dir from hive metastore table") {
+    withTempDir { dir =>
+      val path = dir.toURI.getPath
+      val notExistsPath = s"${path}/src/result"
+
+      sql(s"INSERT OVERWRITE LOCAL DIRECTORY '${notExistsPath}' SELECT * FROM 
src where key < 10")
+
+      sql(
+        s"""
+           |INSERT OVERWRITE LOCAL DIRECTORY '${notExistsPath}'
 
 Review comment:
   OK, I have adjust it.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to