the-other-tim-brown commented on code in PR #13726:
URL: https://github.com/apache/hudi/pull/13726#discussion_r2294980830


##########
hudi-spark-datasource/hudi-spark/src/test/java/org/apache/hudi/client/functional/TestDataValidationCheckForLogCompactionActions.java:
##########
@@ -321,16 +321,16 @@ public TestTableContents(String basePath, String 
tableName, HoodieTableMetaClien
     }
 
     private void updatePreviousGeneration(List<HoodieRecord> generatedRecords, 
String commitTimeOnMainTable, int previousActionType) {
-      Schema schema = new Schema.Parser().parse(this.config.getSchema());
-      this.generatedRecords = generatedRecords.stream().map(rec -> 
deepCopyAndModifyRecordKey(rec)).collect(Collectors.toList());
+      this.generatedRecords = 
generatedRecords.stream().map(this::deepCopyAndModifyRecordKey).collect(Collectors.toList());
       this.commitTimeOnMainTable = commitTimeOnMainTable;
       this.previousActionType = previousActionType;
     }
 
     private HoodieRecord deepCopyAndModifyRecordKey(HoodieRecord record) {
       HoodieKey key = deepCopyAndModifyRecordKey(record.getKey());
-      RawTripTestPayload payload = 
((RawTripTestPayload)record.getData()).clone();
-      return new HoodieAvroRecord(key, payload);
+      GenericRecord data = (GenericRecord) record.getData();
+      GenericRecord copiedData = GenericData.get().deepCopy(data.getSchema(), 
data);
+      return new HoodieAvroIndexedRecord(key, copiedData);

Review Comment:
   Yes we have still have some cases, I've also made sure we do some unique 
ordering in these cases



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