sandip-db commented on code in PR #42462:
URL: https://github.com/apache/spark/pull/42462#discussion_r1300465613
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/xml/StaxXmlGenerator.scala:
##########
@@ -83,21 +86,21 @@ private[xml] object StaxXmlGenerator {
def writeElement(dt: DataType, v: Any, options: XmlOptions): Unit = (dt,
v) match {
case (_, null) | (NullType, _) =>
writer.writeCharacters(options.nullValue)
+ case (StringType, v: UTF8String) => writer.writeCharacters(v.toString)
case (StringType, v: String) => writer.writeCharacters(v)
case (TimestampType, v: Timestamp) =>
Review Comment:
Most StringType arrive here with value of type UTF8String.
Also, JacksonGenerator supports DecimalType and I was planning to add
support for DecimalType in a followup. Is that not required?
--
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]