code: func (c *unaryMinusFunctionClass) typeInfer(ctx sessionctx.Context, argExpr Expression) (types.EvalType, bool) {
  	tp := argExpr.GetType().EvalType()
  	if tp != types.ETInt && tp != types.ETDecimal {
  		tp = types.ETReal
  	}
  
  	sc := ctx.GetSessionVars().StmtCtx
  	overflow := false
  	// TODO: Handle float overflow.
  	if arg, ok := argExpr.(*Constant); sc.InSelectStmt && ok && tp == types.ETInt {
  		overflow = c.handleIntOverflow(arg)
  		if overflow {
  			tp = types.ETDecimal
  		}
  	}
  	return tp, overflow
  }
docs: // typeInfer infers unaryMinus function return type. when the arg is an int constant and overflow,
  // typerInfer will infers the return type as types.ETDecimal, not types.ETInt.