spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maropu <...@git.apache.org>
Subject [GitHub] spark pull request #20979: [SPARK-23588][SQL] CatalystToExternalMap should s...
Date Fri, 06 Apr 2018 09:33:32 GMT
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-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message