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


##########
hudi-common/src/main/java/org/apache/hudi/common/engine/HoodieReaderContext.java:
##########
@@ -239,12 +240,11 @@ public Comparable getOrderingValue(Option<T> recordOption,
     if (metadataMap.containsKey(INTERNAL_META_ORDERING_FIELD)) {
       return (Comparable) metadataMap.get(INTERNAL_META_ORDERING_FIELD);
     }
-
     if (!recordOption.isPresent() || !orderingFieldTypeOpt.isPresent()) {
       return orderingFieldDefault;
     }
-
-    Object value = getValue(recordOption.get(), schema, orderingFieldName);
+    Schema schemaApplied = metadataMap.containsKey(INTERNAL_META_SCHEMA) ? 
(Schema) metadataMap.get(INTERNAL_META_SCHEMA) : schema;
+    Object value = getValue(recordOption.get(), schemaApplied, 
orderingFieldName);

Review Comment:
   I did see some failures because of incorrect schema. So I try to apply the 
internal meta schema first. May be it is temporary. I can remove it to see if 
any tests fail.



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