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

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


The following commit(s) were added to refs/heads/main by this push:
     new f69ccb08d6 GH-49738: [R][CI] Re-enable GCC+LTO job once rhub has a GCC 
15 image (#49795)
f69ccb08d6 is described below

commit f69ccb08d62bf0f1e8b07db3b9d561c234c88abb
Author: Nic Crane <[email protected]>
AuthorDate: Tue May 5 14:15:14 2026 -0400

    GH-49738: [R][CI] Re-enable GCC+LTO job once rhub has a GCC 15 image 
(#49795)
    
    ### Rationale for this change
    
    We removed a job as it was too old and didn't reflect CRAN and now we added 
it in as we have one which does reflect CRAN's environments
    
    ### What changes are included in this PR?
    
    Add GCC 15 job
    
    ### Are these changes tested?
    
    On CI, sure
    
    ### Are there any user-facing changes?
    
    Nah
    * GitHub Issue: #49738
    
    Authored-by: Nic Crane <[email protected]>
    Signed-off-by: Nic Crane <[email protected]>
---
 .github/workflows/r.yml               |  2 +-
 .github/workflows/r_extra.yml         | 33 ++++++++++-----------------------
 dev/tasks/r/github.linux.versions.yml |  2 ++
 r/tests/testthat/helper-arrow.R       | 28 +++++++++++++++++-----------
 r/tests/testthat/test-dplyr-filter.R  | 27 ++++++++++++++-------------
 5 files changed, 44 insertions(+), 48 deletions(-)

diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml
index 57873c0f89..f4c5d8a5bd 100644
--- a/.github/workflows/r.yml
+++ b/.github/workflows/r.yml
@@ -70,7 +70,7 @@ jobs:
     strategy:
       fail-fast: false
       matrix:
-        r: ["4.4"]
+        r: ["4.6"]
         ubuntu: [24.04]
         force-tests: ["true"]
     env:
diff --git a/.github/workflows/r_extra.yml b/.github/workflows/r_extra.yml
index 1eb1d77882..eac55f72bf 100644
--- a/.github/workflows/r_extra.yml
+++ b/.github/workflows/r_extra.yml
@@ -129,34 +129,21 @@ jobs:
             image: r
             runs-on: ubuntu-latest
             title: Rhub
-          # Disabled: rhub/ubuntu-gcc12 image uses GCC 12 but CRAN now uses 
GCC 15.
-          # See https://github.com/apache/arrow/issues/49737
-          # Re-enable once r-hub/containers provides a GCC 15 image (#49738).
-          # - envs:
-          #     - R_CUSTOM_CCACHE=true
-          #     - R_IMAGE=ubuntu-gcc12
-          #     - R_ORG=rhub
-          #   image: r
-          #   runs-on: ubuntu-latest
-          #   title: Rhub GCC 12
-          # Disabled: rhub/gcc13 image uses GCC 13 but CRAN now uses GCC 15.
-          # See https://github.com/apache/arrow/issues/49737
-          # Re-enable once r-hub/containers provides a GCC 15 image (#49738).
-          # - envs:
-          #     - R_IMAGE=gcc13
-          #     - R_ORG=rhub
-          #   image: r
-          #   runs-on: ubuntu-latest
-          #   run-options: >-
-          #     -e INSTALL_ARGS=--use-LTO
-          #   title: Rhub GCC 13 with LTO
+          - envs:
+              - R_IMAGE=ubuntu-gcc15
+              - R_ORG=rhub
+            image: r
+            runs-on: ubuntu-latest
+            run-options: >-
+              -e INSTALL_ARGS=--use-LTO
+            title: Rhub GCC 15 with LTO
           - envs:
               - R_IMAGE=r-base
               - R_ORG=rstudio
-              - R_TAG=4.2-jammy
+              - R_TAG=4.5-jammy
             image: r
             runs-on: ubuntu-latest
-            title: RStudio R-Base 4.2
+            title: RStudio R-Base 4.5
     env:
       ARCHERY_DEBUG: 1
       ARROW_ENABLE_TIMING_TESTS: OFF
diff --git a/dev/tasks/r/github.linux.versions.yml 
b/dev/tasks/r/github.linux.versions.yml
index e5ed151a93..612d84b185 100644
--- a/dev/tasks/r/github.linux.versions.yml
+++ b/dev/tasks/r/github.linux.versions.yml
@@ -33,6 +33,8 @@ jobs:
           - "4.1"
           - "4.2"
           - "4.3"
+          - "4.4"
+          - "4.5"
     env:
       R_ORG: "rstudio"
       R_IMAGE: "r-base"
diff --git a/r/tests/testthat/helper-arrow.R b/r/tests/testthat/helper-arrow.R
index 84b883c3b3..fb22aac0ad 100644
--- a/r/tests/testthat/helper-arrow.R
+++ b/r/tests/testthat/helper-arrow.R
@@ -36,19 +36,25 @@ options(arrow.pull_as_vector = FALSE)
 with_language <- function(lang, expr) {
   skip_on_cran()
   skip_if_not(capabilities("NLS"))
-  old <- Sys.getenv("LANGUAGE")
-  # Check what this message is before changing languages; this will
-  # trigger caching the translations if the OS does that (some do).
-  # If the OS does cache, then we can't test changing languages safely.
-  before <- i18ize_error_messages()
-  Sys.setenv(LANGUAGE = lang)
-  on.exit({
-    Sys.setenv(LANGUAGE = old)
+  # We know we're LANGUAGE=en because we just set it above.
+  # We only need to check whether we can change languages if we're not "en".
+  if (!identical(lang, "en")) {
     .cache$i18ized_error_pattern <<- NULL
-  })
-  if (!identical(before, i18ize_error_messages())) {
-    skip(paste("This OS either does not support changing languages to", lang, 
"or it caches translations"))
+    old <- Sys.getenv("LANGUAGE")
+    # Check what this message is before changing languages; this will
+    # trigger caching the translations if the OS does that (some do).
+    # If the OS does cache, then we can't test changing languages safely.
+    before <- i18ize_error_messages()
+    Sys.setenv(LANGUAGE = lang)
+    on.exit({
+      Sys.setenv(LANGUAGE = old)
+      .cache$i18ized_error_pattern <<- NULL
+    })
+    if (identical(before, i18ize_error_messages())) {
+      skip(paste("This OS either does not support changing languages to", 
lang, "or it caches translations"))
+    }
   }
+
   force(expr)
 }
 
diff --git a/r/tests/testthat/test-dplyr-filter.R 
b/r/tests/testthat/test-dplyr-filter.R
index 3912e518ed..ad69b26be7 100644
--- a/r/tests/testthat/test-dplyr-filter.R
+++ b/r/tests/testthat/test-dplyr-filter.R
@@ -287,11 +287,21 @@ test_that("filter environment scope", {
 })
 
 test_that("Filtering on a column that doesn't exist errors correctly", {
+  # expect_warning(., NA) because the usual behavior when it hits a filter
+  # that it can't evaluate is to raise a warning, collect() to R, and retry
+  # the filter. But we want this to error the first time because it's
+  # a user error, not solvable by retrying in R
+  expect_warning(
+    expect_error(
+      tbl |> record_batch() |> filter(not_a_col == 42) |> collect(),
+      "object 'not_a_col' not found"
+    ),
+    NA
+  )
+})
+
+test_that("Filtering on a non-existent column errors in the correct language", 
{
   with_language("fr", {
-    # expect_warning(., NA) because the usual behavior when it hits a filter
-    # that it can't evaluate is to raise a warning, collect() to R, and retry
-    # the filter. But we want this to error the first time because it's
-    # a user error, not solvable by retrying in R
     expect_warning(
       expect_error(
         tbl |> record_batch() |> filter(not_a_col == 42) |> collect(),
@@ -300,15 +310,6 @@ test_that("Filtering on a column that doesn't exist errors 
correctly", {
       NA
     )
   })
-  with_language("en", {
-    expect_warning(
-      expect_error(
-        tbl |> record_batch() |> filter(not_a_col == 42) |> collect(),
-        "object 'not_a_col' not found"
-      ),
-      NA
-    )
-  })
 })
 
 test_that("Filtering with unsupported functions", {

Reply via email to