fengjian428 commented on code in PR #4676:
URL: https://github.com/apache/hudi/pull/4676#discussion_r971172166
##########
hudi-client/hudi-flink-client/src/main/java/org/apache/hudi/table/action/commit/FlinkWriteHelper.java:
##########
@@ -88,16 +91,20 @@ protected List<HoodieRecord<T>> tag(List<HoodieRecord<T>>
dedupedRecords, Hoodie
@Override
public List<HoodieRecord<T>> deduplicateRecords(
- List<HoodieRecord<T>> records, HoodieIndex<?, ?> index, int parallelism)
{
+ List<HoodieRecord<T>> records, HoodieIndex<?, ?> index, int parallelism,
String jsonSchema) {
// If index used is global, then records are expected to differ in their
partitionPath
Map<Object, List<HoodieRecord<T>>> keyedRecords = records.stream()
.collect(Collectors.groupingBy(record ->
record.getKey().getRecordKey()));
+ final Schema[] schema = {null};
return keyedRecords.values().stream().map(x -> x.stream().reduce((rec1,
rec2) -> {
final T data1 = rec1.getData();
final T data2 = rec2.getData();
- @SuppressWarnings("unchecked") final T reducedData = (T)
data2.preCombine(data1);
+ if (schema[0] == null) {
Review Comment:
Thanks, pass schema directly here
--
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]