HyukjinKwon opened a new pull request, #58603: URL: https://github.com/apache/spark/pull/58603
### What changes were proposed in this pull request? Add an opt-in `maxNestingDepth` option to the XML data source (default `-1` = unlimited = unchanged). When set to a positive value, a record whose element nesting exceeds it fails as a bad record (so PERMISSIVE mode keeps parsing the remaining records rather than failing the job). ### Why are the changes needed? Lets a job bound the element nesting depth accepted from XML input, so a very deeply nested record does not exhaust the parser stack. Off by default; no behavior change unless set. ### Does this PR introduce _any_ user-facing change? No by default. When `maxNestingDepth` is set, records nested more deeply than the limit are treated as bad records under the configured parse mode. ### How was this patch tested? `XmlExpressionsSuite` continues to pass (no regression); the module compiles. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Isaac This pull request and its description were written by Isaac. Co-authored-by: Isaac <[email protected]> -- 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]
