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


##########
hudi-common/src/main/java/org/apache/hudi/common/table/read/BufferedRecords.java:
##########
@@ -44,7 +44,18 @@ public static <T> BufferedRecord<T> 
fromHoodieRecord(HoodieRecord record, Schema
     T data = recordContext.extractDataFromRecord(record, schema, props);
     String recordKey = hoodieKey == null ? recordContext.getRecordKey(data, 
schema) : hoodieKey.getRecordKey();
     Integer schemaId = recordContext.encodeAvroSchema(schema);
-    Comparable orderingValue = record.getOrderingValue(schema, props, 
orderingFields);
+    Comparable orderingValue = record.getCachedOrderingValue() != null ?  
record.getCachedOrderingValue() : recordContext.getOrderingValue(data, schema, 
orderingFields);

Review Comment:
   +1, as long as the T is extracted, we could have fetched the value directly 
from `HoodieRecord`. And after all, extracting values from T would also 
deserialize the record.



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