ericsun95 commented on code in PR #42462:
URL: https://github.com/apache/spark/pull/42462#discussion_r1294137466


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/xml/parsers/StaxXmlGenerator.scala:
##########
@@ -136,7 +143,25 @@ private[xml] object StaxXmlGenerator {
           s"Failed to convert value $v (class of ${v.getClass}) in type $dt to 
XML.")
     }
 
-    val (attributes, elements) = schema.zip(row.toSeq).partition { case (f, _) 
=>
+    def writeMapData(mapType: MapType, map: MapData): Unit = {
+      val keyArray = map.keyArray()
+      val valueArray = map.valueArray()
+      // write attributes first
+      Seq (true, false).foreach { writeAttribute =>
+        var i = 0
+        while (i < map.numElements()) {

Review Comment:
   Same above.



-- 
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]

Reply via email to