danny0405 commented on a change in pull request #3401:
URL: https://github.com/apache/hudi/pull/3401#discussion_r683992963
##########
File path:
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/io/HoodieMergeHandle.java
##########
@@ -239,7 +240,14 @@ protected void init(String fileId,
Iterator<HoodieRecord<T>> newRecordsItr) {
record.seal();
}
// NOTE: Once Records are added to map (spillable-map), DO NOT change it
as they won't persist
- keyToNewRecords.put(record.getRecordKey(), record);
+ String key = record.getRecordKey();
+ if (keyToNewRecords.containsKey(key)) {
Review comment:
Yeah, we can avoid this because the deduplication can be executed before
entering this handle, but `precombine` is not by default true, take a look at
Spark option `DataSourceOptions.INSERT_DROP_DUPS`
--
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]