viirya commented on code in PR #60327:
URL: https://github.com/apache/spark/pull/60327#discussion_r4541000559


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/python/EvalPythonEvaluatorFactory.scala:
##########
@@ -30,12 +30,24 @@ import 
org.apache.spark.sql.execution.python.EvalPythonExec.ArgumentMetadata
 import org.apache.spark.sql.types.{DataType, StructField, StructType}
 import org.apache.spark.util.Utils
 
+/**
+ * @param childOutput the output of the child, which the input rows have
+ * @param udfs the Python UDFs to evaluate
+ * @param output the output rows: the columns of the child that are passed 
through, followed by
+ *               one column for the result of each UDF
+ */
 abstract class EvalPythonEvaluatorFactory(
     childOutput: Seq[Attribute],
     udfs: Seq[PythonUDF],
     output: Seq[Attribute])
   extends PartitionEvaluatorFactory[InternalRow, InternalRow] {
 
+  /** The columns of the child that are passed through to the output. */
+  protected val passThroughOutput: Seq[Attribute] = 
output.dropRight(udfs.length)

Review Comment:
   Done in 29c9aa7: the factories take the pass-through columns and the result 
columns, and build the output from them.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to