From 9a1cc3b84472eea55c170441be06e997c962a90b Mon Sep 17 00:00:00 2001 From: Neal Richardson Date: Mon, 12 Oct 2020 10:38:44 -0700 Subject: [PATCH 1/4] Add timezone to type in schema in test --- r/tests/testthat/test-csv.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r/tests/testthat/test-csv.R b/r/tests/testthat/test-csv.R index 94dd10b62b2..5b9334d5c4c 100644 --- a/r/tests/testthat/test-csv.R +++ b/r/tests/testthat/test-csv.R @@ -212,7 +212,7 @@ test_that("read_csv_arrow() can read timestamps", { tf <- tempfile(); on.exit(unlink(tf)) write.csv(tbl, tf, row.names = FALSE) - df <- read_csv_arrow(tf, col_types = schema(time = timestamp())) + df <- read_csv_arrow(tf, col_types = schema(time = timestamp(timezone = "UTC"))) expect_equal(tbl, df) df <- read_csv_arrow(tf, col_types = "t", col_names = "time", skip = 1) From 5176b8ec83ff08ea34d5b540880b776abfbc70b4 Mon Sep 17 00:00:00 2001 From: Neal Richardson Date: Mon, 12 Oct 2020 10:45:13 -0700 Subject: [PATCH 2/4] Add r-devel CI job --- .github/workflows/r.yml | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml index 6f782c22063..37aee196883 100644 --- a/.github/workflows/r.yml +++ b/.github/workflows/r.yml @@ -92,21 +92,20 @@ jobs: continue-on-error: true run: archery docker push ubuntu-r - rstudio: - name: "rstudio/r-base:${{ matrix.r_version }}-${{ matrix.r_image }}" + bundled: + name: "${{ matrix.config.org }}/${{ matrix.config.image }}:${{ matrix.config.tag }}" runs-on: ubuntu-latest if: ${{ !contains(github.event.pull_request.title, 'WIP') }} strategy: fail-fast: false matrix: - # See https://hub.docker.com/r/rstudio/r-base - r_version: ["4.0"] - r_image: - - centos7 + config: + - {org: 'rstudio', image: 'r-base', tag: '4.0-centos7'} + - {org: 'rhub', image: 'debian-gcc-devel', tag: 'latest'} env: - R_ORG: rstudio - R_IMAGE: r-base - R_TAG: ${{ matrix.r_version }}-${{ matrix.r_image }} + R_ORG: ${{ matrix.config.org }} + R_IMAGE: ${{ matrix.config.image }} + R_TAG: ${{ matrix.config.tag }} steps: - name: Checkout Arrow uses: actions/checkout@v2 @@ -120,8 +119,8 @@ jobs: uses: actions/cache@v1 with: path: .docker - key: ${{ matrix.r_image }}-r-${{ hashFiles('cpp/**') }} - restore-keys: ${{ matrix.r_image }}-r- + key: ${{ matrix.config.image }}-r-${{ hashFiles('cpp/**') }} + restore-keys: ${{ matrix.config.image }}-r- - name: Setup Python uses: actions/setup-python@v1 with: From fa9d5ef018c295a9efd641c3d0f92dacc566c79b Mon Sep 17 00:00:00 2001 From: Neal Richardson Date: Mon, 12 Oct 2020 11:27:42 -0700 Subject: [PATCH 3/4] Don't check timezone here --- r/tests/testthat/test-csv.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r/tests/testthat/test-csv.R b/r/tests/testthat/test-csv.R index 5b9334d5c4c..95fc97aa6c2 100644 --- a/r/tests/testthat/test-csv.R +++ b/r/tests/testthat/test-csv.R @@ -216,7 +216,7 @@ test_that("read_csv_arrow() can read timestamps", { expect_equal(tbl, df) df <- read_csv_arrow(tf, col_types = "t", col_names = "time", skip = 1) - expect_equal(tbl, df) + expect_equivalent(tbl, df) # col_types = "t" makes timezone-naive timestamp }) test_that("read_csv_arrow(timestamp_parsers=)", { From a61dddf4bf4357c62d024ed2d2dbb4c6b065285c Mon Sep 17 00:00:00 2001 From: Neal Richardson Date: Tue, 13 Oct 2020 16:25:14 -0700 Subject: [PATCH 4/4] Try turning off tzone comparison --- r/tests/testthat/test-csv.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r/tests/testthat/test-csv.R b/r/tests/testthat/test-csv.R index 95fc97aa6c2..3de70b35471 100644 --- a/r/tests/testthat/test-csv.R +++ b/r/tests/testthat/test-csv.R @@ -216,7 +216,7 @@ test_that("read_csv_arrow() can read timestamps", { expect_equal(tbl, df) df <- read_csv_arrow(tf, col_types = "t", col_names = "time", skip = 1) - expect_equivalent(tbl, df) # col_types = "t" makes timezone-naive timestamp + expect_equal(tbl, df, check.tzone = FALSE) # col_types = "t" makes timezone-naive timestamp }) test_that("read_csv_arrow(timestamp_parsers=)", {