From 9eb803e680aab0340700498594831e4aa86097b6 Mon Sep 17 00:00:00 2001 From: Jacob Wujciak-Jens Date: Wed, 10 Jan 2024 14:14:51 +0100 Subject: [PATCH 01/13] MINOR: [R][Docs] Fix geoarrrow url in NEWS.md (#39547) ### Rationale for this change The geoarrow repo was moved and is no failing urlcheck. ### What changes are included in this PR? Update the url. Authored-by: Jacob Wujciak-Jens Signed-off-by: Jacob Wujciak-Jens --- r/NEWS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r/NEWS.md b/r/NEWS.md index 52220ebb7960..b244ea215ad3 100644 --- a/r/NEWS.md +++ b/r/NEWS.md @@ -327,7 +327,7 @@ Arrow query engine. See `?acero`. A few new features and bugfixes were implemented for joins: * Extension arrays are now supported in joins, allowing, for example, joining - datasets that contain [geoarrow](https://paleolimbot.github.io/geoarrow/) data. + datasets that contain [geoarrow](https://github.com/geoarrow/geoarrow) data. * The `keep` argument is now supported, allowing separate columns for the left and right hand side join keys in join output. Full joins now coalesce the join keys (when `keep = FALSE`), avoiding the issue where the join keys would From aa92597ea93c114d87b236457b858e589c3136b1 Mon Sep 17 00:00:00 2001 From: Jacob Wujciak-Jens Date: Fri, 12 Jan 2024 05:08:40 +0100 Subject: [PATCH 02/13] GH-39523: [R] Don't override explicitly set NOT_CRAN=false when on dev version (#39524) ### Rationale for this change The default linux build used in the lto job should not build with aws/gcs. A change in the build system changed this. ### What changes are included in this PR? Revert to old behavior by not overriding explicitly set `NOT_CRAN=false`. ### Are these changes tested? CI ### Are there any user-facing changes? No * Closes: #39523 Lead-authored-by: Jacob Wujciak-Jens Co-authored-by: Sutou Kouhei Signed-off-by: Jacob Wujciak-Jens --- r/tools/nixlibs.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/r/tools/nixlibs.R b/r/tools/nixlibs.R index 72fe6fb6f937..dfe379ebe20d 100644 --- a/r/tools/nixlibs.R +++ b/r/tools/nixlibs.R @@ -912,7 +912,8 @@ if (is_release) { VERSION <- VERSION[1, 1:3] arrow_repo <- paste0(getOption("arrow.repo", sprintf("https://apache.jfrog.io/artifactory/arrow/r/%s", VERSION)), "/libarrow/") } else { - not_cran <- TRUE + # Don't override explictily set NOT_CRAN env var, as it is used in CI. + not_cran <- !env_is("NOT_CRAN", "false") arrow_repo <- paste0(getOption("arrow.dev_repo", "https://nightlies.apache.org/arrow/r"), "/libarrow/") } From 4fdba010e5ad14b7b82876e53a5711a4a29c2ffb Mon Sep 17 00:00:00 2001 From: Jonathan Keane Date: Mon, 15 Jan 2024 05:58:05 -0600 Subject: [PATCH 03/13] MINOR: [R] Clean up docs (#39591) I noticed a few docs that needed cleaning up when running make commands Authored-by: Jonathan Keane Signed-off-by: Dewey Dunnington --- r/R/dplyr-funcs-doc.R | 4 ++-- r/inst/NOTICE.txt | 2 +- r/man/acero.Rd | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/r/R/dplyr-funcs-doc.R b/r/R/dplyr-funcs-doc.R index 492729df8c12..2042f800142b 100644 --- a/r/R/dplyr-funcs-doc.R +++ b/r/R/dplyr-funcs-doc.R @@ -21,7 +21,7 @@ #' #' The `arrow` package contains methods for 37 `dplyr` table functions, many of #' which are "verbs" that do transformations to one or more tables. -#' The package also has mappings of 211 R functions to the corresponding +#' The package also has mappings of 212 R functions to the corresponding #' functions in the Arrow compute library. These allow you to write code inside #' of `dplyr` methods that call R functions, including many in packages like #' `stringr` and `lubridate`, and they will get translated to Arrow and run @@ -83,7 +83,7 @@ #' Functions can be called either as `pkg::fun()` or just `fun()`, i.e. both #' `str_sub()` and `stringr::str_sub()` work. #' -#' In addition to these functions, you can call any of Arrow's 254 compute +#' In addition to these functions, you can call any of Arrow's 262 compute #' functions directly. Arrow has many functions that don't map to an existing R #' function. In other cases where there is an R function mapping, you can still #' call the Arrow function directly if you don't want the adaptations that the R diff --git a/r/inst/NOTICE.txt b/r/inst/NOTICE.txt index a609791374c2..2089c6fb2035 100644 --- a/r/inst/NOTICE.txt +++ b/r/inst/NOTICE.txt @@ -1,5 +1,5 @@ Apache Arrow -Copyright 2016-2019 The Apache Software Foundation +Copyright 2016-2024 The Apache Software Foundation This product includes software developed at The Apache Software Foundation (http://www.apache.org/). diff --git a/r/man/acero.Rd b/r/man/acero.Rd index 12afdc23138a..365795d9fc65 100644 --- a/r/man/acero.Rd +++ b/r/man/acero.Rd @@ -9,7 +9,7 @@ \description{ The \code{arrow} package contains methods for 37 \code{dplyr} table functions, many of which are "verbs" that do transformations to one or more tables. -The package also has mappings of 211 R functions to the corresponding +The package also has mappings of 212 R functions to the corresponding functions in the Arrow compute library. These allow you to write code inside of \code{dplyr} methods that call R functions, including many in packages like \code{stringr} and \code{lubridate}, and they will get translated to Arrow and run @@ -71,7 +71,7 @@ can assume that the function works in Acero just as it does in R. Functions can be called either as \code{pkg::fun()} or just \code{fun()}, i.e. both \code{str_sub()} and \code{stringr::str_sub()} work. -In addition to these functions, you can call any of Arrow's 254 compute +In addition to these functions, you can call any of Arrow's 262 compute functions directly. Arrow has many functions that don't map to an existing R function. In other cases where there is an R function mapping, you can still call the Arrow function directly if you don't want the adaptations that the R From d0ada8ffdc19c78f3d5e5c85c538ce6a075ffde8 Mon Sep 17 00:00:00 2001 From: Jacob Wujciak-Jens Date: Wed, 17 Jan 2024 05:09:53 +0100 Subject: [PATCH 04/13] GH-39626: [Docs][R] Update NEWS.md for 15.0.0 (#39627) ### What changes are included in this PR? Update NEWS.md with things not included in 14.0.2. * Closes: #39626 Lead-authored-by: Jacob Wujciak-Jens Co-authored-by: Bryce Mecum Signed-off-by: Jacob Wujciak-Jens --- r/NEWS.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/r/NEWS.md b/r/NEWS.md index b244ea215ad3..e324ed973192 100644 --- a/r/NEWS.md +++ b/r/NEWS.md @@ -19,6 +19,35 @@ # arrow 15.0.1 +## New features + +* Bindings for `base::prod` have been added so you can now use it in your dplyr + pipelines (i.e., `tbl |> summarize(prod(col))`) without having to pull the + data into R (@m-muecke, #38601). +* Calling `dimnames` or `colnames` on `Dataset` objects now returns a useful + result rather than just `NULL` (#38377). +* The `code()` method on Schema objects now takes an optional `namespace` + argument which, when `TRUE`, prefixes names with `arrow::` which makes + the output more portable (@orgadish, #38144). + +## Minor improvements and fixes + +* Don't download cmake when TEST_OFFLINE_BUILD=true and update `SystemRequirements` (#39602). +* Fallback to source build gracefully if binary download fails (#39587). +* An error is now thrown instead of warning and pulling the data into R when any + of `sub`, `gsub`, `stringr::str_replace`, `stringr::str_replace_all` are + passed a length > 1 vector of values in `pattern` (@abfleishman, #39219). +* Missing documentation was added to `?open_dataset` documenting how to use the + ND-JSON support added in arrow 13.0.0 (@Divyansh200102, #38258). +* To make debugging problems easier when using arrow with AWS S3 + (e.g., `s3_bucket`, `S3FileSystem`), the debug log level for S3 can be set + with the `AWS_S3_LOG_LEVEL` environment variable. + See `?S3FileSystem` for more information. (#38267) +* Using arrow with duckdb (i.e., `to_duckdb()`) no longer results in warnings + when quitting your R session. (#38495) +* A large number of minor spelling mistakes were fixed (@jsoref, #38929, #38257) +* The developer documentation has been updated to match changes made in recent releases (#38220) + # arrow 14.0.2 ## Minor improvements and fixes From 14296caf0ab715bde8001455037bbb78ec8af532 Mon Sep 17 00:00:00 2001 From: Neal Richardson Date: Fri, 19 Jan 2024 18:43:37 -0500 Subject: [PATCH 05/13] GH-39697: [R] Source build should check if offline (#39699) ### Rationale for this change CRAN. ### What changes are included in this PR? See the commit messages ### Are these changes tested? Existing CI should pass and not be affected. We should confirm that source builds get all features enabled. We should test on macbuilder with this package and with one where we've inserted `download.file <- function(...) stop()` at the top of nixlibs.R to simulate offline behavior. ### Are there any user-facing changes? I hope there is only one user affected. * Closes: #39697 Authored-by: Neal Richardson Signed-off-by: Jacob Wujciak-Jens --- dev/tasks/r/github.linux.offline.build.yml | 2 +- dev/tasks/tasks.yml | 2 +- r/NEWS.md | 2 +- r/configure | 2 +- r/tools/nixlibs.R | 63 +++++++++++++--------- r/vignettes/developers/setup.Rmd | 2 +- 6 files changed, 43 insertions(+), 30 deletions(-) diff --git a/dev/tasks/r/github.linux.offline.build.yml b/dev/tasks/r/github.linux.offline.build.yml index b116accda891..7a747ac48008 100644 --- a/dev/tasks/r/github.linux.offline.build.yml +++ b/dev/tasks/r/github.linux.offline.build.yml @@ -79,7 +79,7 @@ jobs: shell: Rscript {0} - name: Install env: - TEST_OFFLINE_BUILD: true + ARROW_OFFLINE_BUILD: true LIBARROW_MINIMAL: false {{ macros.github_set_sccache_envvars()|indent(8)}} run: | diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.yml index 04faef427e28..5f294a3d4f64 100644 --- a/dev/tasks/tasks.yml +++ b/dev/tasks/tasks.yml @@ -1279,7 +1279,7 @@ tasks: r_org: library r_image: r-base r_tag: latest - flags: '-e TEST_OFFLINE_BUILD=true' + flags: '-e ARROW_OFFLINE_BUILD=true' test-r-dev-duckdb: ci: github diff --git a/r/NEWS.md b/r/NEWS.md index e324ed973192..3b1f083bc2e3 100644 --- a/r/NEWS.md +++ b/r/NEWS.md @@ -32,7 +32,7 @@ ## Minor improvements and fixes -* Don't download cmake when TEST_OFFLINE_BUILD=true and update `SystemRequirements` (#39602). +* Don't download cmake when ARROW_OFFLINE_BUILD=true and update `SystemRequirements` (#39602). * Fallback to source build gracefully if binary download fails (#39587). * An error is now thrown instead of warning and pulling the data into R when any of `sub`, `gsub`, `stringr::str_replace`, `stringr::str_replace_all` are diff --git a/r/configure b/r/configure index 029fc004dfc4..0882ee6719c4 100755 --- a/r/configure +++ b/r/configure @@ -73,7 +73,7 @@ FORCE_BUNDLED_BUILD=`echo $FORCE_BUNDLED_BUILD | tr '[:upper:]' '[:lower:]'` ARROW_USE_PKG_CONFIG=`echo $ARROW_USE_PKG_CONFIG | tr '[:upper:]' '[:lower:]'` # Just used in testing: whether or not it is ok to download dependencies (in the # bundled build) -TEST_OFFLINE_BUILD=`echo $TEST_OFFLINE_BUILD | tr '[:upper:]' '[:lower:]'` +ARROW_OFFLINE_BUILD=`echo $ARROW_OFFLINE_BUILD | tr '[:upper:]' '[:lower:]'` VERSION=`grep '^Version' DESCRIPTION | sed s/Version:\ //` UNAME=`uname -s` diff --git a/r/tools/nixlibs.R b/r/tools/nixlibs.R index dfe379ebe20d..17c6ab0a8078 100644 --- a/r/tools/nixlibs.R +++ b/r/tools/nixlibs.R @@ -120,11 +120,11 @@ validate_checksum <- function(binary_url, libfile, hush = quietly) { # The warnings from system2 if it fails pop up later in the log and thus are # more confusing than they are helpful (so we suppress them) checksum_ok <- suppressWarnings(system2( - "shasum", - args = c("--status", "-a", "512", "-c", checksum_file), - stdout = ifelse(quietly, FALSE, ""), - stderr = ifelse(quietly, FALSE, "") - )) == 0 + "shasum", + args = c("--status", "-a", "512", "-c", checksum_file), + stdout = ifelse(quietly, FALSE, ""), + stderr = ifelse(quietly, FALSE, "") + )) == 0 if (!checksum_ok) { checksum_ok <- suppressWarnings(system2( @@ -565,8 +565,8 @@ build_libarrow <- function(src_dir, dst_dir) { env_var_list <- c(env_var_list, ARROW_DEPENDENCY_SOURCE = "BUNDLED") } - # On macOS, if not otherwise set, let's override Boost_SOURCE to be bundled - # Necessary due to #39590 for CRAN + # On macOS, if not otherwise set, let's override Boost_SOURCE to be bundled + # Necessary due to #39590 for CRAN if (on_macos) { # Using lowercase (e.g. Boost_SOURCE) to match the cmake args we use already. deps_to_bundle <- c("Boost", "lz4") @@ -906,28 +906,13 @@ on_windows <- tolower(Sys.info()[["sysname"]]) == "windows" # For local debugging, set ARROW_R_DEV=TRUE to make this script print more quietly <- !env_is("ARROW_R_DEV", "true") -not_cran <- env_is("NOT_CRAN", "true") - -if (is_release) { - VERSION <- VERSION[1, 1:3] - arrow_repo <- paste0(getOption("arrow.repo", sprintf("https://apache.jfrog.io/artifactory/arrow/r/%s", VERSION)), "/libarrow/") -} else { - # Don't override explictily set NOT_CRAN env var, as it is used in CI. - not_cran <- !env_is("NOT_CRAN", "false") - arrow_repo <- paste0(getOption("arrow.dev_repo", "https://nightlies.apache.org/arrow/r"), "/libarrow/") -} - -if (!is_release && !test_mode) { - VERSION <- find_latest_nightly(VERSION) -} - # To collect dirs to rm on exit, use cleanup() to add dirs # we reset it to avoid errors on reruns in the same session. options(.arrow.cleanup = character()) on.exit(unlink(getOption(".arrow.cleanup"), recursive = TRUE), add = TRUE) -# enable full featured builds for macOS in case of CRAN source builds. -if (not_cran || on_macos) { +not_cran <- env_is("NOT_CRAN", "true") +if (not_cran) { # Set more eager defaults if (env_is("LIBARROW_BINARY", "")) { Sys.setenv(LIBARROW_BINARY = "true") @@ -943,9 +928,37 @@ if (not_cran || on_macos) { build_ok <- !env_is("LIBARROW_BUILD", "false") # Check if we're authorized to download -download_ok <- !test_mode && !env_is("TEST_OFFLINE_BUILD", "true") +download_ok <- !test_mode && !env_is("ARROW_OFFLINE_BUILD", "true") +if (!download_ok) { + lg("Dependency downloading disabled. Unset ARROW_OFFLINE_BUILD to enable", .indent = "***") +} +# If not forbidden from downloading, check if we are offline and turn off downloading. +# The default libarrow source build will download its source dependencies and fail +# if they can't be retrieved. +# But, don't do this if the user has requested a binary or a non-minimal build: +# we should error rather than silently succeeding with a minimal build. +if (download_ok && Sys.getenv("LIBARROW_BINARY") %in% c("false", "") && !env_is("LIBARROW_MINIMAL", "false")) { + download_ok <- try_download("https://apache.jfrog.io/artifactory/arrow/r/", tempfile()) + if (!download_ok) { + lg("Network connection not available", .indent = "***") + } +} + download_libarrow_ok <- download_ok && !env_is("LIBARROW_DOWNLOAD", "false") +# Set binary repos +if (is_release) { + VERSION <- VERSION[1, 1:3] + arrow_repo <- paste0(getOption("arrow.repo", sprintf("https://apache.jfrog.io/artifactory/arrow/r/%s", VERSION)), "/libarrow/") +} else { + arrow_repo <- paste0(getOption("arrow.dev_repo", "https://nightlies.apache.org/arrow/r"), "/libarrow/") +} + +# If we're on a dev version, look for the most recent libarrow binary version +if (download_libarrow_ok && !is_release && !test_mode) { + VERSION <- find_latest_nightly(VERSION) +} + # This "tools/thirdparty_dependencies" path, within the tar file, might exist if # create_package_with_all_dependencies() was run, or if someone has created it # manually before running make build. diff --git a/r/vignettes/developers/setup.Rmd b/r/vignettes/developers/setup.Rmd index 119bc7841941..4c1eab1e6972 100644 --- a/r/vignettes/developers/setup.Rmd +++ b/r/vignettes/developers/setup.Rmd @@ -280,7 +280,7 @@ withr::with_makevars(list(CPPFLAGS = "", LDFLAGS = ""), remotes::install_github( * See the user-facing [article on installation](../install.html) for a large number of environment variables that determine how the build works and what features get built. -* `TEST_OFFLINE_BUILD`: When set to `true`, the build script will not download +* `ARROW_OFFLINE_BUILD`: When set to `true`, the build script will not download prebuilt the C++ library binary or, if needed, `cmake`. It will turn off any features that require a download, unless they're available in `ARROW_THIRDPARTY_DEPENDENCY_DIR` or the `tools/thirdparty_download/` subfolder. From 1a8c81e860f17c0a69839262bd739fe2733da663 Mon Sep 17 00:00:00 2001 From: Gabriel Tomitsuka Date: Wed, 24 Jan 2024 15:31:51 +0100 Subject: [PATCH 06/13] GH-39761: [Docs] Link to Go documentation references outdated documentation from 2018 (#39750) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ### Rationale for this change The godoc format shows docs in a versioned fashion, making the ["basic" link](https://pkg.go.dev/github.com/apache/arrow/go) reference v0.0.0 from 2018, and godoc doesn't warn you when docs are outdated. Accordingly, for people to find "real" documentation, they have to manually search for the latest docs. Otherwise, it gives the impression that the package is abandoned / makes devs waste considerable time — e.g., I work with Go professionally and wasted 15 minutes on the 2018 docs until I realized they were wrong. ### What changes are included in this PR? * Reference the latest version (v16) in the list of supported implementations of the Arrow website & R package. * Add step to release process that automatically updates the version on release ### Are these changes tested? Yes, I've added tests for this to `dev/release/post-11-bump-versions-test.rb`. ### Are there any user-facing changes? Yes, the link to Implementations > Go on the website will change. * Closes: #39761 Authored-by: Gabriel Tomitsuka Signed-off-by: Sutou Kouhei --- dev/release/post-11-bump-versions-test.rb | 18 ++++++++++++++++++ dev/release/utils-prepare.sh | 17 +++++++++++++++++ docs/source/index.rst | 2 +- r/_pkgdown.yml | 2 +- 4 files changed, 37 insertions(+), 2 deletions(-) diff --git a/dev/release/post-11-bump-versions-test.rb b/dev/release/post-11-bump-versions-test.rb index 4b6933d6102a..78d9320bfb31 100644 --- a/dev/release/post-11-bump-versions-test.rb +++ b/dev/release/post-11-bump-versions-test.rb @@ -197,6 +197,15 @@ def test_version_post_tag ] if release_type == :major expected_changes += [ + { + path: "docs/source/index.rst", + hunks: [ + [ + "- Go ", + "+ Go ", + ], + ], + }, { path: "r/pkgdown/assets/versions.json", hunks: [ @@ -212,6 +221,15 @@ def test_version_post_tag ], ], }, + { + path: "r/_pkgdown.yml", + hunks: [ + [ + "- [Go](https://pkg.go.dev/github.com/apache/arrow/go/v#{@snapshot_major_version})
", + "+ [Go](https://pkg.go.dev/github.com/apache/arrow/go/v#{@next_major_version})
", + ], + ], + }, ] else expected_changes += [ diff --git a/dev/release/utils-prepare.sh b/dev/release/utils-prepare.sh index 8e4c8a84ae8f..51367087228a 100644 --- a/dev/release/utils-prepare.sh +++ b/dev/release/utils-prepare.sh @@ -127,6 +127,7 @@ update_versions() { DESCRIPTION rm -f DESCRIPTION.bak git add DESCRIPTION + # Replace dev version with release version sed -i.bak -E -e \ "/^