yihua commented on code in PR #12122:
URL: https://github.com/apache/hudi/pull/12122#discussion_r1819880039
##########
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:
Does this fix a bug or the schema passed in is always the same as
`metadataMap.get(INTERNAL_META_SCHEMA)`?
--
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]