yaooqinn commented on code in PR #47583:
URL: https://github.com/apache/spark/pull/47583#discussion_r1701970747


##########
sql/hive/src/test/scala/org/apache/spark/sql/hive/orc/HiveOrcQuerySuite.scala:
##########
@@ -415,4 +415,23 @@ class HiveOrcQuerySuite extends OrcQueryTest with 
TestHiveSingleton {
       }
     }
   }
+
+  test("SPARK-49094: ignoreCorruptFiles works for hive orc") {
+    withSQLConf(SQLConf.ORC_SCHEMA_MERGING_ENABLED.key -> "true") {
+      withTempDir { dir =>
+        val basePath = dir.getCanonicalPath
+        spark.range(0, 1).toDF("a").write.orc(new Path(basePath, 
"foo=1").toString)
+        spark.range(0, 1).toDF("b").write.json(new Path(basePath, 
"foo=2").toString)
+
+        withSQLConf(
+          SQLConf.IGNORE_CORRUPT_FILES.key -> "false",
+          SQLConf.ORC_IMPLEMENTATION.key -> "hive") {
+          checkAnswer(spark.read
+            .option("mergeSchema", value = false)

Review Comment:
   > the previous code doesn't care of OrcOption
   
   mergeSchema is actually from OrcOption for both if and else code branches, 
see
   
   
https://github.com/apache/spark/pull/47583/files#diff-9954c15e0525a72c38dd8be7eaff4ba6c2a071b216ecea2524419d49ab4f92fcR68-R69
   
   



-- 
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