yihua commented on code in PR #12452:
URL: https://github.com/apache/hudi/pull/12452#discussion_r1929618161
##########
hudi-common/src/main/java/org/apache/hudi/common/table/read/HoodieBaseFileGroupRecordBuffer.java:
##########
@@ -115,9 +114,16 @@ public
HoodieBaseFileGroupRecordBuffer(HoodieReaderContext<T> readerContext,
} else {
this.payloadClass = Option.empty();
}
- this.orderingFieldName =
Option.ofNullable(ConfigUtils.getOrderingField(props)).orElseGet(() ->
hoodieTableMetaClient.getTableConfig().getPreCombineField());
- this.orderingFieldTypeOpt = recordMergeMode ==
RecordMergeMode.COMMIT_TIME_ORDERING ? Option.empty() :
AvroSchemaUtils.findNestedFieldType(readerSchema, this.orderingFieldName);
- this.orderingFieldDefault = orderingFieldTypeOpt.map(type ->
readerContext.castValue(0, type)).orElse(0);
+ this.orderingFieldName = recordMergeMode ==
RecordMergeMode.COMMIT_TIME_ORDERING
Review Comment:
Also note that, even prior to this PR, we're not using the ordering field if
the merge mode is `COMMIT_TIME_ORDERING`. The change here just to make the
assumption tight and not cause any confusion.
--
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]