shujingyang-db commented on code in PR #43722:
URL: https://github.com/apache/spark/pull/43722#discussion_r1390532119
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/xml/XmlInferSchema.scala:
##########
@@ -198,30 +207,66 @@ private[sql] class XmlInferSchema(options: XmlOptions)
extends Serializable with
*/
private def inferObject(
parser: XMLEventReader,
+ caseSensitive: Boolean,
rootAttributes: Array[Attribute] = Array.empty): DataType = {
val builder = ArrayBuffer[StructField]()
val nameToDataType = collection.mutable.Map.empty[String,
ArrayBuffer[DataType]]
+ // Initialize a map to hold field names with case sensitivity based on
configuration.
+ // The map is only used in case *insensitive* mode
+ var fieldNames = if (caseSensitive) {
Review Comment:
We synced offline. I replaced it with the tree map. Thanks for the
suggestion!
--
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]