jalpan-randeri commented on a change in pull request #26512: 
[WIP][SPARK-29493][SQL] Arrow MapType support
URL: https://github.com/apache/spark/pull/26512#discussion_r349859050
 
 

 ##########
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/arrow/ArrowWriter.scala
 ##########
 @@ -343,3 +348,36 @@ private[arrow] class StructWriter(
     children.foreach(_.reset())
   }
 }
+
+private[arrow] class MapWriter(val valueVector: MapVector,
+                               val keyWriter: ArrowFieldWriter,
+                               val valueWriter: ArrowFieldWriter) extends 
ArrowFieldWriter {
+
+  override def setNull(): Unit = {}
 
 Review comment:
   map vector implemented as an extension of list vector. it is represented as 
list of struct. it seems we can not set key as null. I found following comments 
in code,  
   ```
   if a map is set at a given index, there must be an entry. In other words, 
the StructVector data is non-nullable. 
   ```
   
   - 
https://github.com/apache/arrow/blob/master/java/vector/src/main/java/org/apache/arrow/vector/complex/MapVector.java#L36

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to