dybyte commented on code in PR #10222:
URL: https://github.com/apache/seatunnel/pull/10222#discussion_r2638553127


##########
seatunnel-connectors-v2/connector-maxcompute/src/main/java/org/apache/seatunnel/connectors/seatunnel/maxcompute/util/MaxcomputeOutputFormat.java:
##########
@@ -55,22 +60,15 @@ public MaxcomputeOutputFormat(SeaTunnelRowType rowType, 
ReadonlyConfig readonlyC
     }
 
     public void write(SeaTunnelRow seaTunnelRow) throws IOException, 
TunnelException {
-        ensureUpsertSessionAndWriter();
-        Record newRecord =
-                MaxcomputeTypeMapper.getMaxcomputeRowData(
-                        upsertSession.newRecord(),
-                        seaTunnelRow,
-                        this.tableSchema,
-                        this.rowType,
-                        formatterContext);
-
         switch (seaTunnelRow.getRowKind()) {
             case INSERT:
+                insertRecord(seaTunnelRow);
+                break;
             case UPDATE_AFTER:

Review Comment:
   Yes. I think throwing an explicit exception would be better.



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