yihua commented on code in PR #17772:
URL: https://github.com/apache/hudi/pull/17772#discussion_r2670865324
##########
hudi-client/hudi-flink-client/src/main/java/org/apache/hudi/client/model/HoodieFlinkRecord.java:
##########
@@ -95,21 +95,21 @@ public HoodieRecord<RowData> newInstance(HoodieKey key) {
}
@Override
- protected Comparable<?> doGetOrderingValue(Schema recordSchema, Properties
props, String[] orderingFields) {
+ protected Comparable<?> doGetOrderingValue(HoodieSchema recordSchema,
Properties props, String[] orderingFields) {
if (orderingFields == null) {
return OrderingValues.getDefault();
} else {
return OrderingValues.create(orderingFields, field -> {
if (recordSchema.getField(field) == null) {
Review Comment:
`HoodieSchema#getField` never returns `null`. It returns `Option.empty()`
if the field is not found. So all invocations of `HoodieSchema#getField`
should be revisited and revised so that they have parity as before (i.e., use
`recordSchema.getField(field).isEmpty()` or
`recordSchema.getField(field).isPresent()` instead of `null` check).
--
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]