Github user maropu commented on a diff in the pull request:

    https://github.com/apache/spark/pull/20979#discussion_r179705283
  
    --- 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 --
    
    ok, I'll consider again.


---

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

Reply via email to