thisisnic commented on code in PR #46720:
URL: https://github.com/apache/arrow/pull/46720#discussion_r2149657447
##########
r/tests/testthat/test-data-type.R:
##########
@@ -497,10 +496,6 @@ test_that("decimal type and validation", {
expect_error(decimal128(4, NA), "`scale` must be an integer")
expect_error(decimal128(3:4, NA), "`precision` must have size 1. not size 2")
expect_error(decimal128(4, 2:3), "`scale` must have size 1. not size 2")
- # TODO remove precision range tests below once functionality is tested in
C++ (ARROW-15162)
- expect_error(decimal128(0, 2), "Invalid: Decimal precision out of range [1,
38]: 0", fixed = TRUE)
- expect_error(decimal128(100, 2), "Invalid: Decimal precision out of range
[1, 38]: 100", fixed = TRUE)
-
Review Comment:
OK, we don't actually use the C++ `decimal()` function anyway, so no changes
needed. We could look to use `smallest_decimal()` instead of working out which
decimal it should be ourselves in the R code, but I don't think the time it
would take to make this change would be worth the effort, though can open a new
ticket if you disagree.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]