dragosmg commented on a change in pull request #11790:
URL: https://github.com/apache/arrow/pull/11790#discussion_r761092011



##########
File path: r/tests/testthat/test-data-type.R
##########
@@ -385,16 +385,20 @@ test_that("DictionaryType validation", {
 })
 
 test_that("decimal type and validation", {
-  expect_error(decimal())
+  expect_r6_class(decimal(4, 2), "Decimal128Type")
+
   expect_error(decimal("four"), '"precision" must be an integer')
-  expect_error(decimal(4))
   expect_error(decimal(4, "two"), '"scale" must be an integer')
   expect_error(decimal(NA, 2), '"precision" must be an integer')
-  expect_error(decimal(0, 2), "Invalid: Decimal precision out of range [1, 
38]: 0", fixed = TRUE)
-  expect_error(decimal(100, 2), "Invalid: Decimal precision out of range [1, 
38]: 100", fixed = TRUE)
   expect_error(decimal(4, NA), '"scale" must be an integer')
 
-  expect_r6_class(decimal(4, 2), "Decimal128Type")
+  expect_r6_class(decimal128(4, 2), "Decimal128Type")
+  expect_identical(class(decimal(2, 4)), class(decimal128(2, 4)))

Review comment:
       Done!




-- 
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]


Reply via email to