akshatshenoi-db commented on code in PR #57814:
URL: https://github.com/apache/spark/pull/57814#discussion_r4633362135
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/FileScanRDD.scala:
##########
@@ -281,6 +281,10 @@ class FileScanRDD(
// Throw FileNotFoundException even if `ignoreCorruptFiles`
is true
case e: FileNotFoundException if !ignoreMissingFiles =>
throw e
case e @ (_ : AccessControlException | _ :
BlockMissingException) => throw e
+ // A resource-safety limit is not a corrupt file: skipping
the rest of the archive
+ // would return partial data with no signal that the limit
stopped the read.
+ case e: SparkRuntimeException
+ if e.getCondition == "MAX_ARCHIVE_DEPTH_EXCEEDED" =>
throw e
Review Comment:
Done. `DataSourceUtils.shouldIgnoreCorruptFileException` now returns false
for `MAX_ARCHIVE_DEPTH_EXCEEDED`, and the explicit case here is gone. Without
that case a scan reports the depth error the way it reports other read errors,
as the cause of `FAILED_READ_FILE`, so the scan-path tests now look for it in
the cause chain.
One correction to the premise: the inference paths did not consult that
predicate. CSV, JSON, XML and Avro archive inference and the Parquet footer
reader each had their own `RuntimeException`/`IOException` clause, so each now
adds the predicate as a guard. ORC inference only skips errors rooted in an
`IOException`, so it never swallowed this one.
Added `the depth limit still fails schema inference under
ignoreCorruptFiles` next to the scan-path test. It runs for every format that
infers a schema.
Writing that test showed that a configured limit did not reach two inference
paths at all: `SQLConf.get` falls back to the defaults on the thread pool
Parquet reads footers with, and CSV inference runs its first sampling job
without the session confs. The reader now takes the limit from the Hadoop conf
it is already given, which carries the session's SQL confs (the same way
`ParquetReadSupport` reads its SQL confs). This replaces the `SQLConf.get` read
you checked last round.
##########
.isaac/config.json:
##########
@@ -0,0 +1,3 @@
+{
+ "sync_reminder_last_shown": "2026-08-06"
Review Comment:
Removed both files.
--
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]