linliu-code commented on code in PR #13213:
URL: https://github.com/apache/hudi/pull/13213#discussion_r2056599800


##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/common/model/HoodieSparkRecord.java:
##########
@@ -320,19 +322,23 @@ public HoodieSparkRecord copy() {
 
   @Override
   public Comparable<?> getOrderingValue(Schema recordSchema, Properties props) 
{
+    if (this.orderingValue != null) {
+      return this.orderingValue;
+    }
     StructType structType = 
HoodieInternalRowUtils.getCachedSchema(recordSchema);
     String orderingField = ConfigUtils.getOrderingField(props);
     if (isNullOrEmpty(orderingField)) {

Review Comment:
   If the ordering field from schema is null or empty, we should return without 
going through code after L332.
   Value of `orderingValue` should be properly handled; otherwise, it will be 
null.



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