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

jonkeane 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 fbac12c353 MINOR: [R] Fix a package namespace warning (#43737)
fbac12c353 is described below

commit fbac12c353cb6ead58a5ee765b37bd1bc46cd672
Author: Jonathan Keane <[email protected]>
AuthorDate: Sat Aug 17 17:16:39 2024 -0500

    MINOR: [R] Fix a package namespace warning (#43737)
    
    Oops, I should have caught this in #43633 Removes `data.table::` since the 
namespace is loaded. Also fix some linting errors and free up space on the 
force tests run.
    
    Authored-by: Jonathan Keane <[email protected]>
    Signed-off-by: Jonathan Keane <[email protected]>
---
 .github/workflows/r.yml                         |  3 +++
 r/tests/testthat/test-extra-package-roundtrip.R | 16 ++++++++--------
 2 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml
index c4899ddcc4..bf7eb99e7e 100644
--- a/.github/workflows/r.yml
+++ b/.github/workflows/r.yml
@@ -133,6 +133,9 @@ jobs:
         with:
           fetch-depth: 0
           submodules: recursive
+      - name: Free up disk space
+        run: |
+          ci/scripts/util_free_space.sh
       - name: Cache Docker Volumes
         uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
         with:
diff --git a/r/tests/testthat/test-extra-package-roundtrip.R 
b/r/tests/testthat/test-extra-package-roundtrip.R
index 09a87ef19d..092288dffb 100644
--- a/r/tests/testthat/test-extra-package-roundtrip.R
+++ b/r/tests/testthat/test-extra-package-roundtrip.R
@@ -24,7 +24,7 @@ skip_on_cran()
 # So that we can force these in CI
 load_or_skip <- function(pkg) {
   if (identical(tolower(Sys.getenv("ARROW_R_FORCE_EXTRA_PACKAGE_TESTS")), 
"true")) {
-    # because of this indirection on the package name we also avoid a CHECK 
note and 
+    # because of this indirection on the package name we also avoid a CHECK 
note and
     # we don't otherwise need to Suggest this
     requireNamespace(pkg, quietly = TRUE)
   } else {
@@ -46,11 +46,11 @@ test_that("readr read csvs roundtrip", {
 
   # we should still be able to turn this into a table
   new_df <- read_csv(tf, show_col_types = FALSE)
-  expect_equal(new_df, as_tibble(arrow_table(new_df)))    
+  expect_equal(new_df, as_tibble(arrow_table(new_df)))
 
   # we should still be able to turn this into a table
   new_df <- read_csv(tf, show_col_types = FALSE, lazy = TRUE)
-  expect_equal(new_df, as_tibble(arrow_table(new_df)))    
+  expect_equal(new_df, as_tibble(arrow_table(new_df)))
 
   # and can roundtrip to a parquet file
   pq_tmp_file <- tempfile()
@@ -65,11 +65,11 @@ test_that("data.table objects roundtrip", {
   load_or_skip("data.table")
 
   # 
https://github.com/Rdatatable/data.table/blob/83fd2c05ce2d8555ceb8ba417833956b1b574f7e/R/cedta.R#L25-L27
-  .datatable.aware=TRUE
+  .datatable.aware <- TRUE
 
   DT <- as.data.table(example_data)
 
-  # Table -> collect which is what writing + reading to parquet uses under the 
hood to roundtrip
+  # Table to collect which is what writing + reading to parquet uses under the 
hood to roundtrip
   tab <- as_arrow_table(DT)
   DT_read <- collect(tab)
 
@@ -80,9 +80,9 @@ test_that("data.table objects roundtrip", {
   # and we can set keys + indices + create new columns
   setkey(DT, chr)
   setindex(DT, dbl)
-  DT[, dblshift := data.table::shift(dbl, 1)]
+  DT[, dblshift := shift(dbl, 1)]
 
-  # Table -> collect
+  # Table to collect
   tab <- as_arrow_table(DT)
   DT_read <- collect(tab)
 
@@ -96,7 +96,7 @@ test_that("units roundtrip", {
   tbl <- example_data
   units(tbl$dbl) <- "s"
 
-   # Table -> collect which is what writing + reading to parquet uses under 
the hood to roundtrip
+  # Table to collect which is what writing + reading to parquet uses under the 
hood to roundtrip
   tab <- as_arrow_table(tbl)
   tbl_read <- collect(tab)
 

Reply via email to