code: func AggFieldType(tps []*FieldType) *FieldType {
  	var currType FieldType
  	for i, t := range tps {
  		if i == 0 && currType.Tp == mysql.TypeUnspecified {
  			currType = *t
  			continue
  		}
  		mtp := MergeFieldType(currType.Tp, t.Tp)
  		currType.Tp = mtp
  	}
  
  	return &currType
  }
docs: // AggFieldType aggregates field types for a multi-argument function like `IF`, `IFNULL`, `COALESCE`
  // whose return type is determined by the arguments' FieldTypes.
  // Aggregation is performed by MergeFieldType function.