rdblue commented on a change in pull request #2206:
URL: https://github.com/apache/iceberg/pull/2206#discussion_r569854174



##########
File path: 
spark3-extensions/src/main/scala/org/apache/spark/sql/catalyst/optimizer/RewriteUpdate.scala
##########
@@ -74,12 +109,14 @@ case class RewriteUpdate(spark: SparkSession) extends 
Rule[LogicalPlan] with Rew
     val assignedExprs = assignments.map(_.value)
     val updatedExprs = assignedExprs.zip(relation.output).map { case 
(assignedExpr, attr) =>
       // use semanticEquals to avoid unnecessary if expressions as we may run 
after operator optimization
-      val updatedExpr = if (attr.semanticEquals(assignedExpr)) {
+      if (attr.semanticEquals(assignedExpr)) {
         attr
+      } else if (cond == Literal.TrueLiteral) {

Review comment:
       Oh, right. Thanks!




----------------------------------------------------------------
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:
[email protected]



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

Reply via email to