You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2023/01/09 17:44:18 UTC

[GitHub] [arrow] wjones127 commented on a diff in pull request #15270: ARROW-16480: [R] Update read_csv_arrow and open_dataset parse_options, read_options, and convert_options to take lists

wjones127 commented on code in PR #15270:
URL: https://github.com/apache/arrow/pull/15270#discussion_r1064913451


##########
r/tests/testthat/test-csv.R:
##########
@@ -664,3 +664,27 @@ test_that("Shows an error message when trying to read a timestamp with time zone
     "CSV conversion error to timestamp\\[ns\\]: expected no zone offset in"
   )
 })
+
+test_that("CSV reading/parsing/convert options can be passed in as lists", {
+  tf <- tempfile()
+  on.exit(unlink(tf))
+
+  writeLines('"x"\nNA\nNA\n"NULL"\n\n"foo"\n', tf, )
+  readLines(tf)

Review Comment:
   Small nit: we make a lot of temp files in these tests, when we could just do this in-memory. Don't worry about the rest of the file, but maybe simplify to:
   
   ```suggestion
     tf <- buffer(charToRaw('"x"\nNA\nNA\n"NULL"\n\n"foo"\n'))
   ```



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org