possible SDK bug in handling custom plugin intermediate result aggregator



  • Gido

    Hello Jutta, currently we are investigating this and will respond back later.

    Comment actions Permalink
  • Gido

    After further communication via our service desk and detailed analysis of your provided custom plugin, I wanted to provide the following summary here:

    The behavior was not caused by a bug and the rules for implementing an IntermediateResultAggregator are

    • newGroup() is guaranteed to be called before each group on the sheet, so use it to initialize necessary state.
    • aggregate() or aggregateIntermediate() won't be called until at least one newGroup() is called.
    • aggregate() and aggregateIntemediate() may both be called within the same "grouping".
    • computeAggregationResult() should only be called once per group.
    • computeIntermediateResult() may be called more than once per group. Since we don't copy the instance into something else and are just holding on to the reference, the intermediate result instance should not be cached.
    • After dispose() is called, none of the other methods will be called.
    • If your aggregator function is associative then one can extend the AssociativeAggregator to get the performance of IntermediateResultAggregator without having to implement the intermediate methods. But, this will cause the computeAggregationResult() to be called multiple times per group in some cases.
    Comment actions Permalink

Please sign in to leave a comment.