wjones127 commented on a change in pull request #11892:
URL: https://github.com/apache/arrow/pull/11892#discussion_r765144252
##########
File path: r/tests/testthat/test-dataset-csv.R
##########
@@ -288,3 +289,12 @@ test_that("Column names inferred from schema for
headerless CSVs (ARROW-14063)",
ds <- open_dataset(headerless_csv_dir, format = "csv", schema = schema(int =
int32(), dbl = float64()))
expect_equal(ds %>% collect(), tbl)
})
+
+test_that("open_dataset() deals with BOMs (byte-order-marks) correctly", {
+ writeLines("\xef\xbb\xbfa,b\n1,2\n", con = csv_file)
+
+ expect_equal(
+ open_dataset(csv_file, format = "csv") %>% collect(),
+ tibble(a = 1, b = 2)
+ )
Review comment:
Oh that's a good idea. I'll add that really quick.
--
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]