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


##########
hudi-common/src/main/java/org/apache/hudi/common/table/read/BufferedRecordMergerFactory.java:
##########
@@ -394,30 +407,36 @@ public MergeResult<T> 
mergeNonDeleteRecord(BufferedRecord<T> olderRecord, Buffer
    * based on {@code CUSTOM} merge mode and a given record payload class.
    */
   private static class CustomPayloadRecordMerger<T> extends 
BaseCustomMerger<T> {
-    private final List<String> orderingFieldNames;
-    private final String payloadClass;
+    private final String[] orderingFieldNames;
+    private final String basePayloadClass;
+    private final String incomingPayloadClass;
 
     public CustomPayloadRecordMerger(
         RecordContext<T> recordContext,
         Option<HoodieRecordMerger> recordMerger,
         List<String> orderingFieldNames,
-        String payloadClass,
+        String basePayloadClass,
+        String incomingPayloadClass,
         Schema readerSchema,
         TypedProperties props) {
       super(recordContext, recordMerger, readerSchema, props);
-      this.orderingFieldNames = orderingFieldNames;
-      this.payloadClass = payloadClass;
+      this.orderingFieldNames = orderingFieldNames.toArray(new String[0]);
+      this.basePayloadClass = basePayloadClass;
+      this.incomingPayloadClass = incomingPayloadClass;
     }
 
     @Override
     public Option<BufferedRecord<T>> 
deltaMergeNonDeleteRecord(BufferedRecord<T> newRecord, BufferedRecord<T> 
existingRecord) throws IOException {
-      Option<Pair<HoodieRecord, Schema>> combinedRecordAndSchemaOpt = 
getMergedRecord(existingRecord, newRecord);
-      if (combinedRecordAndSchemaOpt.isPresent()) {
-        T combinedRecordData = recordContext.convertAvroRecord((IndexedRecord) 
combinedRecordAndSchemaOpt.get().getLeft().getData());
+      Option<Pair<HoodieRecord, Schema>> combinedRecordAndSchemaOpt = 
getMergedRecord(existingRecord, newRecord, false);
+      if (combinedRecordAndSchemaOpt.map(combinedRecordAndSchema -> 
combinedRecordAndSchema.getRight() != null).orElse(false)) {

Review Comment:
   This was the sentinel value case, forgot to clean this up.



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