maropu commented on a change in pull request #28715:
URL: https://github.com/apache/spark/pull/28715#discussion_r440635513



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/GenerateExec.scala
##########
@@ -226,14 +226,19 @@ case class GenerateExec(
       "0"
     }
     val numOutput = metricTerm(ctx, "numOutputRows")
+    val requiredInput = {
+      input.zipWithIndex.flatMap { case (ev, i) =>
+        if ((parent.inputSet).contains(child.output(i))) Seq(ev) else Seq()
+      }
+    } ++ position ++ values

Review comment:
       more style nit: how about reformatting it ilke this?
   ```
       val requiredOutputVars = input.zip(child.output).filter(ev => 
parent.inputSet.contains(ev._2))
         .map(_._1) ++ position ++ values
   ```




----------------------------------------------------------------
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:
us...@infra.apache.org



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

Reply via email to