code: func getRangeValue(ctx sessionctx.Context, tblInfo *model.TableInfo, str string, unsignedBigint bool) (interface{}, bool, error) {
  	// Unsigned bigint was converted to uint64 handle.
  	if unsignedBigint {
  		if value, err := strconv.ParseUint(str, 10, 64); err == nil {
  			return value, false, nil
  		}
  
  		if e, err1 := expression.ParseSimpleExprWithTableInfo(ctx, str, tblInfo); err1 == nil {
  			res, isNull, err2 := e.EvalInt(ctx, chunk.Row{})
  			if err2 == nil && !isNull {
  				return uint64(res), true, nil
  			}
  		}
  	} else {
  		if value, err := strconv.ParseInt(str, 10, 64); err == nil {
  			return value, false, nil
  		}
  		// The range value maybe not an integer, it could be a constant expression.
  		// For example, the following two cases are the same:
  		// PARTITION p0 VALUES LESS THAN (TO_SECONDS('2004-01-01'))
  		// PARTITION p0 VALUES LESS THAN (63340531200)
  		if e, err1 := expression.ParseSimpleExprWithTableInfo(ctx, str, tblInfo); err1 == nil {
  			res, isNull, err2 := e.EvalInt(ctx, chunk.Row{})
  			if err2 == nil && !isNull {
  				return res, true, nil
  			}
  		}
  	}
  	return 0, false, ErrNotAllowedTypeInPartition.GenWithStackByArgs(str)
  }
docs: // getRangeValue gets an integer from the range value string.
  // The returned boolean value indicates whether the input string is a constant expression.