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
12 changes: 6 additions & 6 deletions cpp/src/arrow/util/macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,13 @@

#ifdef __clang__
# define ARROW_SUPPRESS_DEPRECATION_WARNING \
_Pragma("clang diagnostic push"); \
_Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"")
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"")
# define ARROW_UNSUPPRESS_DEPRECATION_WARNING _Pragma("clang diagnostic pop")
#elif defined(__GNUC__)
# define ARROW_SUPPRESS_DEPRECATION_WARNING \
_Pragma("GCC diagnostic push"); \
_Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
_Pragma("GCC diagnostic push") \
_Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
# define ARROW_UNSUPPRESS_DEPRECATION_WARNING _Pragma("GCC diagnostic pop")
#elif defined(_MSC_VER)
# define ARROW_SUPPRESS_DEPRECATION_WARNING \
Expand All @@ -174,8 +174,8 @@
// Macros to disable warnings about undeclared global functions
#if defined(__GNUC__)
# define ARROW_SUPPRESS_MISSING_DECLARATIONS_WARNING \
_Pragma("GCC diagnostic push"); \
_Pragma("GCC diagnostic ignored \"-Wmissing-declarations\"")
_Pragma("GCC diagnostic push") \
_Pragma("GCC diagnostic ignored \"-Wmissing-declarations\"")
# define ARROW_UNSUPPRESS_MISSING_DECLARATIONS_WARNING _Pragma("GCC diagnostic pop")
#else
# define ARROW_SUPPRESS_MISSING_DECLARATIONS_WARNING
Expand Down
2 changes: 0 additions & 2 deletions r/NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,6 @@ export(Type)
export(UnionDataset)
export(all_of)
export(arrow_array)
export(arrow_available)
export(arrow_info)
export(arrow_table)
export(arrow_with_acero)
Expand Down Expand Up @@ -403,7 +402,6 @@ export(time64)
export(timestamp)
export(to_arrow)
export(to_duckdb)
export(type)
export(uint16)
export(uint32)
export(uint64)
Expand Down
39 changes: 38 additions & 1 deletion r/NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,44 @@

# arrow 25.0.0

# arrow 24.0.0
## Breaking changes

- Arrow `uint64` types are now always converted to R `double` (numeric) vectors,
regardless of the values. Previously, small `uint64` values were converted to
R `integer`, which could cause inconsistent types within list columns when
different list elements had different value ranges (#50339).

## New features

- `Field` objects now support field-level metadata via `$metadata` and
`$with_metadata()` (@max-romagnoli, #33390).
- Parquet files now support list-columns of ordered factors (ordered
dictionaries) (#49689).

## Minor improvements and fixes

- `Array$create()` now gives a clearer error message when given a `POSIXct`
object with an invalid timezone (#40886).
- Dictionary arrays with `large_string` value types now convert correctly to R
factors (#39603).
- `open_dataset()` now gives a clearer error message when providing a mix of
readr and Arrow options (@Rich-T-kid, #33420).
- `read_parquet()` no longer triggers a C++ alignment warning from the Acero
source node (#46178).
- `Schema` metadata partial matching on `$metadata$r` no longer errors when
other metadata keys start with "r" (#50163).
- `to_arrow()` now preserves `group_by()` when converting from a dbplyr lazy
table (#40640).
- `write_parquet()` now correctly validates that `max_rows_per_group` is a
positive number (#40742).
- Stale S3 connections no longer cause a segfault during garbage collection
(#50009).
- Spurious "Invalid metadata$r" warnings are no longer emitted when reading
files with custom schema metadata (#48712).

## Installation

- The R package now builds under r-universe/r-wasm (#49981).

# arrow 24.0.0

Expand Down
6 changes: 0 additions & 6 deletions r/R/arrow-info.R
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,6 @@ arrow_info <- function() {
structure(out, class = "arrow_info")
}

#' @rdname arrow_info
#' @export
arrow_available <- function() {
.Deprecated(msg = "Arrow C++ is always available as of 7.0.0")
TRUE
}

#' @rdname arrow_info
#' @export
Expand Down
1 change: 0 additions & 1 deletion r/R/dataset-format.R
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ IpcFileFormat <- R6Class("IpcFileFormat", inherit = FileFormat)
#' @rdname JsonFileFormat
#' @name JsonFileFormat
#' @seealso [FileFormat]
#' @examplesIf arrow_with_dataset()
#'
#' @export
JsonFileFormat <- R6Class("JsonFileFormat", inherit = FileFormat)
Expand Down
36 changes: 18 additions & 18 deletions r/R/dplyr-funcs-doc.R
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,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 281 compute
#' In addition to these functions, you can call any of Arrow's 282 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
Expand All @@ -100,24 +100,24 @@
#'
#' ## base
#'
#' * [`!`][!()]
#' * [`!=`][!=()]
#' * [`%%`][%%()]
#' * [`%/%`][%/%()]
#' * [`%in%`][%in%()]
#' * [`&`][&()]
#' * [`*`][*()]
#' * [`+`][+()]
#' * [`-`][-()]
#' * [`/`][/()]
#' * [`<`][<()]
#' * [`<=`][<=()]
#' * [`==`][==()]
#' * [`>`][>()]
#' * [`>=`][>=()]
#' * [`!`][base::!()]
#' * [`!=`][base::!=()]
#' * [`%%`][base::%%()]
#' * [`%/%`][base::%/%()]
#' * [`%in%`][base::%in%()]
#' * [`&`][base::&()]
#' * [`*`][base::*()]
#' * [`+`][base::+()]
#' * [`-`][base::-()]
#' * [`/`][base::/()]
#' * [`<`][base::<()]
#' * [`<=`][base::<=()]
#' * [`==`][base::==()]
#' * [`>`][base::>()]
#' * [`>=`][base::>=()]
#' * [`ISOdate()`][base::ISOdate()]
#' * [`ISOdatetime()`][base::ISOdatetime()]
#' * [`^`][^()]
#' * [`^`][base::^()]
#' * [`abs()`][base::abs()]
#' * [`acos()`][base::acos()]
#' * [`acosh()`][base::acosh()]
Expand Down Expand Up @@ -195,7 +195,7 @@
#' * [`tolower()`][base::tolower()]
#' * [`toupper()`][base::toupper()]
#' * [`trunc()`][base::trunc()]
#' * [`|`][|()]
#' * [`|`][base::|()]
#'
#' ## bit64
#'
Expand Down
21 changes: 8 additions & 13 deletions r/R/type.R
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,6 @@ FLOAT_TYPES <- c("float16", "float32", "float64", "halffloat", "float", "double"
#' @export
infer_type <- function(x, ...) UseMethod("infer_type")

#' @rdname infer_type
#' @export
type <- function(x) {
.Deprecated("infer_type")
infer_type(x)
}

#' @export
infer_type.default <- function(x, ..., from_array_infer_type = FALSE) {
Expand Down Expand Up @@ -356,13 +350,14 @@ NestedType <- R6Class("NestedType", inherit = DataType)
#' `date32()` creates a datetime type with a "day" unit, like the R `Date`
#' class. `date64()` has a "ms" unit.
#'
#' `uint32` (32 bit unsigned integer), `uint64` (64 bit unsigned integer), and
#' `int64` (64-bit signed integer) types may contain values that exceed the
#' range of R's `integer` type (32-bit signed integer). When these arrow objects
#' are translated to R objects, `uint32` and `uint64` are converted to `double`
#' ("numeric") and `int64` is converted to `bit64::integer64`. For `int64`
#' types, this conversion can be disabled (so that `int64` always yields a
#' `bit64::integer64` object) by setting `options(arrow.int64_downcast =
#' `uint64` (64 bit unsigned integer) is always converted to `double`
#' ("numeric") in R. Note that doubles cannot exactly represent all uint64
#' values; precision may be lost for values above 2^53. `uint32` (32 bit unsigned integer) and `int64` (64-bit
#' signed integer) types may contain values that exceed the range of R's
#' `integer` type (32-bit signed integer). When they do, `uint32` is converted
#' to `double` ("numeric") and `int64` is converted to `bit64::integer64`. For
#' `int64` types, this conversion can be disabled (so that `int64` always yields
#' a `bit64::integer64` object) by setting `options(arrow.int64_downcast =
#' FALSE)`.
#'
#' `decimal128()` creates a `Decimal128Type`. Arrow decimals are fixed-point
Expand Down
2 changes: 1 addition & 1 deletion r/R/util.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ is_list_of <- function(object, class) {
is.list(object) && all(map_lgl(object, ~ inherits(., class)))
}

empty_named_list <- function() structure(list(), .Names = character(0))
empty_named_list <- function() structure(list(), names = character(0))

r_symbolic_constants <- c(
"pi",
Expand Down
8 changes: 0 additions & 8 deletions r/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
# arrow <img src="https://arrow.apache.org/img/arrow-logo_hex_black-txt_white-bg.png" align="right" alt="" width="120" />

<!-- badges: start -->

[![cran](https://www.r-pkg.org/badges/version-last-release/arrow)](https://cran.r-project.org/package=arrow)
[![CI](https://github.com/apache/arrow/actions/workflows/r.yml/badge.svg?branch=main&event=push)](https://github.com/apache/arrow/actions/workflows/r.yml?query=branch%3Amain+event%3Apush)
[![R-universe status badge](https://apache.r-universe.dev/badges/arrow)](https://apache.r-universe.dev)
[![conda-forge](https://img.shields.io/conda/vn/conda-forge/r-arrow.svg)](https://anaconda.org/conda-forge/r-arrow)

<!-- badges: end -->

## Overview

Expand Down
8 changes: 7 additions & 1 deletion r/data-raw/docgen.R
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,16 @@ render_fun <- function(fun, pkg_fun, notes) {
# Make it \code{} for better formatting
fun <- paste0("`", fun, "`")
# Wrap in \link{}
# Operators need base:: prefix to disambiguate from other packages (e.g. bit64)
link_target <- ifelse(
!not_operators & !grepl("::", pkg_fun),
paste0("base::", pkg_fun),
pkg_fun
)
out <- ifelse(
pkg_fun %in% do_not_link,
fun,
paste0("[", fun, "][", pkg_fun, "()]")
paste0("[", fun, "][", link_target, "()]")
)
# Add notes after :, if exist
has_notes <- nzchar(notes)
Expand Down
36 changes: 18 additions & 18 deletions r/man/acero.Rd

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

3 changes: 0 additions & 3 deletions r/man/arrow_info.Rd

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

15 changes: 8 additions & 7 deletions r/man/data-type.Rd

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

3 changes: 0 additions & 3 deletions r/man/infer_type.Rd

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

9 changes: 2 additions & 7 deletions r/src/array_to_vector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1296,13 +1296,8 @@ std::shared_ptr<Converter> Converter::Make(
}

case Type::UINT64:
if (ArraysCanFitInteger(chunked_array->chunks())) {
return std::make_shared<arrow::r::Converter_Int<arrow::UInt64Type>>(
chunked_array);
} else {
return std::make_shared<arrow::r::Converter_Double<arrow::UInt64Type>>(
chunked_array);
}
return std::make_shared<arrow::r::Converter_Double<arrow::UInt64Type>>(
chunked_array);

case Type::HALF_FLOAT:
return std::make_shared<arrow::r::Converter_Double<arrow::HalfFloatType>>(
Expand Down
Loading
Loading