You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/05/24 01:09:26 UTC

[GitHub] [iceberg] RussellSpitzer commented on a diff in pull request #4848: Spark: Fix Alignment of Merge Commands with Mixed Case

RussellSpitzer commented on code in PR #4848:
URL: https://github.com/apache/iceberg/pull/4848#discussion_r879973234


##########
spark/v3.2/spark-extensions/src/main/scala/org/apache/spark/sql/catalyst/analysis/AlignRowLevelCommandAssignments.scala:
##########
@@ -84,7 +84,16 @@ object AlignRowLevelCommandAssignments
           throw new AnalysisException("Not matched actions can only contain INSERT")
       }
 
-      m.copy(matchedActions = alignedMatchedActions, notMatchedActions = alignedNotMatchedActions)
+      val alignedMerge = m.copy(
+        matchedActions = alignedMatchedActions,
+        notMatchedActions = alignedNotMatchedActions)
+
+      if (!alignedMerge.aligned) {

Review Comment:
   I did add in a test case for Update. I think that's a good point, I can also just add a case to the Merge Rewrite Rule itself to match on any unaligned merge to an Iceberg table



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