Implement max function of aggregation plugin and test.
Finished aggregation plugin.