dailai commented on code in PR #7835:
URL: https://github.com/apache/seatunnel/pull/7835#discussion_r1800698588


##########
seatunnel-connectors-v2/connector-paimon/src/main/java/org/apache/seatunnel/connectors/seatunnel/paimon/sink/PaimonSinkWriter.java:
##########
@@ -174,16 +175,21 @@ public void write(SeaTunnelRow element) throws 
IOException {
 
     @Override
     public Optional<PaimonCommitInfo> prepareCommit() throws IOException {
+        return Optional.empty();
+    }
+
+    @Override
+    public Optional<PaimonCommitInfo> prepareCommit(long checkpointId) throws 
IOException {
         try {
             List<CommitMessage> fileCommittables;
             if (JobContextUtil.isBatchJob(jobContext)) {
                 fileCommittables = ((BatchTableWrite) 
tableWrite).prepareCommit();
             } else {
                 fileCommittables =
-                        ((StreamTableWrite) tableWrite).prepareCommit(false, 
committables.size());
+                        ((StreamTableWrite) tableWrite).prepareCommit(false, 
checkpointId);

Review Comment:
   It's right. The original is always 0. This is the official example of paimon.
   
   <img width="857" alt="截屏2024-10-15 16 32 59" 
src="https://github.com/user-attachments/assets/713ac6a5-7966-4a4d-a477-2f1364deab99";>
   



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