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

    https://github.com/apache/spark/pull/22104#discussion_r210410738
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/python/EvalPythonExec.scala
 ---
    @@ -117,15 +117,16 @@ abstract class EvalPythonExec(udfs: Seq[PythonUDF], 
output: Seq[Attribute], chil
               }
             }.toArray
           }.toArray
    -      val projection = newMutableProjection(allInputs, child.output)
    +      val projection = UnsafeProjection.create(allInputs, child.output)
           val schema = StructType(dataTypes.zipWithIndex.map { case (dt, i) =>
             StructField(s"_$i", dt)
           })
     
           // Add rows to queue to join later with the result.
           val projectedRowIter = iter.map { inputRow =>
    -        queue.add(inputRow.asInstanceOf[UnsafeRow])
    -        projection(inputRow)
    +        val unsafeRow = projection(inputRow)
    +        queue.add(unsafeRow.asInstanceOf[UnsafeRow])
    --- End diff --
    
    Ok.. This seems to break existing tests. Need to look into it.


---

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

Reply via email to