dragosmg commented on a change in pull request #11758: URL: https://github.com/apache/arrow/pull/11758#discussion_r754535186
########## File path: r/R/type.R ########## @@ -360,6 +363,12 @@ decimal <- function(precision, scale) { } else { stop('"precision" must be an integer', call. = FALSE) } + if (precision > 38) { + stop('"precision" must be lower than or equal to 38', call. = FALSE) + } + if (precision < 1) { + stop('"precision" must be greater than 0', call. = FALSE) + } Review comment: The function wasn't using `assert_that()` for the other checks and I went with that. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org