dgreiss commented on code in PR #36436:
URL: https://github.com/apache/arrow/pull/36436#discussion_r1264527988


##########
r/R/dataset-format.R:
##########
@@ -76,9 +76,10 @@ FileFormat <- R6Class("FileFormat",
 )
 FileFormat$create <- function(format, schema = NULL, ...) {
   opt_names <- names(list(...))
-  if (format %in% c("csv", "text") || any(opt_names %in% c("delim", 
"delimiter"))) {
+  if (format %in% c("csv", "text", "txt") || any(opt_names %in% c("delim", 
"delimiter"))) {
     CsvFileFormat$create(schema = schema, ...)
   } else if (format == "tsv") {
+    # This delimiter argument is ignored.

Review Comment:
   I don't think that fixes it. I believe the reason the delimiter is ignored, 
is because it calls `dataset___CsvFileFormat__make()`, which creates a 
`CsvFileFormat` and `CsvFileFormat` does not have a public member to set the 
[write 
options](https://arrow.apache.org/docs/cpp/api/dataset.html#_CPPv4N5arrow7dataset13CsvFileFormatE).
   
   The Arrow 
[guides](https://arrow.apache.org/docs/cpp/dataset.html#reading-and-writing-partitioned-data)
 have an example where they use `ds::FileSystemDataset::Write()`, but the 
current implementation is to pass an execution plan to Acero through 
`ExecPlan_Write()`. 
   
   Issue #31601 is a related to expose the `FileSystemDatasetWriteOptions` in R 
which may be an alternate solution. 
   



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