hailin0 commented on code in PR #4833:
URL: https://github.com/apache/seatunnel/pull/4833#discussion_r1208716380


##########
seatunnel-connectors-v2/connector-mongodb/src/main/java/org/apache/seatunnel/connectors/seatunnel/mongodb/serde/RowDataDocumentSerializer.java:
##########
@@ -52,6 +56,20 @@ public RowDataDocumentSerializer(
 
     @Override
     public WriteModel<BsonDocument> serializeToWriteModel(SeaTunnelRow row) {
+        switch (row.getRowKind()) {
+            case INSERT:
+            case UPDATE_AFTER:
+                return upsert(row);
+            case UPDATE_BEFORE:

Review Comment:
   If upsert is not enabled, update_before needs to as delete and update_after 
needs to as insert



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

Reply via email to