code: func (a *aggregationEliminateChecker) wrapCastFunction(ctx sessionctx.Context, arg expression.Expression, targetTp *types.FieldType) expression.Expression {
  	if arg.GetType() == targetTp {
  		return arg
  	}
  	return expression.BuildCastFunction(ctx, arg, targetTp)
  }
docs: // wrapCastFunction will wrap a cast if the targetTp is not equal to the arg's.