You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by th...@apache.org on 2023/01/19 14:29:44 UTC

[arrow] branch master updated: GH-33779: [R] Nightly builds (R 3.5 and 3.6) failing due to field refs test (#33780)

This is an automated email from the ASF dual-hosted git repository.

thisisnic pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new e920474d7f GH-33779: [R] Nightly builds (R 3.5 and 3.6) failing due to field refs test (#33780)
e920474d7f is described below

commit e920474d7f1dbc7702c08117481db0cd4297b581
Author: Nic Crane <th...@gmail.com>
AuthorDate: Thu Jan 19 14:29:35 2023 +0000

    GH-33779: [R] Nightly builds (R 3.5 and 3.6) failing due to field refs test (#33780)
    
    This PR fixes a test which is failing on R versions < 4.0 due to the use of the function `data.frame()` which had a change in default parameter value for `stringsAsFactors` (from `TRUE` to `FALSE`) in 4.0, and so is behaving differently in these versions.
    
    I've just swapped out the use of `data.frame()` for `tibble::tibble()` , which we use more prevalently in our tests, and has no such issues on earlier R version.
    
    * Closes: #33779
    
    Authored-by: Nic Crane <th...@gmail.com>
    Signed-off-by: Nic Crane <th...@gmail.com>
---
 r/tests/testthat/test-expression.R | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/r/tests/testthat/test-expression.R b/r/tests/testthat/test-expression.R
index ccb09b9eb0..76c3671c48 100644
--- a/r/tests/testthat/test-expression.R
+++ b/r/tests/testthat/test-expression.R
@@ -148,7 +148,7 @@ test_that("Nested field ref types", {
 })
 
 test_that("Nested field from a non-field-ref (struct_field kernel)", {
-  x <- Expression$scalar(data.frame(a = 1, b = "two"))
+  x <- Expression$scalar(tibble::tibble(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>")