Fix two phase aggregate to use $SUM0
Fix partition bug in hive storage
Fix nullability of Count aggr.
Fix bug in sort