HyukjinKwon commented on code in PR #44994:
URL: https://github.com/apache/spark/pull/44994#discussion_r1475600342


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/xml/StaxXmlParser.scala:
##########
@@ -145,7 +145,8 @@ class StaxXmlParser(
   def doParseColumn(xml: String,
       parseMode: ParseMode,
       xsdSchema: Option[Schema]): Option[InternalRow] = {
-    val xmlRecord = UTF8String.fromString(xml)
+    // limit the size of the XML records to add in bad record exception

Review Comment:
   just `lazy val` sounds simpler ... or we can just add an internal `SQLConf` 
to control this. e.g.,
   
   ```scala
   buildConf("spark.sql.analyzer.maxIterations")
       .internal()
       .doc("...")
       .version("4.0.0")
       ...
   ```



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