danny0405 commented on code in PR #13742:
URL: https://github.com/apache/hudi/pull/13742#discussion_r2299907678


##########
hudi-common/src/main/java/org/apache/hudi/common/model/DefaultHoodieRecordPayload.java:
##########
@@ -172,10 +168,18 @@ protected boolean 
needUpdatingPersistedRecord(IndexedRecord currentValue,
     Comparable persistedOrderingVal = OrderingValues.create(
         orderingFields,
         field -> (Comparable) 
HoodieAvroUtils.getNestedFieldVal((GenericRecord) currentValue, field, true, 
consistentLogicalTimestampEnabled));
-    Comparable incomingOrderingVal = OrderingValues.create(
-        orderingFields,
-        field -> (Comparable) 
HoodieAvroUtils.getNestedFieldVal((GenericRecord) incomingRecord, field, true, 
consistentLogicalTimestampEnabled));
+    Comparable incomingOrderingVal = getIncomingOrderingVal(incomingRecord, 
orderingFields, consistentLogicalTimestampEnabled);
+    // If the incoming record is a delete record without an ordering value, it 
is processed as "commit time" ordering.
+    if (incomingRecord.isEmpty() && incomingOrderingVal == 
OrderingValues.getDefault()) {

Review Comment:
   use `OrderingValues.isDefault`



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