code: func GetIntFromConstant(ctx sessionctx.Context, value Expression) (int, bool, error) {
  	str, isNull, err := GetStringFromConstant(ctx, value)
  	if err != nil || isNull {
  		return 0, true, err
  	}
  	intNum, err := strconv.Atoi(str)
  	if err != nil {
  		return 0, true, nil
  	}
  	return intNum, false, nil
  }
docs: // GetIntFromConstant gets an interger value from the Constant expression.