Github user maropu commented on a diff in the pull request: https://github.com/apache/spark/pull/20980#discussion_r179355354 --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala --- @@ -1176,8 +1176,28 @@ case class ExternalMapToCatalyst private( override def dataType: MapType = MapType( keyConverter.dataType, valueConverter.dataType, valueContainsNull = valueConverter.nullable) - override def eval(input: InternalRow): Any = - throw new UnsupportedOperationException("Only code-generated evaluation is supported") + private lazy val keyCatalystConverter = + CatalystTypeConverters.createToCatalystConverter(dataType.keyType) + private lazy val valueCatalystConverter = + CatalystTypeConverters.createToCatalystConverter(dataType.valueType) + + override def eval(input: InternalRow): Any = { + val result = child.eval(input) + if (result != null) { + val mapValue = result.asInstanceOf[Map[Any, Any]] --- End diff -- ok
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org