hudi-agent commented on code in PR #20138:
URL: https://github.com/apache/hudi/pull/20138#discussion_r4143728657


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/StreamWriteFunction.java:
##########
@@ -589,7 +590,7 @@ private void sortBucketIfNeeded(RowDataBucket 
rowDataBucket) {
       return;
     }
     try {
-      rowDataBucket.sort();
+      rowDataBucket.sort(readerContext.getMergeMode() == 
RecordMergeMode.COMMIT_TIME_ORDERING);

Review Comment:
   🤖 This looks addressed in the current revision. The tie-break is no longer 
tied to merge mode: `RowDataSortBuffer.compare` falls back to the ascending 
record offset (arrival order) whenever the key comparison returns 0, and 
`initRecordKeySort` only checks for the LSM layout. So event-time, commit-time 
and custom modes all keep arrival order for equal keys, and ties on the 
ordering value should now go to the later record, as `shouldKeepNewerRecord` 
expects.



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