Support SparkSqlSerializer for Aggregate

And fixed some style problems.