linliu-code commented on code in PR #9593:
URL: https://github.com/apache/hudi/pull/9593#discussion_r1336159836
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/index/HoodieIndexUtils.java:
##########
@@ -149,6 +150,9 @@ public static <R> HoodieRecord<R>
tagAsNewRecordIfNeeded(HoodieRecord<R> record,
// currentLocation 2 times and it will fail the second time. So creating
a new in memory
// copy of the hoodie record.
HoodieRecord<R> newRecord = record.newInstance();
+ if (record instanceof HoodieEmptyRecord) {
+ newRecord = record.newInstance(record.getKey(), record.getOperation());
+ }
Review Comment:
Changed to use a if-else statement to initialize the newRecord.
--
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]