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



##########
File path: r/R/dataset-write.R
##########
@@ -60,8 +62,13 @@ write_dataset <- function(dataset,
                           format = c("parquet", "feather", "arrow", "ipc"),
                           partitioning = dplyr::group_vars(dataset),
                           basename_template = paste0("part-{i}.", 
as.character(format)),
-                          hive_style = TRUE,
+                          hive_style = TRUE, max_partitions = 1024L,
                           ...) {
+  stopifnot(
+    max_partitions == round(max_partitions, 0),
+    max_partitions == abs(max_partitions),
+    !is.null(max_partitions)
+  )

Review comment:
       yes, I wrote that because I can pass max_partitions = -3
   and it's gonna create 3 partitions, which is very confusing
   also, NA works, and goes to the default 1024L, but NULL fails




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