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] Nightly builds (R 3.5 and 3.6) failing due to field refs test #33779

Closed
thisisnic opened this issue Jan 19, 2023 · 0 comments · Fixed by #33780
Closed

[R] Nightly builds (R 3.5 and 3.6) failing due to field refs test #33779

thisisnic opened this issue Jan 19, 2023 · 0 comments · Fixed by #33780
Assignees
Milestone

Comments

@thisisnic
Copy link
Member

thisisnic commented Jan 19, 2023

Describe the bug, including details regarding any error messages, version, and platform.

The test-r-versions nightly build is failing on R 3.5 and 3.6 due to a test introduced in #19706.

On those builds, the second column in the input data.frame is being converted into a dictionary instead of a string. This is due to the fact that prior to R 4.0, the default value of the stringsAsFactors parameter in data.frame() was TRUE, but since then has been changed to FALSE.

Test body:

test_that("Nested field from a non-field-ref (struct_field kernel)", {
  x <- Expression$scalar(data.frame(a = 1, b = "two"))
  expect_true(inherits(x$a, "Expression"))
  expect_equal(x$a$type(), float64())
  expect_error(x$c, "field 'c' not found in struct<a: double, b: string>")
})

Test result:

══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-expression.R:154'): Nested field from a non-field-ref (struct_field kernel) ──
Error: field 'c' not found in struct<a: double, b: dictionary<values=string, indices=int8, ordered=0>>
Backtrace:
    ▆
 1. ├─testthat::expect_error(x$c, "field 'c' not found in struct<a: double, b: string>") at test-expression.R:154:2
 2. │ └─testthat:::expect_condition_matching(...)
 3. │   └─testthat:::quasi_capture(...)
 4. │     ├─testthat (local) .capture(...)
 5. │     │ └─base::withCallingHandlers(...)
 6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
 7. ├─x$c
 8. └─arrow:::`$.Expression`(x, c)
 9.   └─arrow:::get_nested_field(x, name)

Component(s)

R

@thisisnic thisisnic changed the title [R] Nightly builds (R 3.5 and 3.6) failing [R] Nightly builds (R 3.5 and 3.6) failing due to field refs test Jan 19, 2023
@thisisnic thisisnic self-assigned this Jan 19, 2023
@thisisnic thisisnic added this to the 12.0.0 milestone Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant