nsivabalan commented on code in PR #13600:
URL: https://github.com/apache/hudi/pull/13600#discussion_r2240956797
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/commit/BaseWriteHelper.java:
##########
@@ -85,9 +104,117 @@ public I combineOnCondition(
* @return Collection of HoodieRecord already be deduplicated
*/
public I deduplicateRecords(I records, HoodieTable<T, I, K, O> table, int
parallelism) {
- HoodieRecordMerger recordMerger =
HoodieRecordUtils.mergerToPreCombineMode(table.getConfig().getRecordMerger());
- return deduplicateRecords(records, table.getIndex(), parallelism,
table.getConfig().getSchema(), table.getConfig().getProps(), recordMerger);
+ HoodieReaderContext<T> readerContext =
+ (HoodieReaderContext<T>)
table.getContext().<T>getReaderContextFactoryDuringWrite(table.getMetaClient(),
table.getConfig().getRecordMerger().getRecordType())
+ .getContext();
+ List<String> orderingFieldNames = getOrderingFieldName(readerContext,
table.getConfig().getProps(), table.getMetaClient());
+ BufferedRecordMerger<T> recordMerger = BufferedRecordMergerFactory.create(
+ readerContext,
+ table.getConfig().getRecordMergeMode(),
+ false,
+ Option.ofNullable(table.getConfig().getRecordMerger()),
+ orderingFieldNames,
+ Option.ofNullable(table.getConfig().getPayloadClass()),
+ new SerializableSchema(table.getConfig().getSchema()).get(),
Review Comment:
incoming records could evolve the schema right? don't we have to use
something like writer schema here?
`config.getWriteSchema()`
--
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]