Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22104#discussion_r212197529
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/python/EvalPythonExec.scala
 ---
    @@ -117,15 +117,18 @@ abstract class EvalPythonExec(udfs: Seq[PythonUDF], 
output: Seq[Attribute], chil
               }
             }.toArray
           }.toArray
    -      val projection = newMutableProjection(allInputs, child.output)
    +
    +      // Project input rows to unsafe row so we can put it in the row queue
    +      val unsafeProjection = UnsafeProjection.create(child.output, 
child.output)
    --- End diff --
    
    Ideally all the operators will produce UnsafeRow. If the data source does 
not produce UnsafeRow, Spark will make sure there will be a project above it to 
produce UnsafeRow, so we don't need to worry it here and safely assume the 
input is always UnsafeRow.


---

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

Reply via email to