HyukjinKwon commented on code in PR #42462:
URL: https://github.com/apache/spark/pull/42462#discussion_r1299583398
##########
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:
I think you can remove this, and `case (DecimalType(), v:
java.math.BigDecimal) => writer.writeCharacters(v.toString)` (See also
`JacksonGenerator` and which types are being handled).
BTW, we would also add the type supports for `TimestampNTZType`,
`YearMonthIntervalType` and `DayTimeIntervalType`. But they are orthogonal and
can be done separately.
--
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]