the-other-tim-brown commented on code in PR #13742:
URL: https://github.com/apache/hudi/pull/13742#discussion_r2296724086
##########
hudi-spark-datasource/hudi-spark/src/test/java/org/apache/hudi/io/TestMergeHandle.java:
##########
@@ -673,74 +672,4 @@ public Map<String, HoodieRecord> getValidDeletes() {
return validDeletes;
}
}
-
- public static class CustomMerger implements HoodieRecordMerger {
Review Comment:
Both CustomMerger and CustomPayload are extracted into their own classes for
reuse in testing
##########
hudi-spark-datasource/hudi-spark/src/test/java/org/apache/hudi/io/TestMergeHandle.java:
##########
@@ -501,13 +499,14 @@ private InputAndExpectedDataSet
prepareInputFor2ndBatch(HoodieWriteConfig config
recordsToDelete.add(deleteRecordSameOrderingValue);
recordsToDelete.add(deleteRecordLowerOrderingValue);
recordsToDelete.add(deleteRecordHigherOrderingValue);
+ // Custom merger chooses record with lower ordering value
Review Comment:
Validates that the custom ordering is respected for deletes
##########
hudi-common/src/test/java/org/apache/hudi/common/model/TestDefaultHoodieRecordPayload.java:
##########
@@ -78,8 +78,8 @@ public void testActiveRecords(String key) throws IOException {
record2.put("ts", 1L);
record2.put("_hoodie_is_deleted", false);
- DefaultHoodieRecordPayload payload1 = new
DefaultHoodieRecordPayload(record1, 1);
- DefaultHoodieRecordPayload payload2 = new
DefaultHoodieRecordPayload(record2, 2);
+ DefaultHoodieRecordPayload payload1 = new
DefaultHoodieRecordPayload(record1, 0L);
Review Comment:
Updated the tests so that the ordering value matches the field value
--
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]