kbendick commented on code in PR #5083:
URL: https://github.com/apache/iceberg/pull/5083#discussion_r929587846


##########
spark/v3.2/spark-extensions/src/main/scala/org/apache/spark/sql/catalyst/analysis/RewriteUpdateTable.scala:
##########
@@ -56,24 +58,41 @@ object RewriteUpdateTable extends RewriteRowLevelCommand {
     case u @ UpdateIcebergTable(aliasedTable, assignments, cond, None) if 
u.resolved && u.aligned =>
       EliminateSubqueryAliases(aliasedTable) match {
         case r @ DataSourceV2Relation(tbl: SupportsRowLevelOperations, _, _, 
_, _) =>
-          val operation = buildRowLevelOperation(tbl, UPDATE)
-          val table = RowLevelOperationTable(tbl, operation)
-          val updateCond = cond.getOrElse(Literal.TrueLiteral)
-          val rewritePlan = operation match {
-            case _: SupportsDelta =>
-              buildWriteDeltaPlan(r, table, assignments, updateCond)
-            case _ if SubqueryExpression.hasSubquery(updateCond) =>
-              buildReplaceDataWithUnionPlan(r, table, assignments, updateCond)
-            case _ =>
-              buildReplaceDataPlan(r, table, assignments, updateCond)
+          rewriteUpdateTable(u, r, tbl)
+        case v: View =>
+          val relations = v.children.collect { case r: DataSourceV2Relation if 
r.table.isInstanceOf[SparkTable] =>

Review Comment:
   I think there's mAh e  types of table within Spark than just `SparkTable` 
now but I'm not sure if that matters (cached tables used for some procédures I 
thubj).



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