From 2695421be9e1d52e565631a428449a2d22dbf42e Mon Sep 17 00:00:00 2001 From: Jonathan Keane Date: Sat, 17 Aug 2024 14:22:29 -0500 Subject: [PATCH 1/3] remove data.table:: --- r/tests/testthat/test-extra-package-roundtrip.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r/tests/testthat/test-extra-package-roundtrip.R b/r/tests/testthat/test-extra-package-roundtrip.R index 09a87ef19d56..a085c66cd736 100644 --- a/r/tests/testthat/test-extra-package-roundtrip.R +++ b/r/tests/testthat/test-extra-package-roundtrip.R @@ -80,7 +80,7 @@ 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 tab <- as_arrow_table(DT) From b49427591b126de4f93cbfed28c325f8da5e1fac Mon Sep 17 00:00:00 2001 From: Jonathan Keane Date: Sat, 17 Aug 2024 15:34:29 -0500 Subject: [PATCH 2/3] Linting --- r/tests/testthat/test-extra-package-roundtrip.R | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/r/tests/testthat/test-extra-package-roundtrip.R b/r/tests/testthat/test-extra-package-roundtrip.R index a085c66cd736..d596397a56bd 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,7 +65,7 @@ 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) @@ -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 -> collect which is what writing + reading to parquet uses under the hood to roundtrip tab <- as_arrow_table(tbl) tbl_read <- collect(tab) From 46fa95133c46c618f99765ce53749d9c20593a6e Mon Sep 17 00:00:00 2001 From: Jonathan Keane Date: Sat, 17 Aug 2024 16:18:18 -0500 Subject: [PATCH 3/3] Free up some space, another lint --- .github/workflows/r.yml | 3 +++ r/tests/testthat/test-extra-package-roundtrip.R | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml index c4899ddcc49e..bf7eb99e7e99 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 d596397a56bd..092288dffb95 100644 --- a/r/tests/testthat/test-extra-package-roundtrip.R +++ b/r/tests/testthat/test-extra-package-roundtrip.R @@ -69,7 +69,7 @@ test_that("data.table objects roundtrip", { 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) @@ -82,7 +82,7 @@ test_that("data.table objects roundtrip", { setindex(DT, dbl) 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)