jzhan-2026 commented on code in PR #58698:
URL: https://github.com/apache/spark/pull/58698#discussion_r4041512036


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/xml/ValidatorUtil.scala:
##########
@@ -75,4 +76,43 @@ object ValidatorUtil extends Logging {
    * @return Schema for the file at that path
    */
   def getSchema(path: String): Schema = cache.get(path)
+

Review Comment:
   nits: Validator is not thread-safe (per JAXP javadoc), so this reuse is safe 
only because StaxXMLRecordReader is one-instance-per-task. Worth adding a 
comment here to guard against accidentally lifting this to a shared scope in 
future.



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