shujingyang-db commented on code in PR #44318:
URL: https://github.com/apache/spark/pull/44318#discussion_r1430944306
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/xml/XmlInferSchema.scala:
##########
@@ -171,16 +171,18 @@ class XmlInferSchema(options: XmlOptions, caseSensitive:
Boolean)
case _: EndElement => StringType
case _ => inferField(parser)
}
- case c: Characters if !c.isWhiteSpace =>
+ // what about new line character
+ case c: Characters if !isEmptyString(c) =>
Review Comment:
IMHO inferObject can't do this. This branch handles both primitive types and
nested objects. If we return `inferObject(parser)`, the primitive types will be
inferred as a structFields of valueTag
--
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]