linhongliu-db commented on code in PR #60421:
URL: https://github.com/apache/spark/pull/60421#discussion_r4590102888
##########
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:
Added in a6eca99: `SPARK-61585: reading a file that raises an upgrade error
under ignoreCorruptFiles` reads
`test-data/before_1582_date_v2_4_5.snappy.parquet` in the `EXCEPTION` rebase
mode with `ignoreCorruptFiles=true`, for V1 and V2 and with the vectorized
reader on and off (the parquet-mr path wraps the error in a
`ParquetDecodingException`). By default the read fails with the upgrade error;
with the legacy setting the tasks skip the rest of the file. I checked that the
test fails when the fix is disabled.
##########
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:
Done in a6eca99: version `4.4.0`, and the migration note moved to the
4.3-to-4.4 section.
--
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]