uros-b commented on code in PR #56705:
URL: https://github.com/apache/spark/pull/56705#discussion_r3497433204


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/v2Commands.scala:
##########
@@ -538,6 +538,10 @@ case class WriteDelta(
     operation.command match {
       case DELETE =>
         MetadataAttribute.isPreservedOnDelete(attr)
+      case REPLACE =>
+        // REPLACE emits delete rows for matched target rows and insert rows 
for source rows.
+        // Insert rows carry no metadata, so metadata nullability only needs 
delete preservation.
+        MetadataAttribute.isPreservedOnDelete(attr)

Review Comment:
   Nit: this still has two identical adjacent case DELETE => / case REPLACE => 
arms collapsible to case DELETE | REPLACE =>.



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