You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/12/06 22:52:12 UTC

[GitHub] [spark] jalpan-randeri commented on a change in pull request #26512: [WIP][SPARK-29493][SQL] Arrow MapType support

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_r355063507
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/util/ArrowUtils.scala
 ##########
 @@ -96,6 +108,11 @@ object ArrowUtils {
 
   def fromArrowField(field: Field): DataType = {
     field.getType match {
+      case _: ArrowType.Map =>
+        val elementField = field.getChildren.get(0)
+        val keyType = fromArrowField(elementField.getChildren.get(0))
+        val valueType = fromArrowField(elementField.getChildren.get(1))
+        MapType(keyType, valueType)
 
 Review comment:
   Done. Yes, i was using incorrect constructor

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org