Implement sum function of aggregation plugin and test