@Override
    protected void onSerialize(Serializer buf) {
        super.onSerialize(buf);
        serializeOptional(buf, sum);
    }
Sets the sum of all results in this.

@param sum The sum to set.
@return This, to allow chaining.
searchlib/src/main/java/com/yahoo/searchlib/aggregation/SumAggregationResult.java