pachamaltese commented on a change in pull request #9972:
URL: https://github.com/apache/arrow/pull/9972#discussion_r612716840



##########
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:
       in this other case, the error is 
   ```
    Error: Expected single integer value 
   ```
   




-- 
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:
us...@infra.apache.org


Reply via email to