jonkeane commented on a change in pull request #9972:
URL: https://github.com/apache/arrow/pull/9972#discussion_r612730467
##########
File path: r/tests/testthat/test-dataset.R
##########
@@ -1778,3 +1778,60 @@ test_that("Collecting zero columns from a dataset
doesn't return entire dataset"
c(32, 0)
)
})
+
+# see https://issues.apache.org/jira/browse/ARROW-12315
+test_that("Max partitions fails with non-integer values and less than required
partitions values", {
+ skip_if_not_available("parquet")
+ tmp <- tempfile()
+
+ # this example needs 3 partitions
+
+ # max_partitions = chr => error
+ expect_error(
+ mtcars %>%
+ group_by(cyl) %>%
+ write_dataset(tmp, format = "parquet", max_partitions = "foobar")
+ )
Review comment:
And like I mention below: if we are using the error handling from c++,
we don't need to test it in R as well if it has tests in c++ and there's no
other indirection going on.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]