dragosmg commented on a change in pull request #11668:
URL: https://github.com/apache/arrow/pull/11668#discussion_r761016492
##########
File path: r/R/csv.R
##########
@@ -415,6 +415,16 @@ CsvReadOptions$create <- function(use_threads =
option_use_threads(),
)
}
+readr_to_csv_write_options <- function(include_header,
+ batch_size = 1024L) {
+ assert_that(is_integerish(batch_size, n = 1, finite = TRUE), batch_size > 0)
Review comment:
If we disabled that check / assertion in both
`readr_to_csv_write_options` and `CsvWriteOptions$create()`, we would surface
the following error message from C++:
```
Error: Invalid: WriteOptions: batch_size must be at least 1: -2147483648
/Users/dragos/Documents/arrow/cpp/src/arrow/csv/writer.cc:291
options.Validate()
/Users/dragos/Documents/arrow/cpp/src/arrow/csv/writer.cc:433
MakeCSVWriter(output, table.schema(), options)
In addition: Warning message:
In csv___WriteOptions__initialize(list(include_header = include_header, :
NAs introduced by coercion to integer range
```
--
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]