You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "aokolnychyi (via GitHub)" <gi...@apache.org> on 2023/05/23 17:26:25 UTC

[GitHub] [iceberg] aokolnychyi commented on a diff in pull request #7691: Spark 3.4: Codegen support for UpdateRowsExec

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: issues-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org