szehon-ho commented on code in PR #60421:
URL: https://github.com/apache/spark/pull/60421#discussion_r4567938041


##########
sql/core/src/test/scala/org/apache/spark/sql/FileBasedDataSourceSuite.scala:
##########
@@ -1850,6 +1851,23 @@ class FileBasedDataSourceSuite extends SharedSparkSession
       }
     }
   }
+
+  test("SPARK-61585: ignoreCorruptFiles does not treat SparkUpgradeException 
as file corruption") {

Review Comment:
   Could we add an actual file-read regression with `ignoreCorruptFiles=true`, 
checking that the default raises the upgrade error and the legacy setting 
restores skipping? Please cover V1/V2 and both Parquet reader modes, since 
exception wrapping differs. The helper-level assertions here do not exercise 
the reader call sites or propagation of the legacy configuration to executors.



##########
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala:
##########
@@ -3470,6 +3470,17 @@ object SQLConf {
     .booleanConf
     .createWithDefault(false)
 
+  val LEGACY_IGNORE_CORRUPT_FILES_SKIPS_UPGRADE_ERRORS =
+    buildConf("spark.sql.legacy.files.ignoreCorruptFilesSkipsUpgradeErrors")
+      .internal()
+      .doc("When true, restores the old behavior where 
'spark.sql.files.ignoreCorruptFiles' also " +
+        "skips the rest of a file whose read raises a SparkUpgradeException. 
When false, the " +
+        "upgrade error is raised, since it is not file corruption.")
+      .version("5.0.0")

Review Comment:
   For a normally backported bug fix, could we use `4.4.0` here and put the 
migration note in the 4.3-to-4.4 section? The current `branch-4.x` version is 
`4.4.0-SNAPSHOT`. If this change should ship only in master, please explain 
that release decision.



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