kbendick commented on a change in pull request #3804:
URL: https://github.com/apache/iceberg/pull/3804#discussion_r780550300
##########
File path:
spark/v3.2/spark-extensions/src/main/scala/org/apache/spark/sql/catalyst/analysis/AlignRowLevelCommandAssignments.scala
##########
@@ -34,5 +41,73 @@ object AlignRowLevelCommandAssignments
override def apply(plan: LogicalPlan): LogicalPlan = plan resolveOperators {
case u: UpdateIcebergTable if u.resolved && !u.aligned =>
u.copy(assignments = alignAssignments(u.table, u.assignments))
+
+ case m: MergeIntoIcebergTable if m.resolved && !m.aligned =>
+ val alignedMatchedActions = m.matchedActions.map {
+ case u @ UpdateAction(_, assignments) =>
+ u.copy(assignments = alignAssignments(m.targetTable, assignments))
Review comment:
Do we need to handle `UpdateStarAction`?
##########
File path:
spark/v3.2/spark-extensions/src/main/scala/org/apache/spark/sql/catalyst/analysis/AlignRowLevelCommandAssignments.scala
##########
@@ -34,5 +41,73 @@ object AlignRowLevelCommandAssignments
override def apply(plan: LogicalPlan): LogicalPlan = plan resolveOperators {
case u: UpdateIcebergTable if u.resolved && !u.aligned =>
u.copy(assignments = alignAssignments(u.table, u.assignments))
+
+ case m: MergeIntoIcebergTable if m.resolved && !m.aligned =>
+ val alignedMatchedActions = m.matchedActions.map {
+ case u @ UpdateAction(_, assignments) =>
+ u.copy(assignments = alignAssignments(m.targetTable, assignments))
+ case d: DeleteAction =>
+ d
+ case _ =>
+ throw new AnalysisException("Matched actions can only contain UPDATE
or DELETE")
+ }
+
+ val alignedNotMatchedActions = m.notMatchedActions.map {
+ case i @ InsertAction(_, assignments) =>
Review comment:
Same question regarding `InsertStarAction`.
--
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]