Github user hvanhovell commented on a diff in the pull request: https://github.com/apache/spark/pull/20979#discussion_r179430079 --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala --- @@ -988,8 +988,20 @@ case class CatalystToExternalMap private( override def children: Seq[Expression] = keyLambdaFunction :: valueLambdaFunction :: inputData :: Nil - override def eval(input: InternalRow): Any = - throw new UnsupportedOperationException("Only code-generated evaluation is supported") + private lazy val toScalaValue: Any => Any = { + assert(inputData.dataType.isInstanceOf[MapType]) + val mapType = inputData.dataType.asInstanceOf[MapType] + CatalystTypeConverters.createToScalaConverter(mapType) --- End diff -- I am not sure if I buy that argument. This expression can produce a map type other than `scala.collection.immutable.Map`, so we should either implement this, or we should remove the ability to produce different map types.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org