func NewAggregation(index int, aggrTyp AggrType, distinct, isPushDown bool) *Aggregation {
	return &Aggregation{
		distinct:   distinct,
		index:      index,
		aggrTyp:    aggrTyp,
		isPushDown: isPushDown,
		prec:       -1,
	}
}
NewAggregation new an Aggregetion.
package sqltypes
import (
	"github.com/xelabs/go-mysqlstack/sqlparser/depends/common"
	querypb "github.com/xelabs/go-mysqlstack/sqlparser/depends/query"
)
type AggrType string
const (
	AggrTypeNull AggrType = ""
	AggrTypeCount AggrType = "COUNT"
	AggrTypeSum AggrType = "SUM"
	AggrTypeMin AggrType = "MIN"
	AggrTypeMax AggrType = "MAX"
	AggrTypeAvg AggrType = "AVG"
	AggrTypeGroupBy AggrType = "GROUP BY"
)
type Aggregation struct {
	distinct   bool
	index      int
	aggrTyp    AggrType
	fieldType  querypb.Type
	isPushDown bool
	prec int
}
type AggEvaluateContext struct {
	count  int64
	val    Value
	hasErr bool
	buffer *common.HashTable
}