Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[R] Flaky BOM removal test #30558

Closed
asfimport opened this issue Dec 9, 2021 · 3 comments
Closed

[R] Flaky BOM removal test #30558

asfimport opened this issue Dec 9, 2021 · 3 comments
Assignees
Milestone

Comments

@asfimport
Copy link
Collaborator

asfimport commented Dec 9, 2021

The test introduced in ARROW-14644 appears to be flaky.
See example failed runs:
https://github.com/apache/arrow/runs/4466790381?check_suite_focus=true#step:8:21277
https://github.com/apache/arrow/runs/4463832536?check_suite_focus=true#step:9:22039

── Failure (test-dataset-csv.R:297:3): open_dataset() deals with BOMs (byte-order-marks) correctly ──
`object` (`actual`) not equal to `expected` (`expected`).

actual vs expected
                a b
- actual[1, ]   3 4
+ expected[1, ] 1 2
- actual[2, ]   1 2
+ expected[2, ] 3 4

  `actual$a`: 3 1
`expected$a`: 1 3

  `actual$b`: 4 2
`expected$b`: 2 4

Reporter: Antoine Pitrou / @pitrou
Assignee: Jonathan Keane / @jonkeane

Related issues:

PRs and other links:

Note: This issue was originally created as ARROW-15041. Please see the migration documentation for further details.

@asfimport
Copy link
Collaborator Author

Antoine Pitrou / @pitrou:
@wjones127

@asfimport
Copy link
Collaborator Author

Dragoș Moldovan-Grünfeld / @dragosmg:
This seems to have something to do with the order in which the 2 files are created and subsequently brought together with open_dataset(). Creating file 2 first doesn't trigger a test failure.

  temp_dir <- make_temp_dir()
  writeLines("\xef\xbb\xbfa,b\n1,2\n", con = file.path(temp_dir, "file1.csv"))
  writeLines("\xef\xbb\xbfa,b\n3,4\n", con = file.path(temp_dir, "file2.csv"))

  expect_equal(
    open_dataset(temp_dir, format = "csv") %>% collect(),
    tibble(a = c(1, 3), b = c(2, 4))
  )

@asfimport
Copy link
Collaborator Author

Jonathan Keane / @jonkeane:
Issue resolved by pull request 11917
#11917

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants