Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1718,9 +1718,9 @@ services:
cache_from:
- ${REPO}:amd64-ubuntu-r-valgrind
args:
base: wch1/r-debug:latest
base: rhub/valgrind:latest
cmake: ${CMAKE}
r_bin: RDvalgrind
r_bin: R
tz: ${TZ}
environment:
<<: [*common, *ccache, *sccache]
Expand Down
2 changes: 1 addition & 1 deletion r/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ URL: https://github.com/apache/arrow/, https://arrow.apache.org/docs/r/
BugReports: https://github.com/apache/arrow/issues
Encoding: UTF-8
Language: en-US
SystemRequirements: C++17; for AWS S3 support on Linux, libcurl and openssl (optional);
SystemRequirements: C++20; for AWS S3 support on Linux, libcurl and openssl (optional);
cmake >= 3.26 (build-time only, and only for full source build)
Biarch: true
Imports:
Expand Down
16 changes: 16 additions & 0 deletions r/NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,22 @@
-->

# arrow 23.0.0

## New features

- `nchar()` now supports `keepNA = FALSE` (@HyukjinKwon, #48665).
- `stringr::str_ilike()` binding for case-insensitive pattern matching (#48262).

## Minor improvements and fixes

- Fix slow performance reading files with large number of columns (#48104).
- Fix segfault when calling `concat_tables()` on a `RecordBatch` (#47885).
- Writing partitioned datasets on S3 no longer requires `ListBucket` permissions (@HaochengLIU, #47599).

## Installation

- As of version 23.0.0, `arrow` requires C++20 to build from source. This means that you may need a newer compiler than the default on some older systems. See `vignette("install", package = "arrow")` for guidance.

# arrow 22.0.0.1

## Minor improvements and fixes
Expand Down
2 changes: 1 addition & 1 deletion r/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ There are some special cases to note:

- On Linux the installation process can sometimes be more involved because CRAN does not host binaries for Linux. For more information please see the [installation guide](https://arrow.apache.org/docs/r/articles/install.html).

- If you are compiling arrow from source, please note that as of version 10.0.0, arrow requires C++17 to build. This has implications on Windows and CentOS 7. For Windows users it means you need to be running an R version of 4.0 or later. On CentOS 7, it means you need to install a newer compiler than the default system compiler gcc. See the [installation details article](https://arrow.apache.org/docs/r/articles/developers/install_details.html) for guidance.
- If you are compiling arrow from source, please note that as of version 23.0.0, arrow requires C++20 to build. This has implications on Windows and CentOS 7. For Windows users it means you need to be running an R version of 4.3 or later (though R 4.2 has incomplete support and might work with special configuration). See the [installation details article](https://arrow.apache.org/docs/r/articles/developers/install_details.html) for guidance.

- Development versions of arrow are released nightly. For information on how to install nightly builds please see the [installing nightly builds](https://arrow.apache.org/docs/r/articles/install_nightly.html) article.

Expand Down
22 changes: 7 additions & 15 deletions r/configure
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ if [ "$ARROW_R_DEV" = "true" ] && [ -f "data-raw/codegen.R" ]; then
${R_HOME}/bin/Rscript data-raw/codegen.R
fi

# Arrow requires C++17, so check for it
if [ ! "`${R_HOME}/bin/R CMD config CXX17`" ]; then
# Arrow requires C++20, so check for it
if [ ! "`${R_HOME}/bin/R CMD config CXX20`" ]; then
echo "------------------------- NOTE ---------------------------"
echo "Cannot install arrow: a C++17 compiler is required."
echo "Cannot install arrow: a C++20 compiler is required."
echo "See https://arrow.apache.org/docs/r/articles/install.html"
echo "---------------------------------------------------------"
exit 1
Expand Down Expand Up @@ -260,14 +260,6 @@ set_pkg_vars () {
if [ "$ARROW_R_CXXFLAGS" ]; then
PKG_CFLAGS="$PKG_CFLAGS $ARROW_R_CXXFLAGS"
fi

# We use expr because the product version returns more than just 10.13 and we want to
# match the substring. However, expr always outputs the number of matched characters
# to stdout, to avoid noise in the log we redirect the output to /dev/null
if [ "$UNAME" = "Darwin" ] && expr $(sw_vers -productVersion) : '10\.13' >/dev/null 2>&1; then
# avoid C++17 availability warnings on macOS < 11
PKG_CFLAGS="$PKG_CFLAGS -D_LIBCPP_DISABLE_AVAILABILITY"
fi
}

# If we have pkg-config, it will tell us what libarrow needs
Expand Down Expand Up @@ -408,11 +400,11 @@ else
fi

# Test that we can compile something with those flags
CXX17="`${R_HOME}/bin/R CMD config CXX17` -E"
CXX17FLAGS=`"${R_HOME}"/bin/R CMD config CXX17FLAGS`
CXX17STD=`"${R_HOME}"/bin/R CMD config CXX17STD`
CXX20="`${R_HOME}/bin/R CMD config CXX20` -E"
CXX20FLAGS=`"${R_HOME}"/bin/R CMD config CXX20FLAGS`
CXX20STD=`"${R_HOME}"/bin/R CMD config CXX20STD`
CPPFLAGS=`"${R_HOME}"/bin/R CMD config CPPFLAGS`
TEST_CMD="${CXX17} ${CPPFLAGS} ${PKG_CFLAGS} ${CXX17FLAGS} ${CXX17STD} -xc++ -"
TEST_CMD="${CXX20} ${CPPFLAGS} ${PKG_CFLAGS} ${CXX20FLAGS} ${CXX20STD} -xc++ -"
TEST_ERROR=$(echo "#include $PKG_TEST_HEADER" | ${TEST_CMD} -o /dev/null 2>&1)

if [ $? -eq 0 ]; then
Expand Down
8 changes: 0 additions & 8 deletions r/configure.win
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,6 @@ set_pkg_vars () {
if [ "$ARROW_R_CXXFLAGS" ]; then
PKG_CFLAGS="$PKG_CFLAGS $ARROW_R_CXXFLAGS"
fi

# We use expr because the product version returns more than just 10.13 and we want to
# match the substring. However, expr always outputs the number of matched characters
# to stdout, to avoid noise in the log we redirect the output to /dev/null
if [ "$UNAME" = "Darwin" ] && expr $(sw_vers -productVersion) : '10\.13' >/dev/null 2>&1; then
# avoid C++17 availability warnings on macOS < 11
PKG_CFLAGS="$PKG_CFLAGS -D_LIBCPP_DISABLE_AVAILABILITY"
fi
}

# If we have pkg-config, it will tell us what libarrow needs
Expand Down
2 changes: 0 additions & 2 deletions r/data-raw/codegen.R
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,7 @@ static const R_CallMethodDef CallEntries[] = {
R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
R_useDynamicSymbols(dll, FALSE);

#if defined(HAS_ALTREP)
arrow::r::altrep::Init_Altrep_classes(dll);
#endif

_arrow_compute__Initialize();
}
Expand Down
3 changes: 0 additions & 3 deletions r/inst/NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ https://github.com/libdynd
This product includes software from the LLVM project
* distributed under the University of Illinois Open Source

This product includes software from the google-lint project
* Copyright (c) 2009 Google Inc. All rights reserved.

This product includes software from the mman-win32 project
* Copyright https://code.google.com/p/mman-win32/
* Licensed under the MIT License;
Expand Down
35 changes: 31 additions & 4 deletions r/man/DictionaryType.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 14 additions & 3 deletions r/man/FixedWidthType.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 16 additions & 3 deletions r/man/Message.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 14 additions & 3 deletions r/man/MessageReader.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion r/src/Makevars.in
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ PKG_CPPFLAGS=@cflags@
# https://bugs.llvm.org/show_bug.cgi?id=39191
# https://www.mail-archive.com/gcc-bugs@gcc.gnu.org/msg534862.html
# PKG_CXXFLAGS=$(CXX_VISIBILITY)
CXX_STD=CXX17
CXX_STD=CXX20
PKG_LIBS=@libs@

all: $(SHLIB) purify
Expand Down
2 changes: 1 addition & 1 deletion r/src/Makevars.ucrt
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ CRT=-ucrt
include Makevars.win

# XXX for some reason, this variable doesn't seem propagated from Makevars.win
CXX_STD=CXX17
CXX_STD=CXX20
44 changes: 0 additions & 44 deletions r/src/altrep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,30 +24,9 @@
#include <arrow/util/bitmap_reader.h>
#include <arrow/visit_data_inline.h>

#include <cpp11/altrep.hpp>
#include <cpp11/declarations.hpp>
#if defined(HAS_ALTREP)

#if R_VERSION < R_Version(3, 6, 0)

// workaround because R's <R_ext/Altrep.h> not so conveniently uses `class`
// as a variable name, and C++ is not happy about that
//
// SEXP R_new_altrep(R_altrep_class_t class, SEXP data1, SEXP data2);
//
#define class klass

// Because functions declared in <R_ext/Altrep.h> have C linkage
extern "C" {
#include <R_ext/Altrep.h>
}

// undo the workaround
#undef class

#else
#include <R_ext/Altrep.h>
#endif

#include "./r_task_group.h"

Expand Down Expand Up @@ -1116,29 +1095,6 @@ std::shared_ptr<ChunkedArray> vec_to_arrow_altrep_bypass(SEXP x) {
} // namespace r
} // namespace arrow

#else // HAS_ALTREP

namespace arrow {
namespace r {
namespace altrep {

// return an altrep R vector that shadows the array if possible
SEXP MakeAltrepVector(const std::shared_ptr<ChunkedArray>& chunked_array) {
return R_NilValue;
}

bool is_arrow_altrep(SEXP) { return false; }

std::shared_ptr<ChunkedArray> vec_to_arrow_altrep_bypass(SEXP x) { return nullptr; }

bool is_unmaterialized_arrow_altrep(SEXP) { return false; }

} // namespace altrep
} // namespace r
} // namespace arrow

#endif

// [[arrow::export]]
bool is_arrow_altrep(cpp11::sexp x) { return arrow::r::altrep::is_arrow_altrep(x); }

Expand Down
1 change: 0 additions & 1 deletion r/src/array_to_vector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include <arrow/util/bitmap_writer.h>
#include <arrow/util/int_util.h>

#include <cpp11/altrep.hpp>
#include <type_traits>

#include "./extension.h"
Expand Down
2 changes: 0 additions & 2 deletions r/src/arrowExports.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion r/src/arrow_cpp11.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#undef Free

#include <cpp11.hpp>
#include <cpp11/altrep.hpp>

#include "./nameof.h"

Expand Down
2 changes: 0 additions & 2 deletions r/src/arrow_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,7 @@ arrow::Status AddMetadataFromDots(SEXP lst, int num_fields,

namespace altrep {

#if defined(HAS_ALTREP)
void Init_Altrep_classes(DllInfo* dll);
#endif

SEXP MakeAltrepVector(const std::shared_ptr<ChunkedArray>& chunked_array);
bool is_arrow_altrep(SEXP x);
Expand Down
9 changes: 5 additions & 4 deletions r/src/compute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,13 @@ std::shared_ptr<arrow::compute::FunctionOptions> make_compute_options(
// false means descending, true means ascending
// cpp11 does not support bool here so use int
auto orders = cpp11::as_cpp<std::vector<int>>(options["orders"]);
std::vector<Key> keys;
// Use resize + assignment to avoid vector growth operations that trigger
// false positive -Wmaybe-uninitialized warnings in GCC 14 with std::variant
std::vector<Key> keys(names.size(), Key("", Order::Ascending));
for (size_t i = 0; i < names.size(); i++) {
keys.push_back(
Key(names[i], (orders[i] > 0) ? Order::Descending : Order::Ascending));
keys[i] = Key(names[i], (orders[i] > 0) ? Order::Descending : Order::Ascending);
}
auto out = std::make_shared<Options>(Options(keys));
auto out = std::make_shared<Options>(std::move(keys));
return out;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2115f7927d024996b2819025294c6ea714ba53fc5347de354b68377129050105863f963df8045fe83a49687896b23334b06bd9bf4846771c9be77aae86dbf0de r-libarrow-darwin-arm64-23.0.0.zip
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
b6974eb60abbc96ce15cd3dbb9eac0c17b7786120dff7903ce6cebf3cf2c68e117ec69b6b0ac60c4266744f3d95c2fbb41bdb8050da6a27bc3cc0e7190063fe4 r-libarrow-darwin-x86_64-23.0.0.zip
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7a9e5dfa7dde32834ad31c562a964b2da17ad2d7c0fd867c2bdef2d929dd695868300f84a487e81b06deb998ebfa7ae5e2c194241006dce097b2b938b71d4ffb r-libarrow-linux-x86_64-23.0.0.zip
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
42e316e8b5041b653c63704cc09f05e04675c0be65c1e7ef3bddd70ab85d7373d20cd0590b5e16bcf062b68e065e0840ca7e23e0967570f332de102ecd6c788a r-libarrow-windows-x86_64-23.0.0.zip
Loading
Loading