You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/04/20 08:28:18 UTC

[GitHub] [spark] cloud-fan commented on a change in pull request #32228: [SPARK-34035][SQL] Refactor ScriptTransformation to remove input parameter and replace it by child.output

cloud-fan commented on a change in pull request #32228:
URL: https://github.com/apache/spark/pull/32228#discussion_r616463214



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/ScriptTransformation.scala
##########
@@ -17,24 +17,22 @@
 
 package org.apache.spark.sql.catalyst.plans.logical
 
-import org.apache.spark.sql.catalyst.expressions.{Attribute, AttributeSet, Expression}
+import org.apache.spark.sql.catalyst.expressions.{Attribute, AttributeSet}
 
 /**
  * Transforms the input by forking and running the specified script.
  *
- * @param input the set of expression that should be passed to the script.
  * @param script the command that should be executed.
  * @param output the attributes that are produced by the script.
  * @param ioschema the input and output schema applied in the execution of the script.
  */
 case class ScriptTransformation(
-    input: Seq[Expression],
     script: String,
     output: Seq[Attribute],
     child: LogicalPlan,
     ioschema: ScriptInputOutputSchema) extends UnaryNode {
   @transient
-  override lazy val references: AttributeSet = AttributeSet(input.flatMap(_.references))
+  override lazy val references: AttributeSet = AttributeSet(child.output.flatMap(_.references))

Review comment:
       nit: `children.output`, as it's already `Seq[Attribute]`




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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