aokolnychyi commented on code in PR #7691:
URL: https://github.com/apache/iceberg/pull/7691#discussion_r1202752035


##########
spark/v3.4/spark-extensions/src/main/scala/org/apache/spark/sql/execution/datasources/v2/UpdateRowsExec.scala:
##########
@@ -51,6 +58,59 @@ case class UpdateRowsExec(
     copy(child = newChild)
   }
 
+  override def usedInputs: AttributeSet = {

Review Comment:
   This is a similar optimization as in `ProjectExec`. It ensures if the same 
input attribute is used in multiple output expressions, we only fetch it once. 
Suppose I have `c1 = id + 10, c2 = id - 10`. Instead of fetching `id` for each 
output expression, we can do that once and reuse the same variable.



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