the-other-tim-brown commented on code in PR #13726:
URL: https://github.com/apache/hudi/pull/13726#discussion_r2283714966
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/index/HoodieIndexUtils.java:
##########
@@ -477,21 +477,26 @@ private static <R> Option<HoodieRecord<R>>
mergeIncomingWithExistingRecord(
writeSchemaWithMetaFields, config, recordMerger, keyGenerator,
incomingRecordContext, existingRecordContext, orderingFieldNames);
} else {
// prepend the hoodie meta fields as the incoming record does not have
them
- HoodieRecord incomingPrepended = incoming
- .prependMetaFields(writeSchema, writeSchemaWithMetaFields, new
MetadataValues().setRecordKey(incoming.getRecordKey()).setPartitionPath(incoming.getPartitionPath()),
config.getProps());
- BufferedRecord<R> incomingBufferedRecord =
BufferedRecords.fromHoodieRecord(incomingPrepended, writeSchemaWithMetaFields,
incomingRecordContext, config.getProps(), orderingFieldNames);
+ BufferedRecord<R> incomingBufferedRecord =
BufferedRecords.fromHoodieRecord(incoming, writeSchemaWithMetaFields,
incomingRecordContext, config.getProps(), orderingFieldNames);
Review Comment:
Yes, the incoming should use `writeSchema`. I will fix this.
In the Before, we were stripping the meta fields from the result when
constructing the hoodie record.
Now we will be avoiding the extra conversion when we are on the default path.
--
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]