xiaonanyang-db commented on code in PR #50300: URL: https://github.com/apache/spark/pull/50300#discussion_r2034174770
########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/xml/XmlExpressionEvalUtils.scala: ########## @@ -119,3 +122,49 @@ case class XPathListEvaluator(path: UTF8String) extends XPathEvaluator { } } } + +case class XmlToStructsEvaluator( + options: Map[String, String], + nullableSchema: DataType, + nameOfCorruptRecord: String, + timeZoneId: Option[String], + child: Expression +) { + @transient lazy val parsedOptions = new XmlOptions(options, timeZoneId.get, nameOfCorruptRecord) Review Comment: Good question - I don't have a good idea as well, I suspect there are some null checks at upper layers so it's safe to assume it's not null here. This is moved directly from other classes so it's safe to keep the assumption here. -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org