cloud-fan commented on a change in pull request #35258:
URL: https://github.com/apache/spark/pull/35258#discussion_r800730266



##########
File path: 
sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveDDLSuite.scala
##########
@@ -2926,16 +2926,18 @@ class HiveDDLSuite
     }
   }
 
-  test("SPARK-33844: Insert overwrite directory should check schema too") {
+  test("SPARK-33844, 37969: Insert overwrite directory should check schema 
too") {
     withView("v") {
       spark.range(1).createTempView("v")
       withTempPath { path =>
-        val e = intercept[SparkException] {
-          spark.sql(s"INSERT OVERWRITE LOCAL DIRECTORY 
'${path.getCanonicalPath}' " +
-            s"STORED AS PARQUET SELECT ID, if(1=1, 1, 0), abs(id), '^-' FROM 
v")
-        }.getCause.getCause.getMessage
-        assert(e.contains(
-          "field ended by ';': expected ';' but got 'IF' at line 2:   optional 
int32 (IF"))
+        Seq("PARQUET", "ORC").foreach { format =>
+          val e = intercept[SparkException] {

Review comment:
       can we change the related code slightly? I think we shouldn't put the 
field name check in the big try-catch in `InsertIntoHiveDirCommand.run`.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



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

Reply via email to