houlinchn commented on code in PR #11274:
URL: https://github.com/apache/paimon/pull/11274#discussion_r4666026940
##########
paimon-core/src/main/java/org/apache/paimon/mergetree/compact/PartialUpdateMergeFunction.java:
##########
@@ -165,19 +166,18 @@ protected PartialUpdateMergeFunction(
this.ignoreDelete = ignoreDelete;
this.fieldSeqComparators =
getKeySortedListFromMap(fieldSeqComparators);
this.fieldAggregators = getKeySortedListFromMap(fieldAggregators);
+ this.initialSumValues = new HashMap<>();
+ fieldAggregators.forEach(
+ (i, aggregator) -> {
+ if (aggregator instanceof FieldSumAgg) {
Review Comment:
Thanks, moved it into `FieldAggregator`. It now has `emptyAccumulator()` and
`retractionResult()`, and `FieldSumAgg` overrides both.
`PartialUpdateMergeFunction` no longer checks for `FieldSumAgg`.
This also fixes NOT NULL `ignore-retract` sums. They're wrapped in
`FieldIgnoreRetractAgg`, so the old `instanceof` check missed them.
--
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]