From a71dee63fe027f38fd7041acefefeb76e6605352 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Wed, 8 Dec 2021 07:55:15 -0400 Subject: [PATCH 01/49] make nse_funcs and agg_funcs environments instead of lists --- r/R/arrow-package.R | 2 +- r/R/dplyr-functions.R | 13 ++++--------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/r/R/arrow-package.R b/r/R/arrow-package.R index a72483a0d6df7..609e67e300be6 100644 --- a/r/R/arrow-package.R +++ b/r/R/arrow-package.R @@ -69,7 +69,7 @@ }), paste0("arrow_", all_arrow_funs) ) - .cache$functions <- c(nse_funcs, arrow_funcs) + .cache$functions <- c(as.list(nse_funcs), arrow_funcs) } if (tolower(Sys.info()[["sysname"]]) == "windows") { diff --git a/r/R/dplyr-functions.R b/r/R/dplyr-functions.R index ccd7ded3cca6c..ebd5640adb08c 100644 --- a/r/R/dplyr-functions.R +++ b/r/R/dplyr-functions.R @@ -21,21 +21,16 @@ NULL # This environment is an internal cache for things including data mask functions # We'll populate it at package load time. -.cache <- NULL -init_env <- function() { - .cache <<- new.env(hash = TRUE) -} -init_env() +.cache <- new.env(parent = emptyenv()) # nse_funcs is a list of functions that operated on (and return) Expressions # These will be the basis for a data_mask inside dplyr methods # and will be added to .cache at package load time - # Start with mappings from R function name spellings -nse_funcs <- lapply(set_names(names(.array_function_map)), function(operator) { +nse_funcs <- as.environment(lapply(set_names(names(.array_function_map)), function(operator) { force(operator) function(...) build_expr(operator, ...) -}) +})) # Now add functions to that list where the mapping from R to Arrow isn't 1:1 # Each of these functions should have the same signature as the R function @@ -1014,7 +1009,7 @@ nse_funcs$case_when <- function(...) { # For group-by aggregation, `hash_` gets prepended to the function name. # So to see a list of available hash aggregation functions, # you can use list_compute_functions("^hash_") -agg_funcs <- list() +agg_funcs <- new.env(parent = emptyenv()) agg_funcs$sum <- function(..., na.rm = FALSE) { list( fun = "sum", From 47dba0029814d6b7cfa5c95c65d56ba23406b260 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Wed, 8 Dec 2021 08:18:32 -0400 Subject: [PATCH 02/49] move translation cache generation to dplyr-functions --- r/R/arrow-package.R | 19 ++++--------------- r/R/dplyr-functions.R | 36 +++++++++++++++++++++++++++++++++--- 2 files changed, 37 insertions(+), 18 deletions(-) diff --git a/r/R/arrow-package.R b/r/R/arrow-package.R index 609e67e300be6..dde480fdc763a 100644 --- a/r/R/arrow-package.R +++ b/r/R/arrow-package.R @@ -56,21 +56,10 @@ s3_register("reticulate::r_to_py", cl) } - # Create these once, at package build time - if (arrow_available()) { - # Also include all available Arrow Compute functions, - # namespaced as arrow_fun. - # We can't do this at install time because list_compute_functions() may error - all_arrow_funs <- list_compute_functions() - arrow_funcs <- set_names( - lapply(all_arrow_funs, function(fun) { - force(fun) - function(...) build_expr(fun, ...) - }), - paste0("arrow_", all_arrow_funs) - ) - .cache$functions <- c(as.list(nse_funcs), arrow_funcs) - } + # Create the .cache$functions list at package load time. + # We can't do this at build time because list_compute_functions() may error + # if arrow_available() is FALSE + refresh_translation_cache() if (tolower(Sys.info()[["sysname"]]) == "windows") { # Disable multithreading on Windows diff --git a/r/R/dplyr-functions.R b/r/R/dplyr-functions.R index ebd5640adb08c..313fd5feec2a8 100644 --- a/r/R/dplyr-functions.R +++ b/r/R/dplyr-functions.R @@ -19,10 +19,28 @@ #' @include expression.R NULL -# This environment is an internal cache for things including data mask functions -# We'll populate it at package load time. +# This environment contains a cache of nse_funcs as a list() .cache <- new.env(parent = emptyenv()) +# Called in .onLoad() +refresh_translation_cache <- function() { + arrow_funcs <- list() + + if (arrow_available()) { + # include all available Arrow Compute functions, namespaced as arrow_fun. + all_arrow_funs <- list_compute_functions() + arrow_funcs <- set_names( + lapply(all_arrow_funs, function(fun) { + force(fun) + function(...) build_expr(fun, ...) + }), + paste0("arrow_", all_arrow_funs) + ) + } + + .cache$functions <- c(as.list(nse_funcs), arrow_funcs) +} + # nse_funcs is a list of functions that operated on (and return) Expressions # These will be the basis for a data_mask inside dplyr methods # and will be added to .cache at package load time @@ -32,6 +50,19 @@ nse_funcs <- as.environment(lapply(set_names(names(.array_function_map)), functi function(...) build_expr(operator, ...) })) +# agg_funcs is a list of functions with a different signature than nse_funcs; +# described below +agg_funcs <- new.env(parent = emptyenv()) + + +translation_registry <- function() { + nse_funcs +} + +translation_registry_agg <- function() { + agg_funcs +} + # Now add functions to that list where the mapping from R to Arrow isn't 1:1 # Each of these functions should have the same signature as the R function # they're replacing. @@ -1009,7 +1040,6 @@ nse_funcs$case_when <- function(...) { # For group-by aggregation, `hash_` gets prepended to the function name. # So to see a list of available hash aggregation functions, # you can use list_compute_functions("^hash_") -agg_funcs <- new.env(parent = emptyenv()) agg_funcs$sum <- function(..., na.rm = FALSE) { list( fun = "sum", From 5a69943f4b262b9c20739fa3ac68c2e7d2549d94 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Wed, 8 Dec 2021 09:00:39 -0400 Subject: [PATCH 03/49] use register_translation() for .array_function_map registration --- r/R/dplyr-functions.R | 44 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 38 insertions(+), 6 deletions(-) diff --git a/r/R/dplyr-functions.R b/r/R/dplyr-functions.R index 313fd5feec2a8..546449523abf3 100644 --- a/r/R/dplyr-functions.R +++ b/r/R/dplyr-functions.R @@ -44,17 +44,12 @@ refresh_translation_cache <- function() { # nse_funcs is a list of functions that operated on (and return) Expressions # These will be the basis for a data_mask inside dplyr methods # and will be added to .cache at package load time -# Start with mappings from R function name spellings -nse_funcs <- as.environment(lapply(set_names(names(.array_function_map)), function(operator) { - force(operator) - function(...) build_expr(operator, ...) -})) +nse_funcs <- new.env(parent = emptyenv()) # agg_funcs is a list of functions with a different signature than nse_funcs; # described below agg_funcs <- new.env(parent = emptyenv()) - translation_registry <- function() { nse_funcs } @@ -63,6 +58,43 @@ translation_registry_agg <- function() { agg_funcs } +register_translation <- function(fun_name, fun, registry = translation_registry()) { + name <- gsub("^.*?::", "", fun_name) + namespace <- gsub("::.*$", "", fun_name) + + previous_fun <- if (name %in% names(fun)) registry[[name]] else NULL + + if (is.null(fun)) { + rm(list = name, envir = registry) + } else { + message(sprintf("Registering '%s'", name)) + registry[[name]] <- fun + } + + invisible(previous_fun) +} + +register_translation_agg <- function(fun_name, fun, registry = translation_registry_agg()) { + register_translation(fun_name, fun, registry = registry) +} + +# Start with mappings from R function name spellings +register_array_function_map <- function() { + # use a function to generate the binding so that `operator` persists + # beyond execution time (another option would be to use quasiquotation + # and unquote `operator` directly into the function expression) + array_function_map_factory <- function(operator) { + force(operator) + function(...) build_expr(operator, ...) + } + + for (name in names(.array_function_map)) { + register_translation(name, array_function_map_factory(name)) + } +} + +register_array_function_map() # TEMP + # Now add functions to that list where the mapping from R to Arrow isn't 1:1 # Each of these functions should have the same signature as the R function # they're replacing. From 403af23ceba93762cac3ecfa7d6f9eb21a14787c Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Wed, 8 Dec 2021 09:14:47 -0400 Subject: [PATCH 04/49] group string functions --- r/R/dplyr-functions.R | 1246 +++++++++++++++++++++-------------------- 1 file changed, 629 insertions(+), 617 deletions(-) diff --git a/r/R/dplyr-functions.R b/r/R/dplyr-functions.R index 546449523abf3..ecce6be0c41ad 100644 --- a/r/R/dplyr-functions.R +++ b/r/R/dplyr-functions.R @@ -79,7 +79,7 @@ register_translation_agg <- function(fun_name, fun, registry = translation_regis } # Start with mappings from R function name spellings -register_array_function_map <- function() { +register_array_function_map_translations <- function() { # use a function to generate the binding so that `operator` persists # beyond execution time (another option would be to use quasiquotation # and unquote `operator` directly into the function expression) @@ -93,7 +93,7 @@ register_array_function_map <- function() { } } -register_array_function_map() # TEMP +register_array_function_map_translations() # TEMP # Now add functions to that list where the mapping from R to Arrow isn't 1:1 # Each of these functions should have the same signature as the R function @@ -109,331 +109,321 @@ register_array_function_map() # TEMP # because they manage the preparation of the user-provided inputs # and don't need to wrap scalars -nse_funcs$cast <- function(x, target_type, safe = TRUE, ...) { - opts <- cast_options(safe, ...) - opts$to_type <- as_type(target_type) - Expression$create("cast", x, options = opts) -} +register_type_translations <- function() { -nse_funcs$coalesce <- function(...) { - args <- list2(...) - if (length(args) < 1) { - abort("At least one argument must be supplied to coalesce()") + nse_funcs$cast <- function(x, target_type, safe = TRUE, ...) { + opts <- cast_options(safe, ...) + opts$to_type <- as_type(target_type) + Expression$create("cast", x, options = opts) } - # Treat NaN like NA for consistency with dplyr::coalesce(), but if *all* - # the values are NaN, we should return NaN, not NA, so don't replace - # NaN with NA in the final (or only) argument - # TODO: if an option is added to the coalesce kernel to treat NaN as NA, - # use that to simplify the code here (ARROW-13389) - attr(args[[length(args)]], "last") <- TRUE - args <- lapply(args, function(arg) { - last_arg <- is.null(attr(arg, "last")) - attr(arg, "last") <- NULL + nse_funcs$is.na <- function(x) { + build_expr("is_null", x, options = list(nan_is_null = TRUE)) + } - if (!inherits(arg, "Expression")) { - arg <- Expression$scalar(arg) + nse_funcs$is.nan <- function(x) { + if (is.double(x) || (inherits(x, "Expression") && + x$type_id() %in% TYPES_WITH_NAN)) { + # TODO: if an option is added to the is_nan kernel to treat NA as NaN, + # use that to simplify the code here (ARROW-13366) + build_expr("is_nan", x) & build_expr("is_valid", x) + } else { + Expression$scalar(FALSE) } + } - if (last_arg && arg$type_id() %in% TYPES_WITH_NAN) { - # store the NA_real_ in the same type as arg to avoid avoid casting - # smaller float types to larger float types - NA_expr <- Expression$scalar(Scalar$create(NA_real_, type = arg$type())) - Expression$create("if_else", Expression$create("is_nan", arg), NA_expr, arg) + nse_funcs$is <- function(object, class2) { + if (is.string(class2)) { + switch(class2, + # for R data types, pass off to is.*() functions + character = nse_funcs$is.character(object), + numeric = nse_funcs$is.numeric(object), + integer = nse_funcs$is.integer(object), + integer64 = nse_funcs$is.integer64(object), + logical = nse_funcs$is.logical(object), + factor = nse_funcs$is.factor(object), + list = nse_funcs$is.list(object), + # for Arrow data types, compare class2 with object$type()$ToString(), + # but first strip off any parameters to only compare the top-level data + # type, and canonicalize class2 + sub("^([^([<]+).*$", "\\1", object$type()$ToString()) == + canonical_type_str(class2) + ) + } else if (inherits(class2, "DataType")) { + object$type() == as_type(class2) } else { - arg + stop("Second argument to is() is not a string or DataType", call. = FALSE) } - }) - Expression$create("coalesce", args = args) -} - -nse_funcs$is.na <- function(x) { - build_expr("is_null", x, options = list(nan_is_null = TRUE)) -} - -nse_funcs$is.nan <- function(x) { - if (is.double(x) || (inherits(x, "Expression") && - x$type_id() %in% TYPES_WITH_NAN)) { - # TODO: if an option is added to the is_nan kernel to treat NA as NaN, - # use that to simplify the code here (ARROW-13366) - build_expr("is_nan", x) & build_expr("is_valid", x) - } else { - Expression$scalar(FALSE) } -} -nse_funcs$is <- function(object, class2) { - if (is.string(class2)) { - switch(class2, - # for R data types, pass off to is.*() functions - character = nse_funcs$is.character(object), - numeric = nse_funcs$is.numeric(object), - integer = nse_funcs$is.integer(object), - integer64 = nse_funcs$is.integer64(object), - logical = nse_funcs$is.logical(object), - factor = nse_funcs$is.factor(object), - list = nse_funcs$is.list(object), - # for Arrow data types, compare class2 with object$type()$ToString(), - # but first strip off any parameters to only compare the top-level data - # type, and canonicalize class2 - sub("^([^([<]+).*$", "\\1", object$type()$ToString()) == - canonical_type_str(class2) + nse_funcs$dictionary_encode <- function(x, + null_encoding_behavior = c("mask", "encode")) { + behavior <- toupper(match.arg(null_encoding_behavior)) + null_encoding_behavior <- NullEncodingBehavior[[behavior]] + Expression$create( + "dictionary_encode", + x, + options = list(null_encoding_behavior = null_encoding_behavior) ) - } else if (inherits(class2, "DataType")) { - object$type() == as_type(class2) - } else { - stop("Second argument to is() is not a string or DataType", call. = FALSE) } -} -nse_funcs$dictionary_encode <- function(x, - null_encoding_behavior = c("mask", "encode")) { - behavior <- toupper(match.arg(null_encoding_behavior)) - null_encoding_behavior <- NullEncodingBehavior[[behavior]] - Expression$create( - "dictionary_encode", - x, - options = list(null_encoding_behavior = null_encoding_behavior) - ) -} - -nse_funcs$between <- function(x, left, right) { - x >= left & x <= right -} + nse_funcs$between <- function(x, left, right) { + x >= left & x <= right + } -nse_funcs$is.finite <- function(x) { - is_fin <- Expression$create("is_finite", x) - # for compatibility with base::is.finite(), return FALSE for NA_real_ - is_fin & !nse_funcs$is.na(is_fin) -} + nse_funcs$is.finite <- function(x) { + is_fin <- Expression$create("is_finite", x) + # for compatibility with base::is.finite(), return FALSE for NA_real_ + is_fin & !nse_funcs$is.na(is_fin) + } -nse_funcs$is.infinite <- function(x) { - is_inf <- Expression$create("is_inf", x) - # for compatibility with base::is.infinite(), return FALSE for NA_real_ - is_inf & !nse_funcs$is.na(is_inf) -} + nse_funcs$is.infinite <- function(x) { + is_inf <- Expression$create("is_inf", x) + # for compatibility with base::is.infinite(), return FALSE for NA_real_ + is_inf & !nse_funcs$is.na(is_inf) + } -# as.* type casting functions -# as.factor() is mapped in expression.R -nse_funcs$as.character <- function(x) { - Expression$create("cast", x, options = cast_options(to_type = string())) -} -nse_funcs$as.double <- function(x) { - Expression$create("cast", x, options = cast_options(to_type = float64())) -} -nse_funcs$as.integer <- function(x) { - Expression$create( - "cast", - x, - options = cast_options( - to_type = int32(), - allow_float_truncate = TRUE, - allow_decimal_truncate = TRUE + # as.* type casting functions + # as.factor() is mapped in expression.R + nse_funcs$as.character <- function(x) { + Expression$create("cast", x, options = cast_options(to_type = string())) + } + nse_funcs$as.double <- function(x) { + Expression$create("cast", x, options = cast_options(to_type = float64())) + } + nse_funcs$as.integer <- function(x) { + Expression$create( + "cast", + x, + options = cast_options( + to_type = int32(), + allow_float_truncate = TRUE, + allow_decimal_truncate = TRUE + ) ) - ) -} -nse_funcs$as.integer64 <- function(x) { - Expression$create( - "cast", - x, - options = cast_options( - to_type = int64(), - allow_float_truncate = TRUE, - allow_decimal_truncate = TRUE + } + nse_funcs$as.integer64 <- function(x) { + Expression$create( + "cast", + x, + options = cast_options( + to_type = int64(), + allow_float_truncate = TRUE, + allow_decimal_truncate = TRUE + ) ) - ) -} -nse_funcs$as.logical <- function(x) { - Expression$create("cast", x, options = cast_options(to_type = boolean())) -} -nse_funcs$as.numeric <- function(x) { - Expression$create("cast", x, options = cast_options(to_type = float64())) -} - -# is.* type functions -nse_funcs$is.character <- function(x) { - is.character(x) || (inherits(x, "Expression") && - x$type_id() %in% Type[c("STRING", "LARGE_STRING")]) -} -nse_funcs$is.numeric <- function(x) { - is.numeric(x) || (inherits(x, "Expression") && x$type_id() %in% Type[c( - "UINT8", "INT8", "UINT16", "INT16", "UINT32", "INT32", - "UINT64", "INT64", "HALF_FLOAT", "FLOAT", "DOUBLE", - "DECIMAL128", "DECIMAL256" - )]) -} -nse_funcs$is.double <- function(x) { - is.double(x) || (inherits(x, "Expression") && x$type_id() == Type["DOUBLE"]) -} -nse_funcs$is.integer <- function(x) { - is.integer(x) || (inherits(x, "Expression") && x$type_id() %in% Type[c( - "UINT8", "INT8", "UINT16", "INT16", "UINT32", "INT32", - "UINT64", "INT64" - )]) -} -nse_funcs$is.integer64 <- function(x) { - is.integer64(x) || (inherits(x, "Expression") && x$type_id() == Type["INT64"]) -} -nse_funcs$is.logical <- function(x) { - is.logical(x) || (inherits(x, "Expression") && x$type_id() == Type["BOOL"]) -} -nse_funcs$is.factor <- function(x) { - is.factor(x) || (inherits(x, "Expression") && x$type_id() == Type["DICTIONARY"]) -} -nse_funcs$is.list <- function(x) { - is.list(x) || (inherits(x, "Expression") && x$type_id() %in% Type[c( - "LIST", "FIXED_SIZE_LIST", "LARGE_LIST" - )]) -} + } + nse_funcs$as.logical <- function(x) { + Expression$create("cast", x, options = cast_options(to_type = boolean())) + } + nse_funcs$as.numeric <- function(x) { + Expression$create("cast", x, options = cast_options(to_type = float64())) + } -# rlang::is_* type functions -nse_funcs$is_character <- function(x, n = NULL) { - assert_that(is.null(n)) - nse_funcs$is.character(x) -} -nse_funcs$is_double <- function(x, n = NULL, finite = NULL) { - assert_that(is.null(n) && is.null(finite)) - nse_funcs$is.double(x) -} -nse_funcs$is_integer <- function(x, n = NULL) { - assert_that(is.null(n)) - nse_funcs$is.integer(x) -} -nse_funcs$is_list <- function(x, n = NULL) { - assert_that(is.null(n)) - nse_funcs$is.list(x) -} -nse_funcs$is_logical <- function(x, n = NULL) { - assert_that(is.null(n)) - nse_funcs$is.logical(x) -} + # is.* type functions + nse_funcs$is.character <- function(x) { + is.character(x) || (inherits(x, "Expression") && + x$type_id() %in% Type[c("STRING", "LARGE_STRING")]) + } + nse_funcs$is.numeric <- function(x) { + is.numeric(x) || (inherits(x, "Expression") && x$type_id() %in% Type[c( + "UINT8", "INT8", "UINT16", "INT16", "UINT32", "INT32", + "UINT64", "INT64", "HALF_FLOAT", "FLOAT", "DOUBLE", + "DECIMAL128", "DECIMAL256" + )]) + } + nse_funcs$is.double <- function(x) { + is.double(x) || (inherits(x, "Expression") && x$type_id() == Type["DOUBLE"]) + } + nse_funcs$is.integer <- function(x) { + is.integer(x) || (inherits(x, "Expression") && x$type_id() %in% Type[c( + "UINT8", "INT8", "UINT16", "INT16", "UINT32", "INT32", + "UINT64", "INT64" + )]) + } + nse_funcs$is.integer64 <- function(x) { + is.integer64(x) || (inherits(x, "Expression") && x$type_id() == Type["INT64"]) + } + nse_funcs$is.logical <- function(x) { + is.logical(x) || (inherits(x, "Expression") && x$type_id() == Type["BOOL"]) + } + nse_funcs$is.factor <- function(x) { + is.factor(x) || (inherits(x, "Expression") && x$type_id() == Type["DICTIONARY"]) + } + nse_funcs$is.list <- function(x) { + is.list(x) || (inherits(x, "Expression") && x$type_id() %in% Type[c( + "LIST", "FIXED_SIZE_LIST", "LARGE_LIST" + )]) + } -# Create a data frame/tibble/struct column -nse_funcs$tibble <- function(..., .rows = NULL, .name_repair = NULL) { - if (!is.null(.rows)) arrow_not_supported(".rows") - if (!is.null(.name_repair)) arrow_not_supported(".name_repair") + # rlang::is_* type functions + nse_funcs$is_character <- function(x, n = NULL) { + assert_that(is.null(n)) + nse_funcs$is.character(x) + } + nse_funcs$is_double <- function(x, n = NULL, finite = NULL) { + assert_that(is.null(n) && is.null(finite)) + nse_funcs$is.double(x) + } + nse_funcs$is_integer <- function(x, n = NULL) { + assert_that(is.null(n)) + nse_funcs$is.integer(x) + } + nse_funcs$is_list <- function(x, n = NULL) { + assert_that(is.null(n)) + nse_funcs$is.list(x) + } + nse_funcs$is_logical <- function(x, n = NULL) { + assert_that(is.null(n)) + nse_funcs$is.logical(x) + } - # use dots_list() because this is what tibble() uses to allow the - # useful shorthand of tibble(col1, col2) -> tibble(col1 = col1, col2 = col2) - # we have a stronger enforcement of unique names for arguments because - # it is difficult to replicate the .name_repair semantics and expanding of - # unnamed data frame arguments in the same way that the tibble() constructor - # does. - args <- rlang::dots_list(..., .named = TRUE, .homonyms = "error") + # Create a data frame/tibble/struct column + nse_funcs$tibble <- function(..., .rows = NULL, .name_repair = NULL) { + if (!is.null(.rows)) arrow_not_supported(".rows") + if (!is.null(.name_repair)) arrow_not_supported(".name_repair") - build_expr( - "make_struct", - args = unname(args), - options = list(field_names = names(args)) - ) -} + # use dots_list() because this is what tibble() uses to allow the + # useful shorthand of tibble(col1, col2) -> tibble(col1 = col1, col2 = col2) + # we have a stronger enforcement of unique names for arguments because + # it is difficult to replicate the .name_repair semantics and expanding of + # unnamed data frame arguments in the same way that the tibble() constructor + # does. + args <- rlang::dots_list(..., .named = TRUE, .homonyms = "error") -nse_funcs$data.frame <- function(..., row.names = NULL, - check.rows = NULL, check.names = TRUE, fix.empty.names = TRUE, - stringsAsFactors = FALSE) { - # we need a specific value of stringsAsFactors because the default was - # TRUE in R <= 3.6 - if (!identical(stringsAsFactors, FALSE)) { - arrow_not_supported("stringsAsFactors = TRUE") + build_expr( + "make_struct", + args = unname(args), + options = list(field_names = names(args)) + ) } - # ignore row.names and check.rows with a warning - if (!is.null(row.names)) arrow_not_supported("row.names") - if (!is.null(check.rows)) arrow_not_supported("check.rows") + nse_funcs$data.frame <- function(..., row.names = NULL, + check.rows = NULL, check.names = TRUE, fix.empty.names = TRUE, + stringsAsFactors = FALSE) { + # we need a specific value of stringsAsFactors because the default was + # TRUE in R <= 3.6 + if (!identical(stringsAsFactors, FALSE)) { + arrow_not_supported("stringsAsFactors = TRUE") + } - args <- rlang::dots_list(..., .named = fix.empty.names) - if (is.null(names(args))) { - names(args) <- rep("", length(args)) - } + # ignore row.names and check.rows with a warning + if (!is.null(row.names)) arrow_not_supported("row.names") + if (!is.null(check.rows)) arrow_not_supported("check.rows") - if (identical(check.names, TRUE)) { - if (identical(fix.empty.names, TRUE)) { - names(args) <- make.names(names(args), unique = TRUE) - } else { - name_emtpy <- names(args) == "" - names(args)[!name_emtpy] <- make.names(names(args)[!name_emtpy], unique = TRUE) + args <- rlang::dots_list(..., .named = fix.empty.names) + if (is.null(names(args))) { + names(args) <- rep("", length(args)) } - } - build_expr( - "make_struct", - args = unname(args), - options = list(field_names = names(args)) - ) + if (identical(check.names, TRUE)) { + if (identical(fix.empty.names, TRUE)) { + names(args) <- make.names(names(args), unique = TRUE) + } else { + name_emtpy <- names(args) == "" + names(args)[!name_emtpy] <- make.names(names(args)[!name_emtpy], unique = TRUE) + } + } + + build_expr( + "make_struct", + args = unname(args), + options = list(field_names = names(args)) + ) + } } -# String functions -nse_funcs$nchar <- function(x, type = "chars", allowNA = FALSE, keepNA = NA) { - if (allowNA) { - arrow_not_supported("allowNA = TRUE") +register_type_translations() # TEMP + +# String function helpers + +#' Get `stringr` pattern options +#' +#' This function assigns definitions for the `stringr` pattern modifier +#' functions (`fixed()`, `regex()`, etc.) inside itself, and uses them to +#' evaluate the quoted expression `pattern`, returning a list that is used +#' to control pattern matching behavior in internal `arrow` functions. +#' +#' @param pattern Unevaluated expression containing a call to a `stringr` +#' pattern modifier function +#' +#' @return List containing elements `pattern`, `fixed`, and `ignore_case` +#' @keywords internal +get_stringr_pattern_options <- function(pattern) { + fixed <- function(pattern, ignore_case = FALSE, ...) { + check_dots(...) + list(pattern = pattern, fixed = TRUE, ignore_case = ignore_case) } - if (is.na(keepNA)) { - keepNA <- !identical(type, "width") + regex <- function(pattern, ignore_case = FALSE, ...) { + check_dots(...) + list(pattern = pattern, fixed = FALSE, ignore_case = ignore_case) } - if (!keepNA) { - # TODO: I think there is a fill_null kernel we could use, set null to 2 - arrow_not_supported("keepNA = TRUE") + coll <- function(...) { + arrow_not_supported("Pattern modifier `coll()`") } - if (identical(type, "bytes")) { - Expression$create("binary_length", x) - } else { - Expression$create("utf8_length", x) + boundary <- function(...) { + arrow_not_supported("Pattern modifier `boundary()`") } -} - -nse_funcs$paste <- function(..., sep = " ", collapse = NULL, recycle0 = FALSE) { - assert_that( - is.null(collapse), - msg = "paste() with the collapse argument is not yet supported in Arrow" - ) - if (!inherits(sep, "Expression")) { - assert_that(!is.na(sep), msg = "Invalid separator") + check_dots <- function(...) { + dots <- list(...) + if (length(dots)) { + warning( + "Ignoring pattern modifier ", + ngettext(length(dots), "argument ", "arguments "), + "not supported in Arrow: ", + oxford_paste(names(dots)), + call. = FALSE + ) + } } - arrow_string_join_function(NullHandlingBehavior$REPLACE, "NA")(..., sep) + ensure_opts <- function(opts) { + if (is.character(opts)) { + opts <- list(pattern = opts, fixed = FALSE, ignore_case = FALSE) + } + opts + } + ensure_opts(eval(pattern)) } -nse_funcs$paste0 <- function(..., collapse = NULL, recycle0 = FALSE) { - assert_that( - is.null(collapse), - msg = "paste0() with the collapse argument is not yet supported in Arrow" - ) - arrow_string_join_function(NullHandlingBehavior$REPLACE, "NA")(..., "") +#' Does this string contain regex metacharacters? +#' +#' @param string String to be tested +#' @keywords internal +#' @return Logical: does `string` contain regex metacharacters? +contains_regex <- function(string) { + grepl("[.\\|()[{^$*+?]", string) } -nse_funcs$str_c <- function(..., sep = "", collapse = NULL) { - assert_that( - is.null(collapse), - msg = "str_c() with the collapse argument is not yet supported in Arrow" - ) - arrow_string_join_function(NullHandlingBehavior$EMIT_NULL)(..., sep) +# format `pattern` as needed for case insensitivity and literal matching by RE2 +format_string_pattern <- function(pattern, ignore.case, fixed) { + # Arrow lacks native support for case-insensitive literal string matching and + # replacement, so we use the regular expression engine (RE2) to do this. + # https://github.com/google/re2/wiki/Syntax + if (ignore.case) { + if (fixed) { + # Everything between "\Q" and "\E" is treated as literal text. + # If the search text contains any literal "\E" strings, make them + # lowercase so they won't signal the end of the literal text: + pattern <- gsub("\\E", "\\e", pattern, fixed = TRUE) + pattern <- paste0("\\Q", pattern, "\\E") + } + # Prepend "(?i)" for case-insensitive matching + pattern <- paste0("(?i)", pattern) + } + pattern } -arrow_string_join_function <- function(null_handling, null_replacement = NULL) { - # the `binary_join_element_wise` Arrow C++ compute kernel takes the separator - # as the last argument, so pass `sep` as the last dots arg to this function - function(...) { - args <- lapply(list(...), function(arg) { - # handle scalar literal args, and cast all args to string for - # consistency with base::paste(), base::paste0(), and stringr::str_c() - if (!inherits(arg, "Expression")) { - assert_that( - length(arg) == 1, - msg = "Literal vectors of length != 1 not supported in string concatenation" - ) - Expression$scalar(as.character(arg)) - } else { - nse_funcs$as.character(arg) - } - }) - Expression$create( - "binary_join_element_wise", - args = args, - options = list( - null_handling = null_handling, - null_replacement = null_replacement - ) - ) +# format `replacement` as needed for literal replacement by RE2 +format_string_replacement <- function(replacement, ignore.case, fixed) { + # Arrow lacks native support for case-insensitive literal string + # replacement, so we use the regular expression engine (RE2) to do this. + # https://github.com/google/re2/wiki/Syntax + if (ignore.case && fixed) { + # Escape single backslashes in the regex replacement text so they are + # interpreted as literal backslashes: + replacement <- gsub("\\", "\\\\", replacement, fixed = TRUE) } + replacement } # Currently, Arrow does not supports a locale option for string case conversion @@ -448,407 +438,397 @@ arrow_string_join_function <- function(null_handling, null_replacement = NULL) { stop_if_locale_provided <- function(locale) { if (!identical(locale, "en")) { stop("Providing a value for 'locale' other than the default ('en') is not supported in Arrow. ", - "To change locale, use 'Sys.setlocale()'", - call. = FALSE + "To change locale, use 'Sys.setlocale()'", + call. = FALSE ) } } -nse_funcs$str_to_lower <- function(string, locale = "en") { - stop_if_locale_provided(locale) - Expression$create("utf8_lower", string) -} - -nse_funcs$str_to_upper <- function(string, locale = "en") { - stop_if_locale_provided(locale) - Expression$create("utf8_upper", string) -} +register_string_translations <- function() { -nse_funcs$str_to_title <- function(string, locale = "en") { - stop_if_locale_provided(locale) - Expression$create("utf8_title", string) -} + nse_funcs$nchar <- function(x, type = "chars", allowNA = FALSE, keepNA = NA) { + if (allowNA) { + arrow_not_supported("allowNA = TRUE") + } + if (is.na(keepNA)) { + keepNA <- !identical(type, "width") + } + if (!keepNA) { + # TODO: I think there is a fill_null kernel we could use, set null to 2 + arrow_not_supported("keepNA = TRUE") + } + if (identical(type, "bytes")) { + Expression$create("binary_length", x) + } else { + Expression$create("utf8_length", x) + } + } -nse_funcs$str_trim <- function(string, side = c("both", "left", "right")) { - side <- match.arg(side) - trim_fun <- switch(side, - left = "utf8_ltrim_whitespace", - right = "utf8_rtrim_whitespace", - both = "utf8_trim_whitespace" - ) - Expression$create(trim_fun, string) -} -nse_funcs$substr <- function(x, start, stop) { - assert_that( - length(start) == 1, - msg = "`start` must be length 1 - other lengths are not supported in Arrow" - ) - assert_that( - length(stop) == 1, - msg = "`stop` must be length 1 - other lengths are not supported in Arrow" - ) + arrow_string_join_function <- function(null_handling, null_replacement = NULL) { + # the `binary_join_element_wise` Arrow C++ compute kernel takes the separator + # as the last argument, so pass `sep` as the last dots arg to this function + function(...) { + args <- lapply(list(...), function(arg) { + # handle scalar literal args, and cast all args to string for + # consistency with base::paste(), base::paste0(), and stringr::str_c() + if (!inherits(arg, "Expression")) { + assert_that( + length(arg) == 1, + msg = "Literal vectors of length != 1 not supported in string concatenation" + ) + Expression$scalar(as.character(arg)) + } else { + nse_funcs$as.character(arg) + } + }) + Expression$create( + "binary_join_element_wise", + args = args, + options = list( + null_handling = null_handling, + null_replacement = null_replacement + ) + ) + } + } - # substr treats values as if they're on a continous number line, so values - # 0 are effectively blank characters - set `start` to 1 here so Arrow mimics - # this behavior - if (start <= 0) { - start <- 1 + nse_funcs$paste <- function(..., sep = " ", collapse = NULL, recycle0 = FALSE) { + assert_that( + is.null(collapse), + msg = "paste() with the collapse argument is not yet supported in Arrow" + ) + if (!inherits(sep, "Expression")) { + assert_that(!is.na(sep), msg = "Invalid separator") + } + arrow_string_join_function(NullHandlingBehavior$REPLACE, "NA")(..., sep) } - # if `stop` is lower than `start`, this is invalid, so set `stop` to - # 0 so that an empty string will be returned (consistent with base::substr()) - if (stop < start) { - stop <- 0 + nse_funcs$paste0 <- function(..., collapse = NULL, recycle0 = FALSE) { + assert_that( + is.null(collapse), + msg = "paste0() with the collapse argument is not yet supported in Arrow" + ) + arrow_string_join_function(NullHandlingBehavior$REPLACE, "NA")(..., "") } - Expression$create( - "utf8_slice_codeunits", - x, - # we don't need to subtract 1 from `stop` as C++ counts exclusively - # which effectively cancels out the difference in indexing between R & C++ - options = list(start = start - 1L, stop = stop) - ) -} + nse_funcs$str_c <- function(..., sep = "", collapse = NULL) { + assert_that( + is.null(collapse), + msg = "str_c() with the collapse argument is not yet supported in Arrow" + ) + arrow_string_join_function(NullHandlingBehavior$EMIT_NULL)(..., sep) + } -nse_funcs$substring <- function(text, first, last) { - nse_funcs$substr(x = text, start = first, stop = last) -} -nse_funcs$str_sub <- function(string, start = 1L, end = -1L) { - assert_that( - length(start) == 1, - msg = "`start` must be length 1 - other lengths are not supported in Arrow" - ) - assert_that( - length(end) == 1, - msg = "`end` must be length 1 - other lengths are not supported in Arrow" - ) + nse_funcs$str_to_lower <- function(string, locale = "en") { + stop_if_locale_provided(locale) + Expression$create("utf8_lower", string) + } - # In stringr::str_sub, an `end` value of -1 means the end of the string, so - # set it to the maximum integer to match this behavior - if (end == -1) { - end <- .Machine$integer.max + nse_funcs$str_to_upper <- function(string, locale = "en") { + stop_if_locale_provided(locale) + Expression$create("utf8_upper", string) } - # An end value lower than a start value returns an empty string in - # stringr::str_sub so set end to 0 here to match this behavior - if (end < start) { - end <- 0 + nse_funcs$str_to_title <- function(string, locale = "en") { + stop_if_locale_provided(locale) + Expression$create("utf8_title", string) } - # subtract 1 from `start` because C++ is 0-based and R is 1-based - # str_sub treats a `start` value of 0 or 1 as the same thing so don't subtract 1 when `start` == 0 - # when `start` < 0, both str_sub and utf8_slice_codeunits count backwards from the end - if (start > 0) { - start <- start - 1L + nse_funcs$str_trim <- function(string, side = c("both", "left", "right")) { + side <- match.arg(side) + trim_fun <- switch(side, + left = "utf8_ltrim_whitespace", + right = "utf8_rtrim_whitespace", + both = "utf8_trim_whitespace" + ) + Expression$create(trim_fun, string) } - Expression$create( - "utf8_slice_codeunits", - string, - options = list(start = start, stop = end) - ) -} + nse_funcs$substr <- function(x, start, stop) { + assert_that( + length(start) == 1, + msg = "`start` must be length 1 - other lengths are not supported in Arrow" + ) + assert_that( + length(stop) == 1, + msg = "`stop` must be length 1 - other lengths are not supported in Arrow" + ) -nse_funcs$grepl <- function(pattern, x, ignore.case = FALSE, fixed = FALSE) { - arrow_fun <- ifelse(fixed, "match_substring", "match_substring_regex") - Expression$create( - arrow_fun, - x, - options = list(pattern = pattern, ignore_case = ignore.case) - ) -} + # substr treats values as if they're on a continous number line, so values + # 0 are effectively blank characters - set `start` to 1 here so Arrow mimics + # this behavior + if (start <= 0) { + start <- 1 + } -nse_funcs$str_detect <- function(string, pattern, negate = FALSE) { - opts <- get_stringr_pattern_options(enexpr(pattern)) - out <- nse_funcs$grepl( - pattern = opts$pattern, - x = string, - ignore.case = opts$ignore_case, - fixed = opts$fixed - ) - if (negate) { - out <- !out + # if `stop` is lower than `start`, this is invalid, so set `stop` to + # 0 so that an empty string will be returned (consistent with base::substr()) + if (stop < start) { + stop <- 0 + } + + Expression$create( + "utf8_slice_codeunits", + x, + # we don't need to subtract 1 from `stop` as C++ counts exclusively + # which effectively cancels out the difference in indexing between R & C++ + options = list(start = start - 1L, stop = stop) + ) } - out -} -nse_funcs$str_like <- function(string, pattern, ignore_case = TRUE) { - Expression$create( - "match_like", - string, - options = list(pattern = pattern, ignore_case = ignore_case) - ) -} + nse_funcs$substring <- function(text, first, last) { + nse_funcs$substr(x = text, start = first, stop = last) + } + + nse_funcs$str_sub <- function(string, start = 1L, end = -1L) { + assert_that( + length(start) == 1, + msg = "`start` must be length 1 - other lengths are not supported in Arrow" + ) + assert_that( + length(end) == 1, + msg = "`end` must be length 1 - other lengths are not supported in Arrow" + ) + + # In stringr::str_sub, an `end` value of -1 means the end of the string, so + # set it to the maximum integer to match this behavior + if (end == -1) { + end <- .Machine$integer.max + } + + # An end value lower than a start value returns an empty string in + # stringr::str_sub so set end to 0 here to match this behavior + if (end < start) { + end <- 0 + } + + # subtract 1 from `start` because C++ is 0-based and R is 1-based + # str_sub treats a `start` value of 0 or 1 as the same thing so don't subtract 1 when `start` == 0 + # when `start` < 0, both str_sub and utf8_slice_codeunits count backwards from the end + if (start > 0) { + start <- start - 1L + } -# Encapsulate some common logic for sub/gsub/str_replace/str_replace_all -arrow_r_string_replace_function <- function(max_replacements) { - function(pattern, replacement, x, ignore.case = FALSE, fixed = FALSE) { Expression$create( - ifelse(fixed && !ignore.case, "replace_substring", "replace_substring_regex"), + "utf8_slice_codeunits", + string, + options = list(start = start, stop = end) + ) + } + + nse_funcs$grepl <- function(pattern, x, ignore.case = FALSE, fixed = FALSE) { + arrow_fun <- ifelse(fixed, "match_substring", "match_substring_regex") + Expression$create( + arrow_fun, x, - options = list( - pattern = format_string_pattern(pattern, ignore.case, fixed), - replacement = format_string_replacement(replacement, ignore.case, fixed), - max_replacements = max_replacements - ) + options = list(pattern = pattern, ignore_case = ignore.case) ) } -} -arrow_stringr_string_replace_function <- function(max_replacements) { - function(string, pattern, replacement) { + nse_funcs$str_detect <- function(string, pattern, negate = FALSE) { opts <- get_stringr_pattern_options(enexpr(pattern)) - arrow_r_string_replace_function(max_replacements)( + out <- nse_funcs$grepl( pattern = opts$pattern, - replacement = replacement, x = string, ignore.case = opts$ignore_case, fixed = opts$fixed ) + if (negate) { + out <- !out + } + out } -} -nse_funcs$sub <- arrow_r_string_replace_function(1L) -nse_funcs$gsub <- arrow_r_string_replace_function(-1L) -nse_funcs$str_replace <- arrow_stringr_string_replace_function(1L) -nse_funcs$str_replace_all <- arrow_stringr_string_replace_function(-1L) - -nse_funcs$strsplit <- function(x, - split, - fixed = FALSE, - perl = FALSE, - useBytes = FALSE) { - assert_that(is.string(split)) - - arrow_fun <- ifelse(fixed, "split_pattern", "split_pattern_regex") - # warn when the user specifies both fixed = TRUE and perl = TRUE, for - # consistency with the behavior of base::strsplit() - if (fixed && perl) { - warning("Argument 'perl = TRUE' will be ignored", call. = FALSE) - } - # since split is not a regex, proceed without any warnings or errors regardless - # of the value of perl, for consistency with the behavior of base::strsplit() - Expression$create( - arrow_fun, - x, - options = list(pattern = split, reverse = FALSE, max_splits = -1L) - ) -} + nse_funcs$str_like <- function(string, pattern, ignore_case = TRUE) { + Expression$create( + "match_like", + string, + options = list(pattern = pattern, ignore_case = ignore_case) + ) + } -nse_funcs$str_split <- function(string, pattern, n = Inf, simplify = FALSE) { - opts <- get_stringr_pattern_options(enexpr(pattern)) - arrow_fun <- ifelse(opts$fixed, "split_pattern", "split_pattern_regex") - if (opts$ignore_case) { - arrow_not_supported("Case-insensitive string splitting") + # Encapsulate some common logic for sub/gsub/str_replace/str_replace_all + arrow_r_string_replace_function <- function(max_replacements) { + function(pattern, replacement, x, ignore.case = FALSE, fixed = FALSE) { + Expression$create( + ifelse(fixed && !ignore.case, "replace_substring", "replace_substring_regex"), + x, + options = list( + pattern = format_string_pattern(pattern, ignore.case, fixed), + replacement = format_string_replacement(replacement, ignore.case, fixed), + max_replacements = max_replacements + ) + ) + } } - if (n == 0) { - arrow_not_supported("Splitting strings into zero parts") - } - if (identical(n, Inf)) { - n <- 0L - } - if (simplify) { - warning("Argument 'simplify = TRUE' will be ignored", call. = FALSE) - } - # The max_splits option in the Arrow C++ library controls the maximum number - # of places at which the string is split, whereas the argument n to - # str_split() controls the maximum number of pieces to return. So we must - # subtract 1 from n to get max_splits. - Expression$create( - arrow_fun, - string, - options = list( - pattern = opts$pattern, - reverse = FALSE, - max_splits = n - 1L - ) - ) -} -nse_funcs$pmin <- function(..., na.rm = FALSE) { - build_expr( - "min_element_wise", - ..., - options = list(skip_nulls = na.rm) - ) -} + arrow_stringr_string_replace_function <- function(max_replacements) { + function(string, pattern, replacement) { + opts <- get_stringr_pattern_options(enexpr(pattern)) + arrow_r_string_replace_function(max_replacements)( + pattern = opts$pattern, + replacement = replacement, + x = string, + ignore.case = opts$ignore_case, + fixed = opts$fixed + ) + } + } -nse_funcs$pmax <- function(..., na.rm = FALSE) { - build_expr( - "max_element_wise", - ..., - options = list(skip_nulls = na.rm) - ) -} + nse_funcs$sub <- arrow_r_string_replace_function(1L) + nse_funcs$gsub <- arrow_r_string_replace_function(-1L) + nse_funcs$str_replace <- arrow_stringr_string_replace_function(1L) + nse_funcs$str_replace_all <- arrow_stringr_string_replace_function(-1L) -nse_funcs$str_pad <- function(string, width, side = c("left", "right", "both"), pad = " ") { - assert_that(is_integerish(width)) - side <- match.arg(side) - assert_that(is.string(pad)) + nse_funcs$strsplit <- function(x, + split, + fixed = FALSE, + perl = FALSE, + useBytes = FALSE) { + assert_that(is.string(split)) - if (side == "left") { - pad_func <- "utf8_lpad" - } else if (side == "right") { - pad_func <- "utf8_rpad" - } else if (side == "both") { - pad_func <- "utf8_center" + arrow_fun <- ifelse(fixed, "split_pattern", "split_pattern_regex") + # warn when the user specifies both fixed = TRUE and perl = TRUE, for + # consistency with the behavior of base::strsplit() + if (fixed && perl) { + warning("Argument 'perl = TRUE' will be ignored", call. = FALSE) + } + # since split is not a regex, proceed without any warnings or errors regardless + # of the value of perl, for consistency with the behavior of base::strsplit() + Expression$create( + arrow_fun, + x, + options = list(pattern = split, reverse = FALSE, max_splits = -1L) + ) } - Expression$create( - pad_func, - string, - options = list(width = width, padding = pad) - ) -} - -nse_funcs$startsWith <- function(x, prefix) { - Expression$create( - "starts_with", - x, - options = list(pattern = prefix) - ) -} + nse_funcs$str_split <- function(string, pattern, n = Inf, simplify = FALSE) { + opts <- get_stringr_pattern_options(enexpr(pattern)) + arrow_fun <- ifelse(opts$fixed, "split_pattern", "split_pattern_regex") + if (opts$ignore_case) { + arrow_not_supported("Case-insensitive string splitting") + } + if (n == 0) { + arrow_not_supported("Splitting strings into zero parts") + } + if (identical(n, Inf)) { + n <- 0L + } + if (simplify) { + warning("Argument 'simplify = TRUE' will be ignored", call. = FALSE) + } + # The max_splits option in the Arrow C++ library controls the maximum number + # of places at which the string is split, whereas the argument n to + # str_split() controls the maximum number of pieces to return. So we must + # subtract 1 from n to get max_splits. + Expression$create( + arrow_fun, + string, + options = list( + pattern = opts$pattern, + reverse = FALSE, + max_splits = n - 1L + ) + ) + } -nse_funcs$endsWith <- function(x, suffix) { - Expression$create( - "ends_with", - x, - options = list(pattern = suffix) - ) -} -nse_funcs$str_starts <- function(string, pattern, negate = FALSE) { - opts <- get_stringr_pattern_options(enexpr(pattern)) - if (opts$fixed) { - out <- nse_funcs$startsWith(x = string, prefix = opts$pattern) - } else { - out <- nse_funcs$grepl(pattern = paste0("^", opts$pattern), x = string, fixed = FALSE) - } + nse_funcs$str_pad <- function(string, width, side = c("left", "right", "both"), pad = " ") { + assert_that(is_integerish(width)) + side <- match.arg(side) + assert_that(is.string(pad)) - if (negate) { - out <- !out - } - out -} + if (side == "left") { + pad_func <- "utf8_lpad" + } else if (side == "right") { + pad_func <- "utf8_rpad" + } else if (side == "both") { + pad_func <- "utf8_center" + } -nse_funcs$str_ends <- function(string, pattern, negate = FALSE) { - opts <- get_stringr_pattern_options(enexpr(pattern)) - if (opts$fixed) { - out <- nse_funcs$endsWith(x = string, suffix = opts$pattern) - } else { - out <- nse_funcs$grepl(pattern = paste0(opts$pattern, "$"), x = string, fixed = FALSE) + Expression$create( + pad_func, + string, + options = list(width = width, padding = pad) + ) } - if (negate) { - out <- !out + nse_funcs$startsWith <- function(x, prefix) { + Expression$create( + "starts_with", + x, + options = list(pattern = prefix) + ) } - out -} -nse_funcs$str_count <- function(string, pattern) { - opts <- get_stringr_pattern_options(enexpr(pattern)) - if (!is.string(pattern)) { - arrow_not_supported("`pattern` must be a length 1 character vector; other values") + nse_funcs$endsWith <- function(x, suffix) { + Expression$create( + "ends_with", + x, + options = list(pattern = suffix) + ) } - arrow_fun <- ifelse(opts$fixed, "count_substring", "count_substring_regex") - Expression$create( - arrow_fun, - string, - options = list(pattern = opts$pattern, ignore_case = opts$ignore_case) - ) -} -# String function helpers + nse_funcs$str_starts <- function(string, pattern, negate = FALSE) { + opts <- get_stringr_pattern_options(enexpr(pattern)) + if (opts$fixed) { + out <- nse_funcs$startsWith(x = string, prefix = opts$pattern) + } else { + out <- nse_funcs$grepl(pattern = paste0("^", opts$pattern), x = string, fixed = FALSE) + } -# format `pattern` as needed for case insensitivity and literal matching by RE2 -format_string_pattern <- function(pattern, ignore.case, fixed) { - # Arrow lacks native support for case-insensitive literal string matching and - # replacement, so we use the regular expression engine (RE2) to do this. - # https://github.com/google/re2/wiki/Syntax - if (ignore.case) { - if (fixed) { - # Everything between "\Q" and "\E" is treated as literal text. - # If the search text contains any literal "\E" strings, make them - # lowercase so they won't signal the end of the literal text: - pattern <- gsub("\\E", "\\e", pattern, fixed = TRUE) - pattern <- paste0("\\Q", pattern, "\\E") + if (negate) { + out <- !out } - # Prepend "(?i)" for case-insensitive matching - pattern <- paste0("(?i)", pattern) + out } - pattern -} -# format `replacement` as needed for literal replacement by RE2 -format_string_replacement <- function(replacement, ignore.case, fixed) { - # Arrow lacks native support for case-insensitive literal string - # replacement, so we use the regular expression engine (RE2) to do this. - # https://github.com/google/re2/wiki/Syntax - if (ignore.case && fixed) { - # Escape single backslashes in the regex replacement text so they are - # interpreted as literal backslashes: - replacement <- gsub("\\", "\\\\", replacement, fixed = TRUE) - } - replacement -} + nse_funcs$str_ends <- function(string, pattern, negate = FALSE) { + opts <- get_stringr_pattern_options(enexpr(pattern)) + if (opts$fixed) { + out <- nse_funcs$endsWith(x = string, suffix = opts$pattern) + } else { + out <- nse_funcs$grepl(pattern = paste0(opts$pattern, "$"), x = string, fixed = FALSE) + } -#' Get `stringr` pattern options -#' -#' This function assigns definitions for the `stringr` pattern modifier -#' functions (`fixed()`, `regex()`, etc.) inside itself, and uses them to -#' evaluate the quoted expression `pattern`, returning a list that is used -#' to control pattern matching behavior in internal `arrow` functions. -#' -#' @param pattern Unevaluated expression containing a call to a `stringr` -#' pattern modifier function -#' -#' @return List containing elements `pattern`, `fixed`, and `ignore_case` -#' @keywords internal -get_stringr_pattern_options <- function(pattern) { - fixed <- function(pattern, ignore_case = FALSE, ...) { - check_dots(...) - list(pattern = pattern, fixed = TRUE, ignore_case = ignore_case) - } - regex <- function(pattern, ignore_case = FALSE, ...) { - check_dots(...) - list(pattern = pattern, fixed = FALSE, ignore_case = ignore_case) - } - coll <- function(...) { - arrow_not_supported("Pattern modifier `coll()`") - } - boundary <- function(...) { - arrow_not_supported("Pattern modifier `boundary()`") - } - check_dots <- function(...) { - dots <- list(...) - if (length(dots)) { - warning( - "Ignoring pattern modifier ", - ngettext(length(dots), "argument ", "arguments "), - "not supported in Arrow: ", - oxford_paste(names(dots)), - call. = FALSE - ) + if (negate) { + out <- !out } + out } - ensure_opts <- function(opts) { - if (is.character(opts)) { - opts <- list(pattern = opts, fixed = FALSE, ignore_case = FALSE) + + nse_funcs$str_count <- function(string, pattern) { + opts <- get_stringr_pattern_options(enexpr(pattern)) + if (!is.string(pattern)) { + arrow_not_supported("`pattern` must be a length 1 character vector; other values") } - opts + arrow_fun <- ifelse(opts$fixed, "count_substring", "count_substring_regex") + Expression$create( + arrow_fun, + string, + options = list(pattern = opts$pattern, ignore_case = opts$ignore_case) + ) } - ensure_opts(eval(pattern)) } -#' Does this string contain regex metacharacters? -#' -#' @param string String to be tested -#' @keywords internal -#' @return Logical: does `string` contain regex metacharacters? -contains_regex <- function(string) { - grepl("[.\\|()[{^$*+?]", string) +register_string_translations() # TEMP + +nse_funcs$pmin <- function(..., na.rm = FALSE) { + build_expr( + "min_element_wise", + ..., + options = list(skip_nulls = na.rm) + ) +} + +nse_funcs$pmax <- function(..., na.rm = FALSE) { + build_expr( + "max_element_wise", + ..., + options = list(skip_nulls = na.rm) + ) } nse_funcs$trunc <- function(x, ...) { @@ -1011,6 +991,38 @@ nse_funcs$log <- nse_funcs$logb <- function(x, base = exp(1)) { Expression$create("logb_checked", x, Expression$scalar(base)) } +nse_funcs$coalesce <- function(...) { + args <- list2(...) + if (length(args) < 1) { + abort("At least one argument must be supplied to coalesce()") + } + + # Treat NaN like NA for consistency with dplyr::coalesce(), but if *all* + # the values are NaN, we should return NaN, not NA, so don't replace + # NaN with NA in the final (or only) argument + # TODO: if an option is added to the coalesce kernel to treat NaN as NA, + # use that to simplify the code here (ARROW-13389) + attr(args[[length(args)]], "last") <- TRUE + args <- lapply(args, function(arg) { + last_arg <- is.null(attr(arg, "last")) + attr(arg, "last") <- NULL + + if (!inherits(arg, "Expression")) { + arg <- Expression$scalar(arg) + } + + if (last_arg && arg$type_id() %in% TYPES_WITH_NAN) { + # store the NA_real_ in the same type as arg to avoid avoid casting + # smaller float types to larger float types + NA_expr <- Expression$scalar(Scalar$create(NA_real_, type = arg$type())) + Expression$create("if_else", Expression$create("is_nan", arg), NA_expr, arg) + } else { + arg + } + }) + Expression$create("coalesce", args = args) +} + nse_funcs$if_else <- function(condition, true, false, missing = NULL) { if (!is.null(missing)) { return(nse_funcs$if_else( From 382dcb83aa813a83e3324f23793f316950b51a23 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Wed, 8 Dec 2021 09:16:59 -0400 Subject: [PATCH 05/49] move strptime and strftime tests to test-dplyr-funcs-datetime --- r/tests/testthat/test-dplyr-funcs-datetime.R | 221 ++++++++++++++++++ r/tests/testthat/test-dplyr-funcs-string.R | 226 ------------------- 2 files changed, 221 insertions(+), 226 deletions(-) diff --git a/r/tests/testthat/test-dplyr-funcs-datetime.R b/r/tests/testthat/test-dplyr-funcs-datetime.R index 0b1395680cb3f..0aec2ca1e7b68 100644 --- a/r/tests/testthat/test-dplyr-funcs-datetime.R +++ b/r/tests/testthat/test-dplyr-funcs-datetime.R @@ -45,6 +45,227 @@ test_df <- tibble::tibble( integer = 1:2 ) + +test_that("strptime", { + t_string <- tibble(x = c("2018-10-07 19:04:05", NA)) + t_stamp <- tibble(x = c(lubridate::ymd_hms("2018-10-07 19:04:05"), NA)) + + expect_equal( + t_string %>% + Table$create() %>% + mutate( + x = strptime(x) + ) %>% + collect(), + t_stamp, + ignore_attr = "tzone" + ) + + expect_equal( + t_string %>% + Table$create() %>% + mutate( + x = strptime(x, format = "%Y-%m-%d %H:%M:%S") + ) %>% + collect(), + t_stamp, + ignore_attr = "tzone" + ) + + expect_equal( + t_string %>% + Table$create() %>% + mutate( + x = strptime(x, format = "%Y-%m-%d %H:%M:%S", unit = "ns") + ) %>% + collect(), + t_stamp, + ignore_attr = "tzone" + ) + + expect_equal( + t_string %>% + Table$create() %>% + mutate( + x = strptime(x, format = "%Y-%m-%d %H:%M:%S", unit = "s") + ) %>% + collect(), + t_stamp, + ignore_attr = "tzone" + ) + + tstring <- tibble(x = c("08-05-2008", NA)) + tstamp <- strptime(c("08-05-2008", NA), format = "%m-%d-%Y") + + expect_equal( + tstring %>% + Table$create() %>% + mutate( + x = strptime(x, format = "%m-%d-%Y") + ) %>% + pull(), + # R's strptime returns POSIXlt (list type) + as.POSIXct(tstamp), + ignore_attr = "tzone" + ) +}) + +test_that("errors in strptime", { + # Error when tz is passed + x <- Expression$field_ref("x") + expect_error( + nse_funcs$strptime(x, tz = "PDT"), + "Time zone argument not supported in Arrow" + ) +}) + +test_that("strftime", { + skip_on_os("windows") # https://issues.apache.org/jira/browse/ARROW-13168 + + times <- tibble( + datetime = c(lubridate::ymd_hms("2018-10-07 19:04:05", tz = "Etc/GMT+6"), NA), + date = c(as.Date("2021-01-01"), NA) + ) + formats <- "%a %A %w %d %b %B %m %y %Y %H %I %p %M %z %Z %j %U %W %x %X %% %G %V %u" + formats_date <- "%a %A %w %d %b %B %m %y %Y %H %I %p %M %j %U %W %x %X %% %G %V %u" + + compare_dplyr_binding( + .input %>% + mutate(x = strftime(datetime, format = formats)) %>% + collect(), + times + ) + + compare_dplyr_binding( + .input %>% + mutate(x = strftime(date, format = formats_date)) %>% + collect(), + times + ) + + compare_dplyr_binding( + .input %>% + mutate(x = strftime(datetime, format = formats, tz = "Pacific/Marquesas")) %>% + collect(), + times + ) + + compare_dplyr_binding( + .input %>% + mutate(x = strftime(datetime, format = formats, tz = "EST", usetz = TRUE)) %>% + collect(), + times + ) + + withr::with_timezone( + "Pacific/Marquesas", + { + compare_dplyr_binding( + .input %>% + mutate( + x = strftime(datetime, format = formats, tz = "EST"), + x_date = strftime(date, format = formats_date, tz = "EST") + ) %>% + collect(), + times + ) + + compare_dplyr_binding( + .input %>% + mutate( + x = strftime(datetime, format = formats), + x_date = strftime(date, format = formats_date) + ) %>% + collect(), + times + ) + } + ) + + # This check is due to differences in the way %c currently works in Arrow and R's strftime. + # We can revisit after https://github.com/HowardHinnant/date/issues/704 is resolved. + expect_error( + times %>% + Table$create() %>% + mutate(x = strftime(datetime, format = "%c")) %>% + collect(), + "%c flag is not supported in non-C locales." + ) + + # Output precision of %S depends on the input timestamp precision. + # Timestamps with second precision are represented as integers while + # milliseconds, microsecond and nanoseconds are represented as fixed floating + # point numbers with 3, 6 and 9 decimal places respectively. + compare_dplyr_binding( + .input %>% + mutate(x = strftime(datetime, format = "%S")) %>% + transmute(as.double(substr(x, 1, 2))) %>% + collect(), + times, + tolerance = 1e-6 + ) +}) + +test_that("format_ISO8601", { + skip_on_os("windows") # https://issues.apache.org/jira/browse/ARROW-13168 + times <- tibble(x = c(lubridate::ymd_hms("2018-10-07 19:04:05", tz = "Etc/GMT+6"), NA)) + + compare_dplyr_binding( + .input %>% + mutate(x = format_ISO8601(x, precision = "ymd", usetz = FALSE)) %>% + collect(), + times + ) + + if (getRversion() < "3.5") { + # before 3.5, times$x will have no timezone attribute, so Arrow faithfully + # errors that there is no timezone to format: + expect_error( + times %>% + Table$create() %>% + mutate(x = format_ISO8601(x, precision = "ymd", usetz = TRUE)) %>% + collect(), + "Timezone not present, cannot convert to string with timezone: %Y-%m-%d%z" + ) + + # See comment regarding %S flag in strftime tests + expect_error( + times %>% + Table$create() %>% + mutate(x = format_ISO8601(x, precision = "ymdhms", usetz = TRUE)) %>% + mutate(x = gsub("\\.0*", "", x)) %>% + collect(), + "Timezone not present, cannot convert to string with timezone: %Y-%m-%dT%H:%M:%S%z" + ) + } else { + compare_dplyr_binding( + .input %>% + mutate(x = format_ISO8601(x, precision = "ymd", usetz = TRUE)) %>% + collect(), + times + ) + + # See comment regarding %S flag in strftime tests + compare_dplyr_binding( + .input %>% + mutate(x = format_ISO8601(x, precision = "ymdhms", usetz = TRUE)) %>% + mutate(x = gsub("\\.0*", "", x)) %>% + collect(), + times + ) + } + + + # See comment regarding %S flag in strftime tests + compare_dplyr_binding( + .input %>% + mutate(x = format_ISO8601(x, precision = "ymdhms", usetz = FALSE)) %>% + mutate(x = gsub("\\.0*", "", x)) %>% + collect(), + times + ) +}) + # These tests test detection of dates and times test_that("is.* functions from lubridate", { diff --git a/r/tests/testthat/test-dplyr-funcs-string.R b/r/tests/testthat/test-dplyr-funcs-string.R index f0965926f291c..1b40d65053ef6 100644 --- a/r/tests/testthat/test-dplyr-funcs-string.R +++ b/r/tests/testthat/test-dplyr-funcs-string.R @@ -692,232 +692,6 @@ test_that("edge cases in string detection and replacement", { ) }) -test_that("strptime", { - # base::strptime() defaults to local timezone - # but arrow's strptime defaults to UTC. - # So that tests are consistent, set the local timezone to UTC - # TODO: consider reevaluating this workaround after ARROW-12980 - withr::local_timezone("UTC") - - t_string <- tibble(x = c("2018-10-07 19:04:05", NA)) - t_stamp <- tibble(x = c(lubridate::ymd_hms("2018-10-07 19:04:05"), NA)) - - expect_equal( - t_string %>% - Table$create() %>% - mutate( - x = strptime(x) - ) %>% - collect(), - t_stamp, - ignore_attr = "tzone" - ) - - expect_equal( - t_string %>% - Table$create() %>% - mutate( - x = strptime(x, format = "%Y-%m-%d %H:%M:%S") - ) %>% - collect(), - t_stamp, - ignore_attr = "tzone" - ) - - expect_equal( - t_string %>% - Table$create() %>% - mutate( - x = strptime(x, format = "%Y-%m-%d %H:%M:%S", unit = "ns") - ) %>% - collect(), - t_stamp, - ignore_attr = "tzone" - ) - - expect_equal( - t_string %>% - Table$create() %>% - mutate( - x = strptime(x, format = "%Y-%m-%d %H:%M:%S", unit = "s") - ) %>% - collect(), - t_stamp, - ignore_attr = "tzone" - ) - - tstring <- tibble(x = c("08-05-2008", NA)) - tstamp <- strptime(c("08-05-2008", NA), format = "%m-%d-%Y") - - expect_equal( - tstring %>% - Table$create() %>% - mutate( - x = strptime(x, format = "%m-%d-%Y") - ) %>% - pull(), - # R's strptime returns POSIXlt (list type) - as.POSIXct(tstamp), - ignore_attr = "tzone" - ) -}) - -test_that("errors in strptime", { - # Error when tz is passed - x <- Expression$field_ref("x") - expect_error( - nse_funcs$strptime(x, tz = "PDT"), - "Time zone argument not supported in Arrow" - ) -}) - -test_that("strftime", { - skip_on_os("windows") # https://issues.apache.org/jira/browse/ARROW-13168 - - times <- tibble( - datetime = c(lubridate::ymd_hms("2018-10-07 19:04:05", tz = "Etc/GMT+6"), NA), - date = c(as.Date("2021-01-01"), NA) - ) - formats <- "%a %A %w %d %b %B %m %y %Y %H %I %p %M %z %Z %j %U %W %x %X %% %G %V %u" - formats_date <- "%a %A %w %d %b %B %m %y %Y %H %I %p %M %j %U %W %x %X %% %G %V %u" - - compare_dplyr_binding( - .input %>% - mutate(x = strftime(datetime, format = formats)) %>% - collect(), - times - ) - - compare_dplyr_binding( - .input %>% - mutate(x = strftime(date, format = formats_date)) %>% - collect(), - times - ) - - compare_dplyr_binding( - .input %>% - mutate(x = strftime(datetime, format = formats, tz = "Pacific/Marquesas")) %>% - collect(), - times - ) - - compare_dplyr_binding( - .input %>% - mutate(x = strftime(datetime, format = formats, tz = "EST", usetz = TRUE)) %>% - collect(), - times - ) - - withr::with_timezone( - "Pacific/Marquesas", - { - compare_dplyr_binding( - .input %>% - mutate( - x = strftime(datetime, format = formats, tz = "EST"), - x_date = strftime(date, format = formats_date, tz = "EST") - ) %>% - collect(), - times - ) - - compare_dplyr_binding( - .input %>% - mutate( - x = strftime(datetime, format = formats), - x_date = strftime(date, format = formats_date) - ) %>% - collect(), - times - ) - } - ) - - # This check is due to differences in the way %c currently works in Arrow and R's strftime. - # We can revisit after https://github.com/HowardHinnant/date/issues/704 is resolved. - expect_error( - times %>% - Table$create() %>% - mutate(x = strftime(datetime, format = "%c")) %>% - collect(), - "%c flag is not supported in non-C locales." - ) - - # Output precision of %S depends on the input timestamp precision. - # Timestamps with second precision are represented as integers while - # milliseconds, microsecond and nanoseconds are represented as fixed floating - # point numbers with 3, 6 and 9 decimal places respectively. - compare_dplyr_binding( - .input %>% - mutate(x = strftime(datetime, format = "%S")) %>% - transmute(as.double(substr(x, 1, 2))) %>% - collect(), - times, - tolerance = 1e-6 - ) -}) - -test_that("format_ISO8601", { - skip_on_os("windows") # https://issues.apache.org/jira/browse/ARROW-13168 - times <- tibble(x = c(lubridate::ymd_hms("2018-10-07 19:04:05", tz = "Etc/GMT+6"), NA)) - - compare_dplyr_binding( - .input %>% - mutate(x = format_ISO8601(x, precision = "ymd", usetz = FALSE)) %>% - collect(), - times - ) - - if (getRversion() < "3.5") { - # before 3.5, times$x will have no timezone attribute, so Arrow faithfully - # errors that there is no timezone to format: - expect_error( - times %>% - Table$create() %>% - mutate(x = format_ISO8601(x, precision = "ymd", usetz = TRUE)) %>% - collect(), - "Timezone not present, cannot convert to string with timezone: %Y-%m-%d%z" - ) - - # See comment regarding %S flag in strftime tests - expect_error( - times %>% - Table$create() %>% - mutate(x = format_ISO8601(x, precision = "ymdhms", usetz = TRUE)) %>% - mutate(x = gsub("\\.0*", "", x)) %>% - collect(), - "Timezone not present, cannot convert to string with timezone: %Y-%m-%dT%H:%M:%S%z" - ) - } else { - compare_dplyr_binding( - .input %>% - mutate(x = format_ISO8601(x, precision = "ymd", usetz = TRUE)) %>% - collect(), - times - ) - - # See comment regarding %S flag in strftime tests - compare_dplyr_binding( - .input %>% - mutate(x = format_ISO8601(x, precision = "ymdhms", usetz = TRUE)) %>% - mutate(x = gsub("\\.0*", "", x)) %>% - collect(), - times - ) - } - - - # See comment regarding %S flag in strftime tests - compare_dplyr_binding( - .input %>% - mutate(x = format_ISO8601(x, precision = "ymdhms", usetz = FALSE)) %>% - mutate(x = gsub("\\.0*", "", x)) %>% - collect(), - times - ) -}) - test_that("arrow_find_substring and arrow_find_substring_regex", { df <- tibble(x = c("Foo and Bar", "baz and qux and quux")) From 7afdc06a9fb85d87232f98c7f7655855037361c3 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Wed, 8 Dec 2021 09:18:42 -0400 Subject: [PATCH 06/49] move pmin, pmax, trunc, and round to be next to the other math translations --- r/R/dplyr-functions.R | 58 +++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/r/R/dplyr-functions.R b/r/R/dplyr-functions.R index ecce6be0c41ad..5253af9619cda 100644 --- a/r/R/dplyr-functions.R +++ b/r/R/dplyr-functions.R @@ -815,35 +815,6 @@ register_string_translations <- function() { register_string_translations() # TEMP -nse_funcs$pmin <- function(..., na.rm = FALSE) { - build_expr( - "min_element_wise", - ..., - options = list(skip_nulls = na.rm) - ) -} - -nse_funcs$pmax <- function(..., na.rm = FALSE) { - build_expr( - "max_element_wise", - ..., - options = list(skip_nulls = na.rm) - ) -} - -nse_funcs$trunc <- function(x, ...) { - # accepts and ignores ... for consistency with base::trunc() - build_expr("trunc", x) -} - -nse_funcs$round <- function(x, digits = 0) { - build_expr( - "round", - x, - options = list(ndigits = digits, round_mode = RoundMode$HALF_TO_EVEN) - ) -} - nse_funcs$strptime <- function(x, format = "%Y-%m-%d %H:%M:%S", tz = NULL, unit = "ms") { # Arrow uses unit for time parsing, strptime() does not. # Arrow has no default option for strptime (format, unit), @@ -991,6 +962,35 @@ nse_funcs$log <- nse_funcs$logb <- function(x, base = exp(1)) { Expression$create("logb_checked", x, Expression$scalar(base)) } +nse_funcs$pmin <- function(..., na.rm = FALSE) { + build_expr( + "min_element_wise", + ..., + options = list(skip_nulls = na.rm) + ) +} + +nse_funcs$pmax <- function(..., na.rm = FALSE) { + build_expr( + "max_element_wise", + ..., + options = list(skip_nulls = na.rm) + ) +} + +nse_funcs$trunc <- function(x, ...) { + # accepts and ignores ... for consistency with base::trunc() + build_expr("trunc", x) +} + +nse_funcs$round <- function(x, digits = 0) { + build_expr( + "round", + x, + options = list(ndigits = digits, round_mode = RoundMode$HALF_TO_EVEN) + ) +} + nse_funcs$coalesce <- function(...) { args <- list2(...) if (length(args) < 1) { From 07c0d89737aa05d5cfaf935900a09493b0dfdb47 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Wed, 8 Dec 2021 09:25:30 -0400 Subject: [PATCH 07/49] group datetime translations --- r/R/dplyr-functions.R | 291 ++++++++++++++++++++++-------------------- 1 file changed, 152 insertions(+), 139 deletions(-) diff --git a/r/R/dplyr-functions.R b/r/R/dplyr-functions.R index 5253af9619cda..878804b331788 100644 --- a/r/R/dplyr-functions.R +++ b/r/R/dplyr-functions.R @@ -815,181 +815,194 @@ register_string_translations <- function() { register_string_translations() # TEMP -nse_funcs$strptime <- function(x, format = "%Y-%m-%d %H:%M:%S", tz = NULL, unit = "ms") { - # Arrow uses unit for time parsing, strptime() does not. - # Arrow has no default option for strptime (format, unit), - # we suggest following format = "%Y-%m-%d %H:%M:%S", unit = MILLI/1L/"ms", - # (ARROW-12809) - # ParseTimestampStrptime currently ignores the timezone information (ARROW-12820). - # Stop if tz is provided. - if (is.character(tz)) { - arrow_not_supported("Time zone argument") - } +register_datetime_translations <- function() { - unit <- make_valid_time_unit(unit, c(valid_time64_units, valid_time32_units)) + nse_funcs$strptime <- function(x, format = "%Y-%m-%d %H:%M:%S", tz = NULL, unit = "ms") { + # Arrow uses unit for time parsing, strptime() does not. + # Arrow has no default option for strptime (format, unit), + # we suggest following format = "%Y-%m-%d %H:%M:%S", unit = MILLI/1L/"ms", + # (ARROW-12809) - Expression$create("strptime", x, options = list(format = format, unit = unit)) -} + # ParseTimestampStrptime currently ignores the timezone information (ARROW-12820). + # Stop if tz is provided. + if (is.character(tz)) { + arrow_not_supported("Time zone argument") + } -nse_funcs$strftime <- function(x, format = "", tz = "", usetz = FALSE) { - if (usetz) { - format <- paste(format, "%Z") - } - if (tz == "") { - tz <- Sys.timezone() - } - # Arrow's strftime prints in timezone of the timestamp. To match R's strftime behavior we first - # cast the timestamp to desired timezone. This is a metadata only change. - if (nse_funcs$is.POSIXct(x)) { - ts <- Expression$create("cast", x, options = list(to_type = timestamp(x$type()$unit(), tz))) - } else { - ts <- x + unit <- make_valid_time_unit(unit, c(valid_time64_units, valid_time32_units)) + + Expression$create("strptime", x, options = list(format = format, unit = unit)) } - Expression$create("strftime", ts, options = list(format = format, locale = Sys.getlocale("LC_TIME"))) -} -nse_funcs$format_ISO8601 <- function(x, usetz = FALSE, precision = NULL, ...) { - ISO8601_precision_map <- - list( - y = "%Y", - ym = "%Y-%m", - ymd = "%Y-%m-%d", - ymdh = "%Y-%m-%dT%H", - ymdhm = "%Y-%m-%dT%H:%M", - ymdhms = "%Y-%m-%dT%H:%M:%S" - ) + nse_funcs$strftime <- function(x, format = "", tz = "", usetz = FALSE) { + if (usetz) { + format <- paste(format, "%Z") + } + if (tz == "") { + tz <- Sys.timezone() + } + # Arrow's strftime prints in timezone of the timestamp. To match R's strftime behavior we first + # cast the timestamp to desired timezone. This is a metadata only change. + if (nse_funcs$is.POSIXct(x)) { + ts <- Expression$create("cast", x, options = list(to_type = timestamp(x$type()$unit(), tz))) + } else { + ts <- x + } + Expression$create("strftime", ts, options = list(format = format, locale = Sys.getlocale("LC_TIME"))) + } + + nse_funcs$format_ISO8601 <- function(x, usetz = FALSE, precision = NULL, ...) { + ISO8601_precision_map <- + list( + y = "%Y", + ym = "%Y-%m", + ymd = "%Y-%m-%d", + ymdh = "%Y-%m-%dT%H", + ymdhm = "%Y-%m-%dT%H:%M", + ymdhms = "%Y-%m-%dT%H:%M:%S" + ) - if (is.null(precision)) { - precision <- "ymdhms" - } - if (!precision %in% names(ISO8601_precision_map)) { - abort( - paste( - "`precision` must be one of the following values:", - paste(names(ISO8601_precision_map), collapse = ", "), - "\nValue supplied was: ", - precision + if (is.null(precision)) { + precision <- "ymdhms" + } + if (!precision %in% names(ISO8601_precision_map)) { + abort( + paste( + "`precision` must be one of the following values:", + paste(names(ISO8601_precision_map), collapse = ", "), + "\nValue supplied was: ", + precision + ) ) - ) + } + format <- ISO8601_precision_map[[precision]] + if (usetz) { + format <- paste0(format, "%z") + } + Expression$create("strftime", x, options = list(format = format, locale = "C")) } - format <- ISO8601_precision_map[[precision]] - if (usetz) { - format <- paste0(format, "%z") + + nse_funcs$second <- function(x) { + Expression$create("add", Expression$create("second", x), Expression$create("subsecond", x)) } - Expression$create("strftime", x, options = list(format = format, locale = "C")) -} -nse_funcs$second <- function(x) { - Expression$create("add", Expression$create("second", x), Expression$create("subsecond", x)) -} + nse_funcs$wday <- function(x, + label = FALSE, + abbr = TRUE, + week_start = getOption("lubridate.week.start", 7), + locale = Sys.getlocale("LC_TIME")) { + if (label) { + if (abbr) { + format <- "%a" + } else { + format <- "%A" + } + return(Expression$create("strftime", x, options = list(format = format, locale = locale))) + } -nse_funcs$wday <- function(x, - label = FALSE, - abbr = TRUE, - week_start = getOption("lubridate.week.start", 7), - locale = Sys.getlocale("LC_TIME")) { - if (label) { - if (abbr) { - format <- "%a" - } else { - format <- "%A" + Expression$create("day_of_week", x, options = list(count_from_zero = FALSE, week_start = week_start)) + } + + nse_funcs$month <- function(x, label = FALSE, abbr = TRUE, locale = Sys.getlocale("LC_TIME")) { + if (label) { + if (abbr) { + format <- "%b" + } else { + format <- "%B" + } + return(Expression$create("strftime", x, options = list(format = format, locale = locale))) } - return(Expression$create("strftime", x, options = list(format = format, locale = locale))) + + Expression$create("month", x) } - Expression$create("day_of_week", x, options = list(count_from_zero = FALSE, week_start = week_start)) -} + nse_funcs$is.Date <- function(x) { + inherits(x, "Date") || + (inherits(x, "Expression") && x$type_id() %in% Type[c("DATE32", "DATE64")]) + } -nse_funcs$month <- function(x, label = FALSE, abbr = TRUE, locale = Sys.getlocale("LC_TIME")) { - if (label) { - if (abbr) { - format <- "%b" - } else { - format <- "%B" - } - return(Expression$create("strftime", x, options = list(format = format, locale = locale))) + nse_funcs$is.instant <- nse_funcs$is.timepoint <- function(x) { + inherits(x, c("POSIXt", "POSIXct", "POSIXlt", "Date")) || + (inherits(x, "Expression") && x$type_id() %in% Type[c("TIMESTAMP", "DATE32", "DATE64")]) } - Expression$create("month", x) + nse_funcs$is.POSIXct <- function(x) { + inherits(x, "POSIXct") || + (inherits(x, "Expression") && x$type_id() %in% Type[c("TIMESTAMP")]) + } } -nse_funcs$is.Date <- function(x) { - inherits(x, "Date") || - (inherits(x, "Expression") && x$type_id() %in% Type[c("DATE32", "DATE64")]) -} +register_datetime_translations() # TEMP -nse_funcs$is.instant <- nse_funcs$is.timepoint <- function(x) { - inherits(x, c("POSIXt", "POSIXct", "POSIXlt", "Date")) || - (inherits(x, "Expression") && x$type_id() %in% Type[c("TIMESTAMP", "DATE32", "DATE64")]) -} +register_math_translations <- function() { -nse_funcs$is.POSIXct <- function(x) { - inherits(x, "POSIXct") || - (inherits(x, "Expression") && x$type_id() %in% Type[c("TIMESTAMP")]) -} + nse_funcs$log <- nse_funcs$logb <- function(x, base = exp(1)) { + # like other binary functions, either `x` or `base` can be Expression or double(1) + if (is.numeric(x) && length(x) == 1) { + x <- Expression$scalar(x) + } else if (!inherits(x, "Expression")) { + arrow_not_supported("x must be a column or a length-1 numeric; other values") + } -nse_funcs$log <- nse_funcs$logb <- function(x, base = exp(1)) { - # like other binary functions, either `x` or `base` can be Expression or double(1) - if (is.numeric(x) && length(x) == 1) { - x <- Expression$scalar(x) - } else if (!inherits(x, "Expression")) { - arrow_not_supported("x must be a column or a length-1 numeric; other values") - } + # handle `base` differently because we use the simpler ln, log2, and log10 + # functions for specific scalar base values + if (inherits(base, "Expression")) { + return(Expression$create("logb_checked", x, base)) + } - # handle `base` differently because we use the simpler ln, log2, and log10 - # functions for specific scalar base values - if (inherits(base, "Expression")) { - return(Expression$create("logb_checked", x, base)) - } + if (!is.numeric(base) || length(base) != 1) { + arrow_not_supported("base must be a column or a length-1 numeric; other values") + } - if (!is.numeric(base) || length(base) != 1) { - arrow_not_supported("base must be a column or a length-1 numeric; other values") - } + if (base == exp(1)) { + return(Expression$create("ln_checked", x)) + } - if (base == exp(1)) { - return(Expression$create("ln_checked", x)) - } + if (base == 2) { + return(Expression$create("log2_checked", x)) + } - if (base == 2) { - return(Expression$create("log2_checked", x)) + if (base == 10) { + return(Expression$create("log10_checked", x)) + } + + Expression$create("logb_checked", x, Expression$scalar(base)) } - if (base == 10) { - return(Expression$create("log10_checked", x)) + + nse_funcs$pmin <- function(..., na.rm = FALSE) { + build_expr( + "min_element_wise", + ..., + options = list(skip_nulls = na.rm) + ) } - Expression$create("logb_checked", x, Expression$scalar(base)) -} + nse_funcs$pmax <- function(..., na.rm = FALSE) { + build_expr( + "max_element_wise", + ..., + options = list(skip_nulls = na.rm) + ) + } -nse_funcs$pmin <- function(..., na.rm = FALSE) { - build_expr( - "min_element_wise", - ..., - options = list(skip_nulls = na.rm) - ) -} + nse_funcs$trunc <- function(x, ...) { + # accepts and ignores ... for consistency with base::trunc() + build_expr("trunc", x) + } -nse_funcs$pmax <- function(..., na.rm = FALSE) { - build_expr( - "max_element_wise", - ..., - options = list(skip_nulls = na.rm) - ) -} + nse_funcs$round <- function(x, digits = 0) { + build_expr( + "round", + x, + options = list(ndigits = digits, round_mode = RoundMode$HALF_TO_EVEN) + ) + } -nse_funcs$trunc <- function(x, ...) { - # accepts and ignores ... for consistency with base::trunc() - build_expr("trunc", x) } -nse_funcs$round <- function(x, digits = 0) { - build_expr( - "round", - x, - options = list(ndigits = digits, round_mode = RoundMode$HALF_TO_EVEN) - ) -} +register_math_translations() nse_funcs$coalesce <- function(...) { args <- list2(...) From d308884b7e7aa85c3616f9355b2c7e503487cd7e Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Wed, 8 Dec 2021 09:30:30 -0400 Subject: [PATCH 08/49] better name for 'output_type()' --- r/R/dplyr-collect.R | 2 +- r/R/dplyr-functions.R | 157 ++++++++++++++++++++++-------------------- 2 files changed, 82 insertions(+), 77 deletions(-) diff --git a/r/R/dplyr-collect.R b/r/R/dplyr-collect.R index 13e68f3f484b7..c62f2559310fb 100644 --- a/r/R/dplyr-collect.R +++ b/r/R/dplyr-collect.R @@ -113,7 +113,7 @@ implicit_schema <- function(.data) { hash <- length(.data$group_by_vars) > 0 agg_fields <- imap( new_fields[setdiff(names(new_fields), .data$group_by_vars)], - ~ output_type(.data$aggregations[[.y]][["fun"]], .x, hash) + ~ agg_fun_output_type(.data$aggregations[[.y]][["fun"]], .x, hash) ) new_fields <- c(group_fields, agg_fields) } diff --git a/r/R/dplyr-functions.R b/r/R/dplyr-functions.R index 878804b331788..e6ffe883879be 100644 --- a/r/R/dplyr-functions.R +++ b/r/R/dplyr-functions.R @@ -1002,93 +1002,98 @@ register_math_translations <- function() { } -register_math_translations() - -nse_funcs$coalesce <- function(...) { - args <- list2(...) - if (length(args) < 1) { - abort("At least one argument must be supplied to coalesce()") - } - - # Treat NaN like NA for consistency with dplyr::coalesce(), but if *all* - # the values are NaN, we should return NaN, not NA, so don't replace - # NaN with NA in the final (or only) argument - # TODO: if an option is added to the coalesce kernel to treat NaN as NA, - # use that to simplify the code here (ARROW-13389) - attr(args[[length(args)]], "last") <- TRUE - args <- lapply(args, function(arg) { - last_arg <- is.null(attr(arg, "last")) - attr(arg, "last") <- NULL - - if (!inherits(arg, "Expression")) { - arg <- Expression$scalar(arg) - } +register_math_translations() # TEMP - if (last_arg && arg$type_id() %in% TYPES_WITH_NAN) { - # store the NA_real_ in the same type as arg to avoid avoid casting - # smaller float types to larger float types - NA_expr <- Expression$scalar(Scalar$create(NA_real_, type = arg$type())) - Expression$create("if_else", Expression$create("is_nan", arg), NA_expr, arg) - } else { - arg +register_conditional_translations <- function() { + + nse_funcs$coalesce <- function(...) { + args <- list2(...) + if (length(args) < 1) { + abort("At least one argument must be supplied to coalesce()") } - }) - Expression$create("coalesce", args = args) -} -nse_funcs$if_else <- function(condition, true, false, missing = NULL) { - if (!is.null(missing)) { - return(nse_funcs$if_else( - nse_funcs$is.na(condition), - missing, - nse_funcs$if_else(condition, true, false) - )) + # Treat NaN like NA for consistency with dplyr::coalesce(), but if *all* + # the values are NaN, we should return NaN, not NA, so don't replace + # NaN with NA in the final (or only) argument + # TODO: if an option is added to the coalesce kernel to treat NaN as NA, + # use that to simplify the code here (ARROW-13389) + attr(args[[length(args)]], "last") <- TRUE + args <- lapply(args, function(arg) { + last_arg <- is.null(attr(arg, "last")) + attr(arg, "last") <- NULL + + if (!inherits(arg, "Expression")) { + arg <- Expression$scalar(arg) + } + + if (last_arg && arg$type_id() %in% TYPES_WITH_NAN) { + # store the NA_real_ in the same type as arg to avoid avoid casting + # smaller float types to larger float types + NA_expr <- Expression$scalar(Scalar$create(NA_real_, type = arg$type())) + Expression$create("if_else", Expression$create("is_nan", arg), NA_expr, arg) + } else { + arg + } + }) + Expression$create("coalesce", args = args) } - build_expr("if_else", condition, true, false) -} + nse_funcs$if_else <- function(condition, true, false, missing = NULL) { + if (!is.null(missing)) { + return(nse_funcs$if_else( + nse_funcs$is.na(condition), + missing, + nse_funcs$if_else(condition, true, false) + )) + } -# Although base R ifelse allows `yes` and `no` to be different classes -nse_funcs$ifelse <- function(test, yes, no) { - nse_funcs$if_else(condition = test, true = yes, false = no) -} + build_expr("if_else", condition, true, false) + } -nse_funcs$case_when <- function(...) { - formulas <- list2(...) - n <- length(formulas) - if (n == 0) { - abort("No cases provided in case_when()") - } - query <- vector("list", n) - value <- vector("list", n) - mask <- caller_env() - for (i in seq_len(n)) { - f <- formulas[[i]] - if (!inherits(f, "formula")) { - abort("Each argument to case_when() must be a two-sided formula") - } - query[[i]] <- arrow_eval(f[[2]], mask) - value[[i]] <- arrow_eval(f[[3]], mask) - if (!nse_funcs$is.logical(query[[i]])) { - abort("Left side of each formula in case_when() must be a logical expression") + # Although base R ifelse allows `yes` and `no` to be different classes + nse_funcs$ifelse <- function(test, yes, no) { + nse_funcs$if_else(condition = test, true = yes, false = no) + } + + nse_funcs$case_when <- function(...) { + formulas <- list2(...) + n <- length(formulas) + if (n == 0) { + abort("No cases provided in case_when()") } - if (inherits(value[[i]], "try-error")) { - abort(handle_arrow_not_supported(value[[i]], format_expr(f[[3]]))) + query <- vector("list", n) + value <- vector("list", n) + mask <- caller_env() + for (i in seq_len(n)) { + f <- formulas[[i]] + if (!inherits(f, "formula")) { + abort("Each argument to case_when() must be a two-sided formula") + } + query[[i]] <- arrow_eval(f[[2]], mask) + value[[i]] <- arrow_eval(f[[3]], mask) + if (!nse_funcs$is.logical(query[[i]])) { + abort("Left side of each formula in case_when() must be a logical expression") + } + if (inherits(value[[i]], "try-error")) { + abort(handle_arrow_not_supported(value[[i]], format_expr(f[[3]]))) + } } - } - build_expr( - "case_when", - args = c( - build_expr( - "make_struct", - args = query, - options = list(field_names = as.character(seq_along(query))) - ), - value + build_expr( + "case_when", + args = c( + build_expr( + "make_struct", + args = query, + options = list(field_names = as.character(seq_along(query))) + ), + value + ) ) - ) + } } +register_conditional_translations() # TEMP + # Aggregation functions # These all return a list of: # @param fun string function name @@ -1208,7 +1213,7 @@ ensure_one_arg <- function(args, fun) { args[[1]] } -output_type <- function(fun, input_type, hash) { +agg_fun_output_type <- function(fun, input_type, hash) { # These are quick and dirty heuristics. if (fun %in% c("any", "all")) { bool() From 09c2a648c1a5948f945d5ec6e33c821adaadfbd7 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Wed, 8 Dec 2021 09:33:58 -0400 Subject: [PATCH 09/49] group aggregate functions --- r/R/dplyr-functions.R | 209 ++++++++++++++++++++++-------------------- 1 file changed, 108 insertions(+), 101 deletions(-) diff --git a/r/R/dplyr-functions.R b/r/R/dplyr-functions.R index e6ffe883879be..ab0399a692260 100644 --- a/r/R/dplyr-functions.R +++ b/r/R/dplyr-functions.R @@ -1102,107 +1102,7 @@ register_conditional_translations() # TEMP # For group-by aggregation, `hash_` gets prepended to the function name. # So to see a list of available hash aggregation functions, # you can use list_compute_functions("^hash_") -agg_funcs$sum <- function(..., na.rm = FALSE) { - list( - fun = "sum", - data = ensure_one_arg(list2(...), "sum"), - options = list(skip_nulls = na.rm, min_count = 0L) - ) -} -agg_funcs$any <- function(..., na.rm = FALSE) { - list( - fun = "any", - data = ensure_one_arg(list2(...), "any"), - options = list(skip_nulls = na.rm, min_count = 0L) - ) -} -agg_funcs$all <- function(..., na.rm = FALSE) { - list( - fun = "all", - data = ensure_one_arg(list2(...), "all"), - options = list(skip_nulls = na.rm, min_count = 0L) - ) -} -agg_funcs$mean <- function(x, na.rm = FALSE) { - list( - fun = "mean", - data = x, - options = list(skip_nulls = na.rm, min_count = 0L) - ) -} -agg_funcs$sd <- function(x, na.rm = FALSE, ddof = 1) { - list( - fun = "stddev", - data = x, - options = list(skip_nulls = na.rm, min_count = 0L, ddof = ddof) - ) -} -agg_funcs$var <- function(x, na.rm = FALSE, ddof = 1) { - list( - fun = "variance", - data = x, - options = list(skip_nulls = na.rm, min_count = 0L, ddof = ddof) - ) -} -agg_funcs$quantile <- function(x, probs, na.rm = FALSE) { - if (length(probs) != 1) { - arrow_not_supported("quantile() with length(probs) != 1") - } - # TODO: Bind to the Arrow function that returns an exact quantile and remove - # this warning (ARROW-14021) - warn( - "quantile() currently returns an approximate quantile in Arrow", - .frequency = ifelse(is_interactive(), "once", "always"), - .frequency_id = "arrow.quantile.approximate" - ) - list( - fun = "tdigest", - data = x, - options = list(skip_nulls = na.rm, q = probs) - ) -} -agg_funcs$median <- function(x, na.rm = FALSE) { - # TODO: Bind to the Arrow function that returns an exact median and remove - # this warning (ARROW-14021) - warn( - "median() currently returns an approximate median in Arrow", - .frequency = ifelse(is_interactive(), "once", "always"), - .frequency_id = "arrow.median.approximate" - ) - list( - fun = "approximate_median", - data = x, - options = list(skip_nulls = na.rm) - ) -} -agg_funcs$n_distinct <- function(..., na.rm = FALSE) { - list( - fun = "count_distinct", - data = ensure_one_arg(list2(...), "n_distinct"), - options = list(na.rm = na.rm) - ) -} -agg_funcs$n <- function() { - list( - fun = "sum", - data = Expression$scalar(1L), - options = list() - ) -} -agg_funcs$min <- function(..., na.rm = FALSE) { - list( - fun = "min", - data = ensure_one_arg(list2(...), "min"), - options = list(skip_nulls = na.rm, min_count = 0L) - ) -} -agg_funcs$max <- function(..., na.rm = FALSE) { - list( - fun = "max", - data = ensure_one_arg(list2(...), "max"), - options = list(skip_nulls = na.rm, min_count = 0L) - ) -} + ensure_one_arg <- function(args, fun) { if (length(args) == 0) { @@ -1233,3 +1133,110 @@ agg_fun_output_type <- function(fun, input_type, hash) { input_type } } + +register_aggregate_translations <- function() { + + agg_funcs$sum <- function(..., na.rm = FALSE) { + list( + fun = "sum", + data = ensure_one_arg(list2(...), "sum"), + options = list(skip_nulls = na.rm, min_count = 0L) + ) + } + agg_funcs$any <- function(..., na.rm = FALSE) { + list( + fun = "any", + data = ensure_one_arg(list2(...), "any"), + options = list(skip_nulls = na.rm, min_count = 0L) + ) + } + agg_funcs$all <- function(..., na.rm = FALSE) { + list( + fun = "all", + data = ensure_one_arg(list2(...), "all"), + options = list(skip_nulls = na.rm, min_count = 0L) + ) + } + agg_funcs$mean <- function(x, na.rm = FALSE) { + list( + fun = "mean", + data = x, + options = list(skip_nulls = na.rm, min_count = 0L) + ) + } + agg_funcs$sd <- function(x, na.rm = FALSE, ddof = 1) { + list( + fun = "stddev", + data = x, + options = list(skip_nulls = na.rm, min_count = 0L, ddof = ddof) + ) + } + agg_funcs$var <- function(x, na.rm = FALSE, ddof = 1) { + list( + fun = "variance", + data = x, + options = list(skip_nulls = na.rm, min_count = 0L, ddof = ddof) + ) + } + agg_funcs$quantile <- function(x, probs, na.rm = FALSE) { + if (length(probs) != 1) { + arrow_not_supported("quantile() with length(probs) != 1") + } + # TODO: Bind to the Arrow function that returns an exact quantile and remove + # this warning (ARROW-14021) + warn( + "quantile() currently returns an approximate quantile in Arrow", + .frequency = ifelse(is_interactive(), "once", "always"), + .frequency_id = "arrow.quantile.approximate" + ) + list( + fun = "tdigest", + data = x, + options = list(skip_nulls = na.rm, q = probs) + ) + } + agg_funcs$median <- function(x, na.rm = FALSE) { + # TODO: Bind to the Arrow function that returns an exact median and remove + # this warning (ARROW-14021) + warn( + "median() currently returns an approximate median in Arrow", + .frequency = ifelse(is_interactive(), "once", "always"), + .frequency_id = "arrow.median.approximate" + ) + list( + fun = "approximate_median", + data = x, + options = list(skip_nulls = na.rm) + ) + } + agg_funcs$n_distinct <- function(..., na.rm = FALSE) { + list( + fun = "count_distinct", + data = ensure_one_arg(list2(...), "n_distinct"), + options = list(na.rm = na.rm) + ) + } + agg_funcs$n <- function() { + list( + fun = "sum", + data = Expression$scalar(1L), + options = list() + ) + } + agg_funcs$min <- function(..., na.rm = FALSE) { + list( + fun = "min", + data = ensure_one_arg(list2(...), "min"), + options = list(skip_nulls = na.rm, min_count = 0L) + ) + } + agg_funcs$max <- function(..., na.rm = FALSE) { + list( + fun = "max", + data = ensure_one_arg(list2(...), "max"), + options = list(skip_nulls = na.rm, min_count = 0L) + ) + } +} + +register_aggregate_translations() # TEMP From 9d576c9b62ee4d5ff518a7d09adaf89b2a4d19ec Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Wed, 8 Dec 2021 09:35:51 -0400 Subject: [PATCH 10/49] rename dplyr-functions to dplyr-funcs to match names of test files --- r/DESCRIPTION | 2 +- r/R/{dplyr-functions.R => dplyr-funcs.R} | 0 r/man/contains_regex.Rd | 2 +- r/man/get_stringr_pattern_options.Rd | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename r/R/{dplyr-functions.R => dplyr-funcs.R} (100%) diff --git a/r/DESCRIPTION b/r/DESCRIPTION index 08cb5d44038e0..5b95dc6f16b20 100644 --- a/r/DESCRIPTION +++ b/r/DESCRIPTION @@ -91,7 +91,7 @@ Collate: 'dplyr-eval.R' 'dplyr-filter.R' 'expression.R' - 'dplyr-functions.R' + 'dplyr-funcs.R' 'dplyr-group-by.R' 'dplyr-join.R' 'dplyr-mutate.R' diff --git a/r/R/dplyr-functions.R b/r/R/dplyr-funcs.R similarity index 100% rename from r/R/dplyr-functions.R rename to r/R/dplyr-funcs.R diff --git a/r/man/contains_regex.Rd b/r/man/contains_regex.Rd index f05f11d02793e..2e770a67fa26e 100644 --- a/r/man/contains_regex.Rd +++ b/r/man/contains_regex.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/dplyr-functions.R +% Please edit documentation in R/dplyr-funcs.R \name{contains_regex} \alias{contains_regex} \title{Does this string contain regex metacharacters?} diff --git a/r/man/get_stringr_pattern_options.Rd b/r/man/get_stringr_pattern_options.Rd index 7107b9060244e..8b191bafaa767 100644 --- a/r/man/get_stringr_pattern_options.Rd +++ b/r/man/get_stringr_pattern_options.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/dplyr-functions.R +% Please edit documentation in R/dplyr-funcs.R \name{get_stringr_pattern_options} \alias{get_stringr_pattern_options} \title{Get \code{stringr} pattern options} From c7e977048f0728426a4db02cb5a8820626f3cfb5 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Wed, 8 Dec 2021 09:51:43 -0400 Subject: [PATCH 11/49] regsiter translations at load time and not at build time --- r/R/arrow-package.R | 2 +- r/R/dplyr-funcs.R | 31 +- r/src/arrowExports.cpp | 7234 ++++++++++++++++++++-------------------- 3 files changed, 3632 insertions(+), 3635 deletions(-) diff --git a/r/R/arrow-package.R b/r/R/arrow-package.R index dde480fdc763a..8f250aabcf07c 100644 --- a/r/R/arrow-package.R +++ b/r/R/arrow-package.R @@ -59,7 +59,7 @@ # Create the .cache$functions list at package load time. # We can't do this at build time because list_compute_functions() may error # if arrow_available() is FALSE - refresh_translation_cache() + create_translation_cache() if (tolower(Sys.info()[["sysname"]]) == "windows") { # Disable multithreading on Windows diff --git a/r/R/dplyr-funcs.R b/r/R/dplyr-funcs.R index ab0399a692260..307dcc5dcb823 100644 --- a/r/R/dplyr-funcs.R +++ b/r/R/dplyr-funcs.R @@ -23,11 +23,11 @@ NULL .cache <- new.env(parent = emptyenv()) # Called in .onLoad() -refresh_translation_cache <- function() { +create_translation_cache <- function() { arrow_funcs <- list() + # Register all available Arrow Compute functions, namespaced as arrow_fun. if (arrow_available()) { - # include all available Arrow Compute functions, namespaced as arrow_fun. all_arrow_funs <- list_compute_functions() arrow_funcs <- set_names( lapply(all_arrow_funs, function(fun) { @@ -38,6 +38,18 @@ refresh_translation_cache <- function() { ) } + # Register translations into nse_funcs and agg_funcs + register_array_function_map_translations() + register_aggregate_translations() + register_conditional_translations() + register_datetime_translations() + register_math_translations() + register_string_translations() + register_type_translations() + + message(paste0('"', names(nse_funcs), '"', collapse = "\n")) + + # We only create the cache for nse_funcs and not agg_funcs .cache$functions <- c(as.list(nse_funcs), arrow_funcs) } @@ -93,8 +105,6 @@ register_array_function_map_translations <- function() { } } -register_array_function_map_translations() # TEMP - # Now add functions to that list where the mapping from R to Arrow isn't 1:1 # Each of these functions should have the same signature as the R function # they're replacing. @@ -333,8 +343,6 @@ register_type_translations <- function() { } } -register_type_translations() # TEMP - # String function helpers #' Get `stringr` pattern options @@ -813,9 +821,6 @@ register_string_translations <- function() { } } -register_string_translations() # TEMP - - register_datetime_translations <- function() { nse_funcs$strptime <- function(x, format = "%Y-%m-%d %H:%M:%S", tz = NULL, unit = "ms") { @@ -933,8 +938,6 @@ register_datetime_translations <- function() { } } -register_datetime_translations() # TEMP - register_math_translations <- function() { nse_funcs$log <- nse_funcs$logb <- function(x, base = exp(1)) { @@ -1002,8 +1005,6 @@ register_math_translations <- function() { } -register_math_translations() # TEMP - register_conditional_translations <- function() { nse_funcs$coalesce <- function(...) { @@ -1092,8 +1093,6 @@ register_conditional_translations <- function() { } } -register_conditional_translations() # TEMP - # Aggregation functions # These all return a list of: # @param fun string function name @@ -1238,5 +1237,3 @@ register_aggregate_translations <- function() { ) } } - -register_aggregate_translations() # TEMP diff --git a/r/src/arrowExports.cpp b/r/src/arrowExports.cpp index ef388b0920818..527db478afb6c 100644 --- a/r/src/arrowExports.cpp +++ b/r/src/arrowExports.cpp @@ -5,8 +5,8 @@ #include "./arrow_types.h" // altrep.cpp -#if defined(ARROW_R_WITH_ARROW) -void test_SET_STRING_ELT(SEXP s); + #if defined(ARROW_R_WITH_ARROW) + void test_SET_STRING_ELT(SEXP s); extern "C" SEXP _arrow_test_SET_STRING_ELT(SEXP s_sexp){ BEGIN_CPP11 arrow::r::Input::type s(s_sexp); @@ -14,30 +14,30 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_test_SET_STRING_ELT(SEXP s_sexp){ - Rf_error("Cannot call test_SET_STRING_ELT(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_test_SET_STRING_ELT(SEXP s_sexp){ + Rf_error("Cannot call test_SET_STRING_ELT(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // altrep.cpp -#if defined(ARROW_R_WITH_ARROW) -bool is_arrow_altrep(SEXP x); + #if defined(ARROW_R_WITH_ARROW) + bool is_arrow_altrep(SEXP x); extern "C" SEXP _arrow_is_arrow_altrep(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input::type x(x_sexp); return cpp11::as_sexp(is_arrow_altrep(x)); END_CPP11 } -#else -extern "C" SEXP _arrow_is_arrow_altrep(SEXP x_sexp){ - Rf_error("Cannot call is_arrow_altrep(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_is_arrow_altrep(SEXP x_sexp){ + Rf_error("Cannot call is_arrow_altrep(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // array.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Array__Slice1(const std::shared_ptr& array, R_xlen_t offset); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr Array__Slice1(const std::shared_ptr& array, R_xlen_t offset); extern "C" SEXP _arrow_Array__Slice1(SEXP array_sexp, SEXP offset_sexp){ BEGIN_CPP11 arrow::r::Input&>::type array(array_sexp); @@ -45,15 +45,15 @@ BEGIN_CPP11 return cpp11::as_sexp(Array__Slice1(array, offset)); END_CPP11 } -#else -extern "C" SEXP _arrow_Array__Slice1(SEXP array_sexp, SEXP offset_sexp){ - Rf_error("Cannot call Array__Slice1(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Array__Slice1(SEXP array_sexp, SEXP offset_sexp){ + Rf_error("Cannot call Array__Slice1(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // array.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Array__Slice2(const std::shared_ptr& array, R_xlen_t offset, R_xlen_t length); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr Array__Slice2(const std::shared_ptr& array, R_xlen_t offset, R_xlen_t length); extern "C" SEXP _arrow_Array__Slice2(SEXP array_sexp, SEXP offset_sexp, SEXP length_sexp){ BEGIN_CPP11 arrow::r::Input&>::type array(array_sexp); @@ -62,15 +62,15 @@ BEGIN_CPP11 return cpp11::as_sexp(Array__Slice2(array, offset, length)); END_CPP11 } -#else -extern "C" SEXP _arrow_Array__Slice2(SEXP array_sexp, SEXP offset_sexp, SEXP length_sexp){ - Rf_error("Cannot call Array__Slice2(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Array__Slice2(SEXP array_sexp, SEXP offset_sexp, SEXP length_sexp){ + Rf_error("Cannot call Array__Slice2(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // array.cpp -#if defined(ARROW_R_WITH_ARROW) -bool Array__IsNull(const std::shared_ptr& x, R_xlen_t i); + #if defined(ARROW_R_WITH_ARROW) + bool Array__IsNull(const std::shared_ptr& x, R_xlen_t i); extern "C" SEXP _arrow_Array__IsNull(SEXP x_sexp, SEXP i_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); @@ -78,15 +78,15 @@ BEGIN_CPP11 return cpp11::as_sexp(Array__IsNull(x, i)); END_CPP11 } -#else -extern "C" SEXP _arrow_Array__IsNull(SEXP x_sexp, SEXP i_sexp){ - Rf_error("Cannot call Array__IsNull(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Array__IsNull(SEXP x_sexp, SEXP i_sexp){ + Rf_error("Cannot call Array__IsNull(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // array.cpp -#if defined(ARROW_R_WITH_ARROW) -bool Array__IsValid(const std::shared_ptr& x, R_xlen_t i); + #if defined(ARROW_R_WITH_ARROW) + bool Array__IsValid(const std::shared_ptr& x, R_xlen_t i); extern "C" SEXP _arrow_Array__IsValid(SEXP x_sexp, SEXP i_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); @@ -94,105 +94,105 @@ BEGIN_CPP11 return cpp11::as_sexp(Array__IsValid(x, i)); END_CPP11 } -#else -extern "C" SEXP _arrow_Array__IsValid(SEXP x_sexp, SEXP i_sexp){ - Rf_error("Cannot call Array__IsValid(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Array__IsValid(SEXP x_sexp, SEXP i_sexp){ + Rf_error("Cannot call Array__IsValid(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // array.cpp -#if defined(ARROW_R_WITH_ARROW) -int Array__length(const std::shared_ptr& x); + #if defined(ARROW_R_WITH_ARROW) + int Array__length(const std::shared_ptr& x); extern "C" SEXP _arrow_Array__length(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(Array__length(x)); END_CPP11 } -#else -extern "C" SEXP _arrow_Array__length(SEXP x_sexp){ - Rf_error("Cannot call Array__length(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Array__length(SEXP x_sexp){ + Rf_error("Cannot call Array__length(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // array.cpp -#if defined(ARROW_R_WITH_ARROW) -int Array__offset(const std::shared_ptr& x); + #if defined(ARROW_R_WITH_ARROW) + int Array__offset(const std::shared_ptr& x); extern "C" SEXP _arrow_Array__offset(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(Array__offset(x)); END_CPP11 } -#else -extern "C" SEXP _arrow_Array__offset(SEXP x_sexp){ - Rf_error("Cannot call Array__offset(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Array__offset(SEXP x_sexp){ + Rf_error("Cannot call Array__offset(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // array.cpp -#if defined(ARROW_R_WITH_ARROW) -int Array__null_count(const std::shared_ptr& x); + #if defined(ARROW_R_WITH_ARROW) + int Array__null_count(const std::shared_ptr& x); extern "C" SEXP _arrow_Array__null_count(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(Array__null_count(x)); END_CPP11 } -#else -extern "C" SEXP _arrow_Array__null_count(SEXP x_sexp){ - Rf_error("Cannot call Array__null_count(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Array__null_count(SEXP x_sexp){ + Rf_error("Cannot call Array__null_count(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // array.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Array__type(const std::shared_ptr& x); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr Array__type(const std::shared_ptr& x); extern "C" SEXP _arrow_Array__type(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(Array__type(x)); END_CPP11 } -#else -extern "C" SEXP _arrow_Array__type(SEXP x_sexp){ - Rf_error("Cannot call Array__type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Array__type(SEXP x_sexp){ + Rf_error("Cannot call Array__type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // array.cpp -#if defined(ARROW_R_WITH_ARROW) -std::string Array__ToString(const std::shared_ptr& x); + #if defined(ARROW_R_WITH_ARROW) + std::string Array__ToString(const std::shared_ptr& x); extern "C" SEXP _arrow_Array__ToString(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(Array__ToString(x)); END_CPP11 } -#else -extern "C" SEXP _arrow_Array__ToString(SEXP x_sexp){ - Rf_error("Cannot call Array__ToString(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Array__ToString(SEXP x_sexp){ + Rf_error("Cannot call Array__ToString(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // array.cpp -#if defined(ARROW_R_WITH_ARROW) -arrow::Type::type Array__type_id(const std::shared_ptr& x); + #if defined(ARROW_R_WITH_ARROW) + arrow::Type::type Array__type_id(const std::shared_ptr& x); extern "C" SEXP _arrow_Array__type_id(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(Array__type_id(x)); END_CPP11 } -#else -extern "C" SEXP _arrow_Array__type_id(SEXP x_sexp){ - Rf_error("Cannot call Array__type_id(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Array__type_id(SEXP x_sexp){ + Rf_error("Cannot call Array__type_id(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // array.cpp -#if defined(ARROW_R_WITH_ARROW) -bool Array__Equals(const std::shared_ptr& lhs, const std::shared_ptr& rhs); + #if defined(ARROW_R_WITH_ARROW) + bool Array__Equals(const std::shared_ptr& lhs, const std::shared_ptr& rhs); extern "C" SEXP _arrow_Array__Equals(SEXP lhs_sexp, SEXP rhs_sexp){ BEGIN_CPP11 arrow::r::Input&>::type lhs(lhs_sexp); @@ -200,15 +200,15 @@ BEGIN_CPP11 return cpp11::as_sexp(Array__Equals(lhs, rhs)); END_CPP11 } -#else -extern "C" SEXP _arrow_Array__Equals(SEXP lhs_sexp, SEXP rhs_sexp){ - Rf_error("Cannot call Array__Equals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Array__Equals(SEXP lhs_sexp, SEXP rhs_sexp){ + Rf_error("Cannot call Array__Equals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // array.cpp -#if defined(ARROW_R_WITH_ARROW) -bool Array__ApproxEquals(const std::shared_ptr& lhs, const std::shared_ptr& rhs); + #if defined(ARROW_R_WITH_ARROW) + bool Array__ApproxEquals(const std::shared_ptr& lhs, const std::shared_ptr& rhs); extern "C" SEXP _arrow_Array__ApproxEquals(SEXP lhs_sexp, SEXP rhs_sexp){ BEGIN_CPP11 arrow::r::Input&>::type lhs(lhs_sexp); @@ -216,15 +216,15 @@ BEGIN_CPP11 return cpp11::as_sexp(Array__ApproxEquals(lhs, rhs)); END_CPP11 } -#else -extern "C" SEXP _arrow_Array__ApproxEquals(SEXP lhs_sexp, SEXP rhs_sexp){ - Rf_error("Cannot call Array__ApproxEquals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Array__ApproxEquals(SEXP lhs_sexp, SEXP rhs_sexp){ + Rf_error("Cannot call Array__ApproxEquals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // array.cpp -#if defined(ARROW_R_WITH_ARROW) -std::string Array__Diff(const std::shared_ptr& lhs, const std::shared_ptr& rhs); + #if defined(ARROW_R_WITH_ARROW) + std::string Array__Diff(const std::shared_ptr& lhs, const std::shared_ptr& rhs); extern "C" SEXP _arrow_Array__Diff(SEXP lhs_sexp, SEXP rhs_sexp){ BEGIN_CPP11 arrow::r::Input&>::type lhs(lhs_sexp); @@ -232,30 +232,30 @@ BEGIN_CPP11 return cpp11::as_sexp(Array__Diff(lhs, rhs)); END_CPP11 } -#else -extern "C" SEXP _arrow_Array__Diff(SEXP lhs_sexp, SEXP rhs_sexp){ - Rf_error("Cannot call Array__Diff(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Array__Diff(SEXP lhs_sexp, SEXP rhs_sexp){ + Rf_error("Cannot call Array__Diff(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // array.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Array__data(const std::shared_ptr& array); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr Array__data(const std::shared_ptr& array); extern "C" SEXP _arrow_Array__data(SEXP array_sexp){ BEGIN_CPP11 arrow::r::Input&>::type array(array_sexp); return cpp11::as_sexp(Array__data(array)); END_CPP11 } -#else -extern "C" SEXP _arrow_Array__data(SEXP array_sexp){ - Rf_error("Cannot call Array__data(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Array__data(SEXP array_sexp){ + Rf_error("Cannot call Array__data(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // array.cpp -#if defined(ARROW_R_WITH_ARROW) -bool Array__RangeEquals(const std::shared_ptr& self, const std::shared_ptr& other, R_xlen_t start_idx, R_xlen_t end_idx, R_xlen_t other_start_idx); + #if defined(ARROW_R_WITH_ARROW) + bool Array__RangeEquals(const std::shared_ptr& self, const std::shared_ptr& other, R_xlen_t start_idx, R_xlen_t end_idx, R_xlen_t other_start_idx); extern "C" SEXP _arrow_Array__RangeEquals(SEXP self_sexp, SEXP other_sexp, SEXP start_idx_sexp, SEXP end_idx_sexp, SEXP other_start_idx_sexp){ BEGIN_CPP11 arrow::r::Input&>::type self(self_sexp); @@ -266,15 +266,15 @@ BEGIN_CPP11 return cpp11::as_sexp(Array__RangeEquals(self, other, start_idx, end_idx, other_start_idx)); END_CPP11 } -#else -extern "C" SEXP _arrow_Array__RangeEquals(SEXP self_sexp, SEXP other_sexp, SEXP start_idx_sexp, SEXP end_idx_sexp, SEXP other_start_idx_sexp){ - Rf_error("Cannot call Array__RangeEquals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Array__RangeEquals(SEXP self_sexp, SEXP other_sexp, SEXP start_idx_sexp, SEXP end_idx_sexp, SEXP other_start_idx_sexp){ + Rf_error("Cannot call Array__RangeEquals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // array.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Array__View(const std::shared_ptr& array, const std::shared_ptr& type); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr Array__View(const std::shared_ptr& array, const std::shared_ptr& type); extern "C" SEXP _arrow_Array__View(SEXP array_sexp, SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type array(array_sexp); @@ -282,15 +282,15 @@ BEGIN_CPP11 return cpp11::as_sexp(Array__View(array, type)); END_CPP11 } -#else -extern "C" SEXP _arrow_Array__View(SEXP array_sexp, SEXP type_sexp){ - Rf_error("Cannot call Array__View(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Array__View(SEXP array_sexp, SEXP type_sexp){ + Rf_error("Cannot call Array__View(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // array.cpp -#if defined(ARROW_R_WITH_ARROW) -void Array__Validate(const std::shared_ptr& array); + #if defined(ARROW_R_WITH_ARROW) + void Array__Validate(const std::shared_ptr& array); extern "C" SEXP _arrow_Array__Validate(SEXP array_sexp){ BEGIN_CPP11 arrow::r::Input&>::type array(array_sexp); @@ -298,45 +298,45 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_Array__Validate(SEXP array_sexp){ - Rf_error("Cannot call Array__Validate(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Array__Validate(SEXP array_sexp){ + Rf_error("Cannot call Array__Validate(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // array.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr DictionaryArray__indices(const std::shared_ptr& array); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr DictionaryArray__indices(const std::shared_ptr& array); extern "C" SEXP _arrow_DictionaryArray__indices(SEXP array_sexp){ BEGIN_CPP11 arrow::r::Input&>::type array(array_sexp); return cpp11::as_sexp(DictionaryArray__indices(array)); END_CPP11 } -#else -extern "C" SEXP _arrow_DictionaryArray__indices(SEXP array_sexp){ - Rf_error("Cannot call DictionaryArray__indices(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_DictionaryArray__indices(SEXP array_sexp){ + Rf_error("Cannot call DictionaryArray__indices(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // array.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr DictionaryArray__dictionary(const std::shared_ptr& array); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr DictionaryArray__dictionary(const std::shared_ptr& array); extern "C" SEXP _arrow_DictionaryArray__dictionary(SEXP array_sexp){ BEGIN_CPP11 arrow::r::Input&>::type array(array_sexp); return cpp11::as_sexp(DictionaryArray__dictionary(array)); END_CPP11 } -#else -extern "C" SEXP _arrow_DictionaryArray__dictionary(SEXP array_sexp){ - Rf_error("Cannot call DictionaryArray__dictionary(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_DictionaryArray__dictionary(SEXP array_sexp){ + Rf_error("Cannot call DictionaryArray__dictionary(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // array.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr StructArray__field(const std::shared_ptr& array, int i); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr StructArray__field(const std::shared_ptr& array, int i); extern "C" SEXP _arrow_StructArray__field(SEXP array_sexp, SEXP i_sexp){ BEGIN_CPP11 arrow::r::Input&>::type array(array_sexp); @@ -344,15 +344,15 @@ BEGIN_CPP11 return cpp11::as_sexp(StructArray__field(array, i)); END_CPP11 } -#else -extern "C" SEXP _arrow_StructArray__field(SEXP array_sexp, SEXP i_sexp){ - Rf_error("Cannot call StructArray__field(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_StructArray__field(SEXP array_sexp, SEXP i_sexp){ + Rf_error("Cannot call StructArray__field(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // array.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr StructArray__GetFieldByName(const std::shared_ptr& array, const std::string& name); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr StructArray__GetFieldByName(const std::shared_ptr& array, const std::string& name); extern "C" SEXP _arrow_StructArray__GetFieldByName(SEXP array_sexp, SEXP name_sexp){ BEGIN_CPP11 arrow::r::Input&>::type array(array_sexp); @@ -360,90 +360,90 @@ BEGIN_CPP11 return cpp11::as_sexp(StructArray__GetFieldByName(array, name)); END_CPP11 } -#else -extern "C" SEXP _arrow_StructArray__GetFieldByName(SEXP array_sexp, SEXP name_sexp){ - Rf_error("Cannot call StructArray__GetFieldByName(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_StructArray__GetFieldByName(SEXP array_sexp, SEXP name_sexp){ + Rf_error("Cannot call StructArray__GetFieldByName(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // array.cpp -#if defined(ARROW_R_WITH_ARROW) -cpp11::list StructArray__Flatten(const std::shared_ptr& array); + #if defined(ARROW_R_WITH_ARROW) + cpp11::list StructArray__Flatten(const std::shared_ptr& array); extern "C" SEXP _arrow_StructArray__Flatten(SEXP array_sexp){ BEGIN_CPP11 arrow::r::Input&>::type array(array_sexp); return cpp11::as_sexp(StructArray__Flatten(array)); END_CPP11 } -#else -extern "C" SEXP _arrow_StructArray__Flatten(SEXP array_sexp){ - Rf_error("Cannot call StructArray__Flatten(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_StructArray__Flatten(SEXP array_sexp){ + Rf_error("Cannot call StructArray__Flatten(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // array.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr ListArray__value_type(const std::shared_ptr& array); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr ListArray__value_type(const std::shared_ptr& array); extern "C" SEXP _arrow_ListArray__value_type(SEXP array_sexp){ BEGIN_CPP11 arrow::r::Input&>::type array(array_sexp); return cpp11::as_sexp(ListArray__value_type(array)); END_CPP11 } -#else -extern "C" SEXP _arrow_ListArray__value_type(SEXP array_sexp){ - Rf_error("Cannot call ListArray__value_type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ListArray__value_type(SEXP array_sexp){ + Rf_error("Cannot call ListArray__value_type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // array.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr LargeListArray__value_type(const std::shared_ptr& array); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr LargeListArray__value_type(const std::shared_ptr& array); extern "C" SEXP _arrow_LargeListArray__value_type(SEXP array_sexp){ BEGIN_CPP11 arrow::r::Input&>::type array(array_sexp); return cpp11::as_sexp(LargeListArray__value_type(array)); END_CPP11 } -#else -extern "C" SEXP _arrow_LargeListArray__value_type(SEXP array_sexp){ - Rf_error("Cannot call LargeListArray__value_type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_LargeListArray__value_type(SEXP array_sexp){ + Rf_error("Cannot call LargeListArray__value_type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // array.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr ListArray__values(const std::shared_ptr& array); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr ListArray__values(const std::shared_ptr& array); extern "C" SEXP _arrow_ListArray__values(SEXP array_sexp){ BEGIN_CPP11 arrow::r::Input&>::type array(array_sexp); return cpp11::as_sexp(ListArray__values(array)); END_CPP11 } -#else -extern "C" SEXP _arrow_ListArray__values(SEXP array_sexp){ - Rf_error("Cannot call ListArray__values(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ListArray__values(SEXP array_sexp){ + Rf_error("Cannot call ListArray__values(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // array.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr LargeListArray__values(const std::shared_ptr& array); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr LargeListArray__values(const std::shared_ptr& array); extern "C" SEXP _arrow_LargeListArray__values(SEXP array_sexp){ BEGIN_CPP11 arrow::r::Input&>::type array(array_sexp); return cpp11::as_sexp(LargeListArray__values(array)); END_CPP11 } -#else -extern "C" SEXP _arrow_LargeListArray__values(SEXP array_sexp){ - Rf_error("Cannot call LargeListArray__values(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_LargeListArray__values(SEXP array_sexp){ + Rf_error("Cannot call LargeListArray__values(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // array.cpp -#if defined(ARROW_R_WITH_ARROW) -int32_t ListArray__value_length(const std::shared_ptr& array, int64_t i); + #if defined(ARROW_R_WITH_ARROW) + int32_t ListArray__value_length(const std::shared_ptr& array, int64_t i); extern "C" SEXP _arrow_ListArray__value_length(SEXP array_sexp, SEXP i_sexp){ BEGIN_CPP11 arrow::r::Input&>::type array(array_sexp); @@ -451,15 +451,15 @@ BEGIN_CPP11 return cpp11::as_sexp(ListArray__value_length(array, i)); END_CPP11 } -#else -extern "C" SEXP _arrow_ListArray__value_length(SEXP array_sexp, SEXP i_sexp){ - Rf_error("Cannot call ListArray__value_length(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ListArray__value_length(SEXP array_sexp, SEXP i_sexp){ + Rf_error("Cannot call ListArray__value_length(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // array.cpp -#if defined(ARROW_R_WITH_ARROW) -int64_t LargeListArray__value_length(const std::shared_ptr& array, int64_t i); + #if defined(ARROW_R_WITH_ARROW) + int64_t LargeListArray__value_length(const std::shared_ptr& array, int64_t i); extern "C" SEXP _arrow_LargeListArray__value_length(SEXP array_sexp, SEXP i_sexp){ BEGIN_CPP11 arrow::r::Input&>::type array(array_sexp); @@ -467,15 +467,15 @@ BEGIN_CPP11 return cpp11::as_sexp(LargeListArray__value_length(array, i)); END_CPP11 } -#else -extern "C" SEXP _arrow_LargeListArray__value_length(SEXP array_sexp, SEXP i_sexp){ - Rf_error("Cannot call LargeListArray__value_length(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_LargeListArray__value_length(SEXP array_sexp, SEXP i_sexp){ + Rf_error("Cannot call LargeListArray__value_length(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // array.cpp -#if defined(ARROW_R_WITH_ARROW) -int64_t FixedSizeListArray__value_length(const std::shared_ptr& array, int64_t i); + #if defined(ARROW_R_WITH_ARROW) + int64_t FixedSizeListArray__value_length(const std::shared_ptr& array, int64_t i); extern "C" SEXP _arrow_FixedSizeListArray__value_length(SEXP array_sexp, SEXP i_sexp){ BEGIN_CPP11 arrow::r::Input&>::type array(array_sexp); @@ -483,15 +483,15 @@ BEGIN_CPP11 return cpp11::as_sexp(FixedSizeListArray__value_length(array, i)); END_CPP11 } -#else -extern "C" SEXP _arrow_FixedSizeListArray__value_length(SEXP array_sexp, SEXP i_sexp){ - Rf_error("Cannot call FixedSizeListArray__value_length(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_FixedSizeListArray__value_length(SEXP array_sexp, SEXP i_sexp){ + Rf_error("Cannot call FixedSizeListArray__value_length(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // array.cpp -#if defined(ARROW_R_WITH_ARROW) -int32_t ListArray__value_offset(const std::shared_ptr& array, int64_t i); + #if defined(ARROW_R_WITH_ARROW) + int32_t ListArray__value_offset(const std::shared_ptr& array, int64_t i); extern "C" SEXP _arrow_ListArray__value_offset(SEXP array_sexp, SEXP i_sexp){ BEGIN_CPP11 arrow::r::Input&>::type array(array_sexp); @@ -499,15 +499,15 @@ BEGIN_CPP11 return cpp11::as_sexp(ListArray__value_offset(array, i)); END_CPP11 } -#else -extern "C" SEXP _arrow_ListArray__value_offset(SEXP array_sexp, SEXP i_sexp){ - Rf_error("Cannot call ListArray__value_offset(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ListArray__value_offset(SEXP array_sexp, SEXP i_sexp){ + Rf_error("Cannot call ListArray__value_offset(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // array.cpp -#if defined(ARROW_R_WITH_ARROW) -int64_t LargeListArray__value_offset(const std::shared_ptr& array, int64_t i); + #if defined(ARROW_R_WITH_ARROW) + int64_t LargeListArray__value_offset(const std::shared_ptr& array, int64_t i); extern "C" SEXP _arrow_LargeListArray__value_offset(SEXP array_sexp, SEXP i_sexp){ BEGIN_CPP11 arrow::r::Input&>::type array(array_sexp); @@ -515,15 +515,15 @@ BEGIN_CPP11 return cpp11::as_sexp(LargeListArray__value_offset(array, i)); END_CPP11 } -#else -extern "C" SEXP _arrow_LargeListArray__value_offset(SEXP array_sexp, SEXP i_sexp){ - Rf_error("Cannot call LargeListArray__value_offset(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_LargeListArray__value_offset(SEXP array_sexp, SEXP i_sexp){ + Rf_error("Cannot call LargeListArray__value_offset(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // array.cpp -#if defined(ARROW_R_WITH_ARROW) -int64_t FixedSizeListArray__value_offset(const std::shared_ptr& array, int64_t i); + #if defined(ARROW_R_WITH_ARROW) + int64_t FixedSizeListArray__value_offset(const std::shared_ptr& array, int64_t i); extern "C" SEXP _arrow_FixedSizeListArray__value_offset(SEXP array_sexp, SEXP i_sexp){ BEGIN_CPP11 arrow::r::Input&>::type array(array_sexp); @@ -531,45 +531,45 @@ BEGIN_CPP11 return cpp11::as_sexp(FixedSizeListArray__value_offset(array, i)); END_CPP11 } -#else -extern "C" SEXP _arrow_FixedSizeListArray__value_offset(SEXP array_sexp, SEXP i_sexp){ - Rf_error("Cannot call FixedSizeListArray__value_offset(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_FixedSizeListArray__value_offset(SEXP array_sexp, SEXP i_sexp){ + Rf_error("Cannot call FixedSizeListArray__value_offset(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // array.cpp -#if defined(ARROW_R_WITH_ARROW) -cpp11::writable::integers ListArray__raw_value_offsets(const std::shared_ptr& array); + #if defined(ARROW_R_WITH_ARROW) + cpp11::writable::integers ListArray__raw_value_offsets(const std::shared_ptr& array); extern "C" SEXP _arrow_ListArray__raw_value_offsets(SEXP array_sexp){ BEGIN_CPP11 arrow::r::Input&>::type array(array_sexp); return cpp11::as_sexp(ListArray__raw_value_offsets(array)); END_CPP11 } -#else -extern "C" SEXP _arrow_ListArray__raw_value_offsets(SEXP array_sexp){ - Rf_error("Cannot call ListArray__raw_value_offsets(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ListArray__raw_value_offsets(SEXP array_sexp){ + Rf_error("Cannot call ListArray__raw_value_offsets(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // array.cpp -#if defined(ARROW_R_WITH_ARROW) -cpp11::writable::integers LargeListArray__raw_value_offsets(const std::shared_ptr& array); + #if defined(ARROW_R_WITH_ARROW) + cpp11::writable::integers LargeListArray__raw_value_offsets(const std::shared_ptr& array); extern "C" SEXP _arrow_LargeListArray__raw_value_offsets(SEXP array_sexp){ BEGIN_CPP11 arrow::r::Input&>::type array(array_sexp); return cpp11::as_sexp(LargeListArray__raw_value_offsets(array)); END_CPP11 } -#else -extern "C" SEXP _arrow_LargeListArray__raw_value_offsets(SEXP array_sexp){ - Rf_error("Cannot call LargeListArray__raw_value_offsets(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_LargeListArray__raw_value_offsets(SEXP array_sexp){ + Rf_error("Cannot call LargeListArray__raw_value_offsets(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // array.cpp -#if defined(ARROW_R_WITH_ARROW) -bool Array__Same(const std::shared_ptr& x, const std::shared_ptr& y); + #if defined(ARROW_R_WITH_ARROW) + bool Array__Same(const std::shared_ptr& x, const std::shared_ptr& y); extern "C" SEXP _arrow_Array__Same(SEXP x_sexp, SEXP y_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); @@ -577,30 +577,30 @@ BEGIN_CPP11 return cpp11::as_sexp(Array__Same(x, y)); END_CPP11 } -#else -extern "C" SEXP _arrow_Array__Same(SEXP x_sexp, SEXP y_sexp){ - Rf_error("Cannot call Array__Same(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Array__Same(SEXP x_sexp, SEXP y_sexp){ + Rf_error("Cannot call Array__Same(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // array_to_vector.cpp -#if defined(ARROW_R_WITH_ARROW) -SEXP Array__as_vector(const std::shared_ptr& array); + #if defined(ARROW_R_WITH_ARROW) + SEXP Array__as_vector(const std::shared_ptr& array); extern "C" SEXP _arrow_Array__as_vector(SEXP array_sexp){ BEGIN_CPP11 arrow::r::Input&>::type array(array_sexp); return cpp11::as_sexp(Array__as_vector(array)); END_CPP11 } -#else -extern "C" SEXP _arrow_Array__as_vector(SEXP array_sexp){ - Rf_error("Cannot call Array__as_vector(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Array__as_vector(SEXP array_sexp){ + Rf_error("Cannot call Array__as_vector(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // array_to_vector.cpp -#if defined(ARROW_R_WITH_ARROW) -SEXP ChunkedArray__as_vector(const std::shared_ptr& chunked_array, bool use_threads); + #if defined(ARROW_R_WITH_ARROW) + SEXP ChunkedArray__as_vector(const std::shared_ptr& chunked_array, bool use_threads); extern "C" SEXP _arrow_ChunkedArray__as_vector(SEXP chunked_array_sexp, SEXP use_threads_sexp){ BEGIN_CPP11 arrow::r::Input&>::type chunked_array(chunked_array_sexp); @@ -608,15 +608,15 @@ BEGIN_CPP11 return cpp11::as_sexp(ChunkedArray__as_vector(chunked_array, use_threads)); END_CPP11 } -#else -extern "C" SEXP _arrow_ChunkedArray__as_vector(SEXP chunked_array_sexp, SEXP use_threads_sexp){ - Rf_error("Cannot call ChunkedArray__as_vector(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ChunkedArray__as_vector(SEXP chunked_array_sexp, SEXP use_threads_sexp){ + Rf_error("Cannot call ChunkedArray__as_vector(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // array_to_vector.cpp -#if defined(ARROW_R_WITH_ARROW) -cpp11::writable::list RecordBatch__to_dataframe(const std::shared_ptr& batch, bool use_threads); + #if defined(ARROW_R_WITH_ARROW) + cpp11::writable::list RecordBatch__to_dataframe(const std::shared_ptr& batch, bool use_threads); extern "C" SEXP _arrow_RecordBatch__to_dataframe(SEXP batch_sexp, SEXP use_threads_sexp){ BEGIN_CPP11 arrow::r::Input&>::type batch(batch_sexp); @@ -624,15 +624,15 @@ BEGIN_CPP11 return cpp11::as_sexp(RecordBatch__to_dataframe(batch, use_threads)); END_CPP11 } -#else -extern "C" SEXP _arrow_RecordBatch__to_dataframe(SEXP batch_sexp, SEXP use_threads_sexp){ - Rf_error("Cannot call RecordBatch__to_dataframe(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_RecordBatch__to_dataframe(SEXP batch_sexp, SEXP use_threads_sexp){ + Rf_error("Cannot call RecordBatch__to_dataframe(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // array_to_vector.cpp -#if defined(ARROW_R_WITH_ARROW) -cpp11::writable::list Table__to_dataframe(const std::shared_ptr& table, bool use_threads); + #if defined(ARROW_R_WITH_ARROW) + cpp11::writable::list Table__to_dataframe(const std::shared_ptr& table, bool use_threads); extern "C" SEXP _arrow_Table__to_dataframe(SEXP table_sexp, SEXP use_threads_sexp){ BEGIN_CPP11 arrow::r::Input&>::type table(table_sexp); @@ -640,105 +640,105 @@ BEGIN_CPP11 return cpp11::as_sexp(Table__to_dataframe(table, use_threads)); END_CPP11 } -#else -extern "C" SEXP _arrow_Table__to_dataframe(SEXP table_sexp, SEXP use_threads_sexp){ - Rf_error("Cannot call Table__to_dataframe(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Table__to_dataframe(SEXP table_sexp, SEXP use_threads_sexp){ + Rf_error("Cannot call Table__to_dataframe(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // arraydata.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr ArrayData__get_type(const std::shared_ptr& x); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr ArrayData__get_type(const std::shared_ptr& x); extern "C" SEXP _arrow_ArrayData__get_type(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(ArrayData__get_type(x)); END_CPP11 } -#else -extern "C" SEXP _arrow_ArrayData__get_type(SEXP x_sexp){ - Rf_error("Cannot call ArrayData__get_type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ArrayData__get_type(SEXP x_sexp){ + Rf_error("Cannot call ArrayData__get_type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // arraydata.cpp -#if defined(ARROW_R_WITH_ARROW) -int ArrayData__get_length(const std::shared_ptr& x); + #if defined(ARROW_R_WITH_ARROW) + int ArrayData__get_length(const std::shared_ptr& x); extern "C" SEXP _arrow_ArrayData__get_length(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(ArrayData__get_length(x)); END_CPP11 } -#else -extern "C" SEXP _arrow_ArrayData__get_length(SEXP x_sexp){ - Rf_error("Cannot call ArrayData__get_length(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ArrayData__get_length(SEXP x_sexp){ + Rf_error("Cannot call ArrayData__get_length(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // arraydata.cpp -#if defined(ARROW_R_WITH_ARROW) -int ArrayData__get_null_count(const std::shared_ptr& x); + #if defined(ARROW_R_WITH_ARROW) + int ArrayData__get_null_count(const std::shared_ptr& x); extern "C" SEXP _arrow_ArrayData__get_null_count(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(ArrayData__get_null_count(x)); END_CPP11 } -#else -extern "C" SEXP _arrow_ArrayData__get_null_count(SEXP x_sexp){ - Rf_error("Cannot call ArrayData__get_null_count(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ArrayData__get_null_count(SEXP x_sexp){ + Rf_error("Cannot call ArrayData__get_null_count(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // arraydata.cpp -#if defined(ARROW_R_WITH_ARROW) -int ArrayData__get_offset(const std::shared_ptr& x); + #if defined(ARROW_R_WITH_ARROW) + int ArrayData__get_offset(const std::shared_ptr& x); extern "C" SEXP _arrow_ArrayData__get_offset(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(ArrayData__get_offset(x)); END_CPP11 } -#else -extern "C" SEXP _arrow_ArrayData__get_offset(SEXP x_sexp){ - Rf_error("Cannot call ArrayData__get_offset(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ArrayData__get_offset(SEXP x_sexp){ + Rf_error("Cannot call ArrayData__get_offset(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // arraydata.cpp -#if defined(ARROW_R_WITH_ARROW) -cpp11::list ArrayData__buffers(const std::shared_ptr& x); + #if defined(ARROW_R_WITH_ARROW) + cpp11::list ArrayData__buffers(const std::shared_ptr& x); extern "C" SEXP _arrow_ArrayData__buffers(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(ArrayData__buffers(x)); END_CPP11 } -#else -extern "C" SEXP _arrow_ArrayData__buffers(SEXP x_sexp){ - Rf_error("Cannot call ArrayData__buffers(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ArrayData__buffers(SEXP x_sexp){ + Rf_error("Cannot call ArrayData__buffers(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // buffer.cpp -#if defined(ARROW_R_WITH_ARROW) -bool Buffer__is_mutable(const std::shared_ptr& buffer); + #if defined(ARROW_R_WITH_ARROW) + bool Buffer__is_mutable(const std::shared_ptr& buffer); extern "C" SEXP _arrow_Buffer__is_mutable(SEXP buffer_sexp){ BEGIN_CPP11 arrow::r::Input&>::type buffer(buffer_sexp); return cpp11::as_sexp(Buffer__is_mutable(buffer)); END_CPP11 } -#else -extern "C" SEXP _arrow_Buffer__is_mutable(SEXP buffer_sexp){ - Rf_error("Cannot call Buffer__is_mutable(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Buffer__is_mutable(SEXP buffer_sexp){ + Rf_error("Cannot call Buffer__is_mutable(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // buffer.cpp -#if defined(ARROW_R_WITH_ARROW) -void Buffer__ZeroPadding(const std::shared_ptr& buffer); + #if defined(ARROW_R_WITH_ARROW) + void Buffer__ZeroPadding(const std::shared_ptr& buffer); extern "C" SEXP _arrow_Buffer__ZeroPadding(SEXP buffer_sexp){ BEGIN_CPP11 arrow::r::Input&>::type buffer(buffer_sexp); @@ -746,75 +746,75 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_Buffer__ZeroPadding(SEXP buffer_sexp){ - Rf_error("Cannot call Buffer__ZeroPadding(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Buffer__ZeroPadding(SEXP buffer_sexp){ + Rf_error("Cannot call Buffer__ZeroPadding(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // buffer.cpp -#if defined(ARROW_R_WITH_ARROW) -int64_t Buffer__capacity(const std::shared_ptr& buffer); + #if defined(ARROW_R_WITH_ARROW) + int64_t Buffer__capacity(const std::shared_ptr& buffer); extern "C" SEXP _arrow_Buffer__capacity(SEXP buffer_sexp){ BEGIN_CPP11 arrow::r::Input&>::type buffer(buffer_sexp); return cpp11::as_sexp(Buffer__capacity(buffer)); END_CPP11 } -#else -extern "C" SEXP _arrow_Buffer__capacity(SEXP buffer_sexp){ - Rf_error("Cannot call Buffer__capacity(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Buffer__capacity(SEXP buffer_sexp){ + Rf_error("Cannot call Buffer__capacity(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // buffer.cpp -#if defined(ARROW_R_WITH_ARROW) -int64_t Buffer__size(const std::shared_ptr& buffer); + #if defined(ARROW_R_WITH_ARROW) + int64_t Buffer__size(const std::shared_ptr& buffer); extern "C" SEXP _arrow_Buffer__size(SEXP buffer_sexp){ BEGIN_CPP11 arrow::r::Input&>::type buffer(buffer_sexp); return cpp11::as_sexp(Buffer__size(buffer)); END_CPP11 } -#else -extern "C" SEXP _arrow_Buffer__size(SEXP buffer_sexp){ - Rf_error("Cannot call Buffer__size(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Buffer__size(SEXP buffer_sexp){ + Rf_error("Cannot call Buffer__size(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // buffer.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr r___RBuffer__initialize(SEXP x); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr r___RBuffer__initialize(SEXP x); extern "C" SEXP _arrow_r___RBuffer__initialize(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input::type x(x_sexp); return cpp11::as_sexp(r___RBuffer__initialize(x)); END_CPP11 } -#else -extern "C" SEXP _arrow_r___RBuffer__initialize(SEXP x_sexp){ - Rf_error("Cannot call r___RBuffer__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_r___RBuffer__initialize(SEXP x_sexp){ + Rf_error("Cannot call r___RBuffer__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // buffer.cpp -#if defined(ARROW_R_WITH_ARROW) -cpp11::writable::raws Buffer__data(const std::shared_ptr& buffer); + #if defined(ARROW_R_WITH_ARROW) + cpp11::writable::raws Buffer__data(const std::shared_ptr& buffer); extern "C" SEXP _arrow_Buffer__data(SEXP buffer_sexp){ BEGIN_CPP11 arrow::r::Input&>::type buffer(buffer_sexp); return cpp11::as_sexp(Buffer__data(buffer)); END_CPP11 } -#else -extern "C" SEXP _arrow_Buffer__data(SEXP buffer_sexp){ - Rf_error("Cannot call Buffer__data(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Buffer__data(SEXP buffer_sexp){ + Rf_error("Cannot call Buffer__data(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // buffer.cpp -#if defined(ARROW_R_WITH_ARROW) -bool Buffer__Equals(const std::shared_ptr& x, const std::shared_ptr& y); + #if defined(ARROW_R_WITH_ARROW) + bool Buffer__Equals(const std::shared_ptr& x, const std::shared_ptr& y); extern "C" SEXP _arrow_Buffer__Equals(SEXP x_sexp, SEXP y_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); @@ -822,60 +822,60 @@ BEGIN_CPP11 return cpp11::as_sexp(Buffer__Equals(x, y)); END_CPP11 } -#else -extern "C" SEXP _arrow_Buffer__Equals(SEXP x_sexp, SEXP y_sexp){ - Rf_error("Cannot call Buffer__Equals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Buffer__Equals(SEXP x_sexp, SEXP y_sexp){ + Rf_error("Cannot call Buffer__Equals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // chunkedarray.cpp -#if defined(ARROW_R_WITH_ARROW) -int ChunkedArray__length(const std::shared_ptr& chunked_array); + #if defined(ARROW_R_WITH_ARROW) + int ChunkedArray__length(const std::shared_ptr& chunked_array); extern "C" SEXP _arrow_ChunkedArray__length(SEXP chunked_array_sexp){ BEGIN_CPP11 arrow::r::Input&>::type chunked_array(chunked_array_sexp); return cpp11::as_sexp(ChunkedArray__length(chunked_array)); END_CPP11 } -#else -extern "C" SEXP _arrow_ChunkedArray__length(SEXP chunked_array_sexp){ - Rf_error("Cannot call ChunkedArray__length(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ChunkedArray__length(SEXP chunked_array_sexp){ + Rf_error("Cannot call ChunkedArray__length(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // chunkedarray.cpp -#if defined(ARROW_R_WITH_ARROW) -int ChunkedArray__null_count(const std::shared_ptr& chunked_array); + #if defined(ARROW_R_WITH_ARROW) + int ChunkedArray__null_count(const std::shared_ptr& chunked_array); extern "C" SEXP _arrow_ChunkedArray__null_count(SEXP chunked_array_sexp){ BEGIN_CPP11 arrow::r::Input&>::type chunked_array(chunked_array_sexp); return cpp11::as_sexp(ChunkedArray__null_count(chunked_array)); END_CPP11 } -#else -extern "C" SEXP _arrow_ChunkedArray__null_count(SEXP chunked_array_sexp){ - Rf_error("Cannot call ChunkedArray__null_count(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ChunkedArray__null_count(SEXP chunked_array_sexp){ + Rf_error("Cannot call ChunkedArray__null_count(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // chunkedarray.cpp -#if defined(ARROW_R_WITH_ARROW) -int ChunkedArray__num_chunks(const std::shared_ptr& chunked_array); + #if defined(ARROW_R_WITH_ARROW) + int ChunkedArray__num_chunks(const std::shared_ptr& chunked_array); extern "C" SEXP _arrow_ChunkedArray__num_chunks(SEXP chunked_array_sexp){ BEGIN_CPP11 arrow::r::Input&>::type chunked_array(chunked_array_sexp); return cpp11::as_sexp(ChunkedArray__num_chunks(chunked_array)); END_CPP11 } -#else -extern "C" SEXP _arrow_ChunkedArray__num_chunks(SEXP chunked_array_sexp){ - Rf_error("Cannot call ChunkedArray__num_chunks(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ChunkedArray__num_chunks(SEXP chunked_array_sexp){ + Rf_error("Cannot call ChunkedArray__num_chunks(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // chunkedarray.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr ChunkedArray__chunk(const std::shared_ptr& chunked_array, int i); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr ChunkedArray__chunk(const std::shared_ptr& chunked_array, int i); extern "C" SEXP _arrow_ChunkedArray__chunk(SEXP chunked_array_sexp, SEXP i_sexp){ BEGIN_CPP11 arrow::r::Input&>::type chunked_array(chunked_array_sexp); @@ -883,45 +883,45 @@ BEGIN_CPP11 return cpp11::as_sexp(ChunkedArray__chunk(chunked_array, i)); END_CPP11 } -#else -extern "C" SEXP _arrow_ChunkedArray__chunk(SEXP chunked_array_sexp, SEXP i_sexp){ - Rf_error("Cannot call ChunkedArray__chunk(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ChunkedArray__chunk(SEXP chunked_array_sexp, SEXP i_sexp){ + Rf_error("Cannot call ChunkedArray__chunk(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // chunkedarray.cpp -#if defined(ARROW_R_WITH_ARROW) -cpp11::list ChunkedArray__chunks(const std::shared_ptr& chunked_array); + #if defined(ARROW_R_WITH_ARROW) + cpp11::list ChunkedArray__chunks(const std::shared_ptr& chunked_array); extern "C" SEXP _arrow_ChunkedArray__chunks(SEXP chunked_array_sexp){ BEGIN_CPP11 arrow::r::Input&>::type chunked_array(chunked_array_sexp); return cpp11::as_sexp(ChunkedArray__chunks(chunked_array)); END_CPP11 } -#else -extern "C" SEXP _arrow_ChunkedArray__chunks(SEXP chunked_array_sexp){ - Rf_error("Cannot call ChunkedArray__chunks(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ChunkedArray__chunks(SEXP chunked_array_sexp){ + Rf_error("Cannot call ChunkedArray__chunks(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // chunkedarray.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr ChunkedArray__type(const std::shared_ptr& chunked_array); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr ChunkedArray__type(const std::shared_ptr& chunked_array); extern "C" SEXP _arrow_ChunkedArray__type(SEXP chunked_array_sexp){ BEGIN_CPP11 arrow::r::Input&>::type chunked_array(chunked_array_sexp); return cpp11::as_sexp(ChunkedArray__type(chunked_array)); END_CPP11 } -#else -extern "C" SEXP _arrow_ChunkedArray__type(SEXP chunked_array_sexp){ - Rf_error("Cannot call ChunkedArray__type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ChunkedArray__type(SEXP chunked_array_sexp){ + Rf_error("Cannot call ChunkedArray__type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // chunkedarray.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr ChunkedArray__Slice1(const std::shared_ptr& chunked_array, R_xlen_t offset); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr ChunkedArray__Slice1(const std::shared_ptr& chunked_array, R_xlen_t offset); extern "C" SEXP _arrow_ChunkedArray__Slice1(SEXP chunked_array_sexp, SEXP offset_sexp){ BEGIN_CPP11 arrow::r::Input&>::type chunked_array(chunked_array_sexp); @@ -929,15 +929,15 @@ BEGIN_CPP11 return cpp11::as_sexp(ChunkedArray__Slice1(chunked_array, offset)); END_CPP11 } -#else -extern "C" SEXP _arrow_ChunkedArray__Slice1(SEXP chunked_array_sexp, SEXP offset_sexp){ - Rf_error("Cannot call ChunkedArray__Slice1(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ChunkedArray__Slice1(SEXP chunked_array_sexp, SEXP offset_sexp){ + Rf_error("Cannot call ChunkedArray__Slice1(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // chunkedarray.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr ChunkedArray__Slice2(const std::shared_ptr& chunked_array, R_xlen_t offset, R_xlen_t length); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr ChunkedArray__Slice2(const std::shared_ptr& chunked_array, R_xlen_t offset, R_xlen_t length); extern "C" SEXP _arrow_ChunkedArray__Slice2(SEXP chunked_array_sexp, SEXP offset_sexp, SEXP length_sexp){ BEGIN_CPP11 arrow::r::Input&>::type chunked_array(chunked_array_sexp); @@ -946,15 +946,15 @@ BEGIN_CPP11 return cpp11::as_sexp(ChunkedArray__Slice2(chunked_array, offset, length)); END_CPP11 } -#else -extern "C" SEXP _arrow_ChunkedArray__Slice2(SEXP chunked_array_sexp, SEXP offset_sexp, SEXP length_sexp){ - Rf_error("Cannot call ChunkedArray__Slice2(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ChunkedArray__Slice2(SEXP chunked_array_sexp, SEXP offset_sexp, SEXP length_sexp){ + Rf_error("Cannot call ChunkedArray__Slice2(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // chunkedarray.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr ChunkedArray__View(const std::shared_ptr& array, const std::shared_ptr& type); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr ChunkedArray__View(const std::shared_ptr& array, const std::shared_ptr& type); extern "C" SEXP _arrow_ChunkedArray__View(SEXP array_sexp, SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type array(array_sexp); @@ -962,15 +962,15 @@ BEGIN_CPP11 return cpp11::as_sexp(ChunkedArray__View(array, type)); END_CPP11 } -#else -extern "C" SEXP _arrow_ChunkedArray__View(SEXP array_sexp, SEXP type_sexp){ - Rf_error("Cannot call ChunkedArray__View(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ChunkedArray__View(SEXP array_sexp, SEXP type_sexp){ + Rf_error("Cannot call ChunkedArray__View(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // chunkedarray.cpp -#if defined(ARROW_R_WITH_ARROW) -void ChunkedArray__Validate(const std::shared_ptr& chunked_array); + #if defined(ARROW_R_WITH_ARROW) + void ChunkedArray__Validate(const std::shared_ptr& chunked_array); extern "C" SEXP _arrow_ChunkedArray__Validate(SEXP chunked_array_sexp){ BEGIN_CPP11 arrow::r::Input&>::type chunked_array(chunked_array_sexp); @@ -978,15 +978,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_ChunkedArray__Validate(SEXP chunked_array_sexp){ - Rf_error("Cannot call ChunkedArray__Validate(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ChunkedArray__Validate(SEXP chunked_array_sexp){ + Rf_error("Cannot call ChunkedArray__Validate(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // chunkedarray.cpp -#if defined(ARROW_R_WITH_ARROW) -bool ChunkedArray__Equals(const std::shared_ptr& x, const std::shared_ptr& y); + #if defined(ARROW_R_WITH_ARROW) + bool ChunkedArray__Equals(const std::shared_ptr& x, const std::shared_ptr& y); extern "C" SEXP _arrow_ChunkedArray__Equals(SEXP x_sexp, SEXP y_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); @@ -994,30 +994,30 @@ BEGIN_CPP11 return cpp11::as_sexp(ChunkedArray__Equals(x, y)); END_CPP11 } -#else -extern "C" SEXP _arrow_ChunkedArray__Equals(SEXP x_sexp, SEXP y_sexp){ - Rf_error("Cannot call ChunkedArray__Equals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ChunkedArray__Equals(SEXP x_sexp, SEXP y_sexp){ + Rf_error("Cannot call ChunkedArray__Equals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // chunkedarray.cpp -#if defined(ARROW_R_WITH_ARROW) -std::string ChunkedArray__ToString(const std::shared_ptr& x); + #if defined(ARROW_R_WITH_ARROW) + std::string ChunkedArray__ToString(const std::shared_ptr& x); extern "C" SEXP _arrow_ChunkedArray__ToString(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(ChunkedArray__ToString(x)); END_CPP11 } -#else -extern "C" SEXP _arrow_ChunkedArray__ToString(SEXP x_sexp){ - Rf_error("Cannot call ChunkedArray__ToString(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ChunkedArray__ToString(SEXP x_sexp){ + Rf_error("Cannot call ChunkedArray__ToString(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // chunkedarray.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr ChunkedArray__from_list(cpp11::list chunks, SEXP s_type); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr ChunkedArray__from_list(cpp11::list chunks, SEXP s_type); extern "C" SEXP _arrow_ChunkedArray__from_list(SEXP chunks_sexp, SEXP s_type_sexp){ BEGIN_CPP11 arrow::r::Input::type chunks(chunks_sexp); @@ -1025,15 +1025,15 @@ BEGIN_CPP11 return cpp11::as_sexp(ChunkedArray__from_list(chunks, s_type)); END_CPP11 } -#else -extern "C" SEXP _arrow_ChunkedArray__from_list(SEXP chunks_sexp, SEXP s_type_sexp){ - Rf_error("Cannot call ChunkedArray__from_list(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ChunkedArray__from_list(SEXP chunks_sexp, SEXP s_type_sexp){ + Rf_error("Cannot call ChunkedArray__from_list(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // compression.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr util___Codec__Create(arrow::Compression::type codec, R_xlen_t compression_level); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr util___Codec__Create(arrow::Compression::type codec, R_xlen_t compression_level); extern "C" SEXP _arrow_util___Codec__Create(SEXP codec_sexp, SEXP compression_level_sexp){ BEGIN_CPP11 arrow::r::Input::type codec(codec_sexp); @@ -1041,45 +1041,45 @@ BEGIN_CPP11 return cpp11::as_sexp(util___Codec__Create(codec, compression_level)); END_CPP11 } -#else -extern "C" SEXP _arrow_util___Codec__Create(SEXP codec_sexp, SEXP compression_level_sexp){ - Rf_error("Cannot call util___Codec__Create(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_util___Codec__Create(SEXP codec_sexp, SEXP compression_level_sexp){ + Rf_error("Cannot call util___Codec__Create(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // compression.cpp -#if defined(ARROW_R_WITH_ARROW) -std::string util___Codec__name(const std::shared_ptr& codec); + #if defined(ARROW_R_WITH_ARROW) + std::string util___Codec__name(const std::shared_ptr& codec); extern "C" SEXP _arrow_util___Codec__name(SEXP codec_sexp){ BEGIN_CPP11 arrow::r::Input&>::type codec(codec_sexp); return cpp11::as_sexp(util___Codec__name(codec)); END_CPP11 } -#else -extern "C" SEXP _arrow_util___Codec__name(SEXP codec_sexp){ - Rf_error("Cannot call util___Codec__name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_util___Codec__name(SEXP codec_sexp){ + Rf_error("Cannot call util___Codec__name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // compression.cpp -#if defined(ARROW_R_WITH_ARROW) -bool util___Codec__IsAvailable(arrow::Compression::type codec); + #if defined(ARROW_R_WITH_ARROW) + bool util___Codec__IsAvailable(arrow::Compression::type codec); extern "C" SEXP _arrow_util___Codec__IsAvailable(SEXP codec_sexp){ BEGIN_CPP11 arrow::r::Input::type codec(codec_sexp); return cpp11::as_sexp(util___Codec__IsAvailable(codec)); END_CPP11 } -#else -extern "C" SEXP _arrow_util___Codec__IsAvailable(SEXP codec_sexp){ - Rf_error("Cannot call util___Codec__IsAvailable(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_util___Codec__IsAvailable(SEXP codec_sexp){ + Rf_error("Cannot call util___Codec__IsAvailable(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // compression.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr io___CompressedOutputStream__Make(const std::shared_ptr& codec, const std::shared_ptr& raw); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr io___CompressedOutputStream__Make(const std::shared_ptr& codec, const std::shared_ptr& raw); extern "C" SEXP _arrow_io___CompressedOutputStream__Make(SEXP codec_sexp, SEXP raw_sexp){ BEGIN_CPP11 arrow::r::Input&>::type codec(codec_sexp); @@ -1087,15 +1087,15 @@ BEGIN_CPP11 return cpp11::as_sexp(io___CompressedOutputStream__Make(codec, raw)); END_CPP11 } -#else -extern "C" SEXP _arrow_io___CompressedOutputStream__Make(SEXP codec_sexp, SEXP raw_sexp){ - Rf_error("Cannot call io___CompressedOutputStream__Make(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_io___CompressedOutputStream__Make(SEXP codec_sexp, SEXP raw_sexp){ + Rf_error("Cannot call io___CompressedOutputStream__Make(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // compression.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr io___CompressedInputStream__Make(const std::shared_ptr& codec, const std::shared_ptr& raw); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr io___CompressedInputStream__Make(const std::shared_ptr& codec, const std::shared_ptr& raw); extern "C" SEXP _arrow_io___CompressedInputStream__Make(SEXP codec_sexp, SEXP raw_sexp){ BEGIN_CPP11 arrow::r::Input&>::type codec(codec_sexp); @@ -1103,30 +1103,30 @@ BEGIN_CPP11 return cpp11::as_sexp(io___CompressedInputStream__Make(codec, raw)); END_CPP11 } -#else -extern "C" SEXP _arrow_io___CompressedInputStream__Make(SEXP codec_sexp, SEXP raw_sexp){ - Rf_error("Cannot call io___CompressedInputStream__Make(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_io___CompressedInputStream__Make(SEXP codec_sexp, SEXP raw_sexp){ + Rf_error("Cannot call io___CompressedInputStream__Make(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // compute-exec.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr ExecPlan_create(bool use_threads); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr ExecPlan_create(bool use_threads); extern "C" SEXP _arrow_ExecPlan_create(SEXP use_threads_sexp){ BEGIN_CPP11 arrow::r::Input::type use_threads(use_threads_sexp); return cpp11::as_sexp(ExecPlan_create(use_threads)); END_CPP11 } -#else -extern "C" SEXP _arrow_ExecPlan_create(SEXP use_threads_sexp){ - Rf_error("Cannot call ExecPlan_create(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ExecPlan_create(SEXP use_threads_sexp){ + Rf_error("Cannot call ExecPlan_create(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // compute-exec.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr ExecPlan_run(const std::shared_ptr& plan, const std::shared_ptr& final_node, cpp11::list sort_options, int64_t head); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr ExecPlan_run(const std::shared_ptr& plan, const std::shared_ptr& final_node, cpp11::list sort_options, int64_t head); extern "C" SEXP _arrow_ExecPlan_run(SEXP plan_sexp, SEXP final_node_sexp, SEXP sort_options_sexp, SEXP head_sexp){ BEGIN_CPP11 arrow::r::Input&>::type plan(plan_sexp); @@ -1136,15 +1136,15 @@ BEGIN_CPP11 return cpp11::as_sexp(ExecPlan_run(plan, final_node, sort_options, head)); END_CPP11 } -#else -extern "C" SEXP _arrow_ExecPlan_run(SEXP plan_sexp, SEXP final_node_sexp, SEXP sort_options_sexp, SEXP head_sexp){ - Rf_error("Cannot call ExecPlan_run(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ExecPlan_run(SEXP plan_sexp, SEXP final_node_sexp, SEXP sort_options_sexp, SEXP head_sexp){ + Rf_error("Cannot call ExecPlan_run(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // compute-exec.cpp -#if defined(ARROW_R_WITH_ARROW) -void ExecPlan_StopProducing(const std::shared_ptr& plan); + #if defined(ARROW_R_WITH_ARROW) + void ExecPlan_StopProducing(const std::shared_ptr& plan); extern "C" SEXP _arrow_ExecPlan_StopProducing(SEXP plan_sexp){ BEGIN_CPP11 arrow::r::Input&>::type plan(plan_sexp); @@ -1152,30 +1152,30 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_ExecPlan_StopProducing(SEXP plan_sexp){ - Rf_error("Cannot call ExecPlan_StopProducing(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ExecPlan_StopProducing(SEXP plan_sexp){ + Rf_error("Cannot call ExecPlan_StopProducing(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // compute-exec.cpp -#if defined(ARROW_R_WITH_DATASET) -std::shared_ptr ExecNode_output_schema(const std::shared_ptr& node); + #if defined(ARROW_R_WITH_DATASET) + std::shared_ptr ExecNode_output_schema(const std::shared_ptr& node); extern "C" SEXP _arrow_ExecNode_output_schema(SEXP node_sexp){ BEGIN_CPP11 arrow::r::Input&>::type node(node_sexp); return cpp11::as_sexp(ExecNode_output_schema(node)); END_CPP11 } -#else -extern "C" SEXP _arrow_ExecNode_output_schema(SEXP node_sexp){ - Rf_error("Cannot call ExecNode_output_schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ExecNode_output_schema(SEXP node_sexp){ + Rf_error("Cannot call ExecNode_output_schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // compute-exec.cpp -#if defined(ARROW_R_WITH_DATASET) -std::shared_ptr ExecNode_Scan(const std::shared_ptr& plan, const std::shared_ptr& dataset, const std::shared_ptr& filter, std::vector materialized_field_names); + #if defined(ARROW_R_WITH_DATASET) + std::shared_ptr ExecNode_Scan(const std::shared_ptr& plan, const std::shared_ptr& dataset, const std::shared_ptr& filter, std::vector materialized_field_names); extern "C" SEXP _arrow_ExecNode_Scan(SEXP plan_sexp, SEXP dataset_sexp, SEXP filter_sexp, SEXP materialized_field_names_sexp){ BEGIN_CPP11 arrow::r::Input&>::type plan(plan_sexp); @@ -1185,15 +1185,15 @@ BEGIN_CPP11 return cpp11::as_sexp(ExecNode_Scan(plan, dataset, filter, materialized_field_names)); END_CPP11 } -#else -extern "C" SEXP _arrow_ExecNode_Scan(SEXP plan_sexp, SEXP dataset_sexp, SEXP filter_sexp, SEXP materialized_field_names_sexp){ - Rf_error("Cannot call ExecNode_Scan(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ExecNode_Scan(SEXP plan_sexp, SEXP dataset_sexp, SEXP filter_sexp, SEXP materialized_field_names_sexp){ + Rf_error("Cannot call ExecNode_Scan(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // compute-exec.cpp -#if defined(ARROW_R_WITH_DATASET) -std::shared_ptr ExecNode_Filter(const std::shared_ptr& input, const std::shared_ptr& filter); + #if defined(ARROW_R_WITH_DATASET) + std::shared_ptr ExecNode_Filter(const std::shared_ptr& input, const std::shared_ptr& filter); extern "C" SEXP _arrow_ExecNode_Filter(SEXP input_sexp, SEXP filter_sexp){ BEGIN_CPP11 arrow::r::Input&>::type input(input_sexp); @@ -1201,15 +1201,15 @@ BEGIN_CPP11 return cpp11::as_sexp(ExecNode_Filter(input, filter)); END_CPP11 } -#else -extern "C" SEXP _arrow_ExecNode_Filter(SEXP input_sexp, SEXP filter_sexp){ - Rf_error("Cannot call ExecNode_Filter(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ExecNode_Filter(SEXP input_sexp, SEXP filter_sexp){ + Rf_error("Cannot call ExecNode_Filter(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // compute-exec.cpp -#if defined(ARROW_R_WITH_DATASET) -std::shared_ptr ExecNode_Project(const std::shared_ptr& input, const std::vector>& exprs, std::vector names); + #if defined(ARROW_R_WITH_DATASET) + std::shared_ptr ExecNode_Project(const std::shared_ptr& input, const std::vector>& exprs, std::vector names); extern "C" SEXP _arrow_ExecNode_Project(SEXP input_sexp, SEXP exprs_sexp, SEXP names_sexp){ BEGIN_CPP11 arrow::r::Input&>::type input(input_sexp); @@ -1218,15 +1218,15 @@ BEGIN_CPP11 return cpp11::as_sexp(ExecNode_Project(input, exprs, names)); END_CPP11 } -#else -extern "C" SEXP _arrow_ExecNode_Project(SEXP input_sexp, SEXP exprs_sexp, SEXP names_sexp){ - Rf_error("Cannot call ExecNode_Project(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ExecNode_Project(SEXP input_sexp, SEXP exprs_sexp, SEXP names_sexp){ + Rf_error("Cannot call ExecNode_Project(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // compute-exec.cpp -#if defined(ARROW_R_WITH_DATASET) -std::shared_ptr ExecNode_Aggregate(const std::shared_ptr& input, cpp11::list options, std::vector target_names, std::vector out_field_names, std::vector key_names); + #if defined(ARROW_R_WITH_DATASET) + std::shared_ptr ExecNode_Aggregate(const std::shared_ptr& input, cpp11::list options, std::vector target_names, std::vector out_field_names, std::vector key_names); extern "C" SEXP _arrow_ExecNode_Aggregate(SEXP input_sexp, SEXP options_sexp, SEXP target_names_sexp, SEXP out_field_names_sexp, SEXP key_names_sexp){ BEGIN_CPP11 arrow::r::Input&>::type input(input_sexp); @@ -1237,15 +1237,15 @@ BEGIN_CPP11 return cpp11::as_sexp(ExecNode_Aggregate(input, options, target_names, out_field_names, key_names)); END_CPP11 } -#else -extern "C" SEXP _arrow_ExecNode_Aggregate(SEXP input_sexp, SEXP options_sexp, SEXP target_names_sexp, SEXP out_field_names_sexp, SEXP key_names_sexp){ - Rf_error("Cannot call ExecNode_Aggregate(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ExecNode_Aggregate(SEXP input_sexp, SEXP options_sexp, SEXP target_names_sexp, SEXP out_field_names_sexp, SEXP key_names_sexp){ + Rf_error("Cannot call ExecNode_Aggregate(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // compute-exec.cpp -#if defined(ARROW_R_WITH_DATASET) -std::shared_ptr ExecNode_Join(const std::shared_ptr& input, int type, const std::shared_ptr& right_data, std::vector left_keys, std::vector right_keys, std::vector left_output, std::vector right_output); + #if defined(ARROW_R_WITH_DATASET) + std::shared_ptr ExecNode_Join(const std::shared_ptr& input, int type, const std::shared_ptr& right_data, std::vector left_keys, std::vector right_keys, std::vector left_output, std::vector right_output); extern "C" SEXP _arrow_ExecNode_Join(SEXP input_sexp, SEXP type_sexp, SEXP right_data_sexp, SEXP left_keys_sexp, SEXP right_keys_sexp, SEXP left_output_sexp, SEXP right_output_sexp){ BEGIN_CPP11 arrow::r::Input&>::type input(input_sexp); @@ -1258,15 +1258,15 @@ BEGIN_CPP11 return cpp11::as_sexp(ExecNode_Join(input, type, right_data, left_keys, right_keys, left_output, right_output)); END_CPP11 } -#else -extern "C" SEXP _arrow_ExecNode_Join(SEXP input_sexp, SEXP type_sexp, SEXP right_data_sexp, SEXP left_keys_sexp, SEXP right_keys_sexp, SEXP left_output_sexp, SEXP right_output_sexp){ - Rf_error("Cannot call ExecNode_Join(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ExecNode_Join(SEXP input_sexp, SEXP type_sexp, SEXP right_data_sexp, SEXP left_keys_sexp, SEXP right_keys_sexp, SEXP left_output_sexp, SEXP right_output_sexp){ + Rf_error("Cannot call ExecNode_Join(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // compute-exec.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr ExecNode_ReadFromRecordBatchReader(const std::shared_ptr& plan, const std::shared_ptr& reader); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr ExecNode_ReadFromRecordBatchReader(const std::shared_ptr& plan, const std::shared_ptr& reader); extern "C" SEXP _arrow_ExecNode_ReadFromRecordBatchReader(SEXP plan_sexp, SEXP reader_sexp){ BEGIN_CPP11 arrow::r::Input&>::type plan(plan_sexp); @@ -1274,15 +1274,15 @@ BEGIN_CPP11 return cpp11::as_sexp(ExecNode_ReadFromRecordBatchReader(plan, reader)); END_CPP11 } -#else -extern "C" SEXP _arrow_ExecNode_ReadFromRecordBatchReader(SEXP plan_sexp, SEXP reader_sexp){ - Rf_error("Cannot call ExecNode_ReadFromRecordBatchReader(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ExecNode_ReadFromRecordBatchReader(SEXP plan_sexp, SEXP reader_sexp){ + Rf_error("Cannot call ExecNode_ReadFromRecordBatchReader(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // compute.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr RecordBatch__cast(const std::shared_ptr& batch, const std::shared_ptr& schema, cpp11::list options); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr RecordBatch__cast(const std::shared_ptr& batch, const std::shared_ptr& schema, cpp11::list options); extern "C" SEXP _arrow_RecordBatch__cast(SEXP batch_sexp, SEXP schema_sexp, SEXP options_sexp){ BEGIN_CPP11 arrow::r::Input&>::type batch(batch_sexp); @@ -1291,15 +1291,15 @@ BEGIN_CPP11 return cpp11::as_sexp(RecordBatch__cast(batch, schema, options)); END_CPP11 } -#else -extern "C" SEXP _arrow_RecordBatch__cast(SEXP batch_sexp, SEXP schema_sexp, SEXP options_sexp){ - Rf_error("Cannot call RecordBatch__cast(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_RecordBatch__cast(SEXP batch_sexp, SEXP schema_sexp, SEXP options_sexp){ + Rf_error("Cannot call RecordBatch__cast(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // compute.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Table__cast(const std::shared_ptr& table, const std::shared_ptr& schema, cpp11::list options); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr Table__cast(const std::shared_ptr& table, const std::shared_ptr& schema, cpp11::list options); extern "C" SEXP _arrow_Table__cast(SEXP table_sexp, SEXP schema_sexp, SEXP options_sexp){ BEGIN_CPP11 arrow::r::Input&>::type table(table_sexp); @@ -1308,15 +1308,15 @@ BEGIN_CPP11 return cpp11::as_sexp(Table__cast(table, schema, options)); END_CPP11 } -#else -extern "C" SEXP _arrow_Table__cast(SEXP table_sexp, SEXP schema_sexp, SEXP options_sexp){ - Rf_error("Cannot call Table__cast(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Table__cast(SEXP table_sexp, SEXP schema_sexp, SEXP options_sexp){ + Rf_error("Cannot call Table__cast(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // compute.cpp -#if defined(ARROW_R_WITH_ARROW) -SEXP compute__CallFunction(std::string func_name, cpp11::list args, cpp11::list options); + #if defined(ARROW_R_WITH_ARROW) + SEXP compute__CallFunction(std::string func_name, cpp11::list args, cpp11::list options); extern "C" SEXP _arrow_compute__CallFunction(SEXP func_name_sexp, SEXP args_sexp, SEXP options_sexp){ BEGIN_CPP11 arrow::r::Input::type func_name(func_name_sexp); @@ -1325,132 +1325,132 @@ BEGIN_CPP11 return cpp11::as_sexp(compute__CallFunction(func_name, args, options)); END_CPP11 } -#else -extern "C" SEXP _arrow_compute__CallFunction(SEXP func_name_sexp, SEXP args_sexp, SEXP options_sexp){ - Rf_error("Cannot call compute__CallFunction(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_compute__CallFunction(SEXP func_name_sexp, SEXP args_sexp, SEXP options_sexp){ + Rf_error("Cannot call compute__CallFunction(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // compute.cpp -#if defined(ARROW_R_WITH_ARROW) -std::vector compute__GetFunctionNames(); + #if defined(ARROW_R_WITH_ARROW) + std::vector compute__GetFunctionNames(); extern "C" SEXP _arrow_compute__GetFunctionNames(){ BEGIN_CPP11 return cpp11::as_sexp(compute__GetFunctionNames()); END_CPP11 } -#else -extern "C" SEXP _arrow_compute__GetFunctionNames(){ - Rf_error("Cannot call compute__GetFunctionNames(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_compute__GetFunctionNames(){ + Rf_error("Cannot call compute__GetFunctionNames(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // config.cpp -#if defined(ARROW_R_WITH_ARROW) -std::vector build_info(); + #if defined(ARROW_R_WITH_ARROW) + std::vector build_info(); extern "C" SEXP _arrow_build_info(){ BEGIN_CPP11 return cpp11::as_sexp(build_info()); END_CPP11 } -#else -extern "C" SEXP _arrow_build_info(){ - Rf_error("Cannot call build_info(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_build_info(){ + Rf_error("Cannot call build_info(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // config.cpp -#if defined(ARROW_R_WITH_ARROW) -std::vector runtime_info(); + #if defined(ARROW_R_WITH_ARROW) + std::vector runtime_info(); extern "C" SEXP _arrow_runtime_info(){ BEGIN_CPP11 return cpp11::as_sexp(runtime_info()); END_CPP11 } -#else -extern "C" SEXP _arrow_runtime_info(){ - Rf_error("Cannot call runtime_info(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_runtime_info(){ + Rf_error("Cannot call runtime_info(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // csv.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr csv___WriteOptions__initialize(cpp11::list options); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr csv___WriteOptions__initialize(cpp11::list options); extern "C" SEXP _arrow_csv___WriteOptions__initialize(SEXP options_sexp){ BEGIN_CPP11 arrow::r::Input::type options(options_sexp); return cpp11::as_sexp(csv___WriteOptions__initialize(options)); END_CPP11 } -#else -extern "C" SEXP _arrow_csv___WriteOptions__initialize(SEXP options_sexp){ - Rf_error("Cannot call csv___WriteOptions__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_csv___WriteOptions__initialize(SEXP options_sexp){ + Rf_error("Cannot call csv___WriteOptions__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // csv.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr csv___ReadOptions__initialize(cpp11::list options); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr csv___ReadOptions__initialize(cpp11::list options); extern "C" SEXP _arrow_csv___ReadOptions__initialize(SEXP options_sexp){ BEGIN_CPP11 arrow::r::Input::type options(options_sexp); return cpp11::as_sexp(csv___ReadOptions__initialize(options)); END_CPP11 } -#else -extern "C" SEXP _arrow_csv___ReadOptions__initialize(SEXP options_sexp){ - Rf_error("Cannot call csv___ReadOptions__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_csv___ReadOptions__initialize(SEXP options_sexp){ + Rf_error("Cannot call csv___ReadOptions__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // csv.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr csv___ParseOptions__initialize(cpp11::list options); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr csv___ParseOptions__initialize(cpp11::list options); extern "C" SEXP _arrow_csv___ParseOptions__initialize(SEXP options_sexp){ BEGIN_CPP11 arrow::r::Input::type options(options_sexp); return cpp11::as_sexp(csv___ParseOptions__initialize(options)); END_CPP11 } -#else -extern "C" SEXP _arrow_csv___ParseOptions__initialize(SEXP options_sexp){ - Rf_error("Cannot call csv___ParseOptions__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_csv___ParseOptions__initialize(SEXP options_sexp){ + Rf_error("Cannot call csv___ParseOptions__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // csv.cpp -#if defined(ARROW_R_WITH_ARROW) -SEXP csv___ReadOptions__column_names(const std::shared_ptr& options); + #if defined(ARROW_R_WITH_ARROW) + SEXP csv___ReadOptions__column_names(const std::shared_ptr& options); extern "C" SEXP _arrow_csv___ReadOptions__column_names(SEXP options_sexp){ BEGIN_CPP11 arrow::r::Input&>::type options(options_sexp); return cpp11::as_sexp(csv___ReadOptions__column_names(options)); END_CPP11 } -#else -extern "C" SEXP _arrow_csv___ReadOptions__column_names(SEXP options_sexp){ - Rf_error("Cannot call csv___ReadOptions__column_names(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_csv___ReadOptions__column_names(SEXP options_sexp){ + Rf_error("Cannot call csv___ReadOptions__column_names(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // csv.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr csv___ConvertOptions__initialize(cpp11::list options); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr csv___ConvertOptions__initialize(cpp11::list options); extern "C" SEXP _arrow_csv___ConvertOptions__initialize(SEXP options_sexp){ BEGIN_CPP11 arrow::r::Input::type options(options_sexp); return cpp11::as_sexp(csv___ConvertOptions__initialize(options)); END_CPP11 } -#else -extern "C" SEXP _arrow_csv___ConvertOptions__initialize(SEXP options_sexp){ - Rf_error("Cannot call csv___ConvertOptions__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_csv___ConvertOptions__initialize(SEXP options_sexp){ + Rf_error("Cannot call csv___ConvertOptions__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // csv.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr csv___TableReader__Make(const std::shared_ptr& input, const std::shared_ptr& read_options, const std::shared_ptr& parse_options, const std::shared_ptr& convert_options); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr csv___TableReader__Make(const std::shared_ptr& input, const std::shared_ptr& read_options, const std::shared_ptr& parse_options, const std::shared_ptr& convert_options); extern "C" SEXP _arrow_csv___TableReader__Make(SEXP input_sexp, SEXP read_options_sexp, SEXP parse_options_sexp, SEXP convert_options_sexp){ BEGIN_CPP11 arrow::r::Input&>::type input(input_sexp); @@ -1460,89 +1460,89 @@ BEGIN_CPP11 return cpp11::as_sexp(csv___TableReader__Make(input, read_options, parse_options, convert_options)); END_CPP11 } -#else -extern "C" SEXP _arrow_csv___TableReader__Make(SEXP input_sexp, SEXP read_options_sexp, SEXP parse_options_sexp, SEXP convert_options_sexp){ - Rf_error("Cannot call csv___TableReader__Make(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_csv___TableReader__Make(SEXP input_sexp, SEXP read_options_sexp, SEXP parse_options_sexp, SEXP convert_options_sexp){ + Rf_error("Cannot call csv___TableReader__Make(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // csv.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr csv___TableReader__Read(const std::shared_ptr& table_reader); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr csv___TableReader__Read(const std::shared_ptr& table_reader); extern "C" SEXP _arrow_csv___TableReader__Read(SEXP table_reader_sexp){ BEGIN_CPP11 arrow::r::Input&>::type table_reader(table_reader_sexp); return cpp11::as_sexp(csv___TableReader__Read(table_reader)); END_CPP11 } -#else -extern "C" SEXP _arrow_csv___TableReader__Read(SEXP table_reader_sexp){ - Rf_error("Cannot call csv___TableReader__Read(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_csv___TableReader__Read(SEXP table_reader_sexp){ + Rf_error("Cannot call csv___TableReader__Read(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // csv.cpp -#if defined(ARROW_R_WITH_ARROW) -std::string TimestampParser__kind(const std::shared_ptr& parser); + #if defined(ARROW_R_WITH_ARROW) + std::string TimestampParser__kind(const std::shared_ptr& parser); extern "C" SEXP _arrow_TimestampParser__kind(SEXP parser_sexp){ BEGIN_CPP11 arrow::r::Input&>::type parser(parser_sexp); return cpp11::as_sexp(TimestampParser__kind(parser)); END_CPP11 } -#else -extern "C" SEXP _arrow_TimestampParser__kind(SEXP parser_sexp){ - Rf_error("Cannot call TimestampParser__kind(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_TimestampParser__kind(SEXP parser_sexp){ + Rf_error("Cannot call TimestampParser__kind(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // csv.cpp -#if defined(ARROW_R_WITH_ARROW) -std::string TimestampParser__format(const std::shared_ptr& parser); + #if defined(ARROW_R_WITH_ARROW) + std::string TimestampParser__format(const std::shared_ptr& parser); extern "C" SEXP _arrow_TimestampParser__format(SEXP parser_sexp){ BEGIN_CPP11 arrow::r::Input&>::type parser(parser_sexp); return cpp11::as_sexp(TimestampParser__format(parser)); END_CPP11 } -#else -extern "C" SEXP _arrow_TimestampParser__format(SEXP parser_sexp){ - Rf_error("Cannot call TimestampParser__format(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_TimestampParser__format(SEXP parser_sexp){ + Rf_error("Cannot call TimestampParser__format(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // csv.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr TimestampParser__MakeStrptime(std::string format); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr TimestampParser__MakeStrptime(std::string format); extern "C" SEXP _arrow_TimestampParser__MakeStrptime(SEXP format_sexp){ BEGIN_CPP11 arrow::r::Input::type format(format_sexp); return cpp11::as_sexp(TimestampParser__MakeStrptime(format)); END_CPP11 } -#else -extern "C" SEXP _arrow_TimestampParser__MakeStrptime(SEXP format_sexp){ - Rf_error("Cannot call TimestampParser__MakeStrptime(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_TimestampParser__MakeStrptime(SEXP format_sexp){ + Rf_error("Cannot call TimestampParser__MakeStrptime(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // csv.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr TimestampParser__MakeISO8601(); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr TimestampParser__MakeISO8601(); extern "C" SEXP _arrow_TimestampParser__MakeISO8601(){ BEGIN_CPP11 return cpp11::as_sexp(TimestampParser__MakeISO8601()); END_CPP11 } -#else -extern "C" SEXP _arrow_TimestampParser__MakeISO8601(){ - Rf_error("Cannot call TimestampParser__MakeISO8601(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_TimestampParser__MakeISO8601(){ + Rf_error("Cannot call TimestampParser__MakeISO8601(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // csv.cpp -#if defined(ARROW_R_WITH_ARROW) -void csv___WriteCSV__Table(const std::shared_ptr& table, const std::shared_ptr& write_options, const std::shared_ptr& stream); + #if defined(ARROW_R_WITH_ARROW) + void csv___WriteCSV__Table(const std::shared_ptr& table, const std::shared_ptr& write_options, const std::shared_ptr& stream); extern "C" SEXP _arrow_csv___WriteCSV__Table(SEXP table_sexp, SEXP write_options_sexp, SEXP stream_sexp){ BEGIN_CPP11 arrow::r::Input&>::type table(table_sexp); @@ -1552,15 +1552,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_csv___WriteCSV__Table(SEXP table_sexp, SEXP write_options_sexp, SEXP stream_sexp){ - Rf_error("Cannot call csv___WriteCSV__Table(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_csv___WriteCSV__Table(SEXP table_sexp, SEXP write_options_sexp, SEXP stream_sexp){ + Rf_error("Cannot call csv___WriteCSV__Table(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // csv.cpp -#if defined(ARROW_R_WITH_ARROW) -void csv___WriteCSV__RecordBatch(const std::shared_ptr& record_batch, const std::shared_ptr& write_options, const std::shared_ptr& stream); + #if defined(ARROW_R_WITH_ARROW) + void csv___WriteCSV__RecordBatch(const std::shared_ptr& record_batch, const std::shared_ptr& write_options, const std::shared_ptr& stream); extern "C" SEXP _arrow_csv___WriteCSV__RecordBatch(SEXP record_batch_sexp, SEXP write_options_sexp, SEXP stream_sexp){ BEGIN_CPP11 arrow::r::Input&>::type record_batch(record_batch_sexp); @@ -1570,60 +1570,60 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_csv___WriteCSV__RecordBatch(SEXP record_batch_sexp, SEXP write_options_sexp, SEXP stream_sexp){ - Rf_error("Cannot call csv___WriteCSV__RecordBatch(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_csv___WriteCSV__RecordBatch(SEXP record_batch_sexp, SEXP write_options_sexp, SEXP stream_sexp){ + Rf_error("Cannot call csv___WriteCSV__RecordBatch(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -std::shared_ptr dataset___Dataset__NewScan(const std::shared_ptr& ds); + #if defined(ARROW_R_WITH_DATASET) + std::shared_ptr dataset___Dataset__NewScan(const std::shared_ptr& ds); extern "C" SEXP _arrow_dataset___Dataset__NewScan(SEXP ds_sexp){ BEGIN_CPP11 arrow::r::Input&>::type ds(ds_sexp); return cpp11::as_sexp(dataset___Dataset__NewScan(ds)); END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___Dataset__NewScan(SEXP ds_sexp){ - Rf_error("Cannot call dataset___Dataset__NewScan(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___Dataset__NewScan(SEXP ds_sexp){ + Rf_error("Cannot call dataset___Dataset__NewScan(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -std::shared_ptr dataset___Dataset__schema(const std::shared_ptr& dataset); + #if defined(ARROW_R_WITH_DATASET) + std::shared_ptr dataset___Dataset__schema(const std::shared_ptr& dataset); extern "C" SEXP _arrow_dataset___Dataset__schema(SEXP dataset_sexp){ BEGIN_CPP11 arrow::r::Input&>::type dataset(dataset_sexp); return cpp11::as_sexp(dataset___Dataset__schema(dataset)); END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___Dataset__schema(SEXP dataset_sexp){ - Rf_error("Cannot call dataset___Dataset__schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___Dataset__schema(SEXP dataset_sexp){ + Rf_error("Cannot call dataset___Dataset__schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -std::string dataset___Dataset__type_name(const std::shared_ptr& dataset); + #if defined(ARROW_R_WITH_DATASET) + std::string dataset___Dataset__type_name(const std::shared_ptr& dataset); extern "C" SEXP _arrow_dataset___Dataset__type_name(SEXP dataset_sexp){ BEGIN_CPP11 arrow::r::Input&>::type dataset(dataset_sexp); return cpp11::as_sexp(dataset___Dataset__type_name(dataset)); END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___Dataset__type_name(SEXP dataset_sexp){ - Rf_error("Cannot call dataset___Dataset__type_name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___Dataset__type_name(SEXP dataset_sexp){ + Rf_error("Cannot call dataset___Dataset__type_name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -std::shared_ptr dataset___Dataset__ReplaceSchema(const std::shared_ptr& dataset, const std::shared_ptr& schm); + #if defined(ARROW_R_WITH_DATASET) + std::shared_ptr dataset___Dataset__ReplaceSchema(const std::shared_ptr& dataset, const std::shared_ptr& schm); extern "C" SEXP _arrow_dataset___Dataset__ReplaceSchema(SEXP dataset_sexp, SEXP schm_sexp){ BEGIN_CPP11 arrow::r::Input&>::type dataset(dataset_sexp); @@ -1631,15 +1631,15 @@ BEGIN_CPP11 return cpp11::as_sexp(dataset___Dataset__ReplaceSchema(dataset, schm)); END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___Dataset__ReplaceSchema(SEXP dataset_sexp, SEXP schm_sexp){ - Rf_error("Cannot call dataset___Dataset__ReplaceSchema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___Dataset__ReplaceSchema(SEXP dataset_sexp, SEXP schm_sexp){ + Rf_error("Cannot call dataset___Dataset__ReplaceSchema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -std::shared_ptr dataset___UnionDataset__create(const ds::DatasetVector& datasets, const std::shared_ptr& schm); + #if defined(ARROW_R_WITH_DATASET) + std::shared_ptr dataset___UnionDataset__create(const ds::DatasetVector& datasets, const std::shared_ptr& schm); extern "C" SEXP _arrow_dataset___UnionDataset__create(SEXP datasets_sexp, SEXP schm_sexp){ BEGIN_CPP11 arrow::r::Input::type datasets(datasets_sexp); @@ -1647,90 +1647,90 @@ BEGIN_CPP11 return cpp11::as_sexp(dataset___UnionDataset__create(datasets, schm)); END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___UnionDataset__create(SEXP datasets_sexp, SEXP schm_sexp){ - Rf_error("Cannot call dataset___UnionDataset__create(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___UnionDataset__create(SEXP datasets_sexp, SEXP schm_sexp){ + Rf_error("Cannot call dataset___UnionDataset__create(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -std::shared_ptr dataset___InMemoryDataset__create(const std::shared_ptr& table); + #if defined(ARROW_R_WITH_DATASET) + std::shared_ptr dataset___InMemoryDataset__create(const std::shared_ptr& table); extern "C" SEXP _arrow_dataset___InMemoryDataset__create(SEXP table_sexp){ BEGIN_CPP11 arrow::r::Input&>::type table(table_sexp); return cpp11::as_sexp(dataset___InMemoryDataset__create(table)); END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___InMemoryDataset__create(SEXP table_sexp){ - Rf_error("Cannot call dataset___InMemoryDataset__create(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___InMemoryDataset__create(SEXP table_sexp){ + Rf_error("Cannot call dataset___InMemoryDataset__create(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -cpp11::list dataset___UnionDataset__children(const std::shared_ptr& ds); + #if defined(ARROW_R_WITH_DATASET) + cpp11::list dataset___UnionDataset__children(const std::shared_ptr& ds); extern "C" SEXP _arrow_dataset___UnionDataset__children(SEXP ds_sexp){ BEGIN_CPP11 arrow::r::Input&>::type ds(ds_sexp); return cpp11::as_sexp(dataset___UnionDataset__children(ds)); END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___UnionDataset__children(SEXP ds_sexp){ - Rf_error("Cannot call dataset___UnionDataset__children(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___UnionDataset__children(SEXP ds_sexp){ + Rf_error("Cannot call dataset___UnionDataset__children(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -std::shared_ptr dataset___FileSystemDataset__format(const std::shared_ptr& dataset); + #if defined(ARROW_R_WITH_DATASET) + std::shared_ptr dataset___FileSystemDataset__format(const std::shared_ptr& dataset); extern "C" SEXP _arrow_dataset___FileSystemDataset__format(SEXP dataset_sexp){ BEGIN_CPP11 arrow::r::Input&>::type dataset(dataset_sexp); return cpp11::as_sexp(dataset___FileSystemDataset__format(dataset)); END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___FileSystemDataset__format(SEXP dataset_sexp){ - Rf_error("Cannot call dataset___FileSystemDataset__format(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___FileSystemDataset__format(SEXP dataset_sexp){ + Rf_error("Cannot call dataset___FileSystemDataset__format(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -std::shared_ptr dataset___FileSystemDataset__filesystem(const std::shared_ptr& dataset); + #if defined(ARROW_R_WITH_DATASET) + std::shared_ptr dataset___FileSystemDataset__filesystem(const std::shared_ptr& dataset); extern "C" SEXP _arrow_dataset___FileSystemDataset__filesystem(SEXP dataset_sexp){ BEGIN_CPP11 arrow::r::Input&>::type dataset(dataset_sexp); return cpp11::as_sexp(dataset___FileSystemDataset__filesystem(dataset)); END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___FileSystemDataset__filesystem(SEXP dataset_sexp){ - Rf_error("Cannot call dataset___FileSystemDataset__filesystem(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___FileSystemDataset__filesystem(SEXP dataset_sexp){ + Rf_error("Cannot call dataset___FileSystemDataset__filesystem(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -std::vector dataset___FileSystemDataset__files(const std::shared_ptr& dataset); + #if defined(ARROW_R_WITH_DATASET) + std::vector dataset___FileSystemDataset__files(const std::shared_ptr& dataset); extern "C" SEXP _arrow_dataset___FileSystemDataset__files(SEXP dataset_sexp){ BEGIN_CPP11 arrow::r::Input&>::type dataset(dataset_sexp); return cpp11::as_sexp(dataset___FileSystemDataset__files(dataset)); END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___FileSystemDataset__files(SEXP dataset_sexp){ - Rf_error("Cannot call dataset___FileSystemDataset__files(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___FileSystemDataset__files(SEXP dataset_sexp){ + Rf_error("Cannot call dataset___FileSystemDataset__files(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -std::shared_ptr dataset___DatasetFactory__Finish1(const std::shared_ptr& factory, bool unify_schemas); + #if defined(ARROW_R_WITH_DATASET) + std::shared_ptr dataset___DatasetFactory__Finish1(const std::shared_ptr& factory, bool unify_schemas); extern "C" SEXP _arrow_dataset___DatasetFactory__Finish1(SEXP factory_sexp, SEXP unify_schemas_sexp){ BEGIN_CPP11 arrow::r::Input&>::type factory(factory_sexp); @@ -1738,15 +1738,15 @@ BEGIN_CPP11 return cpp11::as_sexp(dataset___DatasetFactory__Finish1(factory, unify_schemas)); END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___DatasetFactory__Finish1(SEXP factory_sexp, SEXP unify_schemas_sexp){ - Rf_error("Cannot call dataset___DatasetFactory__Finish1(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___DatasetFactory__Finish1(SEXP factory_sexp, SEXP unify_schemas_sexp){ + Rf_error("Cannot call dataset___DatasetFactory__Finish1(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -std::shared_ptr dataset___DatasetFactory__Finish2(const std::shared_ptr& factory, const std::shared_ptr& schema); + #if defined(ARROW_R_WITH_DATASET) + std::shared_ptr dataset___DatasetFactory__Finish2(const std::shared_ptr& factory, const std::shared_ptr& schema); extern "C" SEXP _arrow_dataset___DatasetFactory__Finish2(SEXP factory_sexp, SEXP schema_sexp){ BEGIN_CPP11 arrow::r::Input&>::type factory(factory_sexp); @@ -1754,15 +1754,15 @@ BEGIN_CPP11 return cpp11::as_sexp(dataset___DatasetFactory__Finish2(factory, schema)); END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___DatasetFactory__Finish2(SEXP factory_sexp, SEXP schema_sexp){ - Rf_error("Cannot call dataset___DatasetFactory__Finish2(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___DatasetFactory__Finish2(SEXP factory_sexp, SEXP schema_sexp){ + Rf_error("Cannot call dataset___DatasetFactory__Finish2(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -std::shared_ptr dataset___DatasetFactory__Inspect(const std::shared_ptr& factory, bool unify_schemas); + #if defined(ARROW_R_WITH_DATASET) + std::shared_ptr dataset___DatasetFactory__Inspect(const std::shared_ptr& factory, bool unify_schemas); extern "C" SEXP _arrow_dataset___DatasetFactory__Inspect(SEXP factory_sexp, SEXP unify_schemas_sexp){ BEGIN_CPP11 arrow::r::Input&>::type factory(factory_sexp); @@ -1770,30 +1770,30 @@ BEGIN_CPP11 return cpp11::as_sexp(dataset___DatasetFactory__Inspect(factory, unify_schemas)); END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___DatasetFactory__Inspect(SEXP factory_sexp, SEXP unify_schemas_sexp){ - Rf_error("Cannot call dataset___DatasetFactory__Inspect(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___DatasetFactory__Inspect(SEXP factory_sexp, SEXP unify_schemas_sexp){ + Rf_error("Cannot call dataset___DatasetFactory__Inspect(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -std::shared_ptr dataset___UnionDatasetFactory__Make(const std::vector>& children); + #if defined(ARROW_R_WITH_DATASET) + std::shared_ptr dataset___UnionDatasetFactory__Make(const std::vector>& children); extern "C" SEXP _arrow_dataset___UnionDatasetFactory__Make(SEXP children_sexp){ BEGIN_CPP11 arrow::r::Input>&>::type children(children_sexp); return cpp11::as_sexp(dataset___UnionDatasetFactory__Make(children)); END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___UnionDatasetFactory__Make(SEXP children_sexp){ - Rf_error("Cannot call dataset___UnionDatasetFactory__Make(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___UnionDatasetFactory__Make(SEXP children_sexp){ + Rf_error("Cannot call dataset___UnionDatasetFactory__Make(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -std::shared_ptr dataset___FileSystemDatasetFactory__Make0(const std::shared_ptr& fs, const std::vector& paths, const std::shared_ptr& format); + #if defined(ARROW_R_WITH_DATASET) + std::shared_ptr dataset___FileSystemDatasetFactory__Make0(const std::shared_ptr& fs, const std::vector& paths, const std::shared_ptr& format); extern "C" SEXP _arrow_dataset___FileSystemDatasetFactory__Make0(SEXP fs_sexp, SEXP paths_sexp, SEXP format_sexp){ BEGIN_CPP11 arrow::r::Input&>::type fs(fs_sexp); @@ -1802,15 +1802,15 @@ BEGIN_CPP11 return cpp11::as_sexp(dataset___FileSystemDatasetFactory__Make0(fs, paths, format)); END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___FileSystemDatasetFactory__Make0(SEXP fs_sexp, SEXP paths_sexp, SEXP format_sexp){ - Rf_error("Cannot call dataset___FileSystemDatasetFactory__Make0(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___FileSystemDatasetFactory__Make0(SEXP fs_sexp, SEXP paths_sexp, SEXP format_sexp){ + Rf_error("Cannot call dataset___FileSystemDatasetFactory__Make0(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -std::shared_ptr dataset___FileSystemDatasetFactory__Make2(const std::shared_ptr& fs, const std::shared_ptr& selector, const std::shared_ptr& format, const std::shared_ptr& partitioning); + #if defined(ARROW_R_WITH_DATASET) + std::shared_ptr dataset___FileSystemDatasetFactory__Make2(const std::shared_ptr& fs, const std::shared_ptr& selector, const std::shared_ptr& format, const std::shared_ptr& partitioning); extern "C" SEXP _arrow_dataset___FileSystemDatasetFactory__Make2(SEXP fs_sexp, SEXP selector_sexp, SEXP format_sexp, SEXP partitioning_sexp){ BEGIN_CPP11 arrow::r::Input&>::type fs(fs_sexp); @@ -1820,15 +1820,15 @@ BEGIN_CPP11 return cpp11::as_sexp(dataset___FileSystemDatasetFactory__Make2(fs, selector, format, partitioning)); END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___FileSystemDatasetFactory__Make2(SEXP fs_sexp, SEXP selector_sexp, SEXP format_sexp, SEXP partitioning_sexp){ - Rf_error("Cannot call dataset___FileSystemDatasetFactory__Make2(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___FileSystemDatasetFactory__Make2(SEXP fs_sexp, SEXP selector_sexp, SEXP format_sexp, SEXP partitioning_sexp){ + Rf_error("Cannot call dataset___FileSystemDatasetFactory__Make2(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -std::shared_ptr dataset___FileSystemDatasetFactory__Make1(const std::shared_ptr& fs, const std::shared_ptr& selector, const std::shared_ptr& format); + #if defined(ARROW_R_WITH_DATASET) + std::shared_ptr dataset___FileSystemDatasetFactory__Make1(const std::shared_ptr& fs, const std::shared_ptr& selector, const std::shared_ptr& format); extern "C" SEXP _arrow_dataset___FileSystemDatasetFactory__Make1(SEXP fs_sexp, SEXP selector_sexp, SEXP format_sexp){ BEGIN_CPP11 arrow::r::Input&>::type fs(fs_sexp); @@ -1837,15 +1837,15 @@ BEGIN_CPP11 return cpp11::as_sexp(dataset___FileSystemDatasetFactory__Make1(fs, selector, format)); END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___FileSystemDatasetFactory__Make1(SEXP fs_sexp, SEXP selector_sexp, SEXP format_sexp){ - Rf_error("Cannot call dataset___FileSystemDatasetFactory__Make1(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___FileSystemDatasetFactory__Make1(SEXP fs_sexp, SEXP selector_sexp, SEXP format_sexp){ + Rf_error("Cannot call dataset___FileSystemDatasetFactory__Make1(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -std::shared_ptr dataset___FileSystemDatasetFactory__Make3(const std::shared_ptr& fs, const std::shared_ptr& selector, const std::shared_ptr& format, const std::shared_ptr& factory); + #if defined(ARROW_R_WITH_DATASET) + std::shared_ptr dataset___FileSystemDatasetFactory__Make3(const std::shared_ptr& fs, const std::shared_ptr& selector, const std::shared_ptr& format, const std::shared_ptr& factory); extern "C" SEXP _arrow_dataset___FileSystemDatasetFactory__Make3(SEXP fs_sexp, SEXP selector_sexp, SEXP format_sexp, SEXP factory_sexp){ BEGIN_CPP11 arrow::r::Input&>::type fs(fs_sexp); @@ -1855,45 +1855,45 @@ BEGIN_CPP11 return cpp11::as_sexp(dataset___FileSystemDatasetFactory__Make3(fs, selector, format, factory)); END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___FileSystemDatasetFactory__Make3(SEXP fs_sexp, SEXP selector_sexp, SEXP format_sexp, SEXP factory_sexp){ - Rf_error("Cannot call dataset___FileSystemDatasetFactory__Make3(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___FileSystemDatasetFactory__Make3(SEXP fs_sexp, SEXP selector_sexp, SEXP format_sexp, SEXP factory_sexp){ + Rf_error("Cannot call dataset___FileSystemDatasetFactory__Make3(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -std::string dataset___FileFormat__type_name(const std::shared_ptr& format); + #if defined(ARROW_R_WITH_DATASET) + std::string dataset___FileFormat__type_name(const std::shared_ptr& format); extern "C" SEXP _arrow_dataset___FileFormat__type_name(SEXP format_sexp){ BEGIN_CPP11 arrow::r::Input&>::type format(format_sexp); return cpp11::as_sexp(dataset___FileFormat__type_name(format)); END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___FileFormat__type_name(SEXP format_sexp){ - Rf_error("Cannot call dataset___FileFormat__type_name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___FileFormat__type_name(SEXP format_sexp){ + Rf_error("Cannot call dataset___FileFormat__type_name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -std::shared_ptr dataset___FileFormat__DefaultWriteOptions(const std::shared_ptr& fmt); + #if defined(ARROW_R_WITH_DATASET) + std::shared_ptr dataset___FileFormat__DefaultWriteOptions(const std::shared_ptr& fmt); extern "C" SEXP _arrow_dataset___FileFormat__DefaultWriteOptions(SEXP fmt_sexp){ BEGIN_CPP11 arrow::r::Input&>::type fmt(fmt_sexp); return cpp11::as_sexp(dataset___FileFormat__DefaultWriteOptions(fmt)); END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___FileFormat__DefaultWriteOptions(SEXP fmt_sexp){ - Rf_error("Cannot call dataset___FileFormat__DefaultWriteOptions(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___FileFormat__DefaultWriteOptions(SEXP fmt_sexp){ + Rf_error("Cannot call dataset___FileFormat__DefaultWriteOptions(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -std::shared_ptr dataset___ParquetFileFormat__Make(const std::shared_ptr& options, cpp11::strings dict_columns); + #if defined(ARROW_R_WITH_DATASET) + std::shared_ptr dataset___ParquetFileFormat__Make(const std::shared_ptr& options, cpp11::strings dict_columns); extern "C" SEXP _arrow_dataset___ParquetFileFormat__Make(SEXP options_sexp, SEXP dict_columns_sexp){ BEGIN_CPP11 arrow::r::Input&>::type options(options_sexp); @@ -1901,30 +1901,30 @@ BEGIN_CPP11 return cpp11::as_sexp(dataset___ParquetFileFormat__Make(options, dict_columns)); END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___ParquetFileFormat__Make(SEXP options_sexp, SEXP dict_columns_sexp){ - Rf_error("Cannot call dataset___ParquetFileFormat__Make(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___ParquetFileFormat__Make(SEXP options_sexp, SEXP dict_columns_sexp){ + Rf_error("Cannot call dataset___ParquetFileFormat__Make(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -std::string dataset___FileWriteOptions__type_name(const std::shared_ptr& options); + #if defined(ARROW_R_WITH_DATASET) + std::string dataset___FileWriteOptions__type_name(const std::shared_ptr& options); extern "C" SEXP _arrow_dataset___FileWriteOptions__type_name(SEXP options_sexp){ BEGIN_CPP11 arrow::r::Input&>::type options(options_sexp); return cpp11::as_sexp(dataset___FileWriteOptions__type_name(options)); END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___FileWriteOptions__type_name(SEXP options_sexp){ - Rf_error("Cannot call dataset___FileWriteOptions__type_name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___FileWriteOptions__type_name(SEXP options_sexp){ + Rf_error("Cannot call dataset___FileWriteOptions__type_name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -void dataset___ParquetFileWriteOptions__update(const std::shared_ptr& options, const std::shared_ptr& writer_props, const std::shared_ptr& arrow_writer_props); + #if defined(ARROW_R_WITH_DATASET) + void dataset___ParquetFileWriteOptions__update(const std::shared_ptr& options, const std::shared_ptr& writer_props, const std::shared_ptr& arrow_writer_props); extern "C" SEXP _arrow_dataset___ParquetFileWriteOptions__update(SEXP options_sexp, SEXP writer_props_sexp, SEXP arrow_writer_props_sexp){ BEGIN_CPP11 arrow::r::Input&>::type options(options_sexp); @@ -1934,15 +1934,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___ParquetFileWriteOptions__update(SEXP options_sexp, SEXP writer_props_sexp, SEXP arrow_writer_props_sexp){ - Rf_error("Cannot call dataset___ParquetFileWriteOptions__update(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___ParquetFileWriteOptions__update(SEXP options_sexp, SEXP writer_props_sexp, SEXP arrow_writer_props_sexp){ + Rf_error("Cannot call dataset___ParquetFileWriteOptions__update(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -void dataset___IpcFileWriteOptions__update2(const std::shared_ptr& ipc_options, bool use_legacy_format, const std::shared_ptr& codec, arrow::ipc::MetadataVersion metadata_version); + #if defined(ARROW_R_WITH_DATASET) + void dataset___IpcFileWriteOptions__update2(const std::shared_ptr& ipc_options, bool use_legacy_format, const std::shared_ptr& codec, arrow::ipc::MetadataVersion metadata_version); extern "C" SEXP _arrow_dataset___IpcFileWriteOptions__update2(SEXP ipc_options_sexp, SEXP use_legacy_format_sexp, SEXP codec_sexp, SEXP metadata_version_sexp){ BEGIN_CPP11 arrow::r::Input&>::type ipc_options(ipc_options_sexp); @@ -1953,15 +1953,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___IpcFileWriteOptions__update2(SEXP ipc_options_sexp, SEXP use_legacy_format_sexp, SEXP codec_sexp, SEXP metadata_version_sexp){ - Rf_error("Cannot call dataset___IpcFileWriteOptions__update2(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___IpcFileWriteOptions__update2(SEXP ipc_options_sexp, SEXP use_legacy_format_sexp, SEXP codec_sexp, SEXP metadata_version_sexp){ + Rf_error("Cannot call dataset___IpcFileWriteOptions__update2(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -void dataset___IpcFileWriteOptions__update1(const std::shared_ptr& ipc_options, bool use_legacy_format, arrow::ipc::MetadataVersion metadata_version); + #if defined(ARROW_R_WITH_DATASET) + void dataset___IpcFileWriteOptions__update1(const std::shared_ptr& ipc_options, bool use_legacy_format, arrow::ipc::MetadataVersion metadata_version); extern "C" SEXP _arrow_dataset___IpcFileWriteOptions__update1(SEXP ipc_options_sexp, SEXP use_legacy_format_sexp, SEXP metadata_version_sexp){ BEGIN_CPP11 arrow::r::Input&>::type ipc_options(ipc_options_sexp); @@ -1971,15 +1971,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___IpcFileWriteOptions__update1(SEXP ipc_options_sexp, SEXP use_legacy_format_sexp, SEXP metadata_version_sexp){ - Rf_error("Cannot call dataset___IpcFileWriteOptions__update1(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___IpcFileWriteOptions__update1(SEXP ipc_options_sexp, SEXP use_legacy_format_sexp, SEXP metadata_version_sexp){ + Rf_error("Cannot call dataset___IpcFileWriteOptions__update1(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -void dataset___CsvFileWriteOptions__update(const std::shared_ptr& csv_options, const std::shared_ptr& write_options); + #if defined(ARROW_R_WITH_DATASET) + void dataset___CsvFileWriteOptions__update(const std::shared_ptr& csv_options, const std::shared_ptr& write_options); extern "C" SEXP _arrow_dataset___CsvFileWriteOptions__update(SEXP csv_options_sexp, SEXP write_options_sexp){ BEGIN_CPP11 arrow::r::Input&>::type csv_options(csv_options_sexp); @@ -1988,29 +1988,29 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___CsvFileWriteOptions__update(SEXP csv_options_sexp, SEXP write_options_sexp){ - Rf_error("Cannot call dataset___CsvFileWriteOptions__update(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___CsvFileWriteOptions__update(SEXP csv_options_sexp, SEXP write_options_sexp){ + Rf_error("Cannot call dataset___CsvFileWriteOptions__update(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -std::shared_ptr dataset___IpcFileFormat__Make(); + #if defined(ARROW_R_WITH_DATASET) + std::shared_ptr dataset___IpcFileFormat__Make(); extern "C" SEXP _arrow_dataset___IpcFileFormat__Make(){ BEGIN_CPP11 return cpp11::as_sexp(dataset___IpcFileFormat__Make()); END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___IpcFileFormat__Make(){ - Rf_error("Cannot call dataset___IpcFileFormat__Make(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___IpcFileFormat__Make(){ + Rf_error("Cannot call dataset___IpcFileFormat__Make(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -std::shared_ptr dataset___CsvFileFormat__Make(const std::shared_ptr& parse_options, const std::shared_ptr& convert_options, const std::shared_ptr& read_options); + #if defined(ARROW_R_WITH_DATASET) + std::shared_ptr dataset___CsvFileFormat__Make(const std::shared_ptr& parse_options, const std::shared_ptr& convert_options, const std::shared_ptr& read_options); extern "C" SEXP _arrow_dataset___CsvFileFormat__Make(SEXP parse_options_sexp, SEXP convert_options_sexp, SEXP read_options_sexp){ BEGIN_CPP11 arrow::r::Input&>::type parse_options(parse_options_sexp); @@ -2019,30 +2019,30 @@ BEGIN_CPP11 return cpp11::as_sexp(dataset___CsvFileFormat__Make(parse_options, convert_options, read_options)); END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___CsvFileFormat__Make(SEXP parse_options_sexp, SEXP convert_options_sexp, SEXP read_options_sexp){ - Rf_error("Cannot call dataset___CsvFileFormat__Make(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___CsvFileFormat__Make(SEXP parse_options_sexp, SEXP convert_options_sexp, SEXP read_options_sexp){ + Rf_error("Cannot call dataset___CsvFileFormat__Make(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -std::string dataset___FragmentScanOptions__type_name(const std::shared_ptr& fragment_scan_options); + #if defined(ARROW_R_WITH_DATASET) + std::string dataset___FragmentScanOptions__type_name(const std::shared_ptr& fragment_scan_options); extern "C" SEXP _arrow_dataset___FragmentScanOptions__type_name(SEXP fragment_scan_options_sexp){ BEGIN_CPP11 arrow::r::Input&>::type fragment_scan_options(fragment_scan_options_sexp); return cpp11::as_sexp(dataset___FragmentScanOptions__type_name(fragment_scan_options)); END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___FragmentScanOptions__type_name(SEXP fragment_scan_options_sexp){ - Rf_error("Cannot call dataset___FragmentScanOptions__type_name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___FragmentScanOptions__type_name(SEXP fragment_scan_options_sexp){ + Rf_error("Cannot call dataset___FragmentScanOptions__type_name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -std::shared_ptr dataset___CsvFragmentScanOptions__Make(const std::shared_ptr& convert_options, const std::shared_ptr& read_options); + #if defined(ARROW_R_WITH_DATASET) + std::shared_ptr dataset___CsvFragmentScanOptions__Make(const std::shared_ptr& convert_options, const std::shared_ptr& read_options); extern "C" SEXP _arrow_dataset___CsvFragmentScanOptions__Make(SEXP convert_options_sexp, SEXP read_options_sexp){ BEGIN_CPP11 arrow::r::Input&>::type convert_options(convert_options_sexp); @@ -2050,15 +2050,15 @@ BEGIN_CPP11 return cpp11::as_sexp(dataset___CsvFragmentScanOptions__Make(convert_options, read_options)); END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___CsvFragmentScanOptions__Make(SEXP convert_options_sexp, SEXP read_options_sexp){ - Rf_error("Cannot call dataset___CsvFragmentScanOptions__Make(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___CsvFragmentScanOptions__Make(SEXP convert_options_sexp, SEXP read_options_sexp){ + Rf_error("Cannot call dataset___CsvFragmentScanOptions__Make(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -std::shared_ptr dataset___ParquetFragmentScanOptions__Make(bool use_buffered_stream, int64_t buffer_size, bool pre_buffer); + #if defined(ARROW_R_WITH_DATASET) + std::shared_ptr dataset___ParquetFragmentScanOptions__Make(bool use_buffered_stream, int64_t buffer_size, bool pre_buffer); extern "C" SEXP _arrow_dataset___ParquetFragmentScanOptions__Make(SEXP use_buffered_stream_sexp, SEXP buffer_size_sexp, SEXP pre_buffer_sexp){ BEGIN_CPP11 arrow::r::Input::type use_buffered_stream(use_buffered_stream_sexp); @@ -2067,15 +2067,15 @@ BEGIN_CPP11 return cpp11::as_sexp(dataset___ParquetFragmentScanOptions__Make(use_buffered_stream, buffer_size, pre_buffer)); END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___ParquetFragmentScanOptions__Make(SEXP use_buffered_stream_sexp, SEXP buffer_size_sexp, SEXP pre_buffer_sexp){ - Rf_error("Cannot call dataset___ParquetFragmentScanOptions__Make(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___ParquetFragmentScanOptions__Make(SEXP use_buffered_stream_sexp, SEXP buffer_size_sexp, SEXP pre_buffer_sexp){ + Rf_error("Cannot call dataset___ParquetFragmentScanOptions__Make(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -std::shared_ptr dataset___DirectoryPartitioning(const std::shared_ptr& schm, const std::string& segment_encoding); + #if defined(ARROW_R_WITH_DATASET) + std::shared_ptr dataset___DirectoryPartitioning(const std::shared_ptr& schm, const std::string& segment_encoding); extern "C" SEXP _arrow_dataset___DirectoryPartitioning(SEXP schm_sexp, SEXP segment_encoding_sexp){ BEGIN_CPP11 arrow::r::Input&>::type schm(schm_sexp); @@ -2083,15 +2083,15 @@ BEGIN_CPP11 return cpp11::as_sexp(dataset___DirectoryPartitioning(schm, segment_encoding)); END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___DirectoryPartitioning(SEXP schm_sexp, SEXP segment_encoding_sexp){ - Rf_error("Cannot call dataset___DirectoryPartitioning(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___DirectoryPartitioning(SEXP schm_sexp, SEXP segment_encoding_sexp){ + Rf_error("Cannot call dataset___DirectoryPartitioning(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -std::shared_ptr dataset___DirectoryPartitioning__MakeFactory(const std::vector& field_names, const std::string& segment_encoding); + #if defined(ARROW_R_WITH_DATASET) + std::shared_ptr dataset___DirectoryPartitioning__MakeFactory(const std::vector& field_names, const std::string& segment_encoding); extern "C" SEXP _arrow_dataset___DirectoryPartitioning__MakeFactory(SEXP field_names_sexp, SEXP segment_encoding_sexp){ BEGIN_CPP11 arrow::r::Input&>::type field_names(field_names_sexp); @@ -2099,15 +2099,15 @@ BEGIN_CPP11 return cpp11::as_sexp(dataset___DirectoryPartitioning__MakeFactory(field_names, segment_encoding)); END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___DirectoryPartitioning__MakeFactory(SEXP field_names_sexp, SEXP segment_encoding_sexp){ - Rf_error("Cannot call dataset___DirectoryPartitioning__MakeFactory(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___DirectoryPartitioning__MakeFactory(SEXP field_names_sexp, SEXP segment_encoding_sexp){ + Rf_error("Cannot call dataset___DirectoryPartitioning__MakeFactory(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -std::shared_ptr dataset___HivePartitioning(const std::shared_ptr& schm, const std::string& null_fallback, const std::string& segment_encoding); + #if defined(ARROW_R_WITH_DATASET) + std::shared_ptr dataset___HivePartitioning(const std::shared_ptr& schm, const std::string& null_fallback, const std::string& segment_encoding); extern "C" SEXP _arrow_dataset___HivePartitioning(SEXP schm_sexp, SEXP null_fallback_sexp, SEXP segment_encoding_sexp){ BEGIN_CPP11 arrow::r::Input&>::type schm(schm_sexp); @@ -2116,15 +2116,15 @@ BEGIN_CPP11 return cpp11::as_sexp(dataset___HivePartitioning(schm, null_fallback, segment_encoding)); END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___HivePartitioning(SEXP schm_sexp, SEXP null_fallback_sexp, SEXP segment_encoding_sexp){ - Rf_error("Cannot call dataset___HivePartitioning(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___HivePartitioning(SEXP schm_sexp, SEXP null_fallback_sexp, SEXP segment_encoding_sexp){ + Rf_error("Cannot call dataset___HivePartitioning(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -std::shared_ptr dataset___HivePartitioning__MakeFactory(const std::string& null_fallback, const std::string& segment_encoding); + #if defined(ARROW_R_WITH_DATASET) + std::shared_ptr dataset___HivePartitioning__MakeFactory(const std::string& null_fallback, const std::string& segment_encoding); extern "C" SEXP _arrow_dataset___HivePartitioning__MakeFactory(SEXP null_fallback_sexp, SEXP segment_encoding_sexp){ BEGIN_CPP11 arrow::r::Input::type null_fallback(null_fallback_sexp); @@ -2132,15 +2132,15 @@ BEGIN_CPP11 return cpp11::as_sexp(dataset___HivePartitioning__MakeFactory(null_fallback, segment_encoding)); END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___HivePartitioning__MakeFactory(SEXP null_fallback_sexp, SEXP segment_encoding_sexp){ - Rf_error("Cannot call dataset___HivePartitioning__MakeFactory(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___HivePartitioning__MakeFactory(SEXP null_fallback_sexp, SEXP segment_encoding_sexp){ + Rf_error("Cannot call dataset___HivePartitioning__MakeFactory(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -void dataset___ScannerBuilder__ProjectNames(const std::shared_ptr& sb, const std::vector& cols); + #if defined(ARROW_R_WITH_DATASET) + void dataset___ScannerBuilder__ProjectNames(const std::shared_ptr& sb, const std::vector& cols); extern "C" SEXP _arrow_dataset___ScannerBuilder__ProjectNames(SEXP sb_sexp, SEXP cols_sexp){ BEGIN_CPP11 arrow::r::Input&>::type sb(sb_sexp); @@ -2149,15 +2149,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___ScannerBuilder__ProjectNames(SEXP sb_sexp, SEXP cols_sexp){ - Rf_error("Cannot call dataset___ScannerBuilder__ProjectNames(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___ScannerBuilder__ProjectNames(SEXP sb_sexp, SEXP cols_sexp){ + Rf_error("Cannot call dataset___ScannerBuilder__ProjectNames(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -void dataset___ScannerBuilder__ProjectExprs(const std::shared_ptr& sb, const std::vector>& exprs, const std::vector& names); + #if defined(ARROW_R_WITH_DATASET) + void dataset___ScannerBuilder__ProjectExprs(const std::shared_ptr& sb, const std::vector>& exprs, const std::vector& names); extern "C" SEXP _arrow_dataset___ScannerBuilder__ProjectExprs(SEXP sb_sexp, SEXP exprs_sexp, SEXP names_sexp){ BEGIN_CPP11 arrow::r::Input&>::type sb(sb_sexp); @@ -2167,15 +2167,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___ScannerBuilder__ProjectExprs(SEXP sb_sexp, SEXP exprs_sexp, SEXP names_sexp){ - Rf_error("Cannot call dataset___ScannerBuilder__ProjectExprs(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___ScannerBuilder__ProjectExprs(SEXP sb_sexp, SEXP exprs_sexp, SEXP names_sexp){ + Rf_error("Cannot call dataset___ScannerBuilder__ProjectExprs(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -void dataset___ScannerBuilder__Filter(const std::shared_ptr& sb, const std::shared_ptr& expr); + #if defined(ARROW_R_WITH_DATASET) + void dataset___ScannerBuilder__Filter(const std::shared_ptr& sb, const std::shared_ptr& expr); extern "C" SEXP _arrow_dataset___ScannerBuilder__Filter(SEXP sb_sexp, SEXP expr_sexp){ BEGIN_CPP11 arrow::r::Input&>::type sb(sb_sexp); @@ -2184,15 +2184,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___ScannerBuilder__Filter(SEXP sb_sexp, SEXP expr_sexp){ - Rf_error("Cannot call dataset___ScannerBuilder__Filter(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___ScannerBuilder__Filter(SEXP sb_sexp, SEXP expr_sexp){ + Rf_error("Cannot call dataset___ScannerBuilder__Filter(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -void dataset___ScannerBuilder__UseThreads(const std::shared_ptr& sb, bool threads); + #if defined(ARROW_R_WITH_DATASET) + void dataset___ScannerBuilder__UseThreads(const std::shared_ptr& sb, bool threads); extern "C" SEXP _arrow_dataset___ScannerBuilder__UseThreads(SEXP sb_sexp, SEXP threads_sexp){ BEGIN_CPP11 arrow::r::Input&>::type sb(sb_sexp); @@ -2201,15 +2201,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___ScannerBuilder__UseThreads(SEXP sb_sexp, SEXP threads_sexp){ - Rf_error("Cannot call dataset___ScannerBuilder__UseThreads(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___ScannerBuilder__UseThreads(SEXP sb_sexp, SEXP threads_sexp){ + Rf_error("Cannot call dataset___ScannerBuilder__UseThreads(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -void dataset___ScannerBuilder__UseAsync(const std::shared_ptr& sb, bool use_async); + #if defined(ARROW_R_WITH_DATASET) + void dataset___ScannerBuilder__UseAsync(const std::shared_ptr& sb, bool use_async); extern "C" SEXP _arrow_dataset___ScannerBuilder__UseAsync(SEXP sb_sexp, SEXP use_async_sexp){ BEGIN_CPP11 arrow::r::Input&>::type sb(sb_sexp); @@ -2218,15 +2218,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___ScannerBuilder__UseAsync(SEXP sb_sexp, SEXP use_async_sexp){ - Rf_error("Cannot call dataset___ScannerBuilder__UseAsync(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___ScannerBuilder__UseAsync(SEXP sb_sexp, SEXP use_async_sexp){ + Rf_error("Cannot call dataset___ScannerBuilder__UseAsync(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -void dataset___ScannerBuilder__BatchSize(const std::shared_ptr& sb, int64_t batch_size); + #if defined(ARROW_R_WITH_DATASET) + void dataset___ScannerBuilder__BatchSize(const std::shared_ptr& sb, int64_t batch_size); extern "C" SEXP _arrow_dataset___ScannerBuilder__BatchSize(SEXP sb_sexp, SEXP batch_size_sexp){ BEGIN_CPP11 arrow::r::Input&>::type sb(sb_sexp); @@ -2235,15 +2235,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___ScannerBuilder__BatchSize(SEXP sb_sexp, SEXP batch_size_sexp){ - Rf_error("Cannot call dataset___ScannerBuilder__BatchSize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___ScannerBuilder__BatchSize(SEXP sb_sexp, SEXP batch_size_sexp){ + Rf_error("Cannot call dataset___ScannerBuilder__BatchSize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -void dataset___ScannerBuilder__FragmentScanOptions(const std::shared_ptr& sb, const std::shared_ptr& options); + #if defined(ARROW_R_WITH_DATASET) + void dataset___ScannerBuilder__FragmentScanOptions(const std::shared_ptr& sb, const std::shared_ptr& options); extern "C" SEXP _arrow_dataset___ScannerBuilder__FragmentScanOptions(SEXP sb_sexp, SEXP options_sexp){ BEGIN_CPP11 arrow::r::Input&>::type sb(sb_sexp); @@ -2252,105 +2252,105 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___ScannerBuilder__FragmentScanOptions(SEXP sb_sexp, SEXP options_sexp){ - Rf_error("Cannot call dataset___ScannerBuilder__FragmentScanOptions(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___ScannerBuilder__FragmentScanOptions(SEXP sb_sexp, SEXP options_sexp){ + Rf_error("Cannot call dataset___ScannerBuilder__FragmentScanOptions(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -std::shared_ptr dataset___ScannerBuilder__schema(const std::shared_ptr& sb); + #if defined(ARROW_R_WITH_DATASET) + std::shared_ptr dataset___ScannerBuilder__schema(const std::shared_ptr& sb); extern "C" SEXP _arrow_dataset___ScannerBuilder__schema(SEXP sb_sexp){ BEGIN_CPP11 arrow::r::Input&>::type sb(sb_sexp); return cpp11::as_sexp(dataset___ScannerBuilder__schema(sb)); END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___ScannerBuilder__schema(SEXP sb_sexp){ - Rf_error("Cannot call dataset___ScannerBuilder__schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___ScannerBuilder__schema(SEXP sb_sexp){ + Rf_error("Cannot call dataset___ScannerBuilder__schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -std::shared_ptr dataset___ScannerBuilder__Finish(const std::shared_ptr& sb); + #if defined(ARROW_R_WITH_DATASET) + std::shared_ptr dataset___ScannerBuilder__Finish(const std::shared_ptr& sb); extern "C" SEXP _arrow_dataset___ScannerBuilder__Finish(SEXP sb_sexp){ BEGIN_CPP11 arrow::r::Input&>::type sb(sb_sexp); return cpp11::as_sexp(dataset___ScannerBuilder__Finish(sb)); END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___ScannerBuilder__Finish(SEXP sb_sexp){ - Rf_error("Cannot call dataset___ScannerBuilder__Finish(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___ScannerBuilder__Finish(SEXP sb_sexp){ + Rf_error("Cannot call dataset___ScannerBuilder__Finish(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -std::shared_ptr dataset___ScannerBuilder__FromRecordBatchReader(const std::shared_ptr& reader); + #if defined(ARROW_R_WITH_DATASET) + std::shared_ptr dataset___ScannerBuilder__FromRecordBatchReader(const std::shared_ptr& reader); extern "C" SEXP _arrow_dataset___ScannerBuilder__FromRecordBatchReader(SEXP reader_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); return cpp11::as_sexp(dataset___ScannerBuilder__FromRecordBatchReader(reader)); END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___ScannerBuilder__FromRecordBatchReader(SEXP reader_sexp){ - Rf_error("Cannot call dataset___ScannerBuilder__FromRecordBatchReader(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___ScannerBuilder__FromRecordBatchReader(SEXP reader_sexp){ + Rf_error("Cannot call dataset___ScannerBuilder__FromRecordBatchReader(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -std::shared_ptr dataset___Scanner__ToTable(const std::shared_ptr& scanner); + #if defined(ARROW_R_WITH_DATASET) + std::shared_ptr dataset___Scanner__ToTable(const std::shared_ptr& scanner); extern "C" SEXP _arrow_dataset___Scanner__ToTable(SEXP scanner_sexp){ BEGIN_CPP11 arrow::r::Input&>::type scanner(scanner_sexp); return cpp11::as_sexp(dataset___Scanner__ToTable(scanner)); END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___Scanner__ToTable(SEXP scanner_sexp){ - Rf_error("Cannot call dataset___Scanner__ToTable(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___Scanner__ToTable(SEXP scanner_sexp){ + Rf_error("Cannot call dataset___Scanner__ToTable(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -cpp11::list dataset___Scanner__ScanBatches(const std::shared_ptr& scanner); + #if defined(ARROW_R_WITH_DATASET) + cpp11::list dataset___Scanner__ScanBatches(const std::shared_ptr& scanner); extern "C" SEXP _arrow_dataset___Scanner__ScanBatches(SEXP scanner_sexp){ BEGIN_CPP11 arrow::r::Input&>::type scanner(scanner_sexp); return cpp11::as_sexp(dataset___Scanner__ScanBatches(scanner)); END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___Scanner__ScanBatches(SEXP scanner_sexp){ - Rf_error("Cannot call dataset___Scanner__ScanBatches(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___Scanner__ScanBatches(SEXP scanner_sexp){ + Rf_error("Cannot call dataset___Scanner__ScanBatches(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -std::shared_ptr dataset___Scanner__ToRecordBatchReader(const std::shared_ptr& scanner); + #if defined(ARROW_R_WITH_DATASET) + std::shared_ptr dataset___Scanner__ToRecordBatchReader(const std::shared_ptr& scanner); extern "C" SEXP _arrow_dataset___Scanner__ToRecordBatchReader(SEXP scanner_sexp){ BEGIN_CPP11 arrow::r::Input&>::type scanner(scanner_sexp); return cpp11::as_sexp(dataset___Scanner__ToRecordBatchReader(scanner)); END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___Scanner__ToRecordBatchReader(SEXP scanner_sexp){ - Rf_error("Cannot call dataset___Scanner__ToRecordBatchReader(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___Scanner__ToRecordBatchReader(SEXP scanner_sexp){ + Rf_error("Cannot call dataset___Scanner__ToRecordBatchReader(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -std::shared_ptr dataset___Scanner__head(const std::shared_ptr& scanner, int n); + #if defined(ARROW_R_WITH_DATASET) + std::shared_ptr dataset___Scanner__head(const std::shared_ptr& scanner, int n); extern "C" SEXP _arrow_dataset___Scanner__head(SEXP scanner_sexp, SEXP n_sexp){ BEGIN_CPP11 arrow::r::Input&>::type scanner(scanner_sexp); @@ -2358,45 +2358,45 @@ BEGIN_CPP11 return cpp11::as_sexp(dataset___Scanner__head(scanner, n)); END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___Scanner__head(SEXP scanner_sexp, SEXP n_sexp){ - Rf_error("Cannot call dataset___Scanner__head(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___Scanner__head(SEXP scanner_sexp, SEXP n_sexp){ + Rf_error("Cannot call dataset___Scanner__head(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -std::shared_ptr dataset___Scanner__schema(const std::shared_ptr& sc); + #if defined(ARROW_R_WITH_DATASET) + std::shared_ptr dataset___Scanner__schema(const std::shared_ptr& sc); extern "C" SEXP _arrow_dataset___Scanner__schema(SEXP sc_sexp){ BEGIN_CPP11 arrow::r::Input&>::type sc(sc_sexp); return cpp11::as_sexp(dataset___Scanner__schema(sc)); END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___Scanner__schema(SEXP sc_sexp){ - Rf_error("Cannot call dataset___Scanner__schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___Scanner__schema(SEXP sc_sexp){ + Rf_error("Cannot call dataset___Scanner__schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -cpp11::list dataset___ScanTask__get_batches(const std::shared_ptr& scan_task); + #if defined(ARROW_R_WITH_DATASET) + cpp11::list dataset___ScanTask__get_batches(const std::shared_ptr& scan_task); extern "C" SEXP _arrow_dataset___ScanTask__get_batches(SEXP scan_task_sexp){ BEGIN_CPP11 arrow::r::Input&>::type scan_task(scan_task_sexp); return cpp11::as_sexp(dataset___ScanTask__get_batches(scan_task)); END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___ScanTask__get_batches(SEXP scan_task_sexp){ - Rf_error("Cannot call dataset___ScanTask__get_batches(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___ScanTask__get_batches(SEXP scan_task_sexp){ + Rf_error("Cannot call dataset___ScanTask__get_batches(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -void dataset___Dataset__Write(const std::shared_ptr& file_write_options, const std::shared_ptr& filesystem, std::string base_dir, const std::shared_ptr& partitioning, std::string basename_template, const std::shared_ptr& scanner, arrow::dataset::ExistingDataBehavior existing_data_behavior, int max_partitions); + #if defined(ARROW_R_WITH_DATASET) + void dataset___Dataset__Write(const std::shared_ptr& file_write_options, const std::shared_ptr& filesystem, std::string base_dir, const std::shared_ptr& partitioning, std::string basename_template, const std::shared_ptr& scanner, arrow::dataset::ExistingDataBehavior existing_data_behavior, int max_partitions); extern "C" SEXP _arrow_dataset___Dataset__Write(SEXP file_write_options_sexp, SEXP filesystem_sexp, SEXP base_dir_sexp, SEXP partitioning_sexp, SEXP basename_template_sexp, SEXP scanner_sexp, SEXP existing_data_behavior_sexp, SEXP max_partitions_sexp){ BEGIN_CPP11 arrow::r::Input&>::type file_write_options(file_write_options_sexp); @@ -2411,15 +2411,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___Dataset__Write(SEXP file_write_options_sexp, SEXP filesystem_sexp, SEXP base_dir_sexp, SEXP partitioning_sexp, SEXP basename_template_sexp, SEXP scanner_sexp, SEXP existing_data_behavior_sexp, SEXP max_partitions_sexp){ - Rf_error("Cannot call dataset___Dataset__Write(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___Dataset__Write(SEXP file_write_options_sexp, SEXP filesystem_sexp, SEXP base_dir_sexp, SEXP partitioning_sexp, SEXP basename_template_sexp, SEXP scanner_sexp, SEXP existing_data_behavior_sexp, SEXP max_partitions_sexp){ + Rf_error("Cannot call dataset___Dataset__Write(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -std::shared_ptr dataset___Scanner__TakeRows(const std::shared_ptr& scanner, const std::shared_ptr& indices); + #if defined(ARROW_R_WITH_DATASET) + std::shared_ptr dataset___Scanner__TakeRows(const std::shared_ptr& scanner, const std::shared_ptr& indices); extern "C" SEXP _arrow_dataset___Scanner__TakeRows(SEXP scanner_sexp, SEXP indices_sexp){ BEGIN_CPP11 arrow::r::Input&>::type scanner(scanner_sexp); @@ -2427,296 +2427,296 @@ BEGIN_CPP11 return cpp11::as_sexp(dataset___Scanner__TakeRows(scanner, indices)); END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___Scanner__TakeRows(SEXP scanner_sexp, SEXP indices_sexp){ - Rf_error("Cannot call dataset___Scanner__TakeRows(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___Scanner__TakeRows(SEXP scanner_sexp, SEXP indices_sexp){ + Rf_error("Cannot call dataset___Scanner__TakeRows(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // dataset.cpp -#if defined(ARROW_R_WITH_DATASET) -int64_t dataset___Scanner__CountRows(const std::shared_ptr& scanner); + #if defined(ARROW_R_WITH_DATASET) + int64_t dataset___Scanner__CountRows(const std::shared_ptr& scanner); extern "C" SEXP _arrow_dataset___Scanner__CountRows(SEXP scanner_sexp){ BEGIN_CPP11 arrow::r::Input&>::type scanner(scanner_sexp); return cpp11::as_sexp(dataset___Scanner__CountRows(scanner)); END_CPP11 } -#else -extern "C" SEXP _arrow_dataset___Scanner__CountRows(SEXP scanner_sexp){ - Rf_error("Cannot call dataset___Scanner__CountRows(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_dataset___Scanner__CountRows(SEXP scanner_sexp){ + Rf_error("Cannot call dataset___Scanner__CountRows(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Int8__initialize(); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr Int8__initialize(); extern "C" SEXP _arrow_Int8__initialize(){ BEGIN_CPP11 return cpp11::as_sexp(Int8__initialize()); END_CPP11 } -#else -extern "C" SEXP _arrow_Int8__initialize(){ - Rf_error("Cannot call Int8__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Int8__initialize(){ + Rf_error("Cannot call Int8__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Int16__initialize(); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr Int16__initialize(); extern "C" SEXP _arrow_Int16__initialize(){ BEGIN_CPP11 return cpp11::as_sexp(Int16__initialize()); END_CPP11 } -#else -extern "C" SEXP _arrow_Int16__initialize(){ - Rf_error("Cannot call Int16__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Int16__initialize(){ + Rf_error("Cannot call Int16__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Int32__initialize(); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr Int32__initialize(); extern "C" SEXP _arrow_Int32__initialize(){ BEGIN_CPP11 return cpp11::as_sexp(Int32__initialize()); END_CPP11 } -#else -extern "C" SEXP _arrow_Int32__initialize(){ - Rf_error("Cannot call Int32__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Int32__initialize(){ + Rf_error("Cannot call Int32__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Int64__initialize(); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr Int64__initialize(); extern "C" SEXP _arrow_Int64__initialize(){ BEGIN_CPP11 return cpp11::as_sexp(Int64__initialize()); END_CPP11 } -#else -extern "C" SEXP _arrow_Int64__initialize(){ - Rf_error("Cannot call Int64__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Int64__initialize(){ + Rf_error("Cannot call Int64__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr UInt8__initialize(); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr UInt8__initialize(); extern "C" SEXP _arrow_UInt8__initialize(){ BEGIN_CPP11 return cpp11::as_sexp(UInt8__initialize()); END_CPP11 } -#else -extern "C" SEXP _arrow_UInt8__initialize(){ - Rf_error("Cannot call UInt8__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_UInt8__initialize(){ + Rf_error("Cannot call UInt8__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr UInt16__initialize(); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr UInt16__initialize(); extern "C" SEXP _arrow_UInt16__initialize(){ BEGIN_CPP11 return cpp11::as_sexp(UInt16__initialize()); END_CPP11 } -#else -extern "C" SEXP _arrow_UInt16__initialize(){ - Rf_error("Cannot call UInt16__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_UInt16__initialize(){ + Rf_error("Cannot call UInt16__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr UInt32__initialize(); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr UInt32__initialize(); extern "C" SEXP _arrow_UInt32__initialize(){ BEGIN_CPP11 return cpp11::as_sexp(UInt32__initialize()); END_CPP11 } -#else -extern "C" SEXP _arrow_UInt32__initialize(){ - Rf_error("Cannot call UInt32__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_UInt32__initialize(){ + Rf_error("Cannot call UInt32__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr UInt64__initialize(); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr UInt64__initialize(); extern "C" SEXP _arrow_UInt64__initialize(){ BEGIN_CPP11 return cpp11::as_sexp(UInt64__initialize()); END_CPP11 } -#else -extern "C" SEXP _arrow_UInt64__initialize(){ - Rf_error("Cannot call UInt64__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_UInt64__initialize(){ + Rf_error("Cannot call UInt64__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Float16__initialize(); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr Float16__initialize(); extern "C" SEXP _arrow_Float16__initialize(){ BEGIN_CPP11 return cpp11::as_sexp(Float16__initialize()); END_CPP11 } -#else -extern "C" SEXP _arrow_Float16__initialize(){ - Rf_error("Cannot call Float16__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Float16__initialize(){ + Rf_error("Cannot call Float16__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Float32__initialize(); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr Float32__initialize(); extern "C" SEXP _arrow_Float32__initialize(){ BEGIN_CPP11 return cpp11::as_sexp(Float32__initialize()); END_CPP11 } -#else -extern "C" SEXP _arrow_Float32__initialize(){ - Rf_error("Cannot call Float32__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Float32__initialize(){ + Rf_error("Cannot call Float32__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Float64__initialize(); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr Float64__initialize(); extern "C" SEXP _arrow_Float64__initialize(){ BEGIN_CPP11 return cpp11::as_sexp(Float64__initialize()); END_CPP11 } -#else -extern "C" SEXP _arrow_Float64__initialize(){ - Rf_error("Cannot call Float64__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Float64__initialize(){ + Rf_error("Cannot call Float64__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Boolean__initialize(); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr Boolean__initialize(); extern "C" SEXP _arrow_Boolean__initialize(){ BEGIN_CPP11 return cpp11::as_sexp(Boolean__initialize()); END_CPP11 } -#else -extern "C" SEXP _arrow_Boolean__initialize(){ - Rf_error("Cannot call Boolean__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Boolean__initialize(){ + Rf_error("Cannot call Boolean__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Utf8__initialize(); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr Utf8__initialize(); extern "C" SEXP _arrow_Utf8__initialize(){ BEGIN_CPP11 return cpp11::as_sexp(Utf8__initialize()); END_CPP11 } -#else -extern "C" SEXP _arrow_Utf8__initialize(){ - Rf_error("Cannot call Utf8__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Utf8__initialize(){ + Rf_error("Cannot call Utf8__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr LargeUtf8__initialize(); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr LargeUtf8__initialize(); extern "C" SEXP _arrow_LargeUtf8__initialize(){ BEGIN_CPP11 return cpp11::as_sexp(LargeUtf8__initialize()); END_CPP11 } -#else -extern "C" SEXP _arrow_LargeUtf8__initialize(){ - Rf_error("Cannot call LargeUtf8__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_LargeUtf8__initialize(){ + Rf_error("Cannot call LargeUtf8__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Binary__initialize(); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr Binary__initialize(); extern "C" SEXP _arrow_Binary__initialize(){ BEGIN_CPP11 return cpp11::as_sexp(Binary__initialize()); END_CPP11 } -#else -extern "C" SEXP _arrow_Binary__initialize(){ - Rf_error("Cannot call Binary__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Binary__initialize(){ + Rf_error("Cannot call Binary__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr LargeBinary__initialize(); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr LargeBinary__initialize(); extern "C" SEXP _arrow_LargeBinary__initialize(){ BEGIN_CPP11 return cpp11::as_sexp(LargeBinary__initialize()); END_CPP11 } -#else -extern "C" SEXP _arrow_LargeBinary__initialize(){ - Rf_error("Cannot call LargeBinary__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_LargeBinary__initialize(){ + Rf_error("Cannot call LargeBinary__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Date32__initialize(); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr Date32__initialize(); extern "C" SEXP _arrow_Date32__initialize(){ BEGIN_CPP11 return cpp11::as_sexp(Date32__initialize()); END_CPP11 } -#else -extern "C" SEXP _arrow_Date32__initialize(){ - Rf_error("Cannot call Date32__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Date32__initialize(){ + Rf_error("Cannot call Date32__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Date64__initialize(); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr Date64__initialize(); extern "C" SEXP _arrow_Date64__initialize(){ BEGIN_CPP11 return cpp11::as_sexp(Date64__initialize()); END_CPP11 } -#else -extern "C" SEXP _arrow_Date64__initialize(){ - Rf_error("Cannot call Date64__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Date64__initialize(){ + Rf_error("Cannot call Date64__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Null__initialize(); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr Null__initialize(); extern "C" SEXP _arrow_Null__initialize(){ BEGIN_CPP11 return cpp11::as_sexp(Null__initialize()); END_CPP11 } -#else -extern "C" SEXP _arrow_Null__initialize(){ - Rf_error("Cannot call Null__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Null__initialize(){ + Rf_error("Cannot call Null__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Decimal128Type__initialize(int32_t precision, int32_t scale); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr Decimal128Type__initialize(int32_t precision, int32_t scale); extern "C" SEXP _arrow_Decimal128Type__initialize(SEXP precision_sexp, SEXP scale_sexp){ BEGIN_CPP11 arrow::r::Input::type precision(precision_sexp); @@ -2724,30 +2724,30 @@ BEGIN_CPP11 return cpp11::as_sexp(Decimal128Type__initialize(precision, scale)); END_CPP11 } -#else -extern "C" SEXP _arrow_Decimal128Type__initialize(SEXP precision_sexp, SEXP scale_sexp){ - Rf_error("Cannot call Decimal128Type__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Decimal128Type__initialize(SEXP precision_sexp, SEXP scale_sexp){ + Rf_error("Cannot call Decimal128Type__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr FixedSizeBinary__initialize(R_xlen_t byte_width); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr FixedSizeBinary__initialize(R_xlen_t byte_width); extern "C" SEXP _arrow_FixedSizeBinary__initialize(SEXP byte_width_sexp){ BEGIN_CPP11 arrow::r::Input::type byte_width(byte_width_sexp); return cpp11::as_sexp(FixedSizeBinary__initialize(byte_width)); END_CPP11 } -#else -extern "C" SEXP _arrow_FixedSizeBinary__initialize(SEXP byte_width_sexp){ - Rf_error("Cannot call FixedSizeBinary__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_FixedSizeBinary__initialize(SEXP byte_width_sexp){ + Rf_error("Cannot call FixedSizeBinary__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Timestamp__initialize(arrow::TimeUnit::type unit, const std::string& timezone); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr Timestamp__initialize(arrow::TimeUnit::type unit, const std::string& timezone); extern "C" SEXP _arrow_Timestamp__initialize(SEXP unit_sexp, SEXP timezone_sexp){ BEGIN_CPP11 arrow::r::Input::type unit(unit_sexp); @@ -2755,75 +2755,75 @@ BEGIN_CPP11 return cpp11::as_sexp(Timestamp__initialize(unit, timezone)); END_CPP11 } -#else -extern "C" SEXP _arrow_Timestamp__initialize(SEXP unit_sexp, SEXP timezone_sexp){ - Rf_error("Cannot call Timestamp__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Timestamp__initialize(SEXP unit_sexp, SEXP timezone_sexp){ + Rf_error("Cannot call Timestamp__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Time32__initialize(arrow::TimeUnit::type unit); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr Time32__initialize(arrow::TimeUnit::type unit); extern "C" SEXP _arrow_Time32__initialize(SEXP unit_sexp){ BEGIN_CPP11 arrow::r::Input::type unit(unit_sexp); return cpp11::as_sexp(Time32__initialize(unit)); END_CPP11 } -#else -extern "C" SEXP _arrow_Time32__initialize(SEXP unit_sexp){ - Rf_error("Cannot call Time32__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Time32__initialize(SEXP unit_sexp){ + Rf_error("Cannot call Time32__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Time64__initialize(arrow::TimeUnit::type unit); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr Time64__initialize(arrow::TimeUnit::type unit); extern "C" SEXP _arrow_Time64__initialize(SEXP unit_sexp){ BEGIN_CPP11 arrow::r::Input::type unit(unit_sexp); return cpp11::as_sexp(Time64__initialize(unit)); END_CPP11 } -#else -extern "C" SEXP _arrow_Time64__initialize(SEXP unit_sexp){ - Rf_error("Cannot call Time64__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Time64__initialize(SEXP unit_sexp){ + Rf_error("Cannot call Time64__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr list__(SEXP x); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr list__(SEXP x); extern "C" SEXP _arrow_list__(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input::type x(x_sexp); return cpp11::as_sexp(list__(x)); END_CPP11 } -#else -extern "C" SEXP _arrow_list__(SEXP x_sexp){ - Rf_error("Cannot call list__(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_list__(SEXP x_sexp){ + Rf_error("Cannot call list__(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr large_list__(SEXP x); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr large_list__(SEXP x); extern "C" SEXP _arrow_large_list__(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input::type x(x_sexp); return cpp11::as_sexp(large_list__(x)); END_CPP11 } -#else -extern "C" SEXP _arrow_large_list__(SEXP x_sexp){ - Rf_error("Cannot call large_list__(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_large_list__(SEXP x_sexp){ + Rf_error("Cannot call large_list__(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr fixed_size_list__(SEXP x, int list_size); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr fixed_size_list__(SEXP x, int list_size); extern "C" SEXP _arrow_fixed_size_list__(SEXP x_sexp, SEXP list_size_sexp){ BEGIN_CPP11 arrow::r::Input::type x(x_sexp); @@ -2831,60 +2831,60 @@ BEGIN_CPP11 return cpp11::as_sexp(fixed_size_list__(x, list_size)); END_CPP11 } -#else -extern "C" SEXP _arrow_fixed_size_list__(SEXP x_sexp, SEXP list_size_sexp){ - Rf_error("Cannot call fixed_size_list__(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_fixed_size_list__(SEXP x_sexp, SEXP list_size_sexp){ + Rf_error("Cannot call fixed_size_list__(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr struct__(const std::vector>& fields); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr struct__(const std::vector>& fields); extern "C" SEXP _arrow_struct__(SEXP fields_sexp){ BEGIN_CPP11 arrow::r::Input>&>::type fields(fields_sexp); return cpp11::as_sexp(struct__(fields)); END_CPP11 } -#else -extern "C" SEXP _arrow_struct__(SEXP fields_sexp){ - Rf_error("Cannot call struct__(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_struct__(SEXP fields_sexp){ + Rf_error("Cannot call struct__(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -std::string DataType__ToString(const std::shared_ptr& type); + #if defined(ARROW_R_WITH_ARROW) + std::string DataType__ToString(const std::shared_ptr& type); extern "C" SEXP _arrow_DataType__ToString(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(DataType__ToString(type)); END_CPP11 } -#else -extern "C" SEXP _arrow_DataType__ToString(SEXP type_sexp){ - Rf_error("Cannot call DataType__ToString(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_DataType__ToString(SEXP type_sexp){ + Rf_error("Cannot call DataType__ToString(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -std::string DataType__name(const std::shared_ptr& type); + #if defined(ARROW_R_WITH_ARROW) + std::string DataType__name(const std::shared_ptr& type); extern "C" SEXP _arrow_DataType__name(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(DataType__name(type)); END_CPP11 } -#else -extern "C" SEXP _arrow_DataType__name(SEXP type_sexp){ - Rf_error("Cannot call DataType__name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_DataType__name(SEXP type_sexp){ + Rf_error("Cannot call DataType__name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -bool DataType__Equals(const std::shared_ptr& lhs, const std::shared_ptr& rhs); + #if defined(ARROW_R_WITH_ARROW) + bool DataType__Equals(const std::shared_ptr& lhs, const std::shared_ptr& rhs); extern "C" SEXP _arrow_DataType__Equals(SEXP lhs_sexp, SEXP rhs_sexp){ BEGIN_CPP11 arrow::r::Input&>::type lhs(lhs_sexp); @@ -2892,180 +2892,180 @@ BEGIN_CPP11 return cpp11::as_sexp(DataType__Equals(lhs, rhs)); END_CPP11 } -#else -extern "C" SEXP _arrow_DataType__Equals(SEXP lhs_sexp, SEXP rhs_sexp){ - Rf_error("Cannot call DataType__Equals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_DataType__Equals(SEXP lhs_sexp, SEXP rhs_sexp){ + Rf_error("Cannot call DataType__Equals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -int DataType__num_fields(const std::shared_ptr& type); + #if defined(ARROW_R_WITH_ARROW) + int DataType__num_fields(const std::shared_ptr& type); extern "C" SEXP _arrow_DataType__num_fields(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(DataType__num_fields(type)); END_CPP11 } -#else -extern "C" SEXP _arrow_DataType__num_fields(SEXP type_sexp){ - Rf_error("Cannot call DataType__num_fields(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_DataType__num_fields(SEXP type_sexp){ + Rf_error("Cannot call DataType__num_fields(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -cpp11::list DataType__fields(const std::shared_ptr& type); + #if defined(ARROW_R_WITH_ARROW) + cpp11::list DataType__fields(const std::shared_ptr& type); extern "C" SEXP _arrow_DataType__fields(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(DataType__fields(type)); END_CPP11 } -#else -extern "C" SEXP _arrow_DataType__fields(SEXP type_sexp){ - Rf_error("Cannot call DataType__fields(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_DataType__fields(SEXP type_sexp){ + Rf_error("Cannot call DataType__fields(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -arrow::Type::type DataType__id(const std::shared_ptr& type); + #if defined(ARROW_R_WITH_ARROW) + arrow::Type::type DataType__id(const std::shared_ptr& type); extern "C" SEXP _arrow_DataType__id(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(DataType__id(type)); END_CPP11 } -#else -extern "C" SEXP _arrow_DataType__id(SEXP type_sexp){ - Rf_error("Cannot call DataType__id(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_DataType__id(SEXP type_sexp){ + Rf_error("Cannot call DataType__id(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -std::string ListType__ToString(const std::shared_ptr& type); + #if defined(ARROW_R_WITH_ARROW) + std::string ListType__ToString(const std::shared_ptr& type); extern "C" SEXP _arrow_ListType__ToString(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(ListType__ToString(type)); END_CPP11 } -#else -extern "C" SEXP _arrow_ListType__ToString(SEXP type_sexp){ - Rf_error("Cannot call ListType__ToString(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ListType__ToString(SEXP type_sexp){ + Rf_error("Cannot call ListType__ToString(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -int FixedWidthType__bit_width(const std::shared_ptr& type); + #if defined(ARROW_R_WITH_ARROW) + int FixedWidthType__bit_width(const std::shared_ptr& type); extern "C" SEXP _arrow_FixedWidthType__bit_width(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(FixedWidthType__bit_width(type)); END_CPP11 } -#else -extern "C" SEXP _arrow_FixedWidthType__bit_width(SEXP type_sexp){ - Rf_error("Cannot call FixedWidthType__bit_width(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_FixedWidthType__bit_width(SEXP type_sexp){ + Rf_error("Cannot call FixedWidthType__bit_width(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -arrow::DateUnit DateType__unit(const std::shared_ptr& type); + #if defined(ARROW_R_WITH_ARROW) + arrow::DateUnit DateType__unit(const std::shared_ptr& type); extern "C" SEXP _arrow_DateType__unit(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(DateType__unit(type)); END_CPP11 } -#else -extern "C" SEXP _arrow_DateType__unit(SEXP type_sexp){ - Rf_error("Cannot call DateType__unit(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_DateType__unit(SEXP type_sexp){ + Rf_error("Cannot call DateType__unit(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -arrow::TimeUnit::type TimeType__unit(const std::shared_ptr& type); + #if defined(ARROW_R_WITH_ARROW) + arrow::TimeUnit::type TimeType__unit(const std::shared_ptr& type); extern "C" SEXP _arrow_TimeType__unit(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(TimeType__unit(type)); END_CPP11 } -#else -extern "C" SEXP _arrow_TimeType__unit(SEXP type_sexp){ - Rf_error("Cannot call TimeType__unit(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_TimeType__unit(SEXP type_sexp){ + Rf_error("Cannot call TimeType__unit(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -int32_t DecimalType__precision(const std::shared_ptr& type); + #if defined(ARROW_R_WITH_ARROW) + int32_t DecimalType__precision(const std::shared_ptr& type); extern "C" SEXP _arrow_DecimalType__precision(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(DecimalType__precision(type)); END_CPP11 } -#else -extern "C" SEXP _arrow_DecimalType__precision(SEXP type_sexp){ - Rf_error("Cannot call DecimalType__precision(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_DecimalType__precision(SEXP type_sexp){ + Rf_error("Cannot call DecimalType__precision(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -int32_t DecimalType__scale(const std::shared_ptr& type); + #if defined(ARROW_R_WITH_ARROW) + int32_t DecimalType__scale(const std::shared_ptr& type); extern "C" SEXP _arrow_DecimalType__scale(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(DecimalType__scale(type)); END_CPP11 } -#else -extern "C" SEXP _arrow_DecimalType__scale(SEXP type_sexp){ - Rf_error("Cannot call DecimalType__scale(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_DecimalType__scale(SEXP type_sexp){ + Rf_error("Cannot call DecimalType__scale(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -std::string TimestampType__timezone(const std::shared_ptr& type); + #if defined(ARROW_R_WITH_ARROW) + std::string TimestampType__timezone(const std::shared_ptr& type); extern "C" SEXP _arrow_TimestampType__timezone(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(TimestampType__timezone(type)); END_CPP11 } -#else -extern "C" SEXP _arrow_TimestampType__timezone(SEXP type_sexp){ - Rf_error("Cannot call TimestampType__timezone(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_TimestampType__timezone(SEXP type_sexp){ + Rf_error("Cannot call TimestampType__timezone(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -arrow::TimeUnit::type TimestampType__unit(const std::shared_ptr& type); + #if defined(ARROW_R_WITH_ARROW) + arrow::TimeUnit::type TimestampType__unit(const std::shared_ptr& type); extern "C" SEXP _arrow_TimestampType__unit(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(TimestampType__unit(type)); END_CPP11 } -#else -extern "C" SEXP _arrow_TimestampType__unit(SEXP type_sexp){ - Rf_error("Cannot call TimestampType__unit(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_TimestampType__unit(SEXP type_sexp){ + Rf_error("Cannot call TimestampType__unit(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr DictionaryType__initialize(const std::shared_ptr& index_type, const std::shared_ptr& value_type, bool ordered); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr DictionaryType__initialize(const std::shared_ptr& index_type, const std::shared_ptr& value_type, bool ordered); extern "C" SEXP _arrow_DictionaryType__initialize(SEXP index_type_sexp, SEXP value_type_sexp, SEXP ordered_sexp){ BEGIN_CPP11 arrow::r::Input&>::type index_type(index_type_sexp); @@ -3074,75 +3074,75 @@ BEGIN_CPP11 return cpp11::as_sexp(DictionaryType__initialize(index_type, value_type, ordered)); END_CPP11 } -#else -extern "C" SEXP _arrow_DictionaryType__initialize(SEXP index_type_sexp, SEXP value_type_sexp, SEXP ordered_sexp){ - Rf_error("Cannot call DictionaryType__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_DictionaryType__initialize(SEXP index_type_sexp, SEXP value_type_sexp, SEXP ordered_sexp){ + Rf_error("Cannot call DictionaryType__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr DictionaryType__index_type(const std::shared_ptr& type); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr DictionaryType__index_type(const std::shared_ptr& type); extern "C" SEXP _arrow_DictionaryType__index_type(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(DictionaryType__index_type(type)); END_CPP11 } -#else -extern "C" SEXP _arrow_DictionaryType__index_type(SEXP type_sexp){ - Rf_error("Cannot call DictionaryType__index_type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_DictionaryType__index_type(SEXP type_sexp){ + Rf_error("Cannot call DictionaryType__index_type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr DictionaryType__value_type(const std::shared_ptr& type); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr DictionaryType__value_type(const std::shared_ptr& type); extern "C" SEXP _arrow_DictionaryType__value_type(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(DictionaryType__value_type(type)); END_CPP11 } -#else -extern "C" SEXP _arrow_DictionaryType__value_type(SEXP type_sexp){ - Rf_error("Cannot call DictionaryType__value_type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_DictionaryType__value_type(SEXP type_sexp){ + Rf_error("Cannot call DictionaryType__value_type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -std::string DictionaryType__name(const std::shared_ptr& type); + #if defined(ARROW_R_WITH_ARROW) + std::string DictionaryType__name(const std::shared_ptr& type); extern "C" SEXP _arrow_DictionaryType__name(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(DictionaryType__name(type)); END_CPP11 } -#else -extern "C" SEXP _arrow_DictionaryType__name(SEXP type_sexp){ - Rf_error("Cannot call DictionaryType__name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_DictionaryType__name(SEXP type_sexp){ + Rf_error("Cannot call DictionaryType__name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -bool DictionaryType__ordered(const std::shared_ptr& type); + #if defined(ARROW_R_WITH_ARROW) + bool DictionaryType__ordered(const std::shared_ptr& type); extern "C" SEXP _arrow_DictionaryType__ordered(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(DictionaryType__ordered(type)); END_CPP11 } -#else -extern "C" SEXP _arrow_DictionaryType__ordered(SEXP type_sexp){ - Rf_error("Cannot call DictionaryType__ordered(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_DictionaryType__ordered(SEXP type_sexp){ + Rf_error("Cannot call DictionaryType__ordered(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr StructType__GetFieldByName(const std::shared_ptr& type, const std::string& name); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr StructType__GetFieldByName(const std::shared_ptr& type, const std::string& name); extern "C" SEXP _arrow_StructType__GetFieldByName(SEXP type_sexp, SEXP name_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); @@ -3150,15 +3150,15 @@ BEGIN_CPP11 return cpp11::as_sexp(StructType__GetFieldByName(type, name)); END_CPP11 } -#else -extern "C" SEXP _arrow_StructType__GetFieldByName(SEXP type_sexp, SEXP name_sexp){ - Rf_error("Cannot call StructType__GetFieldByName(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_StructType__GetFieldByName(SEXP type_sexp, SEXP name_sexp){ + Rf_error("Cannot call StructType__GetFieldByName(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -int StructType__GetFieldIndex(const std::shared_ptr& type, const std::string& name); + #if defined(ARROW_R_WITH_ARROW) + int StructType__GetFieldIndex(const std::shared_ptr& type, const std::string& name); extern "C" SEXP _arrow_StructType__GetFieldIndex(SEXP type_sexp, SEXP name_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); @@ -3166,135 +3166,135 @@ BEGIN_CPP11 return cpp11::as_sexp(StructType__GetFieldIndex(type, name)); END_CPP11 } -#else -extern "C" SEXP _arrow_StructType__GetFieldIndex(SEXP type_sexp, SEXP name_sexp){ - Rf_error("Cannot call StructType__GetFieldIndex(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_StructType__GetFieldIndex(SEXP type_sexp, SEXP name_sexp){ + Rf_error("Cannot call StructType__GetFieldIndex(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -std::vector StructType__field_names(const std::shared_ptr& type); + #if defined(ARROW_R_WITH_ARROW) + std::vector StructType__field_names(const std::shared_ptr& type); extern "C" SEXP _arrow_StructType__field_names(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(StructType__field_names(type)); END_CPP11 } -#else -extern "C" SEXP _arrow_StructType__field_names(SEXP type_sexp){ - Rf_error("Cannot call StructType__field_names(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_StructType__field_names(SEXP type_sexp){ + Rf_error("Cannot call StructType__field_names(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr ListType__value_field(const std::shared_ptr& type); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr ListType__value_field(const std::shared_ptr& type); extern "C" SEXP _arrow_ListType__value_field(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(ListType__value_field(type)); END_CPP11 } -#else -extern "C" SEXP _arrow_ListType__value_field(SEXP type_sexp){ - Rf_error("Cannot call ListType__value_field(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ListType__value_field(SEXP type_sexp){ + Rf_error("Cannot call ListType__value_field(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr ListType__value_type(const std::shared_ptr& type); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr ListType__value_type(const std::shared_ptr& type); extern "C" SEXP _arrow_ListType__value_type(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(ListType__value_type(type)); END_CPP11 } -#else -extern "C" SEXP _arrow_ListType__value_type(SEXP type_sexp){ - Rf_error("Cannot call ListType__value_type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ListType__value_type(SEXP type_sexp){ + Rf_error("Cannot call ListType__value_type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr LargeListType__value_field(const std::shared_ptr& type); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr LargeListType__value_field(const std::shared_ptr& type); extern "C" SEXP _arrow_LargeListType__value_field(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(LargeListType__value_field(type)); END_CPP11 } -#else -extern "C" SEXP _arrow_LargeListType__value_field(SEXP type_sexp){ - Rf_error("Cannot call LargeListType__value_field(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_LargeListType__value_field(SEXP type_sexp){ + Rf_error("Cannot call LargeListType__value_field(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr LargeListType__value_type(const std::shared_ptr& type); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr LargeListType__value_type(const std::shared_ptr& type); extern "C" SEXP _arrow_LargeListType__value_type(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(LargeListType__value_type(type)); END_CPP11 } -#else -extern "C" SEXP _arrow_LargeListType__value_type(SEXP type_sexp){ - Rf_error("Cannot call LargeListType__value_type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_LargeListType__value_type(SEXP type_sexp){ + Rf_error("Cannot call LargeListType__value_type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr FixedSizeListType__value_field(const std::shared_ptr& type); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr FixedSizeListType__value_field(const std::shared_ptr& type); extern "C" SEXP _arrow_FixedSizeListType__value_field(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(FixedSizeListType__value_field(type)); END_CPP11 } -#else -extern "C" SEXP _arrow_FixedSizeListType__value_field(SEXP type_sexp){ - Rf_error("Cannot call FixedSizeListType__value_field(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_FixedSizeListType__value_field(SEXP type_sexp){ + Rf_error("Cannot call FixedSizeListType__value_field(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr FixedSizeListType__value_type(const std::shared_ptr& type); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr FixedSizeListType__value_type(const std::shared_ptr& type); extern "C" SEXP _arrow_FixedSizeListType__value_type(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(FixedSizeListType__value_type(type)); END_CPP11 } -#else -extern "C" SEXP _arrow_FixedSizeListType__value_type(SEXP type_sexp){ - Rf_error("Cannot call FixedSizeListType__value_type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_FixedSizeListType__value_type(SEXP type_sexp){ + Rf_error("Cannot call FixedSizeListType__value_type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // datatype.cpp -#if defined(ARROW_R_WITH_ARROW) -int FixedSizeListType__list_size(const std::shared_ptr& type); + #if defined(ARROW_R_WITH_ARROW) + int FixedSizeListType__list_size(const std::shared_ptr& type); extern "C" SEXP _arrow_FixedSizeListType__list_size(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(FixedSizeListType__list_size(type)); END_CPP11 } -#else -extern "C" SEXP _arrow_FixedSizeListType__list_size(SEXP type_sexp){ - Rf_error("Cannot call FixedSizeListType__list_size(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_FixedSizeListType__list_size(SEXP type_sexp){ + Rf_error("Cannot call FixedSizeListType__list_size(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // expression.cpp -#if defined(ARROW_R_WITH_ARROW) -bool compute___expr__equals(const std::shared_ptr& lhs, const std::shared_ptr& rhs); + #if defined(ARROW_R_WITH_ARROW) + bool compute___expr__equals(const std::shared_ptr& lhs, const std::shared_ptr& rhs); extern "C" SEXP _arrow_compute___expr__equals(SEXP lhs_sexp, SEXP rhs_sexp){ BEGIN_CPP11 arrow::r::Input&>::type lhs(lhs_sexp); @@ -3302,15 +3302,15 @@ BEGIN_CPP11 return cpp11::as_sexp(compute___expr__equals(lhs, rhs)); END_CPP11 } -#else -extern "C" SEXP _arrow_compute___expr__equals(SEXP lhs_sexp, SEXP rhs_sexp){ - Rf_error("Cannot call compute___expr__equals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_compute___expr__equals(SEXP lhs_sexp, SEXP rhs_sexp){ + Rf_error("Cannot call compute___expr__equals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // expression.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr compute___expr__call(std::string func_name, cpp11::list argument_list, cpp11::list options); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr compute___expr__call(std::string func_name, cpp11::list argument_list, cpp11::list options); extern "C" SEXP _arrow_compute___expr__call(SEXP func_name_sexp, SEXP argument_list_sexp, SEXP options_sexp){ BEGIN_CPP11 arrow::r::Input::type func_name(func_name_sexp); @@ -3319,90 +3319,90 @@ BEGIN_CPP11 return cpp11::as_sexp(compute___expr__call(func_name, argument_list, options)); END_CPP11 } -#else -extern "C" SEXP _arrow_compute___expr__call(SEXP func_name_sexp, SEXP argument_list_sexp, SEXP options_sexp){ - Rf_error("Cannot call compute___expr__call(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_compute___expr__call(SEXP func_name_sexp, SEXP argument_list_sexp, SEXP options_sexp){ + Rf_error("Cannot call compute___expr__call(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // expression.cpp -#if defined(ARROW_R_WITH_ARROW) -std::vector field_names_in_expression(const std::shared_ptr& x); + #if defined(ARROW_R_WITH_ARROW) + std::vector field_names_in_expression(const std::shared_ptr& x); extern "C" SEXP _arrow_field_names_in_expression(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(field_names_in_expression(x)); END_CPP11 } -#else -extern "C" SEXP _arrow_field_names_in_expression(SEXP x_sexp){ - Rf_error("Cannot call field_names_in_expression(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_field_names_in_expression(SEXP x_sexp){ + Rf_error("Cannot call field_names_in_expression(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // expression.cpp -#if defined(ARROW_R_WITH_ARROW) -std::string compute___expr__get_field_ref_name(const std::shared_ptr& x); + #if defined(ARROW_R_WITH_ARROW) + std::string compute___expr__get_field_ref_name(const std::shared_ptr& x); extern "C" SEXP _arrow_compute___expr__get_field_ref_name(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(compute___expr__get_field_ref_name(x)); END_CPP11 } -#else -extern "C" SEXP _arrow_compute___expr__get_field_ref_name(SEXP x_sexp){ - Rf_error("Cannot call compute___expr__get_field_ref_name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_compute___expr__get_field_ref_name(SEXP x_sexp){ + Rf_error("Cannot call compute___expr__get_field_ref_name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // expression.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr compute___expr__field_ref(std::string name); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr compute___expr__field_ref(std::string name); extern "C" SEXP _arrow_compute___expr__field_ref(SEXP name_sexp){ BEGIN_CPP11 arrow::r::Input::type name(name_sexp); return cpp11::as_sexp(compute___expr__field_ref(name)); END_CPP11 } -#else -extern "C" SEXP _arrow_compute___expr__field_ref(SEXP name_sexp){ - Rf_error("Cannot call compute___expr__field_ref(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_compute___expr__field_ref(SEXP name_sexp){ + Rf_error("Cannot call compute___expr__field_ref(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // expression.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr compute___expr__scalar(const std::shared_ptr& x); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr compute___expr__scalar(const std::shared_ptr& x); extern "C" SEXP _arrow_compute___expr__scalar(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(compute___expr__scalar(x)); END_CPP11 } -#else -extern "C" SEXP _arrow_compute___expr__scalar(SEXP x_sexp){ - Rf_error("Cannot call compute___expr__scalar(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_compute___expr__scalar(SEXP x_sexp){ + Rf_error("Cannot call compute___expr__scalar(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // expression.cpp -#if defined(ARROW_R_WITH_ARROW) -std::string compute___expr__ToString(const std::shared_ptr& x); + #if defined(ARROW_R_WITH_ARROW) + std::string compute___expr__ToString(const std::shared_ptr& x); extern "C" SEXP _arrow_compute___expr__ToString(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(compute___expr__ToString(x)); END_CPP11 } -#else -extern "C" SEXP _arrow_compute___expr__ToString(SEXP x_sexp){ - Rf_error("Cannot call compute___expr__ToString(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_compute___expr__ToString(SEXP x_sexp){ + Rf_error("Cannot call compute___expr__ToString(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // expression.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr compute___expr__type(const std::shared_ptr& x, const std::shared_ptr& schema); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr compute___expr__type(const std::shared_ptr& x, const std::shared_ptr& schema); extern "C" SEXP _arrow_compute___expr__type(SEXP x_sexp, SEXP schema_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); @@ -3410,15 +3410,15 @@ BEGIN_CPP11 return cpp11::as_sexp(compute___expr__type(x, schema)); END_CPP11 } -#else -extern "C" SEXP _arrow_compute___expr__type(SEXP x_sexp, SEXP schema_sexp){ - Rf_error("Cannot call compute___expr__type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_compute___expr__type(SEXP x_sexp, SEXP schema_sexp){ + Rf_error("Cannot call compute___expr__type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // expression.cpp -#if defined(ARROW_R_WITH_ARROW) -arrow::Type::type compute___expr__type_id(const std::shared_ptr& x, const std::shared_ptr& schema); + #if defined(ARROW_R_WITH_ARROW) + arrow::Type::type compute___expr__type_id(const std::shared_ptr& x, const std::shared_ptr& schema); extern "C" SEXP _arrow_compute___expr__type_id(SEXP x_sexp, SEXP schema_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); @@ -3426,15 +3426,15 @@ BEGIN_CPP11 return cpp11::as_sexp(compute___expr__type_id(x, schema)); END_CPP11 } -#else -extern "C" SEXP _arrow_compute___expr__type_id(SEXP x_sexp, SEXP schema_sexp){ - Rf_error("Cannot call compute___expr__type_id(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_compute___expr__type_id(SEXP x_sexp, SEXP schema_sexp){ + Rf_error("Cannot call compute___expr__type_id(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // feather.cpp -#if defined(ARROW_R_WITH_ARROW) -void ipc___WriteFeather__Table(const std::shared_ptr& stream, const std::shared_ptr& table, int version, int chunk_size, arrow::Compression::type compression, int compression_level); + #if defined(ARROW_R_WITH_ARROW) + void ipc___WriteFeather__Table(const std::shared_ptr& stream, const std::shared_ptr& table, int version, int chunk_size, arrow::Compression::type compression, int compression_level); extern "C" SEXP _arrow_ipc___WriteFeather__Table(SEXP stream_sexp, SEXP table_sexp, SEXP version_sexp, SEXP chunk_size_sexp, SEXP compression_sexp, SEXP compression_level_sexp){ BEGIN_CPP11 arrow::r::Input&>::type stream(stream_sexp); @@ -3447,30 +3447,30 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_ipc___WriteFeather__Table(SEXP stream_sexp, SEXP table_sexp, SEXP version_sexp, SEXP chunk_size_sexp, SEXP compression_sexp, SEXP compression_level_sexp){ - Rf_error("Cannot call ipc___WriteFeather__Table(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ipc___WriteFeather__Table(SEXP stream_sexp, SEXP table_sexp, SEXP version_sexp, SEXP chunk_size_sexp, SEXP compression_sexp, SEXP compression_level_sexp){ + Rf_error("Cannot call ipc___WriteFeather__Table(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // feather.cpp -#if defined(ARROW_R_WITH_ARROW) -int ipc___feather___Reader__version(const std::shared_ptr& reader); + #if defined(ARROW_R_WITH_ARROW) + int ipc___feather___Reader__version(const std::shared_ptr& reader); extern "C" SEXP _arrow_ipc___feather___Reader__version(SEXP reader_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); return cpp11::as_sexp(ipc___feather___Reader__version(reader)); END_CPP11 } -#else -extern "C" SEXP _arrow_ipc___feather___Reader__version(SEXP reader_sexp){ - Rf_error("Cannot call ipc___feather___Reader__version(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ipc___feather___Reader__version(SEXP reader_sexp){ + Rf_error("Cannot call ipc___feather___Reader__version(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // feather.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr ipc___feather___Reader__Read(const std::shared_ptr& reader, SEXP columns); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr ipc___feather___Reader__Read(const std::shared_ptr& reader, SEXP columns); extern "C" SEXP _arrow_ipc___feather___Reader__Read(SEXP reader_sexp, SEXP columns_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); @@ -3478,45 +3478,45 @@ BEGIN_CPP11 return cpp11::as_sexp(ipc___feather___Reader__Read(reader, columns)); END_CPP11 } -#else -extern "C" SEXP _arrow_ipc___feather___Reader__Read(SEXP reader_sexp, SEXP columns_sexp){ - Rf_error("Cannot call ipc___feather___Reader__Read(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ipc___feather___Reader__Read(SEXP reader_sexp, SEXP columns_sexp){ + Rf_error("Cannot call ipc___feather___Reader__Read(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // feather.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr ipc___feather___Reader__Open(const std::shared_ptr& stream); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr ipc___feather___Reader__Open(const std::shared_ptr& stream); extern "C" SEXP _arrow_ipc___feather___Reader__Open(SEXP stream_sexp){ BEGIN_CPP11 arrow::r::Input&>::type stream(stream_sexp); return cpp11::as_sexp(ipc___feather___Reader__Open(stream)); END_CPP11 } -#else -extern "C" SEXP _arrow_ipc___feather___Reader__Open(SEXP stream_sexp){ - Rf_error("Cannot call ipc___feather___Reader__Open(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ipc___feather___Reader__Open(SEXP stream_sexp){ + Rf_error("Cannot call ipc___feather___Reader__Open(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // feather.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr ipc___feather___Reader__schema(const std::shared_ptr& reader); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr ipc___feather___Reader__schema(const std::shared_ptr& reader); extern "C" SEXP _arrow_ipc___feather___Reader__schema(SEXP reader_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); return cpp11::as_sexp(ipc___feather___Reader__schema(reader)); END_CPP11 } -#else -extern "C" SEXP _arrow_ipc___feather___Reader__schema(SEXP reader_sexp){ - Rf_error("Cannot call ipc___feather___Reader__schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ipc___feather___Reader__schema(SEXP reader_sexp){ + Rf_error("Cannot call ipc___feather___Reader__schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // field.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Field__initialize(const std::string& name, const std::shared_ptr& field, bool nullable); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr Field__initialize(const std::string& name, const std::shared_ptr& field, bool nullable); extern "C" SEXP _arrow_Field__initialize(SEXP name_sexp, SEXP field_sexp, SEXP nullable_sexp){ BEGIN_CPP11 arrow::r::Input::type name(name_sexp); @@ -3525,45 +3525,45 @@ BEGIN_CPP11 return cpp11::as_sexp(Field__initialize(name, field, nullable)); END_CPP11 } -#else -extern "C" SEXP _arrow_Field__initialize(SEXP name_sexp, SEXP field_sexp, SEXP nullable_sexp){ - Rf_error("Cannot call Field__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Field__initialize(SEXP name_sexp, SEXP field_sexp, SEXP nullable_sexp){ + Rf_error("Cannot call Field__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // field.cpp -#if defined(ARROW_R_WITH_ARROW) -std::string Field__ToString(const std::shared_ptr& field); + #if defined(ARROW_R_WITH_ARROW) + std::string Field__ToString(const std::shared_ptr& field); extern "C" SEXP _arrow_Field__ToString(SEXP field_sexp){ BEGIN_CPP11 arrow::r::Input&>::type field(field_sexp); return cpp11::as_sexp(Field__ToString(field)); END_CPP11 } -#else -extern "C" SEXP _arrow_Field__ToString(SEXP field_sexp){ - Rf_error("Cannot call Field__ToString(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Field__ToString(SEXP field_sexp){ + Rf_error("Cannot call Field__ToString(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // field.cpp -#if defined(ARROW_R_WITH_ARROW) -std::string Field__name(const std::shared_ptr& field); + #if defined(ARROW_R_WITH_ARROW) + std::string Field__name(const std::shared_ptr& field); extern "C" SEXP _arrow_Field__name(SEXP field_sexp){ BEGIN_CPP11 arrow::r::Input&>::type field(field_sexp); return cpp11::as_sexp(Field__name(field)); END_CPP11 } -#else -extern "C" SEXP _arrow_Field__name(SEXP field_sexp){ - Rf_error("Cannot call Field__name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Field__name(SEXP field_sexp){ + Rf_error("Cannot call Field__name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // field.cpp -#if defined(ARROW_R_WITH_ARROW) -bool Field__Equals(const std::shared_ptr& field, const std::shared_ptr& other); + #if defined(ARROW_R_WITH_ARROW) + bool Field__Equals(const std::shared_ptr& field, const std::shared_ptr& other); extern "C" SEXP _arrow_Field__Equals(SEXP field_sexp, SEXP other_sexp){ BEGIN_CPP11 arrow::r::Input&>::type field(field_sexp); @@ -3571,60 +3571,60 @@ BEGIN_CPP11 return cpp11::as_sexp(Field__Equals(field, other)); END_CPP11 } -#else -extern "C" SEXP _arrow_Field__Equals(SEXP field_sexp, SEXP other_sexp){ - Rf_error("Cannot call Field__Equals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Field__Equals(SEXP field_sexp, SEXP other_sexp){ + Rf_error("Cannot call Field__Equals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // field.cpp -#if defined(ARROW_R_WITH_ARROW) -bool Field__nullable(const std::shared_ptr& field); + #if defined(ARROW_R_WITH_ARROW) + bool Field__nullable(const std::shared_ptr& field); extern "C" SEXP _arrow_Field__nullable(SEXP field_sexp){ BEGIN_CPP11 arrow::r::Input&>::type field(field_sexp); return cpp11::as_sexp(Field__nullable(field)); END_CPP11 } -#else -extern "C" SEXP _arrow_Field__nullable(SEXP field_sexp){ - Rf_error("Cannot call Field__nullable(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Field__nullable(SEXP field_sexp){ + Rf_error("Cannot call Field__nullable(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // field.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Field__type(const std::shared_ptr& field); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr Field__type(const std::shared_ptr& field); extern "C" SEXP _arrow_Field__type(SEXP field_sexp){ BEGIN_CPP11 arrow::r::Input&>::type field(field_sexp); return cpp11::as_sexp(Field__type(field)); END_CPP11 } -#else -extern "C" SEXP _arrow_Field__type(SEXP field_sexp){ - Rf_error("Cannot call Field__type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Field__type(SEXP field_sexp){ + Rf_error("Cannot call Field__type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // filesystem.cpp -#if defined(ARROW_R_WITH_ARROW) -fs::FileType fs___FileInfo__type(const std::shared_ptr& x); + #if defined(ARROW_R_WITH_ARROW) + fs::FileType fs___FileInfo__type(const std::shared_ptr& x); extern "C" SEXP _arrow_fs___FileInfo__type(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(fs___FileInfo__type(x)); END_CPP11 } -#else -extern "C" SEXP _arrow_fs___FileInfo__type(SEXP x_sexp){ - Rf_error("Cannot call fs___FileInfo__type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_fs___FileInfo__type(SEXP x_sexp){ + Rf_error("Cannot call fs___FileInfo__type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // filesystem.cpp -#if defined(ARROW_R_WITH_ARROW) -void fs___FileInfo__set_type(const std::shared_ptr& x, fs::FileType type); + #if defined(ARROW_R_WITH_ARROW) + void fs___FileInfo__set_type(const std::shared_ptr& x, fs::FileType type); extern "C" SEXP _arrow_fs___FileInfo__set_type(SEXP x_sexp, SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); @@ -3633,30 +3633,30 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_fs___FileInfo__set_type(SEXP x_sexp, SEXP type_sexp){ - Rf_error("Cannot call fs___FileInfo__set_type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_fs___FileInfo__set_type(SEXP x_sexp, SEXP type_sexp){ + Rf_error("Cannot call fs___FileInfo__set_type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // filesystem.cpp -#if defined(ARROW_R_WITH_ARROW) -std::string fs___FileInfo__path(const std::shared_ptr& x); + #if defined(ARROW_R_WITH_ARROW) + std::string fs___FileInfo__path(const std::shared_ptr& x); extern "C" SEXP _arrow_fs___FileInfo__path(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(fs___FileInfo__path(x)); END_CPP11 } -#else -extern "C" SEXP _arrow_fs___FileInfo__path(SEXP x_sexp){ - Rf_error("Cannot call fs___FileInfo__path(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_fs___FileInfo__path(SEXP x_sexp){ + Rf_error("Cannot call fs___FileInfo__path(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // filesystem.cpp -#if defined(ARROW_R_WITH_ARROW) -void fs___FileInfo__set_path(const std::shared_ptr& x, const std::string& path); + #if defined(ARROW_R_WITH_ARROW) + void fs___FileInfo__set_path(const std::shared_ptr& x, const std::string& path); extern "C" SEXP _arrow_fs___FileInfo__set_path(SEXP x_sexp, SEXP path_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); @@ -3665,30 +3665,30 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_fs___FileInfo__set_path(SEXP x_sexp, SEXP path_sexp){ - Rf_error("Cannot call fs___FileInfo__set_path(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_fs___FileInfo__set_path(SEXP x_sexp, SEXP path_sexp){ + Rf_error("Cannot call fs___FileInfo__set_path(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // filesystem.cpp -#if defined(ARROW_R_WITH_ARROW) -int64_t fs___FileInfo__size(const std::shared_ptr& x); + #if defined(ARROW_R_WITH_ARROW) + int64_t fs___FileInfo__size(const std::shared_ptr& x); extern "C" SEXP _arrow_fs___FileInfo__size(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(fs___FileInfo__size(x)); END_CPP11 } -#else -extern "C" SEXP _arrow_fs___FileInfo__size(SEXP x_sexp){ - Rf_error("Cannot call fs___FileInfo__size(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_fs___FileInfo__size(SEXP x_sexp){ + Rf_error("Cannot call fs___FileInfo__size(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // filesystem.cpp -#if defined(ARROW_R_WITH_ARROW) -void fs___FileInfo__set_size(const std::shared_ptr& x, int64_t size); + #if defined(ARROW_R_WITH_ARROW) + void fs___FileInfo__set_size(const std::shared_ptr& x, int64_t size); extern "C" SEXP _arrow_fs___FileInfo__set_size(SEXP x_sexp, SEXP size_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); @@ -3697,60 +3697,60 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_fs___FileInfo__set_size(SEXP x_sexp, SEXP size_sexp){ - Rf_error("Cannot call fs___FileInfo__set_size(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_fs___FileInfo__set_size(SEXP x_sexp, SEXP size_sexp){ + Rf_error("Cannot call fs___FileInfo__set_size(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // filesystem.cpp -#if defined(ARROW_R_WITH_ARROW) -std::string fs___FileInfo__base_name(const std::shared_ptr& x); + #if defined(ARROW_R_WITH_ARROW) + std::string fs___FileInfo__base_name(const std::shared_ptr& x); extern "C" SEXP _arrow_fs___FileInfo__base_name(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(fs___FileInfo__base_name(x)); END_CPP11 } -#else -extern "C" SEXP _arrow_fs___FileInfo__base_name(SEXP x_sexp){ - Rf_error("Cannot call fs___FileInfo__base_name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_fs___FileInfo__base_name(SEXP x_sexp){ + Rf_error("Cannot call fs___FileInfo__base_name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // filesystem.cpp -#if defined(ARROW_R_WITH_ARROW) -std::string fs___FileInfo__extension(const std::shared_ptr& x); + #if defined(ARROW_R_WITH_ARROW) + std::string fs___FileInfo__extension(const std::shared_ptr& x); extern "C" SEXP _arrow_fs___FileInfo__extension(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(fs___FileInfo__extension(x)); END_CPP11 } -#else -extern "C" SEXP _arrow_fs___FileInfo__extension(SEXP x_sexp){ - Rf_error("Cannot call fs___FileInfo__extension(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_fs___FileInfo__extension(SEXP x_sexp){ + Rf_error("Cannot call fs___FileInfo__extension(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // filesystem.cpp -#if defined(ARROW_R_WITH_ARROW) -SEXP fs___FileInfo__mtime(const std::shared_ptr& x); + #if defined(ARROW_R_WITH_ARROW) + SEXP fs___FileInfo__mtime(const std::shared_ptr& x); extern "C" SEXP _arrow_fs___FileInfo__mtime(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(fs___FileInfo__mtime(x)); END_CPP11 } -#else -extern "C" SEXP _arrow_fs___FileInfo__mtime(SEXP x_sexp){ - Rf_error("Cannot call fs___FileInfo__mtime(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_fs___FileInfo__mtime(SEXP x_sexp){ + Rf_error("Cannot call fs___FileInfo__mtime(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // filesystem.cpp -#if defined(ARROW_R_WITH_ARROW) -void fs___FileInfo__set_mtime(const std::shared_ptr& x, SEXP time); + #if defined(ARROW_R_WITH_ARROW) + void fs___FileInfo__set_mtime(const std::shared_ptr& x, SEXP time); extern "C" SEXP _arrow_fs___FileInfo__set_mtime(SEXP x_sexp, SEXP time_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); @@ -3759,60 +3759,60 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_fs___FileInfo__set_mtime(SEXP x_sexp, SEXP time_sexp){ - Rf_error("Cannot call fs___FileInfo__set_mtime(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_fs___FileInfo__set_mtime(SEXP x_sexp, SEXP time_sexp){ + Rf_error("Cannot call fs___FileInfo__set_mtime(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // filesystem.cpp -#if defined(ARROW_R_WITH_ARROW) -std::string fs___FileSelector__base_dir(const std::shared_ptr& selector); + #if defined(ARROW_R_WITH_ARROW) + std::string fs___FileSelector__base_dir(const std::shared_ptr& selector); extern "C" SEXP _arrow_fs___FileSelector__base_dir(SEXP selector_sexp){ BEGIN_CPP11 arrow::r::Input&>::type selector(selector_sexp); return cpp11::as_sexp(fs___FileSelector__base_dir(selector)); END_CPP11 } -#else -extern "C" SEXP _arrow_fs___FileSelector__base_dir(SEXP selector_sexp){ - Rf_error("Cannot call fs___FileSelector__base_dir(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_fs___FileSelector__base_dir(SEXP selector_sexp){ + Rf_error("Cannot call fs___FileSelector__base_dir(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // filesystem.cpp -#if defined(ARROW_R_WITH_ARROW) -bool fs___FileSelector__allow_not_found(const std::shared_ptr& selector); + #if defined(ARROW_R_WITH_ARROW) + bool fs___FileSelector__allow_not_found(const std::shared_ptr& selector); extern "C" SEXP _arrow_fs___FileSelector__allow_not_found(SEXP selector_sexp){ BEGIN_CPP11 arrow::r::Input&>::type selector(selector_sexp); return cpp11::as_sexp(fs___FileSelector__allow_not_found(selector)); END_CPP11 } -#else -extern "C" SEXP _arrow_fs___FileSelector__allow_not_found(SEXP selector_sexp){ - Rf_error("Cannot call fs___FileSelector__allow_not_found(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_fs___FileSelector__allow_not_found(SEXP selector_sexp){ + Rf_error("Cannot call fs___FileSelector__allow_not_found(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // filesystem.cpp -#if defined(ARROW_R_WITH_ARROW) -bool fs___FileSelector__recursive(const std::shared_ptr& selector); + #if defined(ARROW_R_WITH_ARROW) + bool fs___FileSelector__recursive(const std::shared_ptr& selector); extern "C" SEXP _arrow_fs___FileSelector__recursive(SEXP selector_sexp){ BEGIN_CPP11 arrow::r::Input&>::type selector(selector_sexp); return cpp11::as_sexp(fs___FileSelector__recursive(selector)); END_CPP11 } -#else -extern "C" SEXP _arrow_fs___FileSelector__recursive(SEXP selector_sexp){ - Rf_error("Cannot call fs___FileSelector__recursive(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_fs___FileSelector__recursive(SEXP selector_sexp){ + Rf_error("Cannot call fs___FileSelector__recursive(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // filesystem.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr fs___FileSelector__create(const std::string& base_dir, bool allow_not_found, bool recursive); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr fs___FileSelector__create(const std::string& base_dir, bool allow_not_found, bool recursive); extern "C" SEXP _arrow_fs___FileSelector__create(SEXP base_dir_sexp, SEXP allow_not_found_sexp, SEXP recursive_sexp){ BEGIN_CPP11 arrow::r::Input::type base_dir(base_dir_sexp); @@ -3821,15 +3821,15 @@ BEGIN_CPP11 return cpp11::as_sexp(fs___FileSelector__create(base_dir, allow_not_found, recursive)); END_CPP11 } -#else -extern "C" SEXP _arrow_fs___FileSelector__create(SEXP base_dir_sexp, SEXP allow_not_found_sexp, SEXP recursive_sexp){ - Rf_error("Cannot call fs___FileSelector__create(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_fs___FileSelector__create(SEXP base_dir_sexp, SEXP allow_not_found_sexp, SEXP recursive_sexp){ + Rf_error("Cannot call fs___FileSelector__create(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // filesystem.cpp -#if defined(ARROW_R_WITH_ARROW) -cpp11::list fs___FileSystem__GetTargetInfos_Paths(const std::shared_ptr& file_system, const std::vector& paths); + #if defined(ARROW_R_WITH_ARROW) + cpp11::list fs___FileSystem__GetTargetInfos_Paths(const std::shared_ptr& file_system, const std::vector& paths); extern "C" SEXP _arrow_fs___FileSystem__GetTargetInfos_Paths(SEXP file_system_sexp, SEXP paths_sexp){ BEGIN_CPP11 arrow::r::Input&>::type file_system(file_system_sexp); @@ -3837,15 +3837,15 @@ BEGIN_CPP11 return cpp11::as_sexp(fs___FileSystem__GetTargetInfos_Paths(file_system, paths)); END_CPP11 } -#else -extern "C" SEXP _arrow_fs___FileSystem__GetTargetInfos_Paths(SEXP file_system_sexp, SEXP paths_sexp){ - Rf_error("Cannot call fs___FileSystem__GetTargetInfos_Paths(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_fs___FileSystem__GetTargetInfos_Paths(SEXP file_system_sexp, SEXP paths_sexp){ + Rf_error("Cannot call fs___FileSystem__GetTargetInfos_Paths(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // filesystem.cpp -#if defined(ARROW_R_WITH_ARROW) -cpp11::list fs___FileSystem__GetTargetInfos_FileSelector(const std::shared_ptr& file_system, const std::shared_ptr& selector); + #if defined(ARROW_R_WITH_ARROW) + cpp11::list fs___FileSystem__GetTargetInfos_FileSelector(const std::shared_ptr& file_system, const std::shared_ptr& selector); extern "C" SEXP _arrow_fs___FileSystem__GetTargetInfos_FileSelector(SEXP file_system_sexp, SEXP selector_sexp){ BEGIN_CPP11 arrow::r::Input&>::type file_system(file_system_sexp); @@ -3853,15 +3853,15 @@ BEGIN_CPP11 return cpp11::as_sexp(fs___FileSystem__GetTargetInfos_FileSelector(file_system, selector)); END_CPP11 } -#else -extern "C" SEXP _arrow_fs___FileSystem__GetTargetInfos_FileSelector(SEXP file_system_sexp, SEXP selector_sexp){ - Rf_error("Cannot call fs___FileSystem__GetTargetInfos_FileSelector(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_fs___FileSystem__GetTargetInfos_FileSelector(SEXP file_system_sexp, SEXP selector_sexp){ + Rf_error("Cannot call fs___FileSystem__GetTargetInfos_FileSelector(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // filesystem.cpp -#if defined(ARROW_R_WITH_ARROW) -void fs___FileSystem__CreateDir(const std::shared_ptr& file_system, const std::string& path, bool recursive); + #if defined(ARROW_R_WITH_ARROW) + void fs___FileSystem__CreateDir(const std::shared_ptr& file_system, const std::string& path, bool recursive); extern "C" SEXP _arrow_fs___FileSystem__CreateDir(SEXP file_system_sexp, SEXP path_sexp, SEXP recursive_sexp){ BEGIN_CPP11 arrow::r::Input&>::type file_system(file_system_sexp); @@ -3871,15 +3871,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_fs___FileSystem__CreateDir(SEXP file_system_sexp, SEXP path_sexp, SEXP recursive_sexp){ - Rf_error("Cannot call fs___FileSystem__CreateDir(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_fs___FileSystem__CreateDir(SEXP file_system_sexp, SEXP path_sexp, SEXP recursive_sexp){ + Rf_error("Cannot call fs___FileSystem__CreateDir(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // filesystem.cpp -#if defined(ARROW_R_WITH_ARROW) -void fs___FileSystem__DeleteDir(const std::shared_ptr& file_system, const std::string& path); + #if defined(ARROW_R_WITH_ARROW) + void fs___FileSystem__DeleteDir(const std::shared_ptr& file_system, const std::string& path); extern "C" SEXP _arrow_fs___FileSystem__DeleteDir(SEXP file_system_sexp, SEXP path_sexp){ BEGIN_CPP11 arrow::r::Input&>::type file_system(file_system_sexp); @@ -3888,15 +3888,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_fs___FileSystem__DeleteDir(SEXP file_system_sexp, SEXP path_sexp){ - Rf_error("Cannot call fs___FileSystem__DeleteDir(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_fs___FileSystem__DeleteDir(SEXP file_system_sexp, SEXP path_sexp){ + Rf_error("Cannot call fs___FileSystem__DeleteDir(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // filesystem.cpp -#if defined(ARROW_R_WITH_ARROW) -void fs___FileSystem__DeleteDirContents(const std::shared_ptr& file_system, const std::string& path); + #if defined(ARROW_R_WITH_ARROW) + void fs___FileSystem__DeleteDirContents(const std::shared_ptr& file_system, const std::string& path); extern "C" SEXP _arrow_fs___FileSystem__DeleteDirContents(SEXP file_system_sexp, SEXP path_sexp){ BEGIN_CPP11 arrow::r::Input&>::type file_system(file_system_sexp); @@ -3905,15 +3905,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_fs___FileSystem__DeleteDirContents(SEXP file_system_sexp, SEXP path_sexp){ - Rf_error("Cannot call fs___FileSystem__DeleteDirContents(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_fs___FileSystem__DeleteDirContents(SEXP file_system_sexp, SEXP path_sexp){ + Rf_error("Cannot call fs___FileSystem__DeleteDirContents(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // filesystem.cpp -#if defined(ARROW_R_WITH_ARROW) -void fs___FileSystem__DeleteFile(const std::shared_ptr& file_system, const std::string& path); + #if defined(ARROW_R_WITH_ARROW) + void fs___FileSystem__DeleteFile(const std::shared_ptr& file_system, const std::string& path); extern "C" SEXP _arrow_fs___FileSystem__DeleteFile(SEXP file_system_sexp, SEXP path_sexp){ BEGIN_CPP11 arrow::r::Input&>::type file_system(file_system_sexp); @@ -3922,15 +3922,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_fs___FileSystem__DeleteFile(SEXP file_system_sexp, SEXP path_sexp){ - Rf_error("Cannot call fs___FileSystem__DeleteFile(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_fs___FileSystem__DeleteFile(SEXP file_system_sexp, SEXP path_sexp){ + Rf_error("Cannot call fs___FileSystem__DeleteFile(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // filesystem.cpp -#if defined(ARROW_R_WITH_ARROW) -void fs___FileSystem__DeleteFiles(const std::shared_ptr& file_system, const std::vector& paths); + #if defined(ARROW_R_WITH_ARROW) + void fs___FileSystem__DeleteFiles(const std::shared_ptr& file_system, const std::vector& paths); extern "C" SEXP _arrow_fs___FileSystem__DeleteFiles(SEXP file_system_sexp, SEXP paths_sexp){ BEGIN_CPP11 arrow::r::Input&>::type file_system(file_system_sexp); @@ -3939,15 +3939,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_fs___FileSystem__DeleteFiles(SEXP file_system_sexp, SEXP paths_sexp){ - Rf_error("Cannot call fs___FileSystem__DeleteFiles(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_fs___FileSystem__DeleteFiles(SEXP file_system_sexp, SEXP paths_sexp){ + Rf_error("Cannot call fs___FileSystem__DeleteFiles(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // filesystem.cpp -#if defined(ARROW_R_WITH_ARROW) -void fs___FileSystem__Move(const std::shared_ptr& file_system, const std::string& src, const std::string& dest); + #if defined(ARROW_R_WITH_ARROW) + void fs___FileSystem__Move(const std::shared_ptr& file_system, const std::string& src, const std::string& dest); extern "C" SEXP _arrow_fs___FileSystem__Move(SEXP file_system_sexp, SEXP src_sexp, SEXP dest_sexp){ BEGIN_CPP11 arrow::r::Input&>::type file_system(file_system_sexp); @@ -3957,15 +3957,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_fs___FileSystem__Move(SEXP file_system_sexp, SEXP src_sexp, SEXP dest_sexp){ - Rf_error("Cannot call fs___FileSystem__Move(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_fs___FileSystem__Move(SEXP file_system_sexp, SEXP src_sexp, SEXP dest_sexp){ + Rf_error("Cannot call fs___FileSystem__Move(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // filesystem.cpp -#if defined(ARROW_R_WITH_ARROW) -void fs___FileSystem__CopyFile(const std::shared_ptr& file_system, const std::string& src, const std::string& dest); + #if defined(ARROW_R_WITH_ARROW) + void fs___FileSystem__CopyFile(const std::shared_ptr& file_system, const std::string& src, const std::string& dest); extern "C" SEXP _arrow_fs___FileSystem__CopyFile(SEXP file_system_sexp, SEXP src_sexp, SEXP dest_sexp){ BEGIN_CPP11 arrow::r::Input&>::type file_system(file_system_sexp); @@ -3975,15 +3975,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_fs___FileSystem__CopyFile(SEXP file_system_sexp, SEXP src_sexp, SEXP dest_sexp){ - Rf_error("Cannot call fs___FileSystem__CopyFile(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_fs___FileSystem__CopyFile(SEXP file_system_sexp, SEXP src_sexp, SEXP dest_sexp){ + Rf_error("Cannot call fs___FileSystem__CopyFile(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // filesystem.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr fs___FileSystem__OpenInputStream(const std::shared_ptr& file_system, const std::string& path); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr fs___FileSystem__OpenInputStream(const std::shared_ptr& file_system, const std::string& path); extern "C" SEXP _arrow_fs___FileSystem__OpenInputStream(SEXP file_system_sexp, SEXP path_sexp){ BEGIN_CPP11 arrow::r::Input&>::type file_system(file_system_sexp); @@ -3991,15 +3991,15 @@ BEGIN_CPP11 return cpp11::as_sexp(fs___FileSystem__OpenInputStream(file_system, path)); END_CPP11 } -#else -extern "C" SEXP _arrow_fs___FileSystem__OpenInputStream(SEXP file_system_sexp, SEXP path_sexp){ - Rf_error("Cannot call fs___FileSystem__OpenInputStream(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_fs___FileSystem__OpenInputStream(SEXP file_system_sexp, SEXP path_sexp){ + Rf_error("Cannot call fs___FileSystem__OpenInputStream(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // filesystem.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr fs___FileSystem__OpenInputFile(const std::shared_ptr& file_system, const std::string& path); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr fs___FileSystem__OpenInputFile(const std::shared_ptr& file_system, const std::string& path); extern "C" SEXP _arrow_fs___FileSystem__OpenInputFile(SEXP file_system_sexp, SEXP path_sexp){ BEGIN_CPP11 arrow::r::Input&>::type file_system(file_system_sexp); @@ -4007,15 +4007,15 @@ BEGIN_CPP11 return cpp11::as_sexp(fs___FileSystem__OpenInputFile(file_system, path)); END_CPP11 } -#else -extern "C" SEXP _arrow_fs___FileSystem__OpenInputFile(SEXP file_system_sexp, SEXP path_sexp){ - Rf_error("Cannot call fs___FileSystem__OpenInputFile(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_fs___FileSystem__OpenInputFile(SEXP file_system_sexp, SEXP path_sexp){ + Rf_error("Cannot call fs___FileSystem__OpenInputFile(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // filesystem.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr fs___FileSystem__OpenOutputStream(const std::shared_ptr& file_system, const std::string& path); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr fs___FileSystem__OpenOutputStream(const std::shared_ptr& file_system, const std::string& path); extern "C" SEXP _arrow_fs___FileSystem__OpenOutputStream(SEXP file_system_sexp, SEXP path_sexp){ BEGIN_CPP11 arrow::r::Input&>::type file_system(file_system_sexp); @@ -4023,15 +4023,15 @@ BEGIN_CPP11 return cpp11::as_sexp(fs___FileSystem__OpenOutputStream(file_system, path)); END_CPP11 } -#else -extern "C" SEXP _arrow_fs___FileSystem__OpenOutputStream(SEXP file_system_sexp, SEXP path_sexp){ - Rf_error("Cannot call fs___FileSystem__OpenOutputStream(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_fs___FileSystem__OpenOutputStream(SEXP file_system_sexp, SEXP path_sexp){ + Rf_error("Cannot call fs___FileSystem__OpenOutputStream(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // filesystem.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr fs___FileSystem__OpenAppendStream(const std::shared_ptr& file_system, const std::string& path); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr fs___FileSystem__OpenAppendStream(const std::shared_ptr& file_system, const std::string& path); extern "C" SEXP _arrow_fs___FileSystem__OpenAppendStream(SEXP file_system_sexp, SEXP path_sexp){ BEGIN_CPP11 arrow::r::Input&>::type file_system(file_system_sexp); @@ -4039,44 +4039,44 @@ BEGIN_CPP11 return cpp11::as_sexp(fs___FileSystem__OpenAppendStream(file_system, path)); END_CPP11 } -#else -extern "C" SEXP _arrow_fs___FileSystem__OpenAppendStream(SEXP file_system_sexp, SEXP path_sexp){ - Rf_error("Cannot call fs___FileSystem__OpenAppendStream(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_fs___FileSystem__OpenAppendStream(SEXP file_system_sexp, SEXP path_sexp){ + Rf_error("Cannot call fs___FileSystem__OpenAppendStream(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // filesystem.cpp -#if defined(ARROW_R_WITH_ARROW) -std::string fs___FileSystem__type_name(const std::shared_ptr& file_system); + #if defined(ARROW_R_WITH_ARROW) + std::string fs___FileSystem__type_name(const std::shared_ptr& file_system); extern "C" SEXP _arrow_fs___FileSystem__type_name(SEXP file_system_sexp){ BEGIN_CPP11 arrow::r::Input&>::type file_system(file_system_sexp); return cpp11::as_sexp(fs___FileSystem__type_name(file_system)); END_CPP11 } -#else -extern "C" SEXP _arrow_fs___FileSystem__type_name(SEXP file_system_sexp){ - Rf_error("Cannot call fs___FileSystem__type_name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_fs___FileSystem__type_name(SEXP file_system_sexp){ + Rf_error("Cannot call fs___FileSystem__type_name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // filesystem.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr fs___LocalFileSystem__create(); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr fs___LocalFileSystem__create(); extern "C" SEXP _arrow_fs___LocalFileSystem__create(){ BEGIN_CPP11 return cpp11::as_sexp(fs___LocalFileSystem__create()); END_CPP11 } -#else -extern "C" SEXP _arrow_fs___LocalFileSystem__create(){ - Rf_error("Cannot call fs___LocalFileSystem__create(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_fs___LocalFileSystem__create(){ + Rf_error("Cannot call fs___LocalFileSystem__create(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // filesystem.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr fs___SubTreeFileSystem__create(const std::string& base_path, const std::shared_ptr& base_fs); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr fs___SubTreeFileSystem__create(const std::string& base_path, const std::shared_ptr& base_fs); extern "C" SEXP _arrow_fs___SubTreeFileSystem__create(SEXP base_path_sexp, SEXP base_fs_sexp){ BEGIN_CPP11 arrow::r::Input::type base_path(base_path_sexp); @@ -4084,60 +4084,60 @@ BEGIN_CPP11 return cpp11::as_sexp(fs___SubTreeFileSystem__create(base_path, base_fs)); END_CPP11 } -#else -extern "C" SEXP _arrow_fs___SubTreeFileSystem__create(SEXP base_path_sexp, SEXP base_fs_sexp){ - Rf_error("Cannot call fs___SubTreeFileSystem__create(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_fs___SubTreeFileSystem__create(SEXP base_path_sexp, SEXP base_fs_sexp){ + Rf_error("Cannot call fs___SubTreeFileSystem__create(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // filesystem.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr fs___SubTreeFileSystem__base_fs(const std::shared_ptr& file_system); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr fs___SubTreeFileSystem__base_fs(const std::shared_ptr& file_system); extern "C" SEXP _arrow_fs___SubTreeFileSystem__base_fs(SEXP file_system_sexp){ BEGIN_CPP11 arrow::r::Input&>::type file_system(file_system_sexp); return cpp11::as_sexp(fs___SubTreeFileSystem__base_fs(file_system)); END_CPP11 } -#else -extern "C" SEXP _arrow_fs___SubTreeFileSystem__base_fs(SEXP file_system_sexp){ - Rf_error("Cannot call fs___SubTreeFileSystem__base_fs(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_fs___SubTreeFileSystem__base_fs(SEXP file_system_sexp){ + Rf_error("Cannot call fs___SubTreeFileSystem__base_fs(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // filesystem.cpp -#if defined(ARROW_R_WITH_ARROW) -std::string fs___SubTreeFileSystem__base_path(const std::shared_ptr& file_system); + #if defined(ARROW_R_WITH_ARROW) + std::string fs___SubTreeFileSystem__base_path(const std::shared_ptr& file_system); extern "C" SEXP _arrow_fs___SubTreeFileSystem__base_path(SEXP file_system_sexp){ BEGIN_CPP11 arrow::r::Input&>::type file_system(file_system_sexp); return cpp11::as_sexp(fs___SubTreeFileSystem__base_path(file_system)); END_CPP11 } -#else -extern "C" SEXP _arrow_fs___SubTreeFileSystem__base_path(SEXP file_system_sexp){ - Rf_error("Cannot call fs___SubTreeFileSystem__base_path(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_fs___SubTreeFileSystem__base_path(SEXP file_system_sexp){ + Rf_error("Cannot call fs___SubTreeFileSystem__base_path(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // filesystem.cpp -#if defined(ARROW_R_WITH_ARROW) -cpp11::writable::list fs___FileSystemFromUri(const std::string& path); + #if defined(ARROW_R_WITH_ARROW) + cpp11::writable::list fs___FileSystemFromUri(const std::string& path); extern "C" SEXP _arrow_fs___FileSystemFromUri(SEXP path_sexp){ BEGIN_CPP11 arrow::r::Input::type path(path_sexp); return cpp11::as_sexp(fs___FileSystemFromUri(path)); END_CPP11 } -#else -extern "C" SEXP _arrow_fs___FileSystemFromUri(SEXP path_sexp){ - Rf_error("Cannot call fs___FileSystemFromUri(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_fs___FileSystemFromUri(SEXP path_sexp){ + Rf_error("Cannot call fs___FileSystemFromUri(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // filesystem.cpp -#if defined(ARROW_R_WITH_ARROW) -void fs___CopyFiles(const std::shared_ptr& source_fs, const std::shared_ptr& source_sel, const std::shared_ptr& destination_fs, const std::string& destination_base_dir, int64_t chunk_size, bool use_threads); + #if defined(ARROW_R_WITH_ARROW) + void fs___CopyFiles(const std::shared_ptr& source_fs, const std::shared_ptr& source_sel, const std::shared_ptr& destination_fs, const std::string& destination_base_dir, int64_t chunk_size, bool use_threads); extern "C" SEXP _arrow_fs___CopyFiles(SEXP source_fs_sexp, SEXP source_sel_sexp, SEXP destination_fs_sexp, SEXP destination_base_dir_sexp, SEXP chunk_size_sexp, SEXP use_threads_sexp){ BEGIN_CPP11 arrow::r::Input&>::type source_fs(source_fs_sexp); @@ -4150,15 +4150,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_fs___CopyFiles(SEXP source_fs_sexp, SEXP source_sel_sexp, SEXP destination_fs_sexp, SEXP destination_base_dir_sexp, SEXP chunk_size_sexp, SEXP use_threads_sexp){ - Rf_error("Cannot call fs___CopyFiles(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_fs___CopyFiles(SEXP source_fs_sexp, SEXP source_sel_sexp, SEXP destination_fs_sexp, SEXP destination_base_dir_sexp, SEXP chunk_size_sexp, SEXP use_threads_sexp){ + Rf_error("Cannot call fs___CopyFiles(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // filesystem.cpp -#if defined(ARROW_R_WITH_S3) -std::shared_ptr fs___S3FileSystem__create(bool anonymous, std::string access_key, std::string secret_key, std::string session_token, std::string role_arn, std::string session_name, std::string external_id, int load_frequency, std::string region, std::string endpoint_override, std::string scheme, std::string proxy_options, bool background_writes); + #if defined(ARROW_R_WITH_S3) + std::shared_ptr fs___S3FileSystem__create(bool anonymous, std::string access_key, std::string secret_key, std::string session_token, std::string role_arn, std::string session_name, std::string external_id, int load_frequency, std::string region, std::string endpoint_override, std::string scheme, std::string proxy_options, bool background_writes); extern "C" SEXP _arrow_fs___S3FileSystem__create(SEXP anonymous_sexp, SEXP access_key_sexp, SEXP secret_key_sexp, SEXP session_token_sexp, SEXP role_arn_sexp, SEXP session_name_sexp, SEXP external_id_sexp, SEXP load_frequency_sexp, SEXP region_sexp, SEXP endpoint_override_sexp, SEXP scheme_sexp, SEXP proxy_options_sexp, SEXP background_writes_sexp){ BEGIN_CPP11 arrow::r::Input::type anonymous(anonymous_sexp); @@ -4177,30 +4177,30 @@ BEGIN_CPP11 return cpp11::as_sexp(fs___S3FileSystem__create(anonymous, access_key, secret_key, session_token, role_arn, session_name, external_id, load_frequency, region, endpoint_override, scheme, proxy_options, background_writes)); END_CPP11 } -#else -extern "C" SEXP _arrow_fs___S3FileSystem__create(SEXP anonymous_sexp, SEXP access_key_sexp, SEXP secret_key_sexp, SEXP session_token_sexp, SEXP role_arn_sexp, SEXP session_name_sexp, SEXP external_id_sexp, SEXP load_frequency_sexp, SEXP region_sexp, SEXP endpoint_override_sexp, SEXP scheme_sexp, SEXP proxy_options_sexp, SEXP background_writes_sexp){ - Rf_error("Cannot call fs___S3FileSystem__create(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_fs___S3FileSystem__create(SEXP anonymous_sexp, SEXP access_key_sexp, SEXP secret_key_sexp, SEXP session_token_sexp, SEXP role_arn_sexp, SEXP session_name_sexp, SEXP external_id_sexp, SEXP load_frequency_sexp, SEXP region_sexp, SEXP endpoint_override_sexp, SEXP scheme_sexp, SEXP proxy_options_sexp, SEXP background_writes_sexp){ + Rf_error("Cannot call fs___S3FileSystem__create(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // filesystem.cpp -#if defined(ARROW_R_WITH_S3) -std::string fs___S3FileSystem__region(const std::shared_ptr& fs); + #if defined(ARROW_R_WITH_S3) + std::string fs___S3FileSystem__region(const std::shared_ptr& fs); extern "C" SEXP _arrow_fs___S3FileSystem__region(SEXP fs_sexp){ BEGIN_CPP11 arrow::r::Input&>::type fs(fs_sexp); return cpp11::as_sexp(fs___S3FileSystem__region(fs)); END_CPP11 } -#else -extern "C" SEXP _arrow_fs___S3FileSystem__region(SEXP fs_sexp){ - Rf_error("Cannot call fs___S3FileSystem__region(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_fs___S3FileSystem__region(SEXP fs_sexp){ + Rf_error("Cannot call fs___S3FileSystem__region(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // io.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr io___Readable__Read(const std::shared_ptr& x, int64_t nbytes); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr io___Readable__Read(const std::shared_ptr& x, int64_t nbytes); extern "C" SEXP _arrow_io___Readable__Read(SEXP x_sexp, SEXP nbytes_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); @@ -4208,15 +4208,15 @@ BEGIN_CPP11 return cpp11::as_sexp(io___Readable__Read(x, nbytes)); END_CPP11 } -#else -extern "C" SEXP _arrow_io___Readable__Read(SEXP x_sexp, SEXP nbytes_sexp){ - Rf_error("Cannot call io___Readable__Read(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_io___Readable__Read(SEXP x_sexp, SEXP nbytes_sexp){ + Rf_error("Cannot call io___Readable__Read(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // io.cpp -#if defined(ARROW_R_WITH_ARROW) -void io___InputStream__Close(const std::shared_ptr& x); + #if defined(ARROW_R_WITH_ARROW) + void io___InputStream__Close(const std::shared_ptr& x); extern "C" SEXP _arrow_io___InputStream__Close(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); @@ -4224,15 +4224,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_io___InputStream__Close(SEXP x_sexp){ - Rf_error("Cannot call io___InputStream__Close(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_io___InputStream__Close(SEXP x_sexp){ + Rf_error("Cannot call io___InputStream__Close(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // io.cpp -#if defined(ARROW_R_WITH_ARROW) -void io___OutputStream__Close(const std::shared_ptr& x); + #if defined(ARROW_R_WITH_ARROW) + void io___OutputStream__Close(const std::shared_ptr& x); extern "C" SEXP _arrow_io___OutputStream__Close(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); @@ -4240,45 +4240,45 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_io___OutputStream__Close(SEXP x_sexp){ - Rf_error("Cannot call io___OutputStream__Close(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_io___OutputStream__Close(SEXP x_sexp){ + Rf_error("Cannot call io___OutputStream__Close(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // io.cpp -#if defined(ARROW_R_WITH_ARROW) -int64_t io___RandomAccessFile__GetSize(const std::shared_ptr& x); + #if defined(ARROW_R_WITH_ARROW) + int64_t io___RandomAccessFile__GetSize(const std::shared_ptr& x); extern "C" SEXP _arrow_io___RandomAccessFile__GetSize(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(io___RandomAccessFile__GetSize(x)); END_CPP11 } -#else -extern "C" SEXP _arrow_io___RandomAccessFile__GetSize(SEXP x_sexp){ - Rf_error("Cannot call io___RandomAccessFile__GetSize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_io___RandomAccessFile__GetSize(SEXP x_sexp){ + Rf_error("Cannot call io___RandomAccessFile__GetSize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // io.cpp -#if defined(ARROW_R_WITH_ARROW) -bool io___RandomAccessFile__supports_zero_copy(const std::shared_ptr& x); + #if defined(ARROW_R_WITH_ARROW) + bool io___RandomAccessFile__supports_zero_copy(const std::shared_ptr& x); extern "C" SEXP _arrow_io___RandomAccessFile__supports_zero_copy(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(io___RandomAccessFile__supports_zero_copy(x)); END_CPP11 } -#else -extern "C" SEXP _arrow_io___RandomAccessFile__supports_zero_copy(SEXP x_sexp){ - Rf_error("Cannot call io___RandomAccessFile__supports_zero_copy(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_io___RandomAccessFile__supports_zero_copy(SEXP x_sexp){ + Rf_error("Cannot call io___RandomAccessFile__supports_zero_copy(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // io.cpp -#if defined(ARROW_R_WITH_ARROW) -void io___RandomAccessFile__Seek(const std::shared_ptr& x, int64_t position); + #if defined(ARROW_R_WITH_ARROW) + void io___RandomAccessFile__Seek(const std::shared_ptr& x, int64_t position); extern "C" SEXP _arrow_io___RandomAccessFile__Seek(SEXP x_sexp, SEXP position_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); @@ -4287,45 +4287,45 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_io___RandomAccessFile__Seek(SEXP x_sexp, SEXP position_sexp){ - Rf_error("Cannot call io___RandomAccessFile__Seek(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_io___RandomAccessFile__Seek(SEXP x_sexp, SEXP position_sexp){ + Rf_error("Cannot call io___RandomAccessFile__Seek(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // io.cpp -#if defined(ARROW_R_WITH_ARROW) -int64_t io___RandomAccessFile__Tell(const std::shared_ptr& x); + #if defined(ARROW_R_WITH_ARROW) + int64_t io___RandomAccessFile__Tell(const std::shared_ptr& x); extern "C" SEXP _arrow_io___RandomAccessFile__Tell(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(io___RandomAccessFile__Tell(x)); END_CPP11 } -#else -extern "C" SEXP _arrow_io___RandomAccessFile__Tell(SEXP x_sexp){ - Rf_error("Cannot call io___RandomAccessFile__Tell(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_io___RandomAccessFile__Tell(SEXP x_sexp){ + Rf_error("Cannot call io___RandomAccessFile__Tell(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // io.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr io___RandomAccessFile__Read0(const std::shared_ptr& x); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr io___RandomAccessFile__Read0(const std::shared_ptr& x); extern "C" SEXP _arrow_io___RandomAccessFile__Read0(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(io___RandomAccessFile__Read0(x)); END_CPP11 } -#else -extern "C" SEXP _arrow_io___RandomAccessFile__Read0(SEXP x_sexp){ - Rf_error("Cannot call io___RandomAccessFile__Read0(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_io___RandomAccessFile__Read0(SEXP x_sexp){ + Rf_error("Cannot call io___RandomAccessFile__Read0(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // io.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr io___RandomAccessFile__ReadAt(const std::shared_ptr& x, int64_t position, int64_t nbytes); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr io___RandomAccessFile__ReadAt(const std::shared_ptr& x, int64_t position, int64_t nbytes); extern "C" SEXP _arrow_io___RandomAccessFile__ReadAt(SEXP x_sexp, SEXP position_sexp, SEXP nbytes_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); @@ -4334,15 +4334,15 @@ BEGIN_CPP11 return cpp11::as_sexp(io___RandomAccessFile__ReadAt(x, position, nbytes)); END_CPP11 } -#else -extern "C" SEXP _arrow_io___RandomAccessFile__ReadAt(SEXP x_sexp, SEXP position_sexp, SEXP nbytes_sexp){ - Rf_error("Cannot call io___RandomAccessFile__ReadAt(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_io___RandomAccessFile__ReadAt(SEXP x_sexp, SEXP position_sexp, SEXP nbytes_sexp){ + Rf_error("Cannot call io___RandomAccessFile__ReadAt(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // io.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr io___MemoryMappedFile__Create(const std::string& path, int64_t size); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr io___MemoryMappedFile__Create(const std::string& path, int64_t size); extern "C" SEXP _arrow_io___MemoryMappedFile__Create(SEXP path_sexp, SEXP size_sexp){ BEGIN_CPP11 arrow::r::Input::type path(path_sexp); @@ -4350,15 +4350,15 @@ BEGIN_CPP11 return cpp11::as_sexp(io___MemoryMappedFile__Create(path, size)); END_CPP11 } -#else -extern "C" SEXP _arrow_io___MemoryMappedFile__Create(SEXP path_sexp, SEXP size_sexp){ - Rf_error("Cannot call io___MemoryMappedFile__Create(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_io___MemoryMappedFile__Create(SEXP path_sexp, SEXP size_sexp){ + Rf_error("Cannot call io___MemoryMappedFile__Create(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // io.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr io___MemoryMappedFile__Open(const std::string& path, arrow::io::FileMode::type mode); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr io___MemoryMappedFile__Open(const std::string& path, arrow::io::FileMode::type mode); extern "C" SEXP _arrow_io___MemoryMappedFile__Open(SEXP path_sexp, SEXP mode_sexp){ BEGIN_CPP11 arrow::r::Input::type path(path_sexp); @@ -4366,15 +4366,15 @@ BEGIN_CPP11 return cpp11::as_sexp(io___MemoryMappedFile__Open(path, mode)); END_CPP11 } -#else -extern "C" SEXP _arrow_io___MemoryMappedFile__Open(SEXP path_sexp, SEXP mode_sexp){ - Rf_error("Cannot call io___MemoryMappedFile__Open(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_io___MemoryMappedFile__Open(SEXP path_sexp, SEXP mode_sexp){ + Rf_error("Cannot call io___MemoryMappedFile__Open(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // io.cpp -#if defined(ARROW_R_WITH_ARROW) -void io___MemoryMappedFile__Resize(const std::shared_ptr& x, int64_t size); + #if defined(ARROW_R_WITH_ARROW) + void io___MemoryMappedFile__Resize(const std::shared_ptr& x, int64_t size); extern "C" SEXP _arrow_io___MemoryMappedFile__Resize(SEXP x_sexp, SEXP size_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); @@ -4383,45 +4383,45 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_io___MemoryMappedFile__Resize(SEXP x_sexp, SEXP size_sexp){ - Rf_error("Cannot call io___MemoryMappedFile__Resize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_io___MemoryMappedFile__Resize(SEXP x_sexp, SEXP size_sexp){ + Rf_error("Cannot call io___MemoryMappedFile__Resize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // io.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr io___ReadableFile__Open(const std::string& path); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr io___ReadableFile__Open(const std::string& path); extern "C" SEXP _arrow_io___ReadableFile__Open(SEXP path_sexp){ BEGIN_CPP11 arrow::r::Input::type path(path_sexp); return cpp11::as_sexp(io___ReadableFile__Open(path)); END_CPP11 } -#else -extern "C" SEXP _arrow_io___ReadableFile__Open(SEXP path_sexp){ - Rf_error("Cannot call io___ReadableFile__Open(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_io___ReadableFile__Open(SEXP path_sexp){ + Rf_error("Cannot call io___ReadableFile__Open(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // io.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr io___BufferReader__initialize(const std::shared_ptr& buffer); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr io___BufferReader__initialize(const std::shared_ptr& buffer); extern "C" SEXP _arrow_io___BufferReader__initialize(SEXP buffer_sexp){ BEGIN_CPP11 arrow::r::Input&>::type buffer(buffer_sexp); return cpp11::as_sexp(io___BufferReader__initialize(buffer)); END_CPP11 } -#else -extern "C" SEXP _arrow_io___BufferReader__initialize(SEXP buffer_sexp){ - Rf_error("Cannot call io___BufferReader__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_io___BufferReader__initialize(SEXP buffer_sexp){ + Rf_error("Cannot call io___BufferReader__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // io.cpp -#if defined(ARROW_R_WITH_ARROW) -void io___Writable__write(const std::shared_ptr& stream, const std::shared_ptr& buf); + #if defined(ARROW_R_WITH_ARROW) + void io___Writable__write(const std::shared_ptr& stream, const std::shared_ptr& buf); extern "C" SEXP _arrow_io___Writable__write(SEXP stream_sexp, SEXP buf_sexp){ BEGIN_CPP11 arrow::r::Input&>::type stream(stream_sexp); @@ -4430,105 +4430,105 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_io___Writable__write(SEXP stream_sexp, SEXP buf_sexp){ - Rf_error("Cannot call io___Writable__write(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_io___Writable__write(SEXP stream_sexp, SEXP buf_sexp){ + Rf_error("Cannot call io___Writable__write(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // io.cpp -#if defined(ARROW_R_WITH_ARROW) -int64_t io___OutputStream__Tell(const std::shared_ptr& stream); + #if defined(ARROW_R_WITH_ARROW) + int64_t io___OutputStream__Tell(const std::shared_ptr& stream); extern "C" SEXP _arrow_io___OutputStream__Tell(SEXP stream_sexp){ BEGIN_CPP11 arrow::r::Input&>::type stream(stream_sexp); return cpp11::as_sexp(io___OutputStream__Tell(stream)); END_CPP11 } -#else -extern "C" SEXP _arrow_io___OutputStream__Tell(SEXP stream_sexp){ - Rf_error("Cannot call io___OutputStream__Tell(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_io___OutputStream__Tell(SEXP stream_sexp){ + Rf_error("Cannot call io___OutputStream__Tell(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // io.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr io___FileOutputStream__Open(const std::string& path); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr io___FileOutputStream__Open(const std::string& path); extern "C" SEXP _arrow_io___FileOutputStream__Open(SEXP path_sexp){ BEGIN_CPP11 arrow::r::Input::type path(path_sexp); return cpp11::as_sexp(io___FileOutputStream__Open(path)); END_CPP11 } -#else -extern "C" SEXP _arrow_io___FileOutputStream__Open(SEXP path_sexp){ - Rf_error("Cannot call io___FileOutputStream__Open(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_io___FileOutputStream__Open(SEXP path_sexp){ + Rf_error("Cannot call io___FileOutputStream__Open(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // io.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr io___BufferOutputStream__Create(int64_t initial_capacity); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr io___BufferOutputStream__Create(int64_t initial_capacity); extern "C" SEXP _arrow_io___BufferOutputStream__Create(SEXP initial_capacity_sexp){ BEGIN_CPP11 arrow::r::Input::type initial_capacity(initial_capacity_sexp); return cpp11::as_sexp(io___BufferOutputStream__Create(initial_capacity)); END_CPP11 } -#else -extern "C" SEXP _arrow_io___BufferOutputStream__Create(SEXP initial_capacity_sexp){ - Rf_error("Cannot call io___BufferOutputStream__Create(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_io___BufferOutputStream__Create(SEXP initial_capacity_sexp){ + Rf_error("Cannot call io___BufferOutputStream__Create(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // io.cpp -#if defined(ARROW_R_WITH_ARROW) -int64_t io___BufferOutputStream__capacity(const std::shared_ptr& stream); + #if defined(ARROW_R_WITH_ARROW) + int64_t io___BufferOutputStream__capacity(const std::shared_ptr& stream); extern "C" SEXP _arrow_io___BufferOutputStream__capacity(SEXP stream_sexp){ BEGIN_CPP11 arrow::r::Input&>::type stream(stream_sexp); return cpp11::as_sexp(io___BufferOutputStream__capacity(stream)); END_CPP11 } -#else -extern "C" SEXP _arrow_io___BufferOutputStream__capacity(SEXP stream_sexp){ - Rf_error("Cannot call io___BufferOutputStream__capacity(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_io___BufferOutputStream__capacity(SEXP stream_sexp){ + Rf_error("Cannot call io___BufferOutputStream__capacity(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // io.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr io___BufferOutputStream__Finish(const std::shared_ptr& stream); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr io___BufferOutputStream__Finish(const std::shared_ptr& stream); extern "C" SEXP _arrow_io___BufferOutputStream__Finish(SEXP stream_sexp){ BEGIN_CPP11 arrow::r::Input&>::type stream(stream_sexp); return cpp11::as_sexp(io___BufferOutputStream__Finish(stream)); END_CPP11 } -#else -extern "C" SEXP _arrow_io___BufferOutputStream__Finish(SEXP stream_sexp){ - Rf_error("Cannot call io___BufferOutputStream__Finish(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_io___BufferOutputStream__Finish(SEXP stream_sexp){ + Rf_error("Cannot call io___BufferOutputStream__Finish(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // io.cpp -#if defined(ARROW_R_WITH_ARROW) -int64_t io___BufferOutputStream__Tell(const std::shared_ptr& stream); + #if defined(ARROW_R_WITH_ARROW) + int64_t io___BufferOutputStream__Tell(const std::shared_ptr& stream); extern "C" SEXP _arrow_io___BufferOutputStream__Tell(SEXP stream_sexp){ BEGIN_CPP11 arrow::r::Input&>::type stream(stream_sexp); return cpp11::as_sexp(io___BufferOutputStream__Tell(stream)); END_CPP11 } -#else -extern "C" SEXP _arrow_io___BufferOutputStream__Tell(SEXP stream_sexp){ - Rf_error("Cannot call io___BufferOutputStream__Tell(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_io___BufferOutputStream__Tell(SEXP stream_sexp){ + Rf_error("Cannot call io___BufferOutputStream__Tell(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // io.cpp -#if defined(ARROW_R_WITH_ARROW) -void io___BufferOutputStream__Write(const std::shared_ptr& stream, cpp11::raws bytes); + #if defined(ARROW_R_WITH_ARROW) + void io___BufferOutputStream__Write(const std::shared_ptr& stream, cpp11::raws bytes); extern "C" SEXP _arrow_io___BufferOutputStream__Write(SEXP stream_sexp, SEXP bytes_sexp){ BEGIN_CPP11 arrow::r::Input&>::type stream(stream_sexp); @@ -4537,15 +4537,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_io___BufferOutputStream__Write(SEXP stream_sexp, SEXP bytes_sexp){ - Rf_error("Cannot call io___BufferOutputStream__Write(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_io___BufferOutputStream__Write(SEXP stream_sexp, SEXP bytes_sexp){ + Rf_error("Cannot call io___BufferOutputStream__Write(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // json.cpp -#if defined(ARROW_R_WITH_JSON) -std::shared_ptr json___ReadOptions__initialize(bool use_threads, int block_size); + #if defined(ARROW_R_WITH_JSON) + std::shared_ptr json___ReadOptions__initialize(bool use_threads, int block_size); extern "C" SEXP _arrow_json___ReadOptions__initialize(SEXP use_threads_sexp, SEXP block_size_sexp){ BEGIN_CPP11 arrow::r::Input::type use_threads(use_threads_sexp); @@ -4553,30 +4553,30 @@ BEGIN_CPP11 return cpp11::as_sexp(json___ReadOptions__initialize(use_threads, block_size)); END_CPP11 } -#else -extern "C" SEXP _arrow_json___ReadOptions__initialize(SEXP use_threads_sexp, SEXP block_size_sexp){ - Rf_error("Cannot call json___ReadOptions__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_json___ReadOptions__initialize(SEXP use_threads_sexp, SEXP block_size_sexp){ + Rf_error("Cannot call json___ReadOptions__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // json.cpp -#if defined(ARROW_R_WITH_JSON) -std::shared_ptr json___ParseOptions__initialize1(bool newlines_in_values); + #if defined(ARROW_R_WITH_JSON) + std::shared_ptr json___ParseOptions__initialize1(bool newlines_in_values); extern "C" SEXP _arrow_json___ParseOptions__initialize1(SEXP newlines_in_values_sexp){ BEGIN_CPP11 arrow::r::Input::type newlines_in_values(newlines_in_values_sexp); return cpp11::as_sexp(json___ParseOptions__initialize1(newlines_in_values)); END_CPP11 } -#else -extern "C" SEXP _arrow_json___ParseOptions__initialize1(SEXP newlines_in_values_sexp){ - Rf_error("Cannot call json___ParseOptions__initialize1(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_json___ParseOptions__initialize1(SEXP newlines_in_values_sexp){ + Rf_error("Cannot call json___ParseOptions__initialize1(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // json.cpp -#if defined(ARROW_R_WITH_JSON) -std::shared_ptr json___ParseOptions__initialize2(bool newlines_in_values, const std::shared_ptr& explicit_schema); + #if defined(ARROW_R_WITH_JSON) + std::shared_ptr json___ParseOptions__initialize2(bool newlines_in_values, const std::shared_ptr& explicit_schema); extern "C" SEXP _arrow_json___ParseOptions__initialize2(SEXP newlines_in_values_sexp, SEXP explicit_schema_sexp){ BEGIN_CPP11 arrow::r::Input::type newlines_in_values(newlines_in_values_sexp); @@ -4584,15 +4584,15 @@ BEGIN_CPP11 return cpp11::as_sexp(json___ParseOptions__initialize2(newlines_in_values, explicit_schema)); END_CPP11 } -#else -extern "C" SEXP _arrow_json___ParseOptions__initialize2(SEXP newlines_in_values_sexp, SEXP explicit_schema_sexp){ - Rf_error("Cannot call json___ParseOptions__initialize2(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_json___ParseOptions__initialize2(SEXP newlines_in_values_sexp, SEXP explicit_schema_sexp){ + Rf_error("Cannot call json___ParseOptions__initialize2(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // json.cpp -#if defined(ARROW_R_WITH_JSON) -std::shared_ptr json___TableReader__Make(const std::shared_ptr& input, const std::shared_ptr& read_options, const std::shared_ptr& parse_options); + #if defined(ARROW_R_WITH_JSON) + std::shared_ptr json___TableReader__Make(const std::shared_ptr& input, const std::shared_ptr& read_options, const std::shared_ptr& parse_options); extern "C" SEXP _arrow_json___TableReader__Make(SEXP input_sexp, SEXP read_options_sexp, SEXP parse_options_sexp){ BEGIN_CPP11 arrow::r::Input&>::type input(input_sexp); @@ -4601,178 +4601,178 @@ BEGIN_CPP11 return cpp11::as_sexp(json___TableReader__Make(input, read_options, parse_options)); END_CPP11 } -#else -extern "C" SEXP _arrow_json___TableReader__Make(SEXP input_sexp, SEXP read_options_sexp, SEXP parse_options_sexp){ - Rf_error("Cannot call json___TableReader__Make(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_json___TableReader__Make(SEXP input_sexp, SEXP read_options_sexp, SEXP parse_options_sexp){ + Rf_error("Cannot call json___TableReader__Make(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // json.cpp -#if defined(ARROW_R_WITH_JSON) -std::shared_ptr json___TableReader__Read(const std::shared_ptr& table_reader); + #if defined(ARROW_R_WITH_JSON) + std::shared_ptr json___TableReader__Read(const std::shared_ptr& table_reader); extern "C" SEXP _arrow_json___TableReader__Read(SEXP table_reader_sexp){ BEGIN_CPP11 arrow::r::Input&>::type table_reader(table_reader_sexp); return cpp11::as_sexp(json___TableReader__Read(table_reader)); END_CPP11 } -#else -extern "C" SEXP _arrow_json___TableReader__Read(SEXP table_reader_sexp){ - Rf_error("Cannot call json___TableReader__Read(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_json___TableReader__Read(SEXP table_reader_sexp){ + Rf_error("Cannot call json___TableReader__Read(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // memorypool.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr MemoryPool__default(); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr MemoryPool__default(); extern "C" SEXP _arrow_MemoryPool__default(){ BEGIN_CPP11 return cpp11::as_sexp(MemoryPool__default()); END_CPP11 } -#else -extern "C" SEXP _arrow_MemoryPool__default(){ - Rf_error("Cannot call MemoryPool__default(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_MemoryPool__default(){ + Rf_error("Cannot call MemoryPool__default(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // memorypool.cpp -#if defined(ARROW_R_WITH_ARROW) -double MemoryPool__bytes_allocated(const std::shared_ptr& pool); + #if defined(ARROW_R_WITH_ARROW) + double MemoryPool__bytes_allocated(const std::shared_ptr& pool); extern "C" SEXP _arrow_MemoryPool__bytes_allocated(SEXP pool_sexp){ BEGIN_CPP11 arrow::r::Input&>::type pool(pool_sexp); return cpp11::as_sexp(MemoryPool__bytes_allocated(pool)); END_CPP11 } -#else -extern "C" SEXP _arrow_MemoryPool__bytes_allocated(SEXP pool_sexp){ - Rf_error("Cannot call MemoryPool__bytes_allocated(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_MemoryPool__bytes_allocated(SEXP pool_sexp){ + Rf_error("Cannot call MemoryPool__bytes_allocated(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // memorypool.cpp -#if defined(ARROW_R_WITH_ARROW) -double MemoryPool__max_memory(const std::shared_ptr& pool); + #if defined(ARROW_R_WITH_ARROW) + double MemoryPool__max_memory(const std::shared_ptr& pool); extern "C" SEXP _arrow_MemoryPool__max_memory(SEXP pool_sexp){ BEGIN_CPP11 arrow::r::Input&>::type pool(pool_sexp); return cpp11::as_sexp(MemoryPool__max_memory(pool)); END_CPP11 } -#else -extern "C" SEXP _arrow_MemoryPool__max_memory(SEXP pool_sexp){ - Rf_error("Cannot call MemoryPool__max_memory(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_MemoryPool__max_memory(SEXP pool_sexp){ + Rf_error("Cannot call MemoryPool__max_memory(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // memorypool.cpp -#if defined(ARROW_R_WITH_ARROW) -std::string MemoryPool__backend_name(const std::shared_ptr& pool); + #if defined(ARROW_R_WITH_ARROW) + std::string MemoryPool__backend_name(const std::shared_ptr& pool); extern "C" SEXP _arrow_MemoryPool__backend_name(SEXP pool_sexp){ BEGIN_CPP11 arrow::r::Input&>::type pool(pool_sexp); return cpp11::as_sexp(MemoryPool__backend_name(pool)); END_CPP11 } -#else -extern "C" SEXP _arrow_MemoryPool__backend_name(SEXP pool_sexp){ - Rf_error("Cannot call MemoryPool__backend_name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_MemoryPool__backend_name(SEXP pool_sexp){ + Rf_error("Cannot call MemoryPool__backend_name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // memorypool.cpp -#if defined(ARROW_R_WITH_ARROW) -std::vector supported_memory_backends(); + #if defined(ARROW_R_WITH_ARROW) + std::vector supported_memory_backends(); extern "C" SEXP _arrow_supported_memory_backends(){ BEGIN_CPP11 return cpp11::as_sexp(supported_memory_backends()); END_CPP11 } -#else -extern "C" SEXP _arrow_supported_memory_backends(){ - Rf_error("Cannot call supported_memory_backends(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_supported_memory_backends(){ + Rf_error("Cannot call supported_memory_backends(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // message.cpp -#if defined(ARROW_R_WITH_ARROW) -int64_t ipc___Message__body_length(const std::unique_ptr& message); + #if defined(ARROW_R_WITH_ARROW) + int64_t ipc___Message__body_length(const std::unique_ptr& message); extern "C" SEXP _arrow_ipc___Message__body_length(SEXP message_sexp){ BEGIN_CPP11 arrow::r::Input&>::type message(message_sexp); return cpp11::as_sexp(ipc___Message__body_length(message)); END_CPP11 } -#else -extern "C" SEXP _arrow_ipc___Message__body_length(SEXP message_sexp){ - Rf_error("Cannot call ipc___Message__body_length(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ipc___Message__body_length(SEXP message_sexp){ + Rf_error("Cannot call ipc___Message__body_length(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // message.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr ipc___Message__metadata(const std::unique_ptr& message); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr ipc___Message__metadata(const std::unique_ptr& message); extern "C" SEXP _arrow_ipc___Message__metadata(SEXP message_sexp){ BEGIN_CPP11 arrow::r::Input&>::type message(message_sexp); return cpp11::as_sexp(ipc___Message__metadata(message)); END_CPP11 } -#else -extern "C" SEXP _arrow_ipc___Message__metadata(SEXP message_sexp){ - Rf_error("Cannot call ipc___Message__metadata(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ipc___Message__metadata(SEXP message_sexp){ + Rf_error("Cannot call ipc___Message__metadata(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // message.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr ipc___Message__body(const std::unique_ptr& message); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr ipc___Message__body(const std::unique_ptr& message); extern "C" SEXP _arrow_ipc___Message__body(SEXP message_sexp){ BEGIN_CPP11 arrow::r::Input&>::type message(message_sexp); return cpp11::as_sexp(ipc___Message__body(message)); END_CPP11 } -#else -extern "C" SEXP _arrow_ipc___Message__body(SEXP message_sexp){ - Rf_error("Cannot call ipc___Message__body(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ipc___Message__body(SEXP message_sexp){ + Rf_error("Cannot call ipc___Message__body(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // message.cpp -#if defined(ARROW_R_WITH_ARROW) -int64_t ipc___Message__Verify(const std::unique_ptr& message); + #if defined(ARROW_R_WITH_ARROW) + int64_t ipc___Message__Verify(const std::unique_ptr& message); extern "C" SEXP _arrow_ipc___Message__Verify(SEXP message_sexp){ BEGIN_CPP11 arrow::r::Input&>::type message(message_sexp); return cpp11::as_sexp(ipc___Message__Verify(message)); END_CPP11 } -#else -extern "C" SEXP _arrow_ipc___Message__Verify(SEXP message_sexp){ - Rf_error("Cannot call ipc___Message__Verify(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ipc___Message__Verify(SEXP message_sexp){ + Rf_error("Cannot call ipc___Message__Verify(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // message.cpp -#if defined(ARROW_R_WITH_ARROW) -arrow::ipc::MessageType ipc___Message__type(const std::unique_ptr& message); + #if defined(ARROW_R_WITH_ARROW) + arrow::ipc::MessageType ipc___Message__type(const std::unique_ptr& message); extern "C" SEXP _arrow_ipc___Message__type(SEXP message_sexp){ BEGIN_CPP11 arrow::r::Input&>::type message(message_sexp); return cpp11::as_sexp(ipc___Message__type(message)); END_CPP11 } -#else -extern "C" SEXP _arrow_ipc___Message__type(SEXP message_sexp){ - Rf_error("Cannot call ipc___Message__type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ipc___Message__type(SEXP message_sexp){ + Rf_error("Cannot call ipc___Message__type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // message.cpp -#if defined(ARROW_R_WITH_ARROW) -bool ipc___Message__Equals(const std::unique_ptr& x, const std::unique_ptr& y); + #if defined(ARROW_R_WITH_ARROW) + bool ipc___Message__Equals(const std::unique_ptr& x, const std::unique_ptr& y); extern "C" SEXP _arrow_ipc___Message__Equals(SEXP x_sexp, SEXP y_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); @@ -4780,121 +4780,121 @@ BEGIN_CPP11 return cpp11::as_sexp(ipc___Message__Equals(x, y)); END_CPP11 } -#else -extern "C" SEXP _arrow_ipc___Message__Equals(SEXP x_sexp, SEXP y_sexp){ - Rf_error("Cannot call ipc___Message__Equals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ipc___Message__Equals(SEXP x_sexp, SEXP y_sexp){ + Rf_error("Cannot call ipc___Message__Equals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // message.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr ipc___ReadRecordBatch__Message__Schema(const std::unique_ptr& message, const std::shared_ptr& schema); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr ipc___ReadRecordBatch__Message__Schema(const std::unique_ptr& message, const std::shared_ptr& schema); extern "C" SEXP _arrow_ipc___ReadRecordBatch__Message__Schema(SEXP message_sexp, SEXP schema_sexp){ BEGIN_CPP11 arrow::r::Input&>::type message(message_sexp); arrow::r::Input&>::type schema(schema_sexp); return cpp11::as_sexp(ipc___ReadRecordBatch__Message__Schema(message, schema)); -END_CPP11 -} -#else -extern "C" SEXP _arrow_ipc___ReadRecordBatch__Message__Schema(SEXP message_sexp, SEXP schema_sexp){ - Rf_error("Cannot call ipc___ReadRecordBatch__Message__Schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +END_CPP11 } -#endif - + #else + extern "C" SEXP _arrow_ipc___ReadRecordBatch__Message__Schema(SEXP message_sexp, SEXP schema_sexp){ + Rf_error("Cannot call ipc___ReadRecordBatch__Message__Schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // message.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr ipc___ReadSchema_InputStream(const std::shared_ptr& stream); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr ipc___ReadSchema_InputStream(const std::shared_ptr& stream); extern "C" SEXP _arrow_ipc___ReadSchema_InputStream(SEXP stream_sexp){ BEGIN_CPP11 arrow::r::Input&>::type stream(stream_sexp); return cpp11::as_sexp(ipc___ReadSchema_InputStream(stream)); END_CPP11 } -#else -extern "C" SEXP _arrow_ipc___ReadSchema_InputStream(SEXP stream_sexp){ - Rf_error("Cannot call ipc___ReadSchema_InputStream(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ipc___ReadSchema_InputStream(SEXP stream_sexp){ + Rf_error("Cannot call ipc___ReadSchema_InputStream(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // message.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr ipc___ReadSchema_Message(const std::unique_ptr& message); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr ipc___ReadSchema_Message(const std::unique_ptr& message); extern "C" SEXP _arrow_ipc___ReadSchema_Message(SEXP message_sexp){ BEGIN_CPP11 arrow::r::Input&>::type message(message_sexp); return cpp11::as_sexp(ipc___ReadSchema_Message(message)); END_CPP11 } -#else -extern "C" SEXP _arrow_ipc___ReadSchema_Message(SEXP message_sexp){ - Rf_error("Cannot call ipc___ReadSchema_Message(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ipc___ReadSchema_Message(SEXP message_sexp){ + Rf_error("Cannot call ipc___ReadSchema_Message(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // message.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr ipc___MessageReader__Open(const std::shared_ptr& stream); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr ipc___MessageReader__Open(const std::shared_ptr& stream); extern "C" SEXP _arrow_ipc___MessageReader__Open(SEXP stream_sexp){ BEGIN_CPP11 arrow::r::Input&>::type stream(stream_sexp); return cpp11::as_sexp(ipc___MessageReader__Open(stream)); END_CPP11 } -#else -extern "C" SEXP _arrow_ipc___MessageReader__Open(SEXP stream_sexp){ - Rf_error("Cannot call ipc___MessageReader__Open(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ipc___MessageReader__Open(SEXP stream_sexp){ + Rf_error("Cannot call ipc___MessageReader__Open(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // message.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr ipc___MessageReader__ReadNextMessage(const std::unique_ptr& reader); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr ipc___MessageReader__ReadNextMessage(const std::unique_ptr& reader); extern "C" SEXP _arrow_ipc___MessageReader__ReadNextMessage(SEXP reader_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); return cpp11::as_sexp(ipc___MessageReader__ReadNextMessage(reader)); END_CPP11 } -#else -extern "C" SEXP _arrow_ipc___MessageReader__ReadNextMessage(SEXP reader_sexp){ - Rf_error("Cannot call ipc___MessageReader__ReadNextMessage(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ipc___MessageReader__ReadNextMessage(SEXP reader_sexp){ + Rf_error("Cannot call ipc___MessageReader__ReadNextMessage(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // message.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr ipc___ReadMessage(const std::shared_ptr& stream); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr ipc___ReadMessage(const std::shared_ptr& stream); extern "C" SEXP _arrow_ipc___ReadMessage(SEXP stream_sexp){ BEGIN_CPP11 arrow::r::Input&>::type stream(stream_sexp); return cpp11::as_sexp(ipc___ReadMessage(stream)); END_CPP11 } -#else -extern "C" SEXP _arrow_ipc___ReadMessage(SEXP stream_sexp){ - Rf_error("Cannot call ipc___ReadMessage(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ipc___ReadMessage(SEXP stream_sexp){ + Rf_error("Cannot call ipc___ReadMessage(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // parquet.cpp -#if defined(ARROW_R_WITH_PARQUET) -std::shared_ptr parquet___arrow___ArrowReaderProperties__Make(bool use_threads); + #if defined(ARROW_R_WITH_PARQUET) + std::shared_ptr parquet___arrow___ArrowReaderProperties__Make(bool use_threads); extern "C" SEXP _arrow_parquet___arrow___ArrowReaderProperties__Make(SEXP use_threads_sexp){ BEGIN_CPP11 arrow::r::Input::type use_threads(use_threads_sexp); return cpp11::as_sexp(parquet___arrow___ArrowReaderProperties__Make(use_threads)); END_CPP11 } -#else -extern "C" SEXP _arrow_parquet___arrow___ArrowReaderProperties__Make(SEXP use_threads_sexp){ - Rf_error("Cannot call parquet___arrow___ArrowReaderProperties__Make(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_parquet___arrow___ArrowReaderProperties__Make(SEXP use_threads_sexp){ + Rf_error("Cannot call parquet___arrow___ArrowReaderProperties__Make(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // parquet.cpp -#if defined(ARROW_R_WITH_PARQUET) -void parquet___arrow___ArrowReaderProperties__set_use_threads(const std::shared_ptr& properties, bool use_threads); + #if defined(ARROW_R_WITH_PARQUET) + void parquet___arrow___ArrowReaderProperties__set_use_threads(const std::shared_ptr& properties, bool use_threads); extern "C" SEXP _arrow_parquet___arrow___ArrowReaderProperties__set_use_threads(SEXP properties_sexp, SEXP use_threads_sexp){ BEGIN_CPP11 arrow::r::Input&>::type properties(properties_sexp); @@ -4903,15 +4903,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_parquet___arrow___ArrowReaderProperties__set_use_threads(SEXP properties_sexp, SEXP use_threads_sexp){ - Rf_error("Cannot call parquet___arrow___ArrowReaderProperties__set_use_threads(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_parquet___arrow___ArrowReaderProperties__set_use_threads(SEXP properties_sexp, SEXP use_threads_sexp){ + Rf_error("Cannot call parquet___arrow___ArrowReaderProperties__set_use_threads(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // parquet.cpp -#if defined(ARROW_R_WITH_PARQUET) -bool parquet___arrow___ArrowReaderProperties__get_use_threads(const std::shared_ptr& properties, bool use_threads); + #if defined(ARROW_R_WITH_PARQUET) + bool parquet___arrow___ArrowReaderProperties__get_use_threads(const std::shared_ptr& properties, bool use_threads); extern "C" SEXP _arrow_parquet___arrow___ArrowReaderProperties__get_use_threads(SEXP properties_sexp, SEXP use_threads_sexp){ BEGIN_CPP11 arrow::r::Input&>::type properties(properties_sexp); @@ -4919,15 +4919,15 @@ BEGIN_CPP11 return cpp11::as_sexp(parquet___arrow___ArrowReaderProperties__get_use_threads(properties, use_threads)); END_CPP11 } -#else -extern "C" SEXP _arrow_parquet___arrow___ArrowReaderProperties__get_use_threads(SEXP properties_sexp, SEXP use_threads_sexp){ - Rf_error("Cannot call parquet___arrow___ArrowReaderProperties__get_use_threads(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_parquet___arrow___ArrowReaderProperties__get_use_threads(SEXP properties_sexp, SEXP use_threads_sexp){ + Rf_error("Cannot call parquet___arrow___ArrowReaderProperties__get_use_threads(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // parquet.cpp -#if defined(ARROW_R_WITH_PARQUET) -bool parquet___arrow___ArrowReaderProperties__get_read_dictionary(const std::shared_ptr& properties, int column_index); + #if defined(ARROW_R_WITH_PARQUET) + bool parquet___arrow___ArrowReaderProperties__get_read_dictionary(const std::shared_ptr& properties, int column_index); extern "C" SEXP _arrow_parquet___arrow___ArrowReaderProperties__get_read_dictionary(SEXP properties_sexp, SEXP column_index_sexp){ BEGIN_CPP11 arrow::r::Input&>::type properties(properties_sexp); @@ -4935,15 +4935,15 @@ BEGIN_CPP11 return cpp11::as_sexp(parquet___arrow___ArrowReaderProperties__get_read_dictionary(properties, column_index)); END_CPP11 } -#else -extern "C" SEXP _arrow_parquet___arrow___ArrowReaderProperties__get_read_dictionary(SEXP properties_sexp, SEXP column_index_sexp){ - Rf_error("Cannot call parquet___arrow___ArrowReaderProperties__get_read_dictionary(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_parquet___arrow___ArrowReaderProperties__get_read_dictionary(SEXP properties_sexp, SEXP column_index_sexp){ + Rf_error("Cannot call parquet___arrow___ArrowReaderProperties__get_read_dictionary(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // parquet.cpp -#if defined(ARROW_R_WITH_PARQUET) -void parquet___arrow___ArrowReaderProperties__set_read_dictionary(const std::shared_ptr& properties, int column_index, bool read_dict); + #if defined(ARROW_R_WITH_PARQUET) + void parquet___arrow___ArrowReaderProperties__set_read_dictionary(const std::shared_ptr& properties, int column_index, bool read_dict); extern "C" SEXP _arrow_parquet___arrow___ArrowReaderProperties__set_read_dictionary(SEXP properties_sexp, SEXP column_index_sexp, SEXP read_dict_sexp){ BEGIN_CPP11 arrow::r::Input&>::type properties(properties_sexp); @@ -4953,15 +4953,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_parquet___arrow___ArrowReaderProperties__set_read_dictionary(SEXP properties_sexp, SEXP column_index_sexp, SEXP read_dict_sexp){ - Rf_error("Cannot call parquet___arrow___ArrowReaderProperties__set_read_dictionary(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_parquet___arrow___ArrowReaderProperties__set_read_dictionary(SEXP properties_sexp, SEXP column_index_sexp, SEXP read_dict_sexp){ + Rf_error("Cannot call parquet___arrow___ArrowReaderProperties__set_read_dictionary(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // parquet.cpp -#if defined(ARROW_R_WITH_PARQUET) -std::shared_ptr parquet___arrow___FileReader__OpenFile(const std::shared_ptr& file, const std::shared_ptr& props); + #if defined(ARROW_R_WITH_PARQUET) + std::shared_ptr parquet___arrow___FileReader__OpenFile(const std::shared_ptr& file, const std::shared_ptr& props); extern "C" SEXP _arrow_parquet___arrow___FileReader__OpenFile(SEXP file_sexp, SEXP props_sexp){ BEGIN_CPP11 arrow::r::Input&>::type file(file_sexp); @@ -4969,30 +4969,30 @@ BEGIN_CPP11 return cpp11::as_sexp(parquet___arrow___FileReader__OpenFile(file, props)); END_CPP11 } -#else -extern "C" SEXP _arrow_parquet___arrow___FileReader__OpenFile(SEXP file_sexp, SEXP props_sexp){ - Rf_error("Cannot call parquet___arrow___FileReader__OpenFile(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_parquet___arrow___FileReader__OpenFile(SEXP file_sexp, SEXP props_sexp){ + Rf_error("Cannot call parquet___arrow___FileReader__OpenFile(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // parquet.cpp -#if defined(ARROW_R_WITH_PARQUET) -std::shared_ptr parquet___arrow___FileReader__ReadTable1(const std::shared_ptr& reader); + #if defined(ARROW_R_WITH_PARQUET) + std::shared_ptr parquet___arrow___FileReader__ReadTable1(const std::shared_ptr& reader); extern "C" SEXP _arrow_parquet___arrow___FileReader__ReadTable1(SEXP reader_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); return cpp11::as_sexp(parquet___arrow___FileReader__ReadTable1(reader)); END_CPP11 } -#else -extern "C" SEXP _arrow_parquet___arrow___FileReader__ReadTable1(SEXP reader_sexp){ - Rf_error("Cannot call parquet___arrow___FileReader__ReadTable1(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_parquet___arrow___FileReader__ReadTable1(SEXP reader_sexp){ + Rf_error("Cannot call parquet___arrow___FileReader__ReadTable1(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // parquet.cpp -#if defined(ARROW_R_WITH_PARQUET) -std::shared_ptr parquet___arrow___FileReader__ReadTable2(const std::shared_ptr& reader, const std::vector& column_indices); + #if defined(ARROW_R_WITH_PARQUET) + std::shared_ptr parquet___arrow___FileReader__ReadTable2(const std::shared_ptr& reader, const std::vector& column_indices); extern "C" SEXP _arrow_parquet___arrow___FileReader__ReadTable2(SEXP reader_sexp, SEXP column_indices_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); @@ -5000,15 +5000,15 @@ BEGIN_CPP11 return cpp11::as_sexp(parquet___arrow___FileReader__ReadTable2(reader, column_indices)); END_CPP11 } -#else -extern "C" SEXP _arrow_parquet___arrow___FileReader__ReadTable2(SEXP reader_sexp, SEXP column_indices_sexp){ - Rf_error("Cannot call parquet___arrow___FileReader__ReadTable2(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_parquet___arrow___FileReader__ReadTable2(SEXP reader_sexp, SEXP column_indices_sexp){ + Rf_error("Cannot call parquet___arrow___FileReader__ReadTable2(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // parquet.cpp -#if defined(ARROW_R_WITH_PARQUET) -std::shared_ptr parquet___arrow___FileReader__ReadRowGroup1(const std::shared_ptr& reader, int i); + #if defined(ARROW_R_WITH_PARQUET) + std::shared_ptr parquet___arrow___FileReader__ReadRowGroup1(const std::shared_ptr& reader, int i); extern "C" SEXP _arrow_parquet___arrow___FileReader__ReadRowGroup1(SEXP reader_sexp, SEXP i_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); @@ -5016,15 +5016,15 @@ BEGIN_CPP11 return cpp11::as_sexp(parquet___arrow___FileReader__ReadRowGroup1(reader, i)); END_CPP11 } -#else -extern "C" SEXP _arrow_parquet___arrow___FileReader__ReadRowGroup1(SEXP reader_sexp, SEXP i_sexp){ - Rf_error("Cannot call parquet___arrow___FileReader__ReadRowGroup1(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_parquet___arrow___FileReader__ReadRowGroup1(SEXP reader_sexp, SEXP i_sexp){ + Rf_error("Cannot call parquet___arrow___FileReader__ReadRowGroup1(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // parquet.cpp -#if defined(ARROW_R_WITH_PARQUET) -std::shared_ptr parquet___arrow___FileReader__ReadRowGroup2(const std::shared_ptr& reader, int i, const std::vector& column_indices); + #if defined(ARROW_R_WITH_PARQUET) + std::shared_ptr parquet___arrow___FileReader__ReadRowGroup2(const std::shared_ptr& reader, int i, const std::vector& column_indices); extern "C" SEXP _arrow_parquet___arrow___FileReader__ReadRowGroup2(SEXP reader_sexp, SEXP i_sexp, SEXP column_indices_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); @@ -5033,15 +5033,15 @@ BEGIN_CPP11 return cpp11::as_sexp(parquet___arrow___FileReader__ReadRowGroup2(reader, i, column_indices)); END_CPP11 } -#else -extern "C" SEXP _arrow_parquet___arrow___FileReader__ReadRowGroup2(SEXP reader_sexp, SEXP i_sexp, SEXP column_indices_sexp){ - Rf_error("Cannot call parquet___arrow___FileReader__ReadRowGroup2(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_parquet___arrow___FileReader__ReadRowGroup2(SEXP reader_sexp, SEXP i_sexp, SEXP column_indices_sexp){ + Rf_error("Cannot call parquet___arrow___FileReader__ReadRowGroup2(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // parquet.cpp -#if defined(ARROW_R_WITH_PARQUET) -std::shared_ptr parquet___arrow___FileReader__ReadRowGroups1(const std::shared_ptr& reader, const std::vector& row_groups); + #if defined(ARROW_R_WITH_PARQUET) + std::shared_ptr parquet___arrow___FileReader__ReadRowGroups1(const std::shared_ptr& reader, const std::vector& row_groups); extern "C" SEXP _arrow_parquet___arrow___FileReader__ReadRowGroups1(SEXP reader_sexp, SEXP row_groups_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); @@ -5049,15 +5049,15 @@ BEGIN_CPP11 return cpp11::as_sexp(parquet___arrow___FileReader__ReadRowGroups1(reader, row_groups)); END_CPP11 } -#else -extern "C" SEXP _arrow_parquet___arrow___FileReader__ReadRowGroups1(SEXP reader_sexp, SEXP row_groups_sexp){ - Rf_error("Cannot call parquet___arrow___FileReader__ReadRowGroups1(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_parquet___arrow___FileReader__ReadRowGroups1(SEXP reader_sexp, SEXP row_groups_sexp){ + Rf_error("Cannot call parquet___arrow___FileReader__ReadRowGroups1(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // parquet.cpp -#if defined(ARROW_R_WITH_PARQUET) -std::shared_ptr parquet___arrow___FileReader__ReadRowGroups2(const std::shared_ptr& reader, const std::vector& row_groups, const std::vector& column_indices); + #if defined(ARROW_R_WITH_PARQUET) + std::shared_ptr parquet___arrow___FileReader__ReadRowGroups2(const std::shared_ptr& reader, const std::vector& row_groups, const std::vector& column_indices); extern "C" SEXP _arrow_parquet___arrow___FileReader__ReadRowGroups2(SEXP reader_sexp, SEXP row_groups_sexp, SEXP column_indices_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); @@ -5066,60 +5066,60 @@ BEGIN_CPP11 return cpp11::as_sexp(parquet___arrow___FileReader__ReadRowGroups2(reader, row_groups, column_indices)); END_CPP11 } -#else -extern "C" SEXP _arrow_parquet___arrow___FileReader__ReadRowGroups2(SEXP reader_sexp, SEXP row_groups_sexp, SEXP column_indices_sexp){ - Rf_error("Cannot call parquet___arrow___FileReader__ReadRowGroups2(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_parquet___arrow___FileReader__ReadRowGroups2(SEXP reader_sexp, SEXP row_groups_sexp, SEXP column_indices_sexp){ + Rf_error("Cannot call parquet___arrow___FileReader__ReadRowGroups2(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // parquet.cpp -#if defined(ARROW_R_WITH_PARQUET) -int64_t parquet___arrow___FileReader__num_rows(const std::shared_ptr& reader); + #if defined(ARROW_R_WITH_PARQUET) + int64_t parquet___arrow___FileReader__num_rows(const std::shared_ptr& reader); extern "C" SEXP _arrow_parquet___arrow___FileReader__num_rows(SEXP reader_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); return cpp11::as_sexp(parquet___arrow___FileReader__num_rows(reader)); END_CPP11 } -#else -extern "C" SEXP _arrow_parquet___arrow___FileReader__num_rows(SEXP reader_sexp){ - Rf_error("Cannot call parquet___arrow___FileReader__num_rows(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_parquet___arrow___FileReader__num_rows(SEXP reader_sexp){ + Rf_error("Cannot call parquet___arrow___FileReader__num_rows(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // parquet.cpp -#if defined(ARROW_R_WITH_PARQUET) -int parquet___arrow___FileReader__num_columns(const std::shared_ptr& reader); + #if defined(ARROW_R_WITH_PARQUET) + int parquet___arrow___FileReader__num_columns(const std::shared_ptr& reader); extern "C" SEXP _arrow_parquet___arrow___FileReader__num_columns(SEXP reader_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); return cpp11::as_sexp(parquet___arrow___FileReader__num_columns(reader)); END_CPP11 } -#else -extern "C" SEXP _arrow_parquet___arrow___FileReader__num_columns(SEXP reader_sexp){ - Rf_error("Cannot call parquet___arrow___FileReader__num_columns(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_parquet___arrow___FileReader__num_columns(SEXP reader_sexp){ + Rf_error("Cannot call parquet___arrow___FileReader__num_columns(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // parquet.cpp -#if defined(ARROW_R_WITH_PARQUET) -int parquet___arrow___FileReader__num_row_groups(const std::shared_ptr& reader); + #if defined(ARROW_R_WITH_PARQUET) + int parquet___arrow___FileReader__num_row_groups(const std::shared_ptr& reader); extern "C" SEXP _arrow_parquet___arrow___FileReader__num_row_groups(SEXP reader_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); return cpp11::as_sexp(parquet___arrow___FileReader__num_row_groups(reader)); END_CPP11 } -#else -extern "C" SEXP _arrow_parquet___arrow___FileReader__num_row_groups(SEXP reader_sexp){ - Rf_error("Cannot call parquet___arrow___FileReader__num_row_groups(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_parquet___arrow___FileReader__num_row_groups(SEXP reader_sexp){ + Rf_error("Cannot call parquet___arrow___FileReader__num_row_groups(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // parquet.cpp -#if defined(ARROW_R_WITH_PARQUET) -std::shared_ptr parquet___arrow___FileReader__ReadColumn(const std::shared_ptr& reader, int i); + #if defined(ARROW_R_WITH_PARQUET) + std::shared_ptr parquet___arrow___FileReader__ReadColumn(const std::shared_ptr& reader, int i); extern "C" SEXP _arrow_parquet___arrow___FileReader__ReadColumn(SEXP reader_sexp, SEXP i_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); @@ -5127,15 +5127,15 @@ BEGIN_CPP11 return cpp11::as_sexp(parquet___arrow___FileReader__ReadColumn(reader, i)); END_CPP11 } -#else -extern "C" SEXP _arrow_parquet___arrow___FileReader__ReadColumn(SEXP reader_sexp, SEXP i_sexp){ - Rf_error("Cannot call parquet___arrow___FileReader__ReadColumn(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_parquet___arrow___FileReader__ReadColumn(SEXP reader_sexp, SEXP i_sexp){ + Rf_error("Cannot call parquet___arrow___FileReader__ReadColumn(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // parquet.cpp -#if defined(ARROW_R_WITH_PARQUET) -std::shared_ptr parquet___ArrowWriterProperties___create(bool allow_truncated_timestamps, bool use_deprecated_int96_timestamps, int timestamp_unit); + #if defined(ARROW_R_WITH_PARQUET) + std::shared_ptr parquet___ArrowWriterProperties___create(bool allow_truncated_timestamps, bool use_deprecated_int96_timestamps, int timestamp_unit); extern "C" SEXP _arrow_parquet___ArrowWriterProperties___create(SEXP allow_truncated_timestamps_sexp, SEXP use_deprecated_int96_timestamps_sexp, SEXP timestamp_unit_sexp){ BEGIN_CPP11 arrow::r::Input::type allow_truncated_timestamps(allow_truncated_timestamps_sexp); @@ -5144,29 +5144,29 @@ BEGIN_CPP11 return cpp11::as_sexp(parquet___ArrowWriterProperties___create(allow_truncated_timestamps, use_deprecated_int96_timestamps, timestamp_unit)); END_CPP11 } -#else -extern "C" SEXP _arrow_parquet___ArrowWriterProperties___create(SEXP allow_truncated_timestamps_sexp, SEXP use_deprecated_int96_timestamps_sexp, SEXP timestamp_unit_sexp){ - Rf_error("Cannot call parquet___ArrowWriterProperties___create(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_parquet___ArrowWriterProperties___create(SEXP allow_truncated_timestamps_sexp, SEXP use_deprecated_int96_timestamps_sexp, SEXP timestamp_unit_sexp){ + Rf_error("Cannot call parquet___ArrowWriterProperties___create(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // parquet.cpp -#if defined(ARROW_R_WITH_PARQUET) -std::shared_ptr parquet___WriterProperties___Builder__create(); + #if defined(ARROW_R_WITH_PARQUET) + std::shared_ptr parquet___WriterProperties___Builder__create(); extern "C" SEXP _arrow_parquet___WriterProperties___Builder__create(){ BEGIN_CPP11 return cpp11::as_sexp(parquet___WriterProperties___Builder__create()); END_CPP11 } -#else -extern "C" SEXP _arrow_parquet___WriterProperties___Builder__create(){ - Rf_error("Cannot call parquet___WriterProperties___Builder__create(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_parquet___WriterProperties___Builder__create(){ + Rf_error("Cannot call parquet___WriterProperties___Builder__create(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // parquet.cpp -#if defined(ARROW_R_WITH_PARQUET) -void parquet___WriterProperties___Builder__version(const std::shared_ptr& builder, const parquet::ParquetVersion::type& version); + #if defined(ARROW_R_WITH_PARQUET) + void parquet___WriterProperties___Builder__version(const std::shared_ptr& builder, const parquet::ParquetVersion::type& version); extern "C" SEXP _arrow_parquet___WriterProperties___Builder__version(SEXP builder_sexp, SEXP version_sexp){ BEGIN_CPP11 arrow::r::Input&>::type builder(builder_sexp); @@ -5175,15 +5175,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_parquet___WriterProperties___Builder__version(SEXP builder_sexp, SEXP version_sexp){ - Rf_error("Cannot call parquet___WriterProperties___Builder__version(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_parquet___WriterProperties___Builder__version(SEXP builder_sexp, SEXP version_sexp){ + Rf_error("Cannot call parquet___WriterProperties___Builder__version(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // parquet.cpp -#if defined(ARROW_R_WITH_PARQUET) -void parquet___ArrowWriterProperties___Builder__set_compressions(const std::shared_ptr& builder, const std::vector& paths, cpp11::integers types); + #if defined(ARROW_R_WITH_PARQUET) + void parquet___ArrowWriterProperties___Builder__set_compressions(const std::shared_ptr& builder, const std::vector& paths, cpp11::integers types); extern "C" SEXP _arrow_parquet___ArrowWriterProperties___Builder__set_compressions(SEXP builder_sexp, SEXP paths_sexp, SEXP types_sexp){ BEGIN_CPP11 arrow::r::Input&>::type builder(builder_sexp); @@ -5193,15 +5193,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_parquet___ArrowWriterProperties___Builder__set_compressions(SEXP builder_sexp, SEXP paths_sexp, SEXP types_sexp){ - Rf_error("Cannot call parquet___ArrowWriterProperties___Builder__set_compressions(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_parquet___ArrowWriterProperties___Builder__set_compressions(SEXP builder_sexp, SEXP paths_sexp, SEXP types_sexp){ + Rf_error("Cannot call parquet___ArrowWriterProperties___Builder__set_compressions(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // parquet.cpp -#if defined(ARROW_R_WITH_PARQUET) -void parquet___ArrowWriterProperties___Builder__set_compression_levels(const std::shared_ptr& builder, const std::vector& paths, cpp11::integers levels); + #if defined(ARROW_R_WITH_PARQUET) + void parquet___ArrowWriterProperties___Builder__set_compression_levels(const std::shared_ptr& builder, const std::vector& paths, cpp11::integers levels); extern "C" SEXP _arrow_parquet___ArrowWriterProperties___Builder__set_compression_levels(SEXP builder_sexp, SEXP paths_sexp, SEXP levels_sexp){ BEGIN_CPP11 arrow::r::Input&>::type builder(builder_sexp); @@ -5211,15 +5211,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_parquet___ArrowWriterProperties___Builder__set_compression_levels(SEXP builder_sexp, SEXP paths_sexp, SEXP levels_sexp){ - Rf_error("Cannot call parquet___ArrowWriterProperties___Builder__set_compression_levels(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_parquet___ArrowWriterProperties___Builder__set_compression_levels(SEXP builder_sexp, SEXP paths_sexp, SEXP levels_sexp){ + Rf_error("Cannot call parquet___ArrowWriterProperties___Builder__set_compression_levels(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // parquet.cpp -#if defined(ARROW_R_WITH_PARQUET) -void parquet___ArrowWriterProperties___Builder__set_use_dictionary(const std::shared_ptr& builder, const std::vector& paths, cpp11::logicals use_dictionary); + #if defined(ARROW_R_WITH_PARQUET) + void parquet___ArrowWriterProperties___Builder__set_use_dictionary(const std::shared_ptr& builder, const std::vector& paths, cpp11::logicals use_dictionary); extern "C" SEXP _arrow_parquet___ArrowWriterProperties___Builder__set_use_dictionary(SEXP builder_sexp, SEXP paths_sexp, SEXP use_dictionary_sexp){ BEGIN_CPP11 arrow::r::Input&>::type builder(builder_sexp); @@ -5229,15 +5229,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_parquet___ArrowWriterProperties___Builder__set_use_dictionary(SEXP builder_sexp, SEXP paths_sexp, SEXP use_dictionary_sexp){ - Rf_error("Cannot call parquet___ArrowWriterProperties___Builder__set_use_dictionary(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_parquet___ArrowWriterProperties___Builder__set_use_dictionary(SEXP builder_sexp, SEXP paths_sexp, SEXP use_dictionary_sexp){ + Rf_error("Cannot call parquet___ArrowWriterProperties___Builder__set_use_dictionary(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // parquet.cpp -#if defined(ARROW_R_WITH_PARQUET) -void parquet___ArrowWriterProperties___Builder__set_write_statistics(const std::shared_ptr& builder, const std::vector& paths, cpp11::logicals write_statistics); + #if defined(ARROW_R_WITH_PARQUET) + void parquet___ArrowWriterProperties___Builder__set_write_statistics(const std::shared_ptr& builder, const std::vector& paths, cpp11::logicals write_statistics); extern "C" SEXP _arrow_parquet___ArrowWriterProperties___Builder__set_write_statistics(SEXP builder_sexp, SEXP paths_sexp, SEXP write_statistics_sexp){ BEGIN_CPP11 arrow::r::Input&>::type builder(builder_sexp); @@ -5247,15 +5247,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_parquet___ArrowWriterProperties___Builder__set_write_statistics(SEXP builder_sexp, SEXP paths_sexp, SEXP write_statistics_sexp){ - Rf_error("Cannot call parquet___ArrowWriterProperties___Builder__set_write_statistics(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_parquet___ArrowWriterProperties___Builder__set_write_statistics(SEXP builder_sexp, SEXP paths_sexp, SEXP write_statistics_sexp){ + Rf_error("Cannot call parquet___ArrowWriterProperties___Builder__set_write_statistics(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // parquet.cpp -#if defined(ARROW_R_WITH_PARQUET) -void parquet___ArrowWriterProperties___Builder__data_page_size(const std::shared_ptr& builder, int64_t data_page_size); + #if defined(ARROW_R_WITH_PARQUET) + void parquet___ArrowWriterProperties___Builder__data_page_size(const std::shared_ptr& builder, int64_t data_page_size); extern "C" SEXP _arrow_parquet___ArrowWriterProperties___Builder__data_page_size(SEXP builder_sexp, SEXP data_page_size_sexp){ BEGIN_CPP11 arrow::r::Input&>::type builder(builder_sexp); @@ -5264,30 +5264,30 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_parquet___ArrowWriterProperties___Builder__data_page_size(SEXP builder_sexp, SEXP data_page_size_sexp){ - Rf_error("Cannot call parquet___ArrowWriterProperties___Builder__data_page_size(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_parquet___ArrowWriterProperties___Builder__data_page_size(SEXP builder_sexp, SEXP data_page_size_sexp){ + Rf_error("Cannot call parquet___ArrowWriterProperties___Builder__data_page_size(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // parquet.cpp -#if defined(ARROW_R_WITH_PARQUET) -std::shared_ptr parquet___WriterProperties___Builder__build(const std::shared_ptr& builder); + #if defined(ARROW_R_WITH_PARQUET) + std::shared_ptr parquet___WriterProperties___Builder__build(const std::shared_ptr& builder); extern "C" SEXP _arrow_parquet___WriterProperties___Builder__build(SEXP builder_sexp){ BEGIN_CPP11 arrow::r::Input&>::type builder(builder_sexp); return cpp11::as_sexp(parquet___WriterProperties___Builder__build(builder)); END_CPP11 } -#else -extern "C" SEXP _arrow_parquet___WriterProperties___Builder__build(SEXP builder_sexp){ - Rf_error("Cannot call parquet___WriterProperties___Builder__build(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_parquet___WriterProperties___Builder__build(SEXP builder_sexp){ + Rf_error("Cannot call parquet___WriterProperties___Builder__build(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // parquet.cpp -#if defined(ARROW_R_WITH_PARQUET) -std::shared_ptr parquet___arrow___ParquetFileWriter__Open(const std::shared_ptr& schema, const std::shared_ptr& sink, const std::shared_ptr& properties, const std::shared_ptr& arrow_properties); + #if defined(ARROW_R_WITH_PARQUET) + std::shared_ptr parquet___arrow___ParquetFileWriter__Open(const std::shared_ptr& schema, const std::shared_ptr& sink, const std::shared_ptr& properties, const std::shared_ptr& arrow_properties); extern "C" SEXP _arrow_parquet___arrow___ParquetFileWriter__Open(SEXP schema_sexp, SEXP sink_sexp, SEXP properties_sexp, SEXP arrow_properties_sexp){ BEGIN_CPP11 arrow::r::Input&>::type schema(schema_sexp); @@ -5297,15 +5297,15 @@ BEGIN_CPP11 return cpp11::as_sexp(parquet___arrow___ParquetFileWriter__Open(schema, sink, properties, arrow_properties)); END_CPP11 } -#else -extern "C" SEXP _arrow_parquet___arrow___ParquetFileWriter__Open(SEXP schema_sexp, SEXP sink_sexp, SEXP properties_sexp, SEXP arrow_properties_sexp){ - Rf_error("Cannot call parquet___arrow___ParquetFileWriter__Open(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_parquet___arrow___ParquetFileWriter__Open(SEXP schema_sexp, SEXP sink_sexp, SEXP properties_sexp, SEXP arrow_properties_sexp){ + Rf_error("Cannot call parquet___arrow___ParquetFileWriter__Open(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // parquet.cpp -#if defined(ARROW_R_WITH_PARQUET) -void parquet___arrow___FileWriter__WriteTable(const std::shared_ptr& writer, const std::shared_ptr& table, int64_t chunk_size); + #if defined(ARROW_R_WITH_PARQUET) + void parquet___arrow___FileWriter__WriteTable(const std::shared_ptr& writer, const std::shared_ptr& table, int64_t chunk_size); extern "C" SEXP _arrow_parquet___arrow___FileWriter__WriteTable(SEXP writer_sexp, SEXP table_sexp, SEXP chunk_size_sexp){ BEGIN_CPP11 arrow::r::Input&>::type writer(writer_sexp); @@ -5315,15 +5315,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_parquet___arrow___FileWriter__WriteTable(SEXP writer_sexp, SEXP table_sexp, SEXP chunk_size_sexp){ - Rf_error("Cannot call parquet___arrow___FileWriter__WriteTable(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_parquet___arrow___FileWriter__WriteTable(SEXP writer_sexp, SEXP table_sexp, SEXP chunk_size_sexp){ + Rf_error("Cannot call parquet___arrow___FileWriter__WriteTable(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // parquet.cpp -#if defined(ARROW_R_WITH_PARQUET) -void parquet___arrow___FileWriter__Close(const std::shared_ptr& writer); + #if defined(ARROW_R_WITH_PARQUET) + void parquet___arrow___FileWriter__Close(const std::shared_ptr& writer); extern "C" SEXP _arrow_parquet___arrow___FileWriter__Close(SEXP writer_sexp){ BEGIN_CPP11 arrow::r::Input&>::type writer(writer_sexp); @@ -5331,15 +5331,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_parquet___arrow___FileWriter__Close(SEXP writer_sexp){ - Rf_error("Cannot call parquet___arrow___FileWriter__Close(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_parquet___arrow___FileWriter__Close(SEXP writer_sexp){ + Rf_error("Cannot call parquet___arrow___FileWriter__Close(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // parquet.cpp -#if defined(ARROW_R_WITH_PARQUET) -void parquet___arrow___WriteTable(const std::shared_ptr& table, const std::shared_ptr& sink, const std::shared_ptr& properties, const std::shared_ptr& arrow_properties); + #if defined(ARROW_R_WITH_PARQUET) + void parquet___arrow___WriteTable(const std::shared_ptr& table, const std::shared_ptr& sink, const std::shared_ptr& properties, const std::shared_ptr& arrow_properties); extern "C" SEXP _arrow_parquet___arrow___WriteTable(SEXP table_sexp, SEXP sink_sexp, SEXP properties_sexp, SEXP arrow_properties_sexp){ BEGIN_CPP11 arrow::r::Input&>::type table(table_sexp); @@ -5350,44 +5350,44 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_parquet___arrow___WriteTable(SEXP table_sexp, SEXP sink_sexp, SEXP properties_sexp, SEXP arrow_properties_sexp){ - Rf_error("Cannot call parquet___arrow___WriteTable(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_parquet___arrow___WriteTable(SEXP table_sexp, SEXP sink_sexp, SEXP properties_sexp, SEXP arrow_properties_sexp){ + Rf_error("Cannot call parquet___arrow___WriteTable(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // parquet.cpp -#if defined(ARROW_R_WITH_PARQUET) -std::shared_ptr parquet___arrow___FileReader__GetSchema(const std::shared_ptr& reader); + #if defined(ARROW_R_WITH_PARQUET) + std::shared_ptr parquet___arrow___FileReader__GetSchema(const std::shared_ptr& reader); extern "C" SEXP _arrow_parquet___arrow___FileReader__GetSchema(SEXP reader_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); return cpp11::as_sexp(parquet___arrow___FileReader__GetSchema(reader)); END_CPP11 } -#else -extern "C" SEXP _arrow_parquet___arrow___FileReader__GetSchema(SEXP reader_sexp){ - Rf_error("Cannot call parquet___arrow___FileReader__GetSchema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_parquet___arrow___FileReader__GetSchema(SEXP reader_sexp){ + Rf_error("Cannot call parquet___arrow___FileReader__GetSchema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // py-to-r.cpp -#if defined(ARROW_R_WITH_ARROW) -arrow::r::Pointer allocate_arrow_schema(); + #if defined(ARROW_R_WITH_ARROW) + arrow::r::Pointer allocate_arrow_schema(); extern "C" SEXP _arrow_allocate_arrow_schema(){ BEGIN_CPP11 return cpp11::as_sexp(allocate_arrow_schema()); END_CPP11 } -#else -extern "C" SEXP _arrow_allocate_arrow_schema(){ - Rf_error("Cannot call allocate_arrow_schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_allocate_arrow_schema(){ + Rf_error("Cannot call allocate_arrow_schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // py-to-r.cpp -#if defined(ARROW_R_WITH_ARROW) -void delete_arrow_schema(arrow::r::Pointer ptr); + #if defined(ARROW_R_WITH_ARROW) + void delete_arrow_schema(arrow::r::Pointer ptr); extern "C" SEXP _arrow_delete_arrow_schema(SEXP ptr_sexp){ BEGIN_CPP11 arrow::r::Input>::type ptr(ptr_sexp); @@ -5395,29 +5395,29 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_delete_arrow_schema(SEXP ptr_sexp){ - Rf_error("Cannot call delete_arrow_schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_delete_arrow_schema(SEXP ptr_sexp){ + Rf_error("Cannot call delete_arrow_schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // py-to-r.cpp -#if defined(ARROW_R_WITH_ARROW) -arrow::r::Pointer allocate_arrow_array(); + #if defined(ARROW_R_WITH_ARROW) + arrow::r::Pointer allocate_arrow_array(); extern "C" SEXP _arrow_allocate_arrow_array(){ BEGIN_CPP11 return cpp11::as_sexp(allocate_arrow_array()); END_CPP11 } -#else -extern "C" SEXP _arrow_allocate_arrow_array(){ - Rf_error("Cannot call allocate_arrow_array(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_allocate_arrow_array(){ + Rf_error("Cannot call allocate_arrow_array(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // py-to-r.cpp -#if defined(ARROW_R_WITH_ARROW) -void delete_arrow_array(arrow::r::Pointer ptr); + #if defined(ARROW_R_WITH_ARROW) + void delete_arrow_array(arrow::r::Pointer ptr); extern "C" SEXP _arrow_delete_arrow_array(SEXP ptr_sexp){ BEGIN_CPP11 arrow::r::Input>::type ptr(ptr_sexp); @@ -5425,29 +5425,29 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_delete_arrow_array(SEXP ptr_sexp){ - Rf_error("Cannot call delete_arrow_array(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_delete_arrow_array(SEXP ptr_sexp){ + Rf_error("Cannot call delete_arrow_array(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // py-to-r.cpp -#if defined(ARROW_R_WITH_ARROW) -arrow::r::Pointer allocate_arrow_array_stream(); + #if defined(ARROW_R_WITH_ARROW) + arrow::r::Pointer allocate_arrow_array_stream(); extern "C" SEXP _arrow_allocate_arrow_array_stream(){ BEGIN_CPP11 return cpp11::as_sexp(allocate_arrow_array_stream()); END_CPP11 } -#else -extern "C" SEXP _arrow_allocate_arrow_array_stream(){ - Rf_error("Cannot call allocate_arrow_array_stream(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_allocate_arrow_array_stream(){ + Rf_error("Cannot call allocate_arrow_array_stream(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // py-to-r.cpp -#if defined(ARROW_R_WITH_ARROW) -void delete_arrow_array_stream(arrow::r::Pointer ptr); + #if defined(ARROW_R_WITH_ARROW) + void delete_arrow_array_stream(arrow::r::Pointer ptr); extern "C" SEXP _arrow_delete_arrow_array_stream(SEXP ptr_sexp){ BEGIN_CPP11 arrow::r::Input>::type ptr(ptr_sexp); @@ -5455,15 +5455,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_delete_arrow_array_stream(SEXP ptr_sexp){ - Rf_error("Cannot call delete_arrow_array_stream(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_delete_arrow_array_stream(SEXP ptr_sexp){ + Rf_error("Cannot call delete_arrow_array_stream(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // py-to-r.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr ImportArray(arrow::r::Pointer array, arrow::r::Pointer schema); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr ImportArray(arrow::r::Pointer array, arrow::r::Pointer schema); extern "C" SEXP _arrow_ImportArray(SEXP array_sexp, SEXP schema_sexp){ BEGIN_CPP11 arrow::r::Input>::type array(array_sexp); @@ -5471,15 +5471,15 @@ BEGIN_CPP11 return cpp11::as_sexp(ImportArray(array, schema)); END_CPP11 } -#else -extern "C" SEXP _arrow_ImportArray(SEXP array_sexp, SEXP schema_sexp){ - Rf_error("Cannot call ImportArray(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ImportArray(SEXP array_sexp, SEXP schema_sexp){ + Rf_error("Cannot call ImportArray(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // py-to-r.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr ImportRecordBatch(arrow::r::Pointer array, arrow::r::Pointer schema); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr ImportRecordBatch(arrow::r::Pointer array, arrow::r::Pointer schema); extern "C" SEXP _arrow_ImportRecordBatch(SEXP array_sexp, SEXP schema_sexp){ BEGIN_CPP11 arrow::r::Input>::type array(array_sexp); @@ -5487,75 +5487,75 @@ BEGIN_CPP11 return cpp11::as_sexp(ImportRecordBatch(array, schema)); END_CPP11 } -#else -extern "C" SEXP _arrow_ImportRecordBatch(SEXP array_sexp, SEXP schema_sexp){ - Rf_error("Cannot call ImportRecordBatch(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ImportRecordBatch(SEXP array_sexp, SEXP schema_sexp){ + Rf_error("Cannot call ImportRecordBatch(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // py-to-r.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr ImportSchema(arrow::r::Pointer schema); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr ImportSchema(arrow::r::Pointer schema); extern "C" SEXP _arrow_ImportSchema(SEXP schema_sexp){ BEGIN_CPP11 arrow::r::Input>::type schema(schema_sexp); return cpp11::as_sexp(ImportSchema(schema)); END_CPP11 } -#else -extern "C" SEXP _arrow_ImportSchema(SEXP schema_sexp){ - Rf_error("Cannot call ImportSchema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ImportSchema(SEXP schema_sexp){ + Rf_error("Cannot call ImportSchema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // py-to-r.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr ImportField(arrow::r::Pointer field); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr ImportField(arrow::r::Pointer field); extern "C" SEXP _arrow_ImportField(SEXP field_sexp){ BEGIN_CPP11 arrow::r::Input>::type field(field_sexp); return cpp11::as_sexp(ImportField(field)); END_CPP11 } -#else -extern "C" SEXP _arrow_ImportField(SEXP field_sexp){ - Rf_error("Cannot call ImportField(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ImportField(SEXP field_sexp){ + Rf_error("Cannot call ImportField(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // py-to-r.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr ImportType(arrow::r::Pointer type); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr ImportType(arrow::r::Pointer type); extern "C" SEXP _arrow_ImportType(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input>::type type(type_sexp); return cpp11::as_sexp(ImportType(type)); END_CPP11 } -#else -extern "C" SEXP _arrow_ImportType(SEXP type_sexp){ - Rf_error("Cannot call ImportType(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ImportType(SEXP type_sexp){ + Rf_error("Cannot call ImportType(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // py-to-r.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr ImportRecordBatchReader(arrow::r::Pointer stream); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr ImportRecordBatchReader(arrow::r::Pointer stream); extern "C" SEXP _arrow_ImportRecordBatchReader(SEXP stream_sexp){ BEGIN_CPP11 arrow::r::Input>::type stream(stream_sexp); return cpp11::as_sexp(ImportRecordBatchReader(stream)); END_CPP11 } -#else -extern "C" SEXP _arrow_ImportRecordBatchReader(SEXP stream_sexp){ - Rf_error("Cannot call ImportRecordBatchReader(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ImportRecordBatchReader(SEXP stream_sexp){ + Rf_error("Cannot call ImportRecordBatchReader(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // py-to-r.cpp -#if defined(ARROW_R_WITH_ARROW) -void ExportType(const std::shared_ptr& type, arrow::r::Pointer ptr); + #if defined(ARROW_R_WITH_ARROW) + void ExportType(const std::shared_ptr& type, arrow::r::Pointer ptr); extern "C" SEXP _arrow_ExportType(SEXP type_sexp, SEXP ptr_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); @@ -5564,15 +5564,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_ExportType(SEXP type_sexp, SEXP ptr_sexp){ - Rf_error("Cannot call ExportType(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ExportType(SEXP type_sexp, SEXP ptr_sexp){ + Rf_error("Cannot call ExportType(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // py-to-r.cpp -#if defined(ARROW_R_WITH_ARROW) -void ExportField(const std::shared_ptr& field, arrow::r::Pointer ptr); + #if defined(ARROW_R_WITH_ARROW) + void ExportField(const std::shared_ptr& field, arrow::r::Pointer ptr); extern "C" SEXP _arrow_ExportField(SEXP field_sexp, SEXP ptr_sexp){ BEGIN_CPP11 arrow::r::Input&>::type field(field_sexp); @@ -5581,15 +5581,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_ExportField(SEXP field_sexp, SEXP ptr_sexp){ - Rf_error("Cannot call ExportField(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ExportField(SEXP field_sexp, SEXP ptr_sexp){ + Rf_error("Cannot call ExportField(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // py-to-r.cpp -#if defined(ARROW_R_WITH_ARROW) -void ExportSchema(const std::shared_ptr& schema, arrow::r::Pointer ptr); + #if defined(ARROW_R_WITH_ARROW) + void ExportSchema(const std::shared_ptr& schema, arrow::r::Pointer ptr); extern "C" SEXP _arrow_ExportSchema(SEXP schema_sexp, SEXP ptr_sexp){ BEGIN_CPP11 arrow::r::Input&>::type schema(schema_sexp); @@ -5598,15 +5598,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_ExportSchema(SEXP schema_sexp, SEXP ptr_sexp){ - Rf_error("Cannot call ExportSchema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ExportSchema(SEXP schema_sexp, SEXP ptr_sexp){ + Rf_error("Cannot call ExportSchema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // py-to-r.cpp -#if defined(ARROW_R_WITH_ARROW) -void ExportArray(const std::shared_ptr& array, arrow::r::Pointer array_ptr, arrow::r::Pointer schema_ptr); + #if defined(ARROW_R_WITH_ARROW) + void ExportArray(const std::shared_ptr& array, arrow::r::Pointer array_ptr, arrow::r::Pointer schema_ptr); extern "C" SEXP _arrow_ExportArray(SEXP array_sexp, SEXP array_ptr_sexp, SEXP schema_ptr_sexp){ BEGIN_CPP11 arrow::r::Input&>::type array(array_sexp); @@ -5616,15 +5616,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_ExportArray(SEXP array_sexp, SEXP array_ptr_sexp, SEXP schema_ptr_sexp){ - Rf_error("Cannot call ExportArray(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ExportArray(SEXP array_sexp, SEXP array_ptr_sexp, SEXP schema_ptr_sexp){ + Rf_error("Cannot call ExportArray(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // py-to-r.cpp -#if defined(ARROW_R_WITH_ARROW) -void ExportRecordBatch(const std::shared_ptr& batch, arrow::r::Pointer array_ptr, arrow::r::Pointer schema_ptr); + #if defined(ARROW_R_WITH_ARROW) + void ExportRecordBatch(const std::shared_ptr& batch, arrow::r::Pointer array_ptr, arrow::r::Pointer schema_ptr); extern "C" SEXP _arrow_ExportRecordBatch(SEXP batch_sexp, SEXP array_ptr_sexp, SEXP schema_ptr_sexp){ BEGIN_CPP11 arrow::r::Input&>::type batch(batch_sexp); @@ -5634,15 +5634,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_ExportRecordBatch(SEXP batch_sexp, SEXP array_ptr_sexp, SEXP schema_ptr_sexp){ - Rf_error("Cannot call ExportRecordBatch(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ExportRecordBatch(SEXP batch_sexp, SEXP array_ptr_sexp, SEXP schema_ptr_sexp){ + Rf_error("Cannot call ExportRecordBatch(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // py-to-r.cpp -#if defined(ARROW_R_WITH_ARROW) -void ExportRecordBatchReader(const std::shared_ptr& reader, arrow::r::Pointer stream_ptr); + #if defined(ARROW_R_WITH_ARROW) + void ExportRecordBatchReader(const std::shared_ptr& reader, arrow::r::Pointer stream_ptr); extern "C" SEXP _arrow_ExportRecordBatchReader(SEXP reader_sexp, SEXP stream_ptr_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); @@ -5651,15 +5651,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_ExportRecordBatchReader(SEXP reader_sexp, SEXP stream_ptr_sexp){ - Rf_error("Cannot call ExportRecordBatchReader(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ExportRecordBatchReader(SEXP reader_sexp, SEXP stream_ptr_sexp){ + Rf_error("Cannot call ExportRecordBatchReader(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // r_to_arrow.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Table__from_dots(SEXP lst, SEXP schema_sxp, bool use_threads); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr Table__from_dots(SEXP lst, SEXP schema_sxp, bool use_threads); extern "C" SEXP _arrow_Table__from_dots(SEXP lst_sexp, SEXP schema_sxp_sexp, SEXP use_threads_sexp){ BEGIN_CPP11 arrow::r::Input::type lst(lst_sexp); @@ -5668,15 +5668,15 @@ BEGIN_CPP11 return cpp11::as_sexp(Table__from_dots(lst, schema_sxp, use_threads)); END_CPP11 } -#else -extern "C" SEXP _arrow_Table__from_dots(SEXP lst_sexp, SEXP schema_sxp_sexp, SEXP use_threads_sexp){ - Rf_error("Cannot call Table__from_dots(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Table__from_dots(SEXP lst_sexp, SEXP schema_sxp_sexp, SEXP use_threads_sexp){ + Rf_error("Cannot call Table__from_dots(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // r_to_arrow.cpp -#if defined(ARROW_R_WITH_ARROW) -SEXP vec_to_Array(SEXP x, SEXP s_type); + #if defined(ARROW_R_WITH_ARROW) + SEXP vec_to_Array(SEXP x, SEXP s_type); extern "C" SEXP _arrow_vec_to_Array(SEXP x_sexp, SEXP s_type_sexp){ BEGIN_CPP11 arrow::r::Input::type x(x_sexp); @@ -5684,15 +5684,15 @@ BEGIN_CPP11 return cpp11::as_sexp(vec_to_Array(x, s_type)); END_CPP11 } -#else -extern "C" SEXP _arrow_vec_to_Array(SEXP x_sexp, SEXP s_type_sexp){ - Rf_error("Cannot call vec_to_Array(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_vec_to_Array(SEXP x_sexp, SEXP s_type_sexp){ + Rf_error("Cannot call vec_to_Array(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // r_to_arrow.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr DictionaryArray__FromArrays(const std::shared_ptr& type, const std::shared_ptr& indices, const std::shared_ptr& dict); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr DictionaryArray__FromArrays(const std::shared_ptr& type, const std::shared_ptr& indices, const std::shared_ptr& dict); extern "C" SEXP _arrow_DictionaryArray__FromArrays(SEXP type_sexp, SEXP indices_sexp, SEXP dict_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); @@ -5701,60 +5701,60 @@ BEGIN_CPP11 return cpp11::as_sexp(DictionaryArray__FromArrays(type, indices, dict)); END_CPP11 } -#else -extern "C" SEXP _arrow_DictionaryArray__FromArrays(SEXP type_sexp, SEXP indices_sexp, SEXP dict_sexp){ - Rf_error("Cannot call DictionaryArray__FromArrays(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_DictionaryArray__FromArrays(SEXP type_sexp, SEXP indices_sexp, SEXP dict_sexp){ + Rf_error("Cannot call DictionaryArray__FromArrays(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // recordbatch.cpp -#if defined(ARROW_R_WITH_ARROW) -int RecordBatch__num_columns(const std::shared_ptr& x); + #if defined(ARROW_R_WITH_ARROW) + int RecordBatch__num_columns(const std::shared_ptr& x); extern "C" SEXP _arrow_RecordBatch__num_columns(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(RecordBatch__num_columns(x)); END_CPP11 } -#else -extern "C" SEXP _arrow_RecordBatch__num_columns(SEXP x_sexp){ - Rf_error("Cannot call RecordBatch__num_columns(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_RecordBatch__num_columns(SEXP x_sexp){ + Rf_error("Cannot call RecordBatch__num_columns(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // recordbatch.cpp -#if defined(ARROW_R_WITH_ARROW) -int RecordBatch__num_rows(const std::shared_ptr& x); + #if defined(ARROW_R_WITH_ARROW) + int RecordBatch__num_rows(const std::shared_ptr& x); extern "C" SEXP _arrow_RecordBatch__num_rows(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(RecordBatch__num_rows(x)); END_CPP11 } -#else -extern "C" SEXP _arrow_RecordBatch__num_rows(SEXP x_sexp){ - Rf_error("Cannot call RecordBatch__num_rows(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_RecordBatch__num_rows(SEXP x_sexp){ + Rf_error("Cannot call RecordBatch__num_rows(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // recordbatch.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr RecordBatch__schema(const std::shared_ptr& x); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr RecordBatch__schema(const std::shared_ptr& x); extern "C" SEXP _arrow_RecordBatch__schema(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(RecordBatch__schema(x)); END_CPP11 } -#else -extern "C" SEXP _arrow_RecordBatch__schema(SEXP x_sexp){ - Rf_error("Cannot call RecordBatch__schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_RecordBatch__schema(SEXP x_sexp){ + Rf_error("Cannot call RecordBatch__schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // recordbatch.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr RecordBatch__RenameColumns(const std::shared_ptr& batch, const std::vector& names); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr RecordBatch__RenameColumns(const std::shared_ptr& batch, const std::vector& names); extern "C" SEXP _arrow_RecordBatch__RenameColumns(SEXP batch_sexp, SEXP names_sexp){ BEGIN_CPP11 arrow::r::Input&>::type batch(batch_sexp); @@ -5762,15 +5762,15 @@ BEGIN_CPP11 return cpp11::as_sexp(RecordBatch__RenameColumns(batch, names)); END_CPP11 } -#else -extern "C" SEXP _arrow_RecordBatch__RenameColumns(SEXP batch_sexp, SEXP names_sexp){ - Rf_error("Cannot call RecordBatch__RenameColumns(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_RecordBatch__RenameColumns(SEXP batch_sexp, SEXP names_sexp){ + Rf_error("Cannot call RecordBatch__RenameColumns(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // recordbatch.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr RecordBatch__ReplaceSchemaMetadata(const std::shared_ptr& x, cpp11::strings metadata); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr RecordBatch__ReplaceSchemaMetadata(const std::shared_ptr& x, cpp11::strings metadata); extern "C" SEXP _arrow_RecordBatch__ReplaceSchemaMetadata(SEXP x_sexp, SEXP metadata_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); @@ -5778,30 +5778,30 @@ BEGIN_CPP11 return cpp11::as_sexp(RecordBatch__ReplaceSchemaMetadata(x, metadata)); END_CPP11 } -#else -extern "C" SEXP _arrow_RecordBatch__ReplaceSchemaMetadata(SEXP x_sexp, SEXP metadata_sexp){ - Rf_error("Cannot call RecordBatch__ReplaceSchemaMetadata(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_RecordBatch__ReplaceSchemaMetadata(SEXP x_sexp, SEXP metadata_sexp){ + Rf_error("Cannot call RecordBatch__ReplaceSchemaMetadata(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // recordbatch.cpp -#if defined(ARROW_R_WITH_ARROW) -cpp11::list RecordBatch__columns(const std::shared_ptr& batch); + #if defined(ARROW_R_WITH_ARROW) + cpp11::list RecordBatch__columns(const std::shared_ptr& batch); extern "C" SEXP _arrow_RecordBatch__columns(SEXP batch_sexp){ BEGIN_CPP11 arrow::r::Input&>::type batch(batch_sexp); return cpp11::as_sexp(RecordBatch__columns(batch)); END_CPP11 } -#else -extern "C" SEXP _arrow_RecordBatch__columns(SEXP batch_sexp){ - Rf_error("Cannot call RecordBatch__columns(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_RecordBatch__columns(SEXP batch_sexp){ + Rf_error("Cannot call RecordBatch__columns(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // recordbatch.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr RecordBatch__column(const std::shared_ptr& batch, R_xlen_t i); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr RecordBatch__column(const std::shared_ptr& batch, R_xlen_t i); extern "C" SEXP _arrow_RecordBatch__column(SEXP batch_sexp, SEXP i_sexp){ BEGIN_CPP11 arrow::r::Input&>::type batch(batch_sexp); @@ -5809,15 +5809,15 @@ BEGIN_CPP11 return cpp11::as_sexp(RecordBatch__column(batch, i)); END_CPP11 } -#else -extern "C" SEXP _arrow_RecordBatch__column(SEXP batch_sexp, SEXP i_sexp){ - Rf_error("Cannot call RecordBatch__column(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_RecordBatch__column(SEXP batch_sexp, SEXP i_sexp){ + Rf_error("Cannot call RecordBatch__column(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // recordbatch.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr RecordBatch__GetColumnByName(const std::shared_ptr& batch, const std::string& name); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr RecordBatch__GetColumnByName(const std::shared_ptr& batch, const std::string& name); extern "C" SEXP _arrow_RecordBatch__GetColumnByName(SEXP batch_sexp, SEXP name_sexp){ BEGIN_CPP11 arrow::r::Input&>::type batch(batch_sexp); @@ -5825,15 +5825,15 @@ BEGIN_CPP11 return cpp11::as_sexp(RecordBatch__GetColumnByName(batch, name)); END_CPP11 } -#else -extern "C" SEXP _arrow_RecordBatch__GetColumnByName(SEXP batch_sexp, SEXP name_sexp){ - Rf_error("Cannot call RecordBatch__GetColumnByName(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_RecordBatch__GetColumnByName(SEXP batch_sexp, SEXP name_sexp){ + Rf_error("Cannot call RecordBatch__GetColumnByName(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // recordbatch.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr RecordBatch__SelectColumns(const std::shared_ptr& batch, const std::vector& indices); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr RecordBatch__SelectColumns(const std::shared_ptr& batch, const std::vector& indices); extern "C" SEXP _arrow_RecordBatch__SelectColumns(SEXP batch_sexp, SEXP indices_sexp){ BEGIN_CPP11 arrow::r::Input&>::type batch(batch_sexp); @@ -5841,15 +5841,15 @@ BEGIN_CPP11 return cpp11::as_sexp(RecordBatch__SelectColumns(batch, indices)); END_CPP11 } -#else -extern "C" SEXP _arrow_RecordBatch__SelectColumns(SEXP batch_sexp, SEXP indices_sexp){ - Rf_error("Cannot call RecordBatch__SelectColumns(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_RecordBatch__SelectColumns(SEXP batch_sexp, SEXP indices_sexp){ + Rf_error("Cannot call RecordBatch__SelectColumns(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // recordbatch.cpp -#if defined(ARROW_R_WITH_ARROW) -bool RecordBatch__Equals(const std::shared_ptr& self, const std::shared_ptr& other, bool check_metadata); + #if defined(ARROW_R_WITH_ARROW) + bool RecordBatch__Equals(const std::shared_ptr& self, const std::shared_ptr& other, bool check_metadata); extern "C" SEXP _arrow_RecordBatch__Equals(SEXP self_sexp, SEXP other_sexp, SEXP check_metadata_sexp){ BEGIN_CPP11 arrow::r::Input&>::type self(self_sexp); @@ -5858,15 +5858,15 @@ BEGIN_CPP11 return cpp11::as_sexp(RecordBatch__Equals(self, other, check_metadata)); END_CPP11 } -#else -extern "C" SEXP _arrow_RecordBatch__Equals(SEXP self_sexp, SEXP other_sexp, SEXP check_metadata_sexp){ - Rf_error("Cannot call RecordBatch__Equals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_RecordBatch__Equals(SEXP self_sexp, SEXP other_sexp, SEXP check_metadata_sexp){ + Rf_error("Cannot call RecordBatch__Equals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // recordbatch.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr RecordBatch__AddColumn(const std::shared_ptr& batch, R_xlen_t i, const std::shared_ptr& field, const std::shared_ptr& column); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr RecordBatch__AddColumn(const std::shared_ptr& batch, R_xlen_t i, const std::shared_ptr& field, const std::shared_ptr& column); extern "C" SEXP _arrow_RecordBatch__AddColumn(SEXP batch_sexp, SEXP i_sexp, SEXP field_sexp, SEXP column_sexp){ BEGIN_CPP11 arrow::r::Input&>::type batch(batch_sexp); @@ -5876,15 +5876,15 @@ BEGIN_CPP11 return cpp11::as_sexp(RecordBatch__AddColumn(batch, i, field, column)); END_CPP11 } -#else -extern "C" SEXP _arrow_RecordBatch__AddColumn(SEXP batch_sexp, SEXP i_sexp, SEXP field_sexp, SEXP column_sexp){ - Rf_error("Cannot call RecordBatch__AddColumn(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_RecordBatch__AddColumn(SEXP batch_sexp, SEXP i_sexp, SEXP field_sexp, SEXP column_sexp){ + Rf_error("Cannot call RecordBatch__AddColumn(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // recordbatch.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr RecordBatch__SetColumn(const std::shared_ptr& batch, R_xlen_t i, const std::shared_ptr& field, const std::shared_ptr& column); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr RecordBatch__SetColumn(const std::shared_ptr& batch, R_xlen_t i, const std::shared_ptr& field, const std::shared_ptr& column); extern "C" SEXP _arrow_RecordBatch__SetColumn(SEXP batch_sexp, SEXP i_sexp, SEXP field_sexp, SEXP column_sexp){ BEGIN_CPP11 arrow::r::Input&>::type batch(batch_sexp); @@ -5894,15 +5894,15 @@ BEGIN_CPP11 return cpp11::as_sexp(RecordBatch__SetColumn(batch, i, field, column)); END_CPP11 } -#else -extern "C" SEXP _arrow_RecordBatch__SetColumn(SEXP batch_sexp, SEXP i_sexp, SEXP field_sexp, SEXP column_sexp){ - Rf_error("Cannot call RecordBatch__SetColumn(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_RecordBatch__SetColumn(SEXP batch_sexp, SEXP i_sexp, SEXP field_sexp, SEXP column_sexp){ + Rf_error("Cannot call RecordBatch__SetColumn(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // recordbatch.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr RecordBatch__RemoveColumn(const std::shared_ptr& batch, R_xlen_t i); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr RecordBatch__RemoveColumn(const std::shared_ptr& batch, R_xlen_t i); extern "C" SEXP _arrow_RecordBatch__RemoveColumn(SEXP batch_sexp, SEXP i_sexp){ BEGIN_CPP11 arrow::r::Input&>::type batch(batch_sexp); @@ -5910,15 +5910,15 @@ BEGIN_CPP11 return cpp11::as_sexp(RecordBatch__RemoveColumn(batch, i)); END_CPP11 } -#else -extern "C" SEXP _arrow_RecordBatch__RemoveColumn(SEXP batch_sexp, SEXP i_sexp){ - Rf_error("Cannot call RecordBatch__RemoveColumn(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_RecordBatch__RemoveColumn(SEXP batch_sexp, SEXP i_sexp){ + Rf_error("Cannot call RecordBatch__RemoveColumn(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // recordbatch.cpp -#if defined(ARROW_R_WITH_ARROW) -std::string RecordBatch__column_name(const std::shared_ptr& batch, R_xlen_t i); + #if defined(ARROW_R_WITH_ARROW) + std::string RecordBatch__column_name(const std::shared_ptr& batch, R_xlen_t i); extern "C" SEXP _arrow_RecordBatch__column_name(SEXP batch_sexp, SEXP i_sexp){ BEGIN_CPP11 arrow::r::Input&>::type batch(batch_sexp); @@ -5926,30 +5926,30 @@ BEGIN_CPP11 return cpp11::as_sexp(RecordBatch__column_name(batch, i)); END_CPP11 } -#else -extern "C" SEXP _arrow_RecordBatch__column_name(SEXP batch_sexp, SEXP i_sexp){ - Rf_error("Cannot call RecordBatch__column_name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_RecordBatch__column_name(SEXP batch_sexp, SEXP i_sexp){ + Rf_error("Cannot call RecordBatch__column_name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // recordbatch.cpp -#if defined(ARROW_R_WITH_ARROW) -cpp11::writable::strings RecordBatch__names(const std::shared_ptr& batch); + #if defined(ARROW_R_WITH_ARROW) + cpp11::writable::strings RecordBatch__names(const std::shared_ptr& batch); extern "C" SEXP _arrow_RecordBatch__names(SEXP batch_sexp){ BEGIN_CPP11 arrow::r::Input&>::type batch(batch_sexp); return cpp11::as_sexp(RecordBatch__names(batch)); END_CPP11 } -#else -extern "C" SEXP _arrow_RecordBatch__names(SEXP batch_sexp){ - Rf_error("Cannot call RecordBatch__names(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_RecordBatch__names(SEXP batch_sexp){ + Rf_error("Cannot call RecordBatch__names(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // recordbatch.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr RecordBatch__Slice1(const std::shared_ptr& self, R_xlen_t offset); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr RecordBatch__Slice1(const std::shared_ptr& self, R_xlen_t offset); extern "C" SEXP _arrow_RecordBatch__Slice1(SEXP self_sexp, SEXP offset_sexp){ BEGIN_CPP11 arrow::r::Input&>::type self(self_sexp); @@ -5957,15 +5957,15 @@ BEGIN_CPP11 return cpp11::as_sexp(RecordBatch__Slice1(self, offset)); END_CPP11 } -#else -extern "C" SEXP _arrow_RecordBatch__Slice1(SEXP self_sexp, SEXP offset_sexp){ - Rf_error("Cannot call RecordBatch__Slice1(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_RecordBatch__Slice1(SEXP self_sexp, SEXP offset_sexp){ + Rf_error("Cannot call RecordBatch__Slice1(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // recordbatch.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr RecordBatch__Slice2(const std::shared_ptr& self, R_xlen_t offset, R_xlen_t length); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr RecordBatch__Slice2(const std::shared_ptr& self, R_xlen_t offset, R_xlen_t length); extern "C" SEXP _arrow_RecordBatch__Slice2(SEXP self_sexp, SEXP offset_sexp, SEXP length_sexp){ BEGIN_CPP11 arrow::r::Input&>::type self(self_sexp); @@ -5974,30 +5974,30 @@ BEGIN_CPP11 return cpp11::as_sexp(RecordBatch__Slice2(self, offset, length)); END_CPP11 } -#else -extern "C" SEXP _arrow_RecordBatch__Slice2(SEXP self_sexp, SEXP offset_sexp, SEXP length_sexp){ - Rf_error("Cannot call RecordBatch__Slice2(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_RecordBatch__Slice2(SEXP self_sexp, SEXP offset_sexp, SEXP length_sexp){ + Rf_error("Cannot call RecordBatch__Slice2(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // recordbatch.cpp -#if defined(ARROW_R_WITH_ARROW) -cpp11::raws ipc___SerializeRecordBatch__Raw(const std::shared_ptr& batch); + #if defined(ARROW_R_WITH_ARROW) + cpp11::raws ipc___SerializeRecordBatch__Raw(const std::shared_ptr& batch); extern "C" SEXP _arrow_ipc___SerializeRecordBatch__Raw(SEXP batch_sexp){ BEGIN_CPP11 arrow::r::Input&>::type batch(batch_sexp); return cpp11::as_sexp(ipc___SerializeRecordBatch__Raw(batch)); END_CPP11 } -#else -extern "C" SEXP _arrow_ipc___SerializeRecordBatch__Raw(SEXP batch_sexp){ - Rf_error("Cannot call ipc___SerializeRecordBatch__Raw(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ipc___SerializeRecordBatch__Raw(SEXP batch_sexp){ + Rf_error("Cannot call ipc___SerializeRecordBatch__Raw(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // recordbatch.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr ipc___ReadRecordBatch__InputStream__Schema(const std::shared_ptr& stream, const std::shared_ptr& schema); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr ipc___ReadRecordBatch__InputStream__Schema(const std::shared_ptr& stream, const std::shared_ptr& schema); extern "C" SEXP _arrow_ipc___ReadRecordBatch__InputStream__Schema(SEXP stream_sexp, SEXP schema_sexp){ BEGIN_CPP11 arrow::r::Input&>::type stream(stream_sexp); @@ -6005,15 +6005,15 @@ BEGIN_CPP11 return cpp11::as_sexp(ipc___ReadRecordBatch__InputStream__Schema(stream, schema)); END_CPP11 } -#else -extern "C" SEXP _arrow_ipc___ReadRecordBatch__InputStream__Schema(SEXP stream_sexp, SEXP schema_sexp){ - Rf_error("Cannot call ipc___ReadRecordBatch__InputStream__Schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ipc___ReadRecordBatch__InputStream__Schema(SEXP stream_sexp, SEXP schema_sexp){ + Rf_error("Cannot call ipc___ReadRecordBatch__InputStream__Schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // recordbatch.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr RecordBatch__from_arrays(SEXP schema_sxp, SEXP lst); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr RecordBatch__from_arrays(SEXP schema_sxp, SEXP lst); extern "C" SEXP _arrow_RecordBatch__from_arrays(SEXP schema_sxp_sexp, SEXP lst_sexp){ BEGIN_CPP11 arrow::r::Input::type schema_sxp(schema_sxp_sexp); @@ -6021,120 +6021,120 @@ BEGIN_CPP11 return cpp11::as_sexp(RecordBatch__from_arrays(schema_sxp, lst)); END_CPP11 } -#else -extern "C" SEXP _arrow_RecordBatch__from_arrays(SEXP schema_sxp_sexp, SEXP lst_sexp){ - Rf_error("Cannot call RecordBatch__from_arrays(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_RecordBatch__from_arrays(SEXP schema_sxp_sexp, SEXP lst_sexp){ + Rf_error("Cannot call RecordBatch__from_arrays(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // recordbatchreader.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr RecordBatchReader__schema(const std::shared_ptr& reader); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr RecordBatchReader__schema(const std::shared_ptr& reader); extern "C" SEXP _arrow_RecordBatchReader__schema(SEXP reader_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); return cpp11::as_sexp(RecordBatchReader__schema(reader)); END_CPP11 } -#else -extern "C" SEXP _arrow_RecordBatchReader__schema(SEXP reader_sexp){ - Rf_error("Cannot call RecordBatchReader__schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_RecordBatchReader__schema(SEXP reader_sexp){ + Rf_error("Cannot call RecordBatchReader__schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // recordbatchreader.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr RecordBatchReader__ReadNext(const std::shared_ptr& reader); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr RecordBatchReader__ReadNext(const std::shared_ptr& reader); extern "C" SEXP _arrow_RecordBatchReader__ReadNext(SEXP reader_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); return cpp11::as_sexp(RecordBatchReader__ReadNext(reader)); END_CPP11 } -#else -extern "C" SEXP _arrow_RecordBatchReader__ReadNext(SEXP reader_sexp){ - Rf_error("Cannot call RecordBatchReader__ReadNext(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_RecordBatchReader__ReadNext(SEXP reader_sexp){ + Rf_error("Cannot call RecordBatchReader__ReadNext(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // recordbatchreader.cpp -#if defined(ARROW_R_WITH_ARROW) -cpp11::list RecordBatchReader__batches(const std::shared_ptr& reader); + #if defined(ARROW_R_WITH_ARROW) + cpp11::list RecordBatchReader__batches(const std::shared_ptr& reader); extern "C" SEXP _arrow_RecordBatchReader__batches(SEXP reader_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); return cpp11::as_sexp(RecordBatchReader__batches(reader)); END_CPP11 } -#else -extern "C" SEXP _arrow_RecordBatchReader__batches(SEXP reader_sexp){ - Rf_error("Cannot call RecordBatchReader__batches(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_RecordBatchReader__batches(SEXP reader_sexp){ + Rf_error("Cannot call RecordBatchReader__batches(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // recordbatchreader.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Table__from_RecordBatchReader(const std::shared_ptr& reader); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr Table__from_RecordBatchReader(const std::shared_ptr& reader); extern "C" SEXP _arrow_Table__from_RecordBatchReader(SEXP reader_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); return cpp11::as_sexp(Table__from_RecordBatchReader(reader)); END_CPP11 } -#else -extern "C" SEXP _arrow_Table__from_RecordBatchReader(SEXP reader_sexp){ - Rf_error("Cannot call Table__from_RecordBatchReader(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Table__from_RecordBatchReader(SEXP reader_sexp){ + Rf_error("Cannot call Table__from_RecordBatchReader(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // recordbatchreader.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr ipc___RecordBatchStreamReader__Open(const std::shared_ptr& stream); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr ipc___RecordBatchStreamReader__Open(const std::shared_ptr& stream); extern "C" SEXP _arrow_ipc___RecordBatchStreamReader__Open(SEXP stream_sexp){ BEGIN_CPP11 arrow::r::Input&>::type stream(stream_sexp); return cpp11::as_sexp(ipc___RecordBatchStreamReader__Open(stream)); END_CPP11 } -#else -extern "C" SEXP _arrow_ipc___RecordBatchStreamReader__Open(SEXP stream_sexp){ - Rf_error("Cannot call ipc___RecordBatchStreamReader__Open(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ipc___RecordBatchStreamReader__Open(SEXP stream_sexp){ + Rf_error("Cannot call ipc___RecordBatchStreamReader__Open(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // recordbatchreader.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr ipc___RecordBatchFileReader__schema(const std::shared_ptr& reader); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr ipc___RecordBatchFileReader__schema(const std::shared_ptr& reader); extern "C" SEXP _arrow_ipc___RecordBatchFileReader__schema(SEXP reader_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); return cpp11::as_sexp(ipc___RecordBatchFileReader__schema(reader)); END_CPP11 } -#else -extern "C" SEXP _arrow_ipc___RecordBatchFileReader__schema(SEXP reader_sexp){ - Rf_error("Cannot call ipc___RecordBatchFileReader__schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ipc___RecordBatchFileReader__schema(SEXP reader_sexp){ + Rf_error("Cannot call ipc___RecordBatchFileReader__schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // recordbatchreader.cpp -#if defined(ARROW_R_WITH_ARROW) -int ipc___RecordBatchFileReader__num_record_batches(const std::shared_ptr& reader); + #if defined(ARROW_R_WITH_ARROW) + int ipc___RecordBatchFileReader__num_record_batches(const std::shared_ptr& reader); extern "C" SEXP _arrow_ipc___RecordBatchFileReader__num_record_batches(SEXP reader_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); return cpp11::as_sexp(ipc___RecordBatchFileReader__num_record_batches(reader)); END_CPP11 } -#else -extern "C" SEXP _arrow_ipc___RecordBatchFileReader__num_record_batches(SEXP reader_sexp){ - Rf_error("Cannot call ipc___RecordBatchFileReader__num_record_batches(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ipc___RecordBatchFileReader__num_record_batches(SEXP reader_sexp){ + Rf_error("Cannot call ipc___RecordBatchFileReader__num_record_batches(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // recordbatchreader.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr ipc___RecordBatchFileReader__ReadRecordBatch(const std::shared_ptr& reader, int i); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr ipc___RecordBatchFileReader__ReadRecordBatch(const std::shared_ptr& reader, int i); extern "C" SEXP _arrow_ipc___RecordBatchFileReader__ReadRecordBatch(SEXP reader_sexp, SEXP i_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); @@ -6142,60 +6142,60 @@ BEGIN_CPP11 return cpp11::as_sexp(ipc___RecordBatchFileReader__ReadRecordBatch(reader, i)); END_CPP11 } -#else -extern "C" SEXP _arrow_ipc___RecordBatchFileReader__ReadRecordBatch(SEXP reader_sexp, SEXP i_sexp){ - Rf_error("Cannot call ipc___RecordBatchFileReader__ReadRecordBatch(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ipc___RecordBatchFileReader__ReadRecordBatch(SEXP reader_sexp, SEXP i_sexp){ + Rf_error("Cannot call ipc___RecordBatchFileReader__ReadRecordBatch(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // recordbatchreader.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr ipc___RecordBatchFileReader__Open(const std::shared_ptr& file); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr ipc___RecordBatchFileReader__Open(const std::shared_ptr& file); extern "C" SEXP _arrow_ipc___RecordBatchFileReader__Open(SEXP file_sexp){ BEGIN_CPP11 arrow::r::Input&>::type file(file_sexp); return cpp11::as_sexp(ipc___RecordBatchFileReader__Open(file)); END_CPP11 } -#else -extern "C" SEXP _arrow_ipc___RecordBatchFileReader__Open(SEXP file_sexp){ - Rf_error("Cannot call ipc___RecordBatchFileReader__Open(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ipc___RecordBatchFileReader__Open(SEXP file_sexp){ + Rf_error("Cannot call ipc___RecordBatchFileReader__Open(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // recordbatchreader.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Table__from_RecordBatchFileReader(const std::shared_ptr& reader); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr Table__from_RecordBatchFileReader(const std::shared_ptr& reader); extern "C" SEXP _arrow_Table__from_RecordBatchFileReader(SEXP reader_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); return cpp11::as_sexp(Table__from_RecordBatchFileReader(reader)); END_CPP11 } -#else -extern "C" SEXP _arrow_Table__from_RecordBatchFileReader(SEXP reader_sexp){ - Rf_error("Cannot call Table__from_RecordBatchFileReader(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Table__from_RecordBatchFileReader(SEXP reader_sexp){ + Rf_error("Cannot call Table__from_RecordBatchFileReader(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // recordbatchreader.cpp -#if defined(ARROW_R_WITH_ARROW) -cpp11::list ipc___RecordBatchFileReader__batches(const std::shared_ptr& reader); + #if defined(ARROW_R_WITH_ARROW) + cpp11::list ipc___RecordBatchFileReader__batches(const std::shared_ptr& reader); extern "C" SEXP _arrow_ipc___RecordBatchFileReader__batches(SEXP reader_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); return cpp11::as_sexp(ipc___RecordBatchFileReader__batches(reader)); END_CPP11 } -#else -extern "C" SEXP _arrow_ipc___RecordBatchFileReader__batches(SEXP reader_sexp){ - Rf_error("Cannot call ipc___RecordBatchFileReader__batches(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ipc___RecordBatchFileReader__batches(SEXP reader_sexp){ + Rf_error("Cannot call ipc___RecordBatchFileReader__batches(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // recordbatchwriter.cpp -#if defined(ARROW_R_WITH_ARROW) -void ipc___RecordBatchWriter__WriteRecordBatch(const std::shared_ptr& batch_writer, const std::shared_ptr& batch); + #if defined(ARROW_R_WITH_ARROW) + void ipc___RecordBatchWriter__WriteRecordBatch(const std::shared_ptr& batch_writer, const std::shared_ptr& batch); extern "C" SEXP _arrow_ipc___RecordBatchWriter__WriteRecordBatch(SEXP batch_writer_sexp, SEXP batch_sexp){ BEGIN_CPP11 arrow::r::Input&>::type batch_writer(batch_writer_sexp); @@ -6204,15 +6204,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_ipc___RecordBatchWriter__WriteRecordBatch(SEXP batch_writer_sexp, SEXP batch_sexp){ - Rf_error("Cannot call ipc___RecordBatchWriter__WriteRecordBatch(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ipc___RecordBatchWriter__WriteRecordBatch(SEXP batch_writer_sexp, SEXP batch_sexp){ + Rf_error("Cannot call ipc___RecordBatchWriter__WriteRecordBatch(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // recordbatchwriter.cpp -#if defined(ARROW_R_WITH_ARROW) -void ipc___RecordBatchWriter__WriteTable(const std::shared_ptr& batch_writer, const std::shared_ptr& table); + #if defined(ARROW_R_WITH_ARROW) + void ipc___RecordBatchWriter__WriteTable(const std::shared_ptr& batch_writer, const std::shared_ptr& table); extern "C" SEXP _arrow_ipc___RecordBatchWriter__WriteTable(SEXP batch_writer_sexp, SEXP table_sexp){ BEGIN_CPP11 arrow::r::Input&>::type batch_writer(batch_writer_sexp); @@ -6221,15 +6221,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_ipc___RecordBatchWriter__WriteTable(SEXP batch_writer_sexp, SEXP table_sexp){ - Rf_error("Cannot call ipc___RecordBatchWriter__WriteTable(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ipc___RecordBatchWriter__WriteTable(SEXP batch_writer_sexp, SEXP table_sexp){ + Rf_error("Cannot call ipc___RecordBatchWriter__WriteTable(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // recordbatchwriter.cpp -#if defined(ARROW_R_WITH_ARROW) -void ipc___RecordBatchWriter__Close(const std::shared_ptr& batch_writer); + #if defined(ARROW_R_WITH_ARROW) + void ipc___RecordBatchWriter__Close(const std::shared_ptr& batch_writer); extern "C" SEXP _arrow_ipc___RecordBatchWriter__Close(SEXP batch_writer_sexp){ BEGIN_CPP11 arrow::r::Input&>::type batch_writer(batch_writer_sexp); @@ -6237,15 +6237,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_ipc___RecordBatchWriter__Close(SEXP batch_writer_sexp){ - Rf_error("Cannot call ipc___RecordBatchWriter__Close(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ipc___RecordBatchWriter__Close(SEXP batch_writer_sexp){ + Rf_error("Cannot call ipc___RecordBatchWriter__Close(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // recordbatchwriter.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr ipc___RecordBatchFileWriter__Open(const std::shared_ptr& stream, const std::shared_ptr& schema, bool use_legacy_format, arrow::ipc::MetadataVersion metadata_version); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr ipc___RecordBatchFileWriter__Open(const std::shared_ptr& stream, const std::shared_ptr& schema, bool use_legacy_format, arrow::ipc::MetadataVersion metadata_version); extern "C" SEXP _arrow_ipc___RecordBatchFileWriter__Open(SEXP stream_sexp, SEXP schema_sexp, SEXP use_legacy_format_sexp, SEXP metadata_version_sexp){ BEGIN_CPP11 arrow::r::Input&>::type stream(stream_sexp); @@ -6255,15 +6255,15 @@ BEGIN_CPP11 return cpp11::as_sexp(ipc___RecordBatchFileWriter__Open(stream, schema, use_legacy_format, metadata_version)); END_CPP11 } -#else -extern "C" SEXP _arrow_ipc___RecordBatchFileWriter__Open(SEXP stream_sexp, SEXP schema_sexp, SEXP use_legacy_format_sexp, SEXP metadata_version_sexp){ - Rf_error("Cannot call ipc___RecordBatchFileWriter__Open(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ipc___RecordBatchFileWriter__Open(SEXP stream_sexp, SEXP schema_sexp, SEXP use_legacy_format_sexp, SEXP metadata_version_sexp){ + Rf_error("Cannot call ipc___RecordBatchFileWriter__Open(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // recordbatchwriter.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr ipc___RecordBatchStreamWriter__Open(const std::shared_ptr& stream, const std::shared_ptr& schema, bool use_legacy_format, arrow::ipc::MetadataVersion metadata_version); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr ipc___RecordBatchStreamWriter__Open(const std::shared_ptr& stream, const std::shared_ptr& schema, bool use_legacy_format, arrow::ipc::MetadataVersion metadata_version); extern "C" SEXP _arrow_ipc___RecordBatchStreamWriter__Open(SEXP stream_sexp, SEXP schema_sexp, SEXP use_legacy_format_sexp, SEXP metadata_version_sexp){ BEGIN_CPP11 arrow::r::Input&>::type stream(stream_sexp); @@ -6273,15 +6273,15 @@ BEGIN_CPP11 return cpp11::as_sexp(ipc___RecordBatchStreamWriter__Open(stream, schema, use_legacy_format, metadata_version)); END_CPP11 } -#else -extern "C" SEXP _arrow_ipc___RecordBatchStreamWriter__Open(SEXP stream_sexp, SEXP schema_sexp, SEXP use_legacy_format_sexp, SEXP metadata_version_sexp){ - Rf_error("Cannot call ipc___RecordBatchStreamWriter__Open(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_ipc___RecordBatchStreamWriter__Open(SEXP stream_sexp, SEXP schema_sexp, SEXP use_legacy_format_sexp, SEXP metadata_version_sexp){ + Rf_error("Cannot call ipc___RecordBatchStreamWriter__Open(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // scalar.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Array__GetScalar(const std::shared_ptr& x, int64_t i); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr Array__GetScalar(const std::shared_ptr& x, int64_t i); extern "C" SEXP _arrow_Array__GetScalar(SEXP x_sexp, SEXP i_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); @@ -6289,30 +6289,30 @@ BEGIN_CPP11 return cpp11::as_sexp(Array__GetScalar(x, i)); END_CPP11 } -#else -extern "C" SEXP _arrow_Array__GetScalar(SEXP x_sexp, SEXP i_sexp){ - Rf_error("Cannot call Array__GetScalar(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Array__GetScalar(SEXP x_sexp, SEXP i_sexp){ + Rf_error("Cannot call Array__GetScalar(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // scalar.cpp -#if defined(ARROW_R_WITH_ARROW) -std::string Scalar__ToString(const std::shared_ptr& s); + #if defined(ARROW_R_WITH_ARROW) + std::string Scalar__ToString(const std::shared_ptr& s); extern "C" SEXP _arrow_Scalar__ToString(SEXP s_sexp){ BEGIN_CPP11 arrow::r::Input&>::type s(s_sexp); return cpp11::as_sexp(Scalar__ToString(s)); END_CPP11 } -#else -extern "C" SEXP _arrow_Scalar__ToString(SEXP s_sexp){ - Rf_error("Cannot call Scalar__ToString(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Scalar__ToString(SEXP s_sexp){ + Rf_error("Cannot call Scalar__ToString(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // scalar.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr StructScalar__field(const std::shared_ptr& s, int i); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr StructScalar__field(const std::shared_ptr& s, int i); extern "C" SEXP _arrow_StructScalar__field(SEXP s_sexp, SEXP i_sexp){ BEGIN_CPP11 arrow::r::Input&>::type s(s_sexp); @@ -6320,15 +6320,15 @@ BEGIN_CPP11 return cpp11::as_sexp(StructScalar__field(s, i)); END_CPP11 } -#else -extern "C" SEXP _arrow_StructScalar__field(SEXP s_sexp, SEXP i_sexp){ - Rf_error("Cannot call StructScalar__field(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_StructScalar__field(SEXP s_sexp, SEXP i_sexp){ + Rf_error("Cannot call StructScalar__field(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // scalar.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr StructScalar__GetFieldByName(const std::shared_ptr& s, const std::string& name); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr StructScalar__GetFieldByName(const std::shared_ptr& s, const std::string& name); extern "C" SEXP _arrow_StructScalar__GetFieldByName(SEXP s_sexp, SEXP name_sexp){ BEGIN_CPP11 arrow::r::Input&>::type s(s_sexp); @@ -6336,30 +6336,30 @@ BEGIN_CPP11 return cpp11::as_sexp(StructScalar__GetFieldByName(s, name)); END_CPP11 } -#else -extern "C" SEXP _arrow_StructScalar__GetFieldByName(SEXP s_sexp, SEXP name_sexp){ - Rf_error("Cannot call StructScalar__GetFieldByName(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_StructScalar__GetFieldByName(SEXP s_sexp, SEXP name_sexp){ + Rf_error("Cannot call StructScalar__GetFieldByName(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // scalar.cpp -#if defined(ARROW_R_WITH_ARROW) -SEXP Scalar__as_vector(const std::shared_ptr& scalar); + #if defined(ARROW_R_WITH_ARROW) + SEXP Scalar__as_vector(const std::shared_ptr& scalar); extern "C" SEXP _arrow_Scalar__as_vector(SEXP scalar_sexp){ BEGIN_CPP11 arrow::r::Input&>::type scalar(scalar_sexp); return cpp11::as_sexp(Scalar__as_vector(scalar)); END_CPP11 } -#else -extern "C" SEXP _arrow_Scalar__as_vector(SEXP scalar_sexp){ - Rf_error("Cannot call Scalar__as_vector(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Scalar__as_vector(SEXP scalar_sexp){ + Rf_error("Cannot call Scalar__as_vector(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // scalar.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr MakeArrayFromScalar(const std::shared_ptr& scalar, int n); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr MakeArrayFromScalar(const std::shared_ptr& scalar, int n); extern "C" SEXP _arrow_MakeArrayFromScalar(SEXP scalar_sexp, SEXP n_sexp){ BEGIN_CPP11 arrow::r::Input&>::type scalar(scalar_sexp); @@ -6367,45 +6367,45 @@ BEGIN_CPP11 return cpp11::as_sexp(MakeArrayFromScalar(scalar, n)); END_CPP11 } -#else -extern "C" SEXP _arrow_MakeArrayFromScalar(SEXP scalar_sexp, SEXP n_sexp){ - Rf_error("Cannot call MakeArrayFromScalar(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_MakeArrayFromScalar(SEXP scalar_sexp, SEXP n_sexp){ + Rf_error("Cannot call MakeArrayFromScalar(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // scalar.cpp -#if defined(ARROW_R_WITH_ARROW) -bool Scalar__is_valid(const std::shared_ptr& s); + #if defined(ARROW_R_WITH_ARROW) + bool Scalar__is_valid(const std::shared_ptr& s); extern "C" SEXP _arrow_Scalar__is_valid(SEXP s_sexp){ BEGIN_CPP11 arrow::r::Input&>::type s(s_sexp); return cpp11::as_sexp(Scalar__is_valid(s)); END_CPP11 } -#else -extern "C" SEXP _arrow_Scalar__is_valid(SEXP s_sexp){ - Rf_error("Cannot call Scalar__is_valid(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Scalar__is_valid(SEXP s_sexp){ + Rf_error("Cannot call Scalar__is_valid(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // scalar.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Scalar__type(const std::shared_ptr& s); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr Scalar__type(const std::shared_ptr& s); extern "C" SEXP _arrow_Scalar__type(SEXP s_sexp){ BEGIN_CPP11 arrow::r::Input&>::type s(s_sexp); return cpp11::as_sexp(Scalar__type(s)); END_CPP11 } -#else -extern "C" SEXP _arrow_Scalar__type(SEXP s_sexp){ - Rf_error("Cannot call Scalar__type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Scalar__type(SEXP s_sexp){ + Rf_error("Cannot call Scalar__type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // scalar.cpp -#if defined(ARROW_R_WITH_ARROW) -bool Scalar__Equals(const std::shared_ptr& lhs, const std::shared_ptr& rhs); + #if defined(ARROW_R_WITH_ARROW) + bool Scalar__Equals(const std::shared_ptr& lhs, const std::shared_ptr& rhs); extern "C" SEXP _arrow_Scalar__Equals(SEXP lhs_sexp, SEXP rhs_sexp){ BEGIN_CPP11 arrow::r::Input&>::type lhs(lhs_sexp); @@ -6413,15 +6413,15 @@ BEGIN_CPP11 return cpp11::as_sexp(Scalar__Equals(lhs, rhs)); END_CPP11 } -#else -extern "C" SEXP _arrow_Scalar__Equals(SEXP lhs_sexp, SEXP rhs_sexp){ - Rf_error("Cannot call Scalar__Equals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Scalar__Equals(SEXP lhs_sexp, SEXP rhs_sexp){ + Rf_error("Cannot call Scalar__Equals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // scalar.cpp -#if defined(ARROW_R_WITH_ARROW) -bool Scalar__ApproxEquals(const std::shared_ptr& lhs, const std::shared_ptr& rhs); + #if defined(ARROW_R_WITH_ARROW) + bool Scalar__ApproxEquals(const std::shared_ptr& lhs, const std::shared_ptr& rhs); extern "C" SEXP _arrow_Scalar__ApproxEquals(SEXP lhs_sexp, SEXP rhs_sexp){ BEGIN_CPP11 arrow::r::Input&>::type lhs(lhs_sexp); @@ -6429,60 +6429,60 @@ BEGIN_CPP11 return cpp11::as_sexp(Scalar__ApproxEquals(lhs, rhs)); END_CPP11 } -#else -extern "C" SEXP _arrow_Scalar__ApproxEquals(SEXP lhs_sexp, SEXP rhs_sexp){ - Rf_error("Cannot call Scalar__ApproxEquals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Scalar__ApproxEquals(SEXP lhs_sexp, SEXP rhs_sexp){ + Rf_error("Cannot call Scalar__ApproxEquals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // schema.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr schema_(const std::vector>& fields); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr schema_(const std::vector>& fields); extern "C" SEXP _arrow_schema_(SEXP fields_sexp){ BEGIN_CPP11 arrow::r::Input>&>::type fields(fields_sexp); return cpp11::as_sexp(schema_(fields)); END_CPP11 } -#else -extern "C" SEXP _arrow_schema_(SEXP fields_sexp){ - Rf_error("Cannot call schema_(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_schema_(SEXP fields_sexp){ + Rf_error("Cannot call schema_(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // schema.cpp -#if defined(ARROW_R_WITH_ARROW) -std::string Schema__ToString(const std::shared_ptr& s); + #if defined(ARROW_R_WITH_ARROW) + std::string Schema__ToString(const std::shared_ptr& s); extern "C" SEXP _arrow_Schema__ToString(SEXP s_sexp){ BEGIN_CPP11 arrow::r::Input&>::type s(s_sexp); return cpp11::as_sexp(Schema__ToString(s)); END_CPP11 } -#else -extern "C" SEXP _arrow_Schema__ToString(SEXP s_sexp){ - Rf_error("Cannot call Schema__ToString(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Schema__ToString(SEXP s_sexp){ + Rf_error("Cannot call Schema__ToString(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // schema.cpp -#if defined(ARROW_R_WITH_ARROW) -int Schema__num_fields(const std::shared_ptr& s); + #if defined(ARROW_R_WITH_ARROW) + int Schema__num_fields(const std::shared_ptr& s); extern "C" SEXP _arrow_Schema__num_fields(SEXP s_sexp){ BEGIN_CPP11 arrow::r::Input&>::type s(s_sexp); return cpp11::as_sexp(Schema__num_fields(s)); END_CPP11 } -#else -extern "C" SEXP _arrow_Schema__num_fields(SEXP s_sexp){ - Rf_error("Cannot call Schema__num_fields(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Schema__num_fields(SEXP s_sexp){ + Rf_error("Cannot call Schema__num_fields(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // schema.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Schema__field(const std::shared_ptr& s, int i); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr Schema__field(const std::shared_ptr& s, int i); extern "C" SEXP _arrow_Schema__field(SEXP s_sexp, SEXP i_sexp){ BEGIN_CPP11 arrow::r::Input&>::type s(s_sexp); @@ -6490,15 +6490,15 @@ BEGIN_CPP11 return cpp11::as_sexp(Schema__field(s, i)); END_CPP11 } -#else -extern "C" SEXP _arrow_Schema__field(SEXP s_sexp, SEXP i_sexp){ - Rf_error("Cannot call Schema__field(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Schema__field(SEXP s_sexp, SEXP i_sexp){ + Rf_error("Cannot call Schema__field(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // schema.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Schema__AddField(const std::shared_ptr& s, int i, const std::shared_ptr& field); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr Schema__AddField(const std::shared_ptr& s, int i, const std::shared_ptr& field); extern "C" SEXP _arrow_Schema__AddField(SEXP s_sexp, SEXP i_sexp, SEXP field_sexp){ BEGIN_CPP11 arrow::r::Input&>::type s(s_sexp); @@ -6507,15 +6507,15 @@ BEGIN_CPP11 return cpp11::as_sexp(Schema__AddField(s, i, field)); END_CPP11 } -#else -extern "C" SEXP _arrow_Schema__AddField(SEXP s_sexp, SEXP i_sexp, SEXP field_sexp){ - Rf_error("Cannot call Schema__AddField(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Schema__AddField(SEXP s_sexp, SEXP i_sexp, SEXP field_sexp){ + Rf_error("Cannot call Schema__AddField(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // schema.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Schema__SetField(const std::shared_ptr& s, int i, const std::shared_ptr& field); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr Schema__SetField(const std::shared_ptr& s, int i, const std::shared_ptr& field); extern "C" SEXP _arrow_Schema__SetField(SEXP s_sexp, SEXP i_sexp, SEXP field_sexp){ BEGIN_CPP11 arrow::r::Input&>::type s(s_sexp); @@ -6524,15 +6524,15 @@ BEGIN_CPP11 return cpp11::as_sexp(Schema__SetField(s, i, field)); END_CPP11 } -#else -extern "C" SEXP _arrow_Schema__SetField(SEXP s_sexp, SEXP i_sexp, SEXP field_sexp){ - Rf_error("Cannot call Schema__SetField(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Schema__SetField(SEXP s_sexp, SEXP i_sexp, SEXP field_sexp){ + Rf_error("Cannot call Schema__SetField(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // schema.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Schema__RemoveField(const std::shared_ptr& s, int i); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr Schema__RemoveField(const std::shared_ptr& s, int i); extern "C" SEXP _arrow_Schema__RemoveField(SEXP s_sexp, SEXP i_sexp){ BEGIN_CPP11 arrow::r::Input&>::type s(s_sexp); @@ -6540,15 +6540,15 @@ BEGIN_CPP11 return cpp11::as_sexp(Schema__RemoveField(s, i)); END_CPP11 } -#else -extern "C" SEXP _arrow_Schema__RemoveField(SEXP s_sexp, SEXP i_sexp){ - Rf_error("Cannot call Schema__RemoveField(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Schema__RemoveField(SEXP s_sexp, SEXP i_sexp){ + Rf_error("Cannot call Schema__RemoveField(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // schema.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Schema__GetFieldByName(const std::shared_ptr& s, std::string x); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr Schema__GetFieldByName(const std::shared_ptr& s, std::string x); extern "C" SEXP _arrow_Schema__GetFieldByName(SEXP s_sexp, SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type s(s_sexp); @@ -6556,75 +6556,75 @@ BEGIN_CPP11 return cpp11::as_sexp(Schema__GetFieldByName(s, x)); END_CPP11 } -#else -extern "C" SEXP _arrow_Schema__GetFieldByName(SEXP s_sexp, SEXP x_sexp){ - Rf_error("Cannot call Schema__GetFieldByName(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Schema__GetFieldByName(SEXP s_sexp, SEXP x_sexp){ + Rf_error("Cannot call Schema__GetFieldByName(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // schema.cpp -#if defined(ARROW_R_WITH_ARROW) -cpp11::list Schema__fields(const std::shared_ptr& schema); + #if defined(ARROW_R_WITH_ARROW) + cpp11::list Schema__fields(const std::shared_ptr& schema); extern "C" SEXP _arrow_Schema__fields(SEXP schema_sexp){ BEGIN_CPP11 arrow::r::Input&>::type schema(schema_sexp); return cpp11::as_sexp(Schema__fields(schema)); END_CPP11 } -#else -extern "C" SEXP _arrow_Schema__fields(SEXP schema_sexp){ - Rf_error("Cannot call Schema__fields(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Schema__fields(SEXP schema_sexp){ + Rf_error("Cannot call Schema__fields(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // schema.cpp -#if defined(ARROW_R_WITH_ARROW) -std::vector Schema__field_names(const std::shared_ptr& schema); + #if defined(ARROW_R_WITH_ARROW) + std::vector Schema__field_names(const std::shared_ptr& schema); extern "C" SEXP _arrow_Schema__field_names(SEXP schema_sexp){ BEGIN_CPP11 arrow::r::Input&>::type schema(schema_sexp); return cpp11::as_sexp(Schema__field_names(schema)); END_CPP11 } -#else -extern "C" SEXP _arrow_Schema__field_names(SEXP schema_sexp){ - Rf_error("Cannot call Schema__field_names(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Schema__field_names(SEXP schema_sexp){ + Rf_error("Cannot call Schema__field_names(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // schema.cpp -#if defined(ARROW_R_WITH_ARROW) -bool Schema__HasMetadata(const std::shared_ptr& schema); + #if defined(ARROW_R_WITH_ARROW) + bool Schema__HasMetadata(const std::shared_ptr& schema); extern "C" SEXP _arrow_Schema__HasMetadata(SEXP schema_sexp){ BEGIN_CPP11 arrow::r::Input&>::type schema(schema_sexp); return cpp11::as_sexp(Schema__HasMetadata(schema)); END_CPP11 } -#else -extern "C" SEXP _arrow_Schema__HasMetadata(SEXP schema_sexp){ - Rf_error("Cannot call Schema__HasMetadata(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Schema__HasMetadata(SEXP schema_sexp){ + Rf_error("Cannot call Schema__HasMetadata(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // schema.cpp -#if defined(ARROW_R_WITH_ARROW) -cpp11::writable::list Schema__metadata(const std::shared_ptr& schema); + #if defined(ARROW_R_WITH_ARROW) + cpp11::writable::list Schema__metadata(const std::shared_ptr& schema); extern "C" SEXP _arrow_Schema__metadata(SEXP schema_sexp){ BEGIN_CPP11 arrow::r::Input&>::type schema(schema_sexp); return cpp11::as_sexp(Schema__metadata(schema)); END_CPP11 } -#else -extern "C" SEXP _arrow_Schema__metadata(SEXP schema_sexp){ - Rf_error("Cannot call Schema__metadata(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Schema__metadata(SEXP schema_sexp){ + Rf_error("Cannot call Schema__metadata(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // schema.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Schema__WithMetadata(const std::shared_ptr& schema, cpp11::strings metadata); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr Schema__WithMetadata(const std::shared_ptr& schema, cpp11::strings metadata); extern "C" SEXP _arrow_Schema__WithMetadata(SEXP schema_sexp, SEXP metadata_sexp){ BEGIN_CPP11 arrow::r::Input&>::type schema(schema_sexp); @@ -6632,30 +6632,30 @@ BEGIN_CPP11 return cpp11::as_sexp(Schema__WithMetadata(schema, metadata)); END_CPP11 } -#else -extern "C" SEXP _arrow_Schema__WithMetadata(SEXP schema_sexp, SEXP metadata_sexp){ - Rf_error("Cannot call Schema__WithMetadata(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Schema__WithMetadata(SEXP schema_sexp, SEXP metadata_sexp){ + Rf_error("Cannot call Schema__WithMetadata(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // schema.cpp -#if defined(ARROW_R_WITH_ARROW) -cpp11::writable::raws Schema__serialize(const std::shared_ptr& schema); + #if defined(ARROW_R_WITH_ARROW) + cpp11::writable::raws Schema__serialize(const std::shared_ptr& schema); extern "C" SEXP _arrow_Schema__serialize(SEXP schema_sexp){ BEGIN_CPP11 arrow::r::Input&>::type schema(schema_sexp); return cpp11::as_sexp(Schema__serialize(schema)); END_CPP11 } -#else -extern "C" SEXP _arrow_Schema__serialize(SEXP schema_sexp){ - Rf_error("Cannot call Schema__serialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Schema__serialize(SEXP schema_sexp){ + Rf_error("Cannot call Schema__serialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // schema.cpp -#if defined(ARROW_R_WITH_ARROW) -bool Schema__Equals(const std::shared_ptr& schema, const std::shared_ptr& other, bool check_metadata); + #if defined(ARROW_R_WITH_ARROW) + bool Schema__Equals(const std::shared_ptr& schema, const std::shared_ptr& other, bool check_metadata); extern "C" SEXP _arrow_Schema__Equals(SEXP schema_sexp, SEXP other_sexp, SEXP check_metadata_sexp){ BEGIN_CPP11 arrow::r::Input&>::type schema(schema_sexp); @@ -6664,75 +6664,75 @@ BEGIN_CPP11 return cpp11::as_sexp(Schema__Equals(schema, other, check_metadata)); END_CPP11 } -#else -extern "C" SEXP _arrow_Schema__Equals(SEXP schema_sexp, SEXP other_sexp, SEXP check_metadata_sexp){ - Rf_error("Cannot call Schema__Equals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Schema__Equals(SEXP schema_sexp, SEXP other_sexp, SEXP check_metadata_sexp){ + Rf_error("Cannot call Schema__Equals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // schema.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr arrow__UnifySchemas(const std::vector>& schemas); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr arrow__UnifySchemas(const std::vector>& schemas); extern "C" SEXP _arrow_arrow__UnifySchemas(SEXP schemas_sexp){ BEGIN_CPP11 arrow::r::Input>&>::type schemas(schemas_sexp); return cpp11::as_sexp(arrow__UnifySchemas(schemas)); END_CPP11 } -#else -extern "C" SEXP _arrow_arrow__UnifySchemas(SEXP schemas_sexp){ - Rf_error("Cannot call arrow__UnifySchemas(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_arrow__UnifySchemas(SEXP schemas_sexp){ + Rf_error("Cannot call arrow__UnifySchemas(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // table.cpp -#if defined(ARROW_R_WITH_ARROW) -int Table__num_columns(const std::shared_ptr& x); + #if defined(ARROW_R_WITH_ARROW) + int Table__num_columns(const std::shared_ptr& x); extern "C" SEXP _arrow_Table__num_columns(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(Table__num_columns(x)); END_CPP11 } -#else -extern "C" SEXP _arrow_Table__num_columns(SEXP x_sexp){ - Rf_error("Cannot call Table__num_columns(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Table__num_columns(SEXP x_sexp){ + Rf_error("Cannot call Table__num_columns(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // table.cpp -#if defined(ARROW_R_WITH_ARROW) -int Table__num_rows(const std::shared_ptr& x); + #if defined(ARROW_R_WITH_ARROW) + int Table__num_rows(const std::shared_ptr& x); extern "C" SEXP _arrow_Table__num_rows(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(Table__num_rows(x)); END_CPP11 } -#else -extern "C" SEXP _arrow_Table__num_rows(SEXP x_sexp){ - Rf_error("Cannot call Table__num_rows(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Table__num_rows(SEXP x_sexp){ + Rf_error("Cannot call Table__num_rows(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // table.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Table__schema(const std::shared_ptr& x); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr Table__schema(const std::shared_ptr& x); extern "C" SEXP _arrow_Table__schema(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(Table__schema(x)); END_CPP11 } -#else -extern "C" SEXP _arrow_Table__schema(SEXP x_sexp){ - Rf_error("Cannot call Table__schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Table__schema(SEXP x_sexp){ + Rf_error("Cannot call Table__schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // table.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Table__ReplaceSchemaMetadata(const std::shared_ptr& x, cpp11::strings metadata); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr Table__ReplaceSchemaMetadata(const std::shared_ptr& x, cpp11::strings metadata); extern "C" SEXP _arrow_Table__ReplaceSchemaMetadata(SEXP x_sexp, SEXP metadata_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); @@ -6740,15 +6740,15 @@ BEGIN_CPP11 return cpp11::as_sexp(Table__ReplaceSchemaMetadata(x, metadata)); END_CPP11 } -#else -extern "C" SEXP _arrow_Table__ReplaceSchemaMetadata(SEXP x_sexp, SEXP metadata_sexp){ - Rf_error("Cannot call Table__ReplaceSchemaMetadata(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Table__ReplaceSchemaMetadata(SEXP x_sexp, SEXP metadata_sexp){ + Rf_error("Cannot call Table__ReplaceSchemaMetadata(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // table.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Table__column(const std::shared_ptr& table, R_xlen_t i); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr Table__column(const std::shared_ptr& table, R_xlen_t i); extern "C" SEXP _arrow_Table__column(SEXP table_sexp, SEXP i_sexp){ BEGIN_CPP11 arrow::r::Input&>::type table(table_sexp); @@ -6756,15 +6756,15 @@ BEGIN_CPP11 return cpp11::as_sexp(Table__column(table, i)); END_CPP11 } -#else -extern "C" SEXP _arrow_Table__column(SEXP table_sexp, SEXP i_sexp){ - Rf_error("Cannot call Table__column(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Table__column(SEXP table_sexp, SEXP i_sexp){ + Rf_error("Cannot call Table__column(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // table.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Table__field(const std::shared_ptr& table, R_xlen_t i); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr Table__field(const std::shared_ptr& table, R_xlen_t i); extern "C" SEXP _arrow_Table__field(SEXP table_sexp, SEXP i_sexp){ BEGIN_CPP11 arrow::r::Input&>::type table(table_sexp); @@ -6772,45 +6772,45 @@ BEGIN_CPP11 return cpp11::as_sexp(Table__field(table, i)); END_CPP11 } -#else -extern "C" SEXP _arrow_Table__field(SEXP table_sexp, SEXP i_sexp){ - Rf_error("Cannot call Table__field(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Table__field(SEXP table_sexp, SEXP i_sexp){ + Rf_error("Cannot call Table__field(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // table.cpp -#if defined(ARROW_R_WITH_ARROW) -cpp11::list Table__columns(const std::shared_ptr& table); + #if defined(ARROW_R_WITH_ARROW) + cpp11::list Table__columns(const std::shared_ptr& table); extern "C" SEXP _arrow_Table__columns(SEXP table_sexp){ BEGIN_CPP11 arrow::r::Input&>::type table(table_sexp); return cpp11::as_sexp(Table__columns(table)); END_CPP11 } -#else -extern "C" SEXP _arrow_Table__columns(SEXP table_sexp){ - Rf_error("Cannot call Table__columns(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Table__columns(SEXP table_sexp){ + Rf_error("Cannot call Table__columns(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // table.cpp -#if defined(ARROW_R_WITH_ARROW) -std::vector Table__ColumnNames(const std::shared_ptr& table); + #if defined(ARROW_R_WITH_ARROW) + std::vector Table__ColumnNames(const std::shared_ptr& table); extern "C" SEXP _arrow_Table__ColumnNames(SEXP table_sexp){ BEGIN_CPP11 arrow::r::Input&>::type table(table_sexp); return cpp11::as_sexp(Table__ColumnNames(table)); END_CPP11 } -#else -extern "C" SEXP _arrow_Table__ColumnNames(SEXP table_sexp){ - Rf_error("Cannot call Table__ColumnNames(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Table__ColumnNames(SEXP table_sexp){ + Rf_error("Cannot call Table__ColumnNames(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // table.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Table__RenameColumns(const std::shared_ptr& table, const std::vector& names); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr Table__RenameColumns(const std::shared_ptr& table, const std::vector& names); extern "C" SEXP _arrow_Table__RenameColumns(SEXP table_sexp, SEXP names_sexp){ BEGIN_CPP11 arrow::r::Input&>::type table(table_sexp); @@ -6818,15 +6818,15 @@ BEGIN_CPP11 return cpp11::as_sexp(Table__RenameColumns(table, names)); END_CPP11 } -#else -extern "C" SEXP _arrow_Table__RenameColumns(SEXP table_sexp, SEXP names_sexp){ - Rf_error("Cannot call Table__RenameColumns(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Table__RenameColumns(SEXP table_sexp, SEXP names_sexp){ + Rf_error("Cannot call Table__RenameColumns(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // table.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Table__Slice1(const std::shared_ptr& table, R_xlen_t offset); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr Table__Slice1(const std::shared_ptr& table, R_xlen_t offset); extern "C" SEXP _arrow_Table__Slice1(SEXP table_sexp, SEXP offset_sexp){ BEGIN_CPP11 arrow::r::Input&>::type table(table_sexp); @@ -6834,15 +6834,15 @@ BEGIN_CPP11 return cpp11::as_sexp(Table__Slice1(table, offset)); END_CPP11 } -#else -extern "C" SEXP _arrow_Table__Slice1(SEXP table_sexp, SEXP offset_sexp){ - Rf_error("Cannot call Table__Slice1(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Table__Slice1(SEXP table_sexp, SEXP offset_sexp){ + Rf_error("Cannot call Table__Slice1(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // table.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Table__Slice2(const std::shared_ptr& table, R_xlen_t offset, R_xlen_t length); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr Table__Slice2(const std::shared_ptr& table, R_xlen_t offset, R_xlen_t length); extern "C" SEXP _arrow_Table__Slice2(SEXP table_sexp, SEXP offset_sexp, SEXP length_sexp){ BEGIN_CPP11 arrow::r::Input&>::type table(table_sexp); @@ -6851,15 +6851,15 @@ BEGIN_CPP11 return cpp11::as_sexp(Table__Slice2(table, offset, length)); END_CPP11 } -#else -extern "C" SEXP _arrow_Table__Slice2(SEXP table_sexp, SEXP offset_sexp, SEXP length_sexp){ - Rf_error("Cannot call Table__Slice2(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Table__Slice2(SEXP table_sexp, SEXP offset_sexp, SEXP length_sexp){ + Rf_error("Cannot call Table__Slice2(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // table.cpp -#if defined(ARROW_R_WITH_ARROW) -bool Table__Equals(const std::shared_ptr& lhs, const std::shared_ptr& rhs, bool check_metadata); + #if defined(ARROW_R_WITH_ARROW) + bool Table__Equals(const std::shared_ptr& lhs, const std::shared_ptr& rhs, bool check_metadata); extern "C" SEXP _arrow_Table__Equals(SEXP lhs_sexp, SEXP rhs_sexp, SEXP check_metadata_sexp){ BEGIN_CPP11 arrow::r::Input&>::type lhs(lhs_sexp); @@ -6868,45 +6868,45 @@ BEGIN_CPP11 return cpp11::as_sexp(Table__Equals(lhs, rhs, check_metadata)); END_CPP11 } -#else -extern "C" SEXP _arrow_Table__Equals(SEXP lhs_sexp, SEXP rhs_sexp, SEXP check_metadata_sexp){ - Rf_error("Cannot call Table__Equals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Table__Equals(SEXP lhs_sexp, SEXP rhs_sexp, SEXP check_metadata_sexp){ + Rf_error("Cannot call Table__Equals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // table.cpp -#if defined(ARROW_R_WITH_ARROW) -bool Table__Validate(const std::shared_ptr& table); + #if defined(ARROW_R_WITH_ARROW) + bool Table__Validate(const std::shared_ptr& table); extern "C" SEXP _arrow_Table__Validate(SEXP table_sexp){ BEGIN_CPP11 arrow::r::Input&>::type table(table_sexp); return cpp11::as_sexp(Table__Validate(table)); END_CPP11 } -#else -extern "C" SEXP _arrow_Table__Validate(SEXP table_sexp){ - Rf_error("Cannot call Table__Validate(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Table__Validate(SEXP table_sexp){ + Rf_error("Cannot call Table__Validate(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // table.cpp -#if defined(ARROW_R_WITH_ARROW) -bool Table__ValidateFull(const std::shared_ptr& table); + #if defined(ARROW_R_WITH_ARROW) + bool Table__ValidateFull(const std::shared_ptr& table); extern "C" SEXP _arrow_Table__ValidateFull(SEXP table_sexp){ BEGIN_CPP11 arrow::r::Input&>::type table(table_sexp); return cpp11::as_sexp(Table__ValidateFull(table)); END_CPP11 } -#else -extern "C" SEXP _arrow_Table__ValidateFull(SEXP table_sexp){ - Rf_error("Cannot call Table__ValidateFull(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Table__ValidateFull(SEXP table_sexp){ + Rf_error("Cannot call Table__ValidateFull(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // table.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Table__GetColumnByName(const std::shared_ptr& table, const std::string& name); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr Table__GetColumnByName(const std::shared_ptr& table, const std::string& name); extern "C" SEXP _arrow_Table__GetColumnByName(SEXP table_sexp, SEXP name_sexp){ BEGIN_CPP11 arrow::r::Input&>::type table(table_sexp); @@ -6914,15 +6914,15 @@ BEGIN_CPP11 return cpp11::as_sexp(Table__GetColumnByName(table, name)); END_CPP11 } -#else -extern "C" SEXP _arrow_Table__GetColumnByName(SEXP table_sexp, SEXP name_sexp){ - Rf_error("Cannot call Table__GetColumnByName(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Table__GetColumnByName(SEXP table_sexp, SEXP name_sexp){ + Rf_error("Cannot call Table__GetColumnByName(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // table.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Table__RemoveColumn(const std::shared_ptr& table, R_xlen_t i); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr Table__RemoveColumn(const std::shared_ptr& table, R_xlen_t i); extern "C" SEXP _arrow_Table__RemoveColumn(SEXP table_sexp, SEXP i_sexp){ BEGIN_CPP11 arrow::r::Input&>::type table(table_sexp); @@ -6930,15 +6930,15 @@ BEGIN_CPP11 return cpp11::as_sexp(Table__RemoveColumn(table, i)); END_CPP11 } -#else -extern "C" SEXP _arrow_Table__RemoveColumn(SEXP table_sexp, SEXP i_sexp){ - Rf_error("Cannot call Table__RemoveColumn(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Table__RemoveColumn(SEXP table_sexp, SEXP i_sexp){ + Rf_error("Cannot call Table__RemoveColumn(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // table.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Table__AddColumn(const std::shared_ptr& table, R_xlen_t i, const std::shared_ptr& field, const std::shared_ptr& column); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr Table__AddColumn(const std::shared_ptr& table, R_xlen_t i, const std::shared_ptr& field, const std::shared_ptr& column); extern "C" SEXP _arrow_Table__AddColumn(SEXP table_sexp, SEXP i_sexp, SEXP field_sexp, SEXP column_sexp){ BEGIN_CPP11 arrow::r::Input&>::type table(table_sexp); @@ -6948,15 +6948,15 @@ BEGIN_CPP11 return cpp11::as_sexp(Table__AddColumn(table, i, field, column)); END_CPP11 } -#else -extern "C" SEXP _arrow_Table__AddColumn(SEXP table_sexp, SEXP i_sexp, SEXP field_sexp, SEXP column_sexp){ - Rf_error("Cannot call Table__AddColumn(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Table__AddColumn(SEXP table_sexp, SEXP i_sexp, SEXP field_sexp, SEXP column_sexp){ + Rf_error("Cannot call Table__AddColumn(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // table.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Table__SetColumn(const std::shared_ptr& table, R_xlen_t i, const std::shared_ptr& field, const std::shared_ptr& column); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr Table__SetColumn(const std::shared_ptr& table, R_xlen_t i, const std::shared_ptr& field, const std::shared_ptr& column); extern "C" SEXP _arrow_Table__SetColumn(SEXP table_sexp, SEXP i_sexp, SEXP field_sexp, SEXP column_sexp){ BEGIN_CPP11 arrow::r::Input&>::type table(table_sexp); @@ -6966,15 +6966,15 @@ BEGIN_CPP11 return cpp11::as_sexp(Table__SetColumn(table, i, field, column)); END_CPP11 } -#else -extern "C" SEXP _arrow_Table__SetColumn(SEXP table_sexp, SEXP i_sexp, SEXP field_sexp, SEXP column_sexp){ - Rf_error("Cannot call Table__SetColumn(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Table__SetColumn(SEXP table_sexp, SEXP i_sexp, SEXP field_sexp, SEXP column_sexp){ + Rf_error("Cannot call Table__SetColumn(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // table.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Table__SelectColumns(const std::shared_ptr& table, const std::vector& indices); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr Table__SelectColumns(const std::shared_ptr& table, const std::vector& indices); extern "C" SEXP _arrow_Table__SelectColumns(SEXP table_sexp, SEXP indices_sexp){ BEGIN_CPP11 arrow::r::Input&>::type table(table_sexp); @@ -6982,30 +6982,30 @@ BEGIN_CPP11 return cpp11::as_sexp(Table__SelectColumns(table, indices)); END_CPP11 } -#else -extern "C" SEXP _arrow_Table__SelectColumns(SEXP table_sexp, SEXP indices_sexp){ - Rf_error("Cannot call Table__SelectColumns(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Table__SelectColumns(SEXP table_sexp, SEXP indices_sexp){ + Rf_error("Cannot call Table__SelectColumns(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // table.cpp -#if defined(ARROW_R_WITH_ARROW) -bool all_record_batches(SEXP lst); + #if defined(ARROW_R_WITH_ARROW) + bool all_record_batches(SEXP lst); extern "C" SEXP _arrow_all_record_batches(SEXP lst_sexp){ BEGIN_CPP11 arrow::r::Input::type lst(lst_sexp); return cpp11::as_sexp(all_record_batches(lst)); END_CPP11 } -#else -extern "C" SEXP _arrow_all_record_batches(SEXP lst_sexp){ - Rf_error("Cannot call all_record_batches(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_all_record_batches(SEXP lst_sexp){ + Rf_error("Cannot call all_record_batches(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // table.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Table__from_record_batches(const std::vector>& batches, SEXP schema_sxp); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr Table__from_record_batches(const std::vector>& batches, SEXP schema_sxp); extern "C" SEXP _arrow_Table__from_record_batches(SEXP batches_sexp, SEXP schema_sxp_sexp){ BEGIN_CPP11 arrow::r::Input>&>::type batches(batches_sexp); @@ -7013,29 +7013,29 @@ BEGIN_CPP11 return cpp11::as_sexp(Table__from_record_batches(batches, schema_sxp)); END_CPP11 } -#else -extern "C" SEXP _arrow_Table__from_record_batches(SEXP batches_sexp, SEXP schema_sxp_sexp){ - Rf_error("Cannot call Table__from_record_batches(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_Table__from_record_batches(SEXP batches_sexp, SEXP schema_sxp_sexp){ + Rf_error("Cannot call Table__from_record_batches(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // threadpool.cpp -#if defined(ARROW_R_WITH_ARROW) -int GetCpuThreadPoolCapacity(); + #if defined(ARROW_R_WITH_ARROW) + int GetCpuThreadPoolCapacity(); extern "C" SEXP _arrow_GetCpuThreadPoolCapacity(){ BEGIN_CPP11 return cpp11::as_sexp(GetCpuThreadPoolCapacity()); END_CPP11 } -#else -extern "C" SEXP _arrow_GetCpuThreadPoolCapacity(){ - Rf_error("Cannot call GetCpuThreadPoolCapacity(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_GetCpuThreadPoolCapacity(){ + Rf_error("Cannot call GetCpuThreadPoolCapacity(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // threadpool.cpp -#if defined(ARROW_R_WITH_ARROW) -void SetCpuThreadPoolCapacity(int threads); + #if defined(ARROW_R_WITH_ARROW) + void SetCpuThreadPoolCapacity(int threads); extern "C" SEXP _arrow_SetCpuThreadPoolCapacity(SEXP threads_sexp){ BEGIN_CPP11 arrow::r::Input::type threads(threads_sexp); @@ -7043,29 +7043,29 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_SetCpuThreadPoolCapacity(SEXP threads_sexp){ - Rf_error("Cannot call SetCpuThreadPoolCapacity(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_SetCpuThreadPoolCapacity(SEXP threads_sexp){ + Rf_error("Cannot call SetCpuThreadPoolCapacity(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // threadpool.cpp -#if defined(ARROW_R_WITH_ARROW) -int GetIOThreadPoolCapacity(); + #if defined(ARROW_R_WITH_ARROW) + int GetIOThreadPoolCapacity(); extern "C" SEXP _arrow_GetIOThreadPoolCapacity(){ BEGIN_CPP11 return cpp11::as_sexp(GetIOThreadPoolCapacity()); END_CPP11 } -#else -extern "C" SEXP _arrow_GetIOThreadPoolCapacity(){ - Rf_error("Cannot call GetIOThreadPoolCapacity(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_GetIOThreadPoolCapacity(){ + Rf_error("Cannot call GetIOThreadPoolCapacity(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // threadpool.cpp -#if defined(ARROW_R_WITH_ARROW) -void SetIOThreadPoolCapacity(int threads); + #if defined(ARROW_R_WITH_ARROW) + void SetIOThreadPoolCapacity(int threads); extern "C" SEXP _arrow_SetIOThreadPoolCapacity(SEXP threads_sexp){ BEGIN_CPP11 arrow::r::Input::type threads(threads_sexp); @@ -7073,53 +7073,53 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } -#else -extern "C" SEXP _arrow_SetIOThreadPoolCapacity(SEXP threads_sexp){ - Rf_error("Cannot call SetIOThreadPoolCapacity(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_SetIOThreadPoolCapacity(SEXP threads_sexp){ + Rf_error("Cannot call SetIOThreadPoolCapacity(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + // type_infer.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Array__infer_type(SEXP x); + #if defined(ARROW_R_WITH_ARROW) + std::shared_ptr Array__infer_type(SEXP x); extern "C" SEXP _arrow_Array__infer_type(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input::type x(x_sexp); return cpp11::as_sexp(Array__infer_type(x)); END_CPP11 } -#else -extern "C" SEXP _arrow_Array__infer_type(SEXP x_sexp){ - Rf_error("Cannot call Array__infer_type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - -#if defined(ARROW_R_WITH_ARROW) -extern "C" SEXP _arrow_Table__Reset(SEXP r6) { + #else + extern "C" SEXP _arrow_Array__infer_type(SEXP x_sexp){ + Rf_error("Cannot call Array__infer_type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + + #if defined(ARROW_R_WITH_ARROW) + extern "C" SEXP _arrow_Table__Reset(SEXP r6) { BEGIN_CPP11 arrow::r::r6_reset_pointer(r6); END_CPP11 return R_NilValue; } -#else -extern "C" SEXP _arrow_Table__Reset(SEXP r6){ - Rf_error("Cannot call Table(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - -#if defined(ARROW_R_WITH_ARROW) -extern "C" SEXP _arrow_RecordBatch__Reset(SEXP r6) { + #else + extern "C" SEXP _arrow_Table__Reset(SEXP r6){ + Rf_error("Cannot call Table(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + + #if defined(ARROW_R_WITH_ARROW) + extern "C" SEXP _arrow_RecordBatch__Reset(SEXP r6) { BEGIN_CPP11 arrow::r::r6_reset_pointer(r6); END_CPP11 return R_NilValue; } -#else -extern "C" SEXP _arrow_RecordBatch__Reset(SEXP r6){ - Rf_error("Cannot call RecordBatch(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); -} -#endif - + #else + extern "C" SEXP _arrow_RecordBatch__Reset(SEXP r6){ + Rf_error("Cannot call RecordBatch(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); + } + #endif + extern "C" SEXP _arrow_available() { return Rf_ScalarLogical( #if defined(ARROW_R_WITH_ARROW) From 0d15ddd485a4851e8169d3fdabff55209f1f2078 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Wed, 8 Dec 2021 09:53:40 -0400 Subject: [PATCH 12/49] remove debugging --- r/R/dplyr-funcs.R | 3 --- 1 file changed, 3 deletions(-) diff --git a/r/R/dplyr-funcs.R b/r/R/dplyr-funcs.R index 307dcc5dcb823..ec598a5e44c5e 100644 --- a/r/R/dplyr-funcs.R +++ b/r/R/dplyr-funcs.R @@ -47,8 +47,6 @@ create_translation_cache <- function() { register_string_translations() register_type_translations() - message(paste0('"', names(nse_funcs), '"', collapse = "\n")) - # We only create the cache for nse_funcs and not agg_funcs .cache$functions <- c(as.list(nse_funcs), arrow_funcs) } @@ -79,7 +77,6 @@ register_translation <- function(fun_name, fun, registry = translation_registry( if (is.null(fun)) { rm(list = name, envir = registry) } else { - message(sprintf("Registering '%s'", name)) registry[[name]] <- fun } From d834b3d97f25e06a38fce9e60a603957cc11db0b Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Wed, 8 Dec 2021 09:57:55 -0400 Subject: [PATCH 13/49] separate conditional and string translations --- r/DESCRIPTION | 2 + r/R/dplyr-funcs-conditional.R | 88 +++++ r/R/dplyr-funcs-string.R | 478 ++++++++++++++++++++++ r/R/dplyr-funcs.R | 566 --------------------------- r/man/contains_regex.Rd | 2 +- r/man/get_stringr_pattern_options.Rd | 2 +- 6 files changed, 570 insertions(+), 568 deletions(-) create mode 100644 r/R/dplyr-funcs-conditional.R create mode 100644 r/R/dplyr-funcs-string.R diff --git a/r/DESCRIPTION b/r/DESCRIPTION index 5b95dc6f16b20..60b4c4a5ef8de 100644 --- a/r/DESCRIPTION +++ b/r/DESCRIPTION @@ -90,6 +90,8 @@ Collate: 'dplyr-distinct.R' 'dplyr-eval.R' 'dplyr-filter.R' + 'dplyr-funcs-conditional.R' + 'dplyr-funcs-string.R' 'expression.R' 'dplyr-funcs.R' 'dplyr-group-by.R' diff --git a/r/R/dplyr-funcs-conditional.R b/r/R/dplyr-funcs-conditional.R new file mode 100644 index 0000000000000..7aa0523101117 --- /dev/null +++ b/r/R/dplyr-funcs-conditional.R @@ -0,0 +1,88 @@ + +register_conditional_translations <- function() { + + nse_funcs$coalesce <- function(...) { + args <- list2(...) + if (length(args) < 1) { + abort("At least one argument must be supplied to coalesce()") + } + + # Treat NaN like NA for consistency with dplyr::coalesce(), but if *all* + # the values are NaN, we should return NaN, not NA, so don't replace + # NaN with NA in the final (or only) argument + # TODO: if an option is added to the coalesce kernel to treat NaN as NA, + # use that to simplify the code here (ARROW-13389) + attr(args[[length(args)]], "last") <- TRUE + args <- lapply(args, function(arg) { + last_arg <- is.null(attr(arg, "last")) + attr(arg, "last") <- NULL + + if (!inherits(arg, "Expression")) { + arg <- Expression$scalar(arg) + } + + if (last_arg && arg$type_id() %in% TYPES_WITH_NAN) { + # store the NA_real_ in the same type as arg to avoid avoid casting + # smaller float types to larger float types + NA_expr <- Expression$scalar(Scalar$create(NA_real_, type = arg$type())) + Expression$create("if_else", Expression$create("is_nan", arg), NA_expr, arg) + } else { + arg + } + }) + Expression$create("coalesce", args = args) + } + + nse_funcs$if_else <- function(condition, true, false, missing = NULL) { + if (!is.null(missing)) { + return(nse_funcs$if_else( + nse_funcs$is.na(condition), + missing, + nse_funcs$if_else(condition, true, false) + )) + } + + build_expr("if_else", condition, true, false) + } + + # Although base R ifelse allows `yes` and `no` to be different classes + nse_funcs$ifelse <- function(test, yes, no) { + nse_funcs$if_else(condition = test, true = yes, false = no) + } + + nse_funcs$case_when <- function(...) { + formulas <- list2(...) + n <- length(formulas) + if (n == 0) { + abort("No cases provided in case_when()") + } + query <- vector("list", n) + value <- vector("list", n) + mask <- caller_env() + for (i in seq_len(n)) { + f <- formulas[[i]] + if (!inherits(f, "formula")) { + abort("Each argument to case_when() must be a two-sided formula") + } + query[[i]] <- arrow_eval(f[[2]], mask) + value[[i]] <- arrow_eval(f[[3]], mask) + if (!nse_funcs$is.logical(query[[i]])) { + abort("Left side of each formula in case_when() must be a logical expression") + } + if (inherits(value[[i]], "try-error")) { + abort(handle_arrow_not_supported(value[[i]], format_expr(f[[3]]))) + } + } + build_expr( + "case_when", + args = c( + build_expr( + "make_struct", + args = query, + options = list(field_names = as.character(seq_along(query))) + ), + value + ) + ) + } +} diff --git a/r/R/dplyr-funcs-string.R b/r/R/dplyr-funcs-string.R new file mode 100644 index 0000000000000..158a9565ba8b5 --- /dev/null +++ b/r/R/dplyr-funcs-string.R @@ -0,0 +1,478 @@ + +# String function helpers + +#' Get `stringr` pattern options +#' +#' This function assigns definitions for the `stringr` pattern modifier +#' functions (`fixed()`, `regex()`, etc.) inside itself, and uses them to +#' evaluate the quoted expression `pattern`, returning a list that is used +#' to control pattern matching behavior in internal `arrow` functions. +#' +#' @param pattern Unevaluated expression containing a call to a `stringr` +#' pattern modifier function +#' +#' @return List containing elements `pattern`, `fixed`, and `ignore_case` +#' @keywords internal +get_stringr_pattern_options <- function(pattern) { + fixed <- function(pattern, ignore_case = FALSE, ...) { + check_dots(...) + list(pattern = pattern, fixed = TRUE, ignore_case = ignore_case) + } + regex <- function(pattern, ignore_case = FALSE, ...) { + check_dots(...) + list(pattern = pattern, fixed = FALSE, ignore_case = ignore_case) + } + coll <- function(...) { + arrow_not_supported("Pattern modifier `coll()`") + } + boundary <- function(...) { + arrow_not_supported("Pattern modifier `boundary()`") + } + check_dots <- function(...) { + dots <- list(...) + if (length(dots)) { + warning( + "Ignoring pattern modifier ", + ngettext(length(dots), "argument ", "arguments "), + "not supported in Arrow: ", + oxford_paste(names(dots)), + call. = FALSE + ) + } + } + ensure_opts <- function(opts) { + if (is.character(opts)) { + opts <- list(pattern = opts, fixed = FALSE, ignore_case = FALSE) + } + opts + } + ensure_opts(eval(pattern)) +} + +#' Does this string contain regex metacharacters? +#' +#' @param string String to be tested +#' @keywords internal +#' @return Logical: does `string` contain regex metacharacters? +contains_regex <- function(string) { + grepl("[.\\|()[{^$*+?]", string) +} + +# format `pattern` as needed for case insensitivity and literal matching by RE2 +format_string_pattern <- function(pattern, ignore.case, fixed) { + # Arrow lacks native support for case-insensitive literal string matching and + # replacement, so we use the regular expression engine (RE2) to do this. + # https://github.com/google/re2/wiki/Syntax + if (ignore.case) { + if (fixed) { + # Everything between "\Q" and "\E" is treated as literal text. + # If the search text contains any literal "\E" strings, make them + # lowercase so they won't signal the end of the literal text: + pattern <- gsub("\\E", "\\e", pattern, fixed = TRUE) + pattern <- paste0("\\Q", pattern, "\\E") + } + # Prepend "(?i)" for case-insensitive matching + pattern <- paste0("(?i)", pattern) + } + pattern +} + +# format `replacement` as needed for literal replacement by RE2 +format_string_replacement <- function(replacement, ignore.case, fixed) { + # Arrow lacks native support for case-insensitive literal string + # replacement, so we use the regular expression engine (RE2) to do this. + # https://github.com/google/re2/wiki/Syntax + if (ignore.case && fixed) { + # Escape single backslashes in the regex replacement text so they are + # interpreted as literal backslashes: + replacement <- gsub("\\", "\\\\", replacement, fixed = TRUE) + } + replacement +} + +# Currently, Arrow does not supports a locale option for string case conversion +# functions, contrast to stringr's API, so the 'locale' argument is only valid +# for stringr's default value ("en"). The following are string functions that +# take a 'locale' option as its second argument: +# str_to_lower +# str_to_upper +# str_to_title +# +# Arrow locale will be supported with ARROW-14126 +stop_if_locale_provided <- function(locale) { + if (!identical(locale, "en")) { + stop("Providing a value for 'locale' other than the default ('en') is not supported in Arrow. ", + "To change locale, use 'Sys.setlocale()'", + call. = FALSE + ) + } +} + +register_string_translations <- function() { + + nse_funcs$nchar <- function(x, type = "chars", allowNA = FALSE, keepNA = NA) { + if (allowNA) { + arrow_not_supported("allowNA = TRUE") + } + if (is.na(keepNA)) { + keepNA <- !identical(type, "width") + } + if (!keepNA) { + # TODO: I think there is a fill_null kernel we could use, set null to 2 + arrow_not_supported("keepNA = TRUE") + } + if (identical(type, "bytes")) { + Expression$create("binary_length", x) + } else { + Expression$create("utf8_length", x) + } + } + + + arrow_string_join_function <- function(null_handling, null_replacement = NULL) { + # the `binary_join_element_wise` Arrow C++ compute kernel takes the separator + # as the last argument, so pass `sep` as the last dots arg to this function + function(...) { + args <- lapply(list(...), function(arg) { + # handle scalar literal args, and cast all args to string for + # consistency with base::paste(), base::paste0(), and stringr::str_c() + if (!inherits(arg, "Expression")) { + assert_that( + length(arg) == 1, + msg = "Literal vectors of length != 1 not supported in string concatenation" + ) + Expression$scalar(as.character(arg)) + } else { + nse_funcs$as.character(arg) + } + }) + Expression$create( + "binary_join_element_wise", + args = args, + options = list( + null_handling = null_handling, + null_replacement = null_replacement + ) + ) + } + } + + nse_funcs$paste <- function(..., sep = " ", collapse = NULL, recycle0 = FALSE) { + assert_that( + is.null(collapse), + msg = "paste() with the collapse argument is not yet supported in Arrow" + ) + if (!inherits(sep, "Expression")) { + assert_that(!is.na(sep), msg = "Invalid separator") + } + arrow_string_join_function(NullHandlingBehavior$REPLACE, "NA")(..., sep) + } + + nse_funcs$paste0 <- function(..., collapse = NULL, recycle0 = FALSE) { + assert_that( + is.null(collapse), + msg = "paste0() with the collapse argument is not yet supported in Arrow" + ) + arrow_string_join_function(NullHandlingBehavior$REPLACE, "NA")(..., "") + } + + nse_funcs$str_c <- function(..., sep = "", collapse = NULL) { + assert_that( + is.null(collapse), + msg = "str_c() with the collapse argument is not yet supported in Arrow" + ) + arrow_string_join_function(NullHandlingBehavior$EMIT_NULL)(..., sep) + } + + + nse_funcs$str_to_lower <- function(string, locale = "en") { + stop_if_locale_provided(locale) + Expression$create("utf8_lower", string) + } + + nse_funcs$str_to_upper <- function(string, locale = "en") { + stop_if_locale_provided(locale) + Expression$create("utf8_upper", string) + } + + nse_funcs$str_to_title <- function(string, locale = "en") { + stop_if_locale_provided(locale) + Expression$create("utf8_title", string) + } + + nse_funcs$str_trim <- function(string, side = c("both", "left", "right")) { + side <- match.arg(side) + trim_fun <- switch(side, + left = "utf8_ltrim_whitespace", + right = "utf8_rtrim_whitespace", + both = "utf8_trim_whitespace" + ) + Expression$create(trim_fun, string) + } + + nse_funcs$substr <- function(x, start, stop) { + assert_that( + length(start) == 1, + msg = "`start` must be length 1 - other lengths are not supported in Arrow" + ) + assert_that( + length(stop) == 1, + msg = "`stop` must be length 1 - other lengths are not supported in Arrow" + ) + + # substr treats values as if they're on a continous number line, so values + # 0 are effectively blank characters - set `start` to 1 here so Arrow mimics + # this behavior + if (start <= 0) { + start <- 1 + } + + # if `stop` is lower than `start`, this is invalid, so set `stop` to + # 0 so that an empty string will be returned (consistent with base::substr()) + if (stop < start) { + stop <- 0 + } + + Expression$create( + "utf8_slice_codeunits", + x, + # we don't need to subtract 1 from `stop` as C++ counts exclusively + # which effectively cancels out the difference in indexing between R & C++ + options = list(start = start - 1L, stop = stop) + ) + } + + nse_funcs$substring <- function(text, first, last) { + nse_funcs$substr(x = text, start = first, stop = last) + } + + nse_funcs$str_sub <- function(string, start = 1L, end = -1L) { + assert_that( + length(start) == 1, + msg = "`start` must be length 1 - other lengths are not supported in Arrow" + ) + assert_that( + length(end) == 1, + msg = "`end` must be length 1 - other lengths are not supported in Arrow" + ) + + # In stringr::str_sub, an `end` value of -1 means the end of the string, so + # set it to the maximum integer to match this behavior + if (end == -1) { + end <- .Machine$integer.max + } + + # An end value lower than a start value returns an empty string in + # stringr::str_sub so set end to 0 here to match this behavior + if (end < start) { + end <- 0 + } + + # subtract 1 from `start` because C++ is 0-based and R is 1-based + # str_sub treats a `start` value of 0 or 1 as the same thing so don't subtract 1 when `start` == 0 + # when `start` < 0, both str_sub and utf8_slice_codeunits count backwards from the end + if (start > 0) { + start <- start - 1L + } + + Expression$create( + "utf8_slice_codeunits", + string, + options = list(start = start, stop = end) + ) + } + + nse_funcs$grepl <- function(pattern, x, ignore.case = FALSE, fixed = FALSE) { + arrow_fun <- ifelse(fixed, "match_substring", "match_substring_regex") + Expression$create( + arrow_fun, + x, + options = list(pattern = pattern, ignore_case = ignore.case) + ) + } + + nse_funcs$str_detect <- function(string, pattern, negate = FALSE) { + opts <- get_stringr_pattern_options(enexpr(pattern)) + out <- nse_funcs$grepl( + pattern = opts$pattern, + x = string, + ignore.case = opts$ignore_case, + fixed = opts$fixed + ) + if (negate) { + out <- !out + } + out + } + + nse_funcs$str_like <- function(string, pattern, ignore_case = TRUE) { + Expression$create( + "match_like", + string, + options = list(pattern = pattern, ignore_case = ignore_case) + ) + } + + # Encapsulate some common logic for sub/gsub/str_replace/str_replace_all + arrow_r_string_replace_function <- function(max_replacements) { + function(pattern, replacement, x, ignore.case = FALSE, fixed = FALSE) { + Expression$create( + ifelse(fixed && !ignore.case, "replace_substring", "replace_substring_regex"), + x, + options = list( + pattern = format_string_pattern(pattern, ignore.case, fixed), + replacement = format_string_replacement(replacement, ignore.case, fixed), + max_replacements = max_replacements + ) + ) + } + } + + arrow_stringr_string_replace_function <- function(max_replacements) { + function(string, pattern, replacement) { + opts <- get_stringr_pattern_options(enexpr(pattern)) + arrow_r_string_replace_function(max_replacements)( + pattern = opts$pattern, + replacement = replacement, + x = string, + ignore.case = opts$ignore_case, + fixed = opts$fixed + ) + } + } + + nse_funcs$sub <- arrow_r_string_replace_function(1L) + nse_funcs$gsub <- arrow_r_string_replace_function(-1L) + nse_funcs$str_replace <- arrow_stringr_string_replace_function(1L) + nse_funcs$str_replace_all <- arrow_stringr_string_replace_function(-1L) + + nse_funcs$strsplit <- function(x, + split, + fixed = FALSE, + perl = FALSE, + useBytes = FALSE) { + assert_that(is.string(split)) + + arrow_fun <- ifelse(fixed, "split_pattern", "split_pattern_regex") + # warn when the user specifies both fixed = TRUE and perl = TRUE, for + # consistency with the behavior of base::strsplit() + if (fixed && perl) { + warning("Argument 'perl = TRUE' will be ignored", call. = FALSE) + } + # since split is not a regex, proceed without any warnings or errors regardless + # of the value of perl, for consistency with the behavior of base::strsplit() + Expression$create( + arrow_fun, + x, + options = list(pattern = split, reverse = FALSE, max_splits = -1L) + ) + } + + nse_funcs$str_split <- function(string, pattern, n = Inf, simplify = FALSE) { + opts <- get_stringr_pattern_options(enexpr(pattern)) + arrow_fun <- ifelse(opts$fixed, "split_pattern", "split_pattern_regex") + if (opts$ignore_case) { + arrow_not_supported("Case-insensitive string splitting") + } + if (n == 0) { + arrow_not_supported("Splitting strings into zero parts") + } + if (identical(n, Inf)) { + n <- 0L + } + if (simplify) { + warning("Argument 'simplify = TRUE' will be ignored", call. = FALSE) + } + # The max_splits option in the Arrow C++ library controls the maximum number + # of places at which the string is split, whereas the argument n to + # str_split() controls the maximum number of pieces to return. So we must + # subtract 1 from n to get max_splits. + Expression$create( + arrow_fun, + string, + options = list( + pattern = opts$pattern, + reverse = FALSE, + max_splits = n - 1L + ) + ) + } + + + nse_funcs$str_pad <- function(string, width, side = c("left", "right", "both"), pad = " ") { + assert_that(is_integerish(width)) + side <- match.arg(side) + assert_that(is.string(pad)) + + if (side == "left") { + pad_func <- "utf8_lpad" + } else if (side == "right") { + pad_func <- "utf8_rpad" + } else if (side == "both") { + pad_func <- "utf8_center" + } + + Expression$create( + pad_func, + string, + options = list(width = width, padding = pad) + ) + } + + nse_funcs$startsWith <- function(x, prefix) { + Expression$create( + "starts_with", + x, + options = list(pattern = prefix) + ) + } + + nse_funcs$endsWith <- function(x, suffix) { + Expression$create( + "ends_with", + x, + options = list(pattern = suffix) + ) + } + + nse_funcs$str_starts <- function(string, pattern, negate = FALSE) { + opts <- get_stringr_pattern_options(enexpr(pattern)) + if (opts$fixed) { + out <- nse_funcs$startsWith(x = string, prefix = opts$pattern) + } else { + out <- nse_funcs$grepl(pattern = paste0("^", opts$pattern), x = string, fixed = FALSE) + } + + if (negate) { + out <- !out + } + out + } + + nse_funcs$str_ends <- function(string, pattern, negate = FALSE) { + opts <- get_stringr_pattern_options(enexpr(pattern)) + if (opts$fixed) { + out <- nse_funcs$endsWith(x = string, suffix = opts$pattern) + } else { + out <- nse_funcs$grepl(pattern = paste0(opts$pattern, "$"), x = string, fixed = FALSE) + } + + if (negate) { + out <- !out + } + out + } + + nse_funcs$str_count <- function(string, pattern) { + opts <- get_stringr_pattern_options(enexpr(pattern)) + if (!is.string(pattern)) { + arrow_not_supported("`pattern` must be a length 1 character vector; other values") + } + arrow_fun <- ifelse(opts$fixed, "count_substring", "count_substring_regex") + Expression$create( + arrow_fun, + string, + options = list(pattern = opts$pattern, ignore_case = opts$ignore_case) + ) + } +} diff --git a/r/R/dplyr-funcs.R b/r/R/dplyr-funcs.R index ec598a5e44c5e..a5220cba3d900 100644 --- a/r/R/dplyr-funcs.R +++ b/r/R/dplyr-funcs.R @@ -340,484 +340,6 @@ register_type_translations <- function() { } } -# String function helpers - -#' Get `stringr` pattern options -#' -#' This function assigns definitions for the `stringr` pattern modifier -#' functions (`fixed()`, `regex()`, etc.) inside itself, and uses them to -#' evaluate the quoted expression `pattern`, returning a list that is used -#' to control pattern matching behavior in internal `arrow` functions. -#' -#' @param pattern Unevaluated expression containing a call to a `stringr` -#' pattern modifier function -#' -#' @return List containing elements `pattern`, `fixed`, and `ignore_case` -#' @keywords internal -get_stringr_pattern_options <- function(pattern) { - fixed <- function(pattern, ignore_case = FALSE, ...) { - check_dots(...) - list(pattern = pattern, fixed = TRUE, ignore_case = ignore_case) - } - regex <- function(pattern, ignore_case = FALSE, ...) { - check_dots(...) - list(pattern = pattern, fixed = FALSE, ignore_case = ignore_case) - } - coll <- function(...) { - arrow_not_supported("Pattern modifier `coll()`") - } - boundary <- function(...) { - arrow_not_supported("Pattern modifier `boundary()`") - } - check_dots <- function(...) { - dots <- list(...) - if (length(dots)) { - warning( - "Ignoring pattern modifier ", - ngettext(length(dots), "argument ", "arguments "), - "not supported in Arrow: ", - oxford_paste(names(dots)), - call. = FALSE - ) - } - } - ensure_opts <- function(opts) { - if (is.character(opts)) { - opts <- list(pattern = opts, fixed = FALSE, ignore_case = FALSE) - } - opts - } - ensure_opts(eval(pattern)) -} - -#' Does this string contain regex metacharacters? -#' -#' @param string String to be tested -#' @keywords internal -#' @return Logical: does `string` contain regex metacharacters? -contains_regex <- function(string) { - grepl("[.\\|()[{^$*+?]", string) -} - -# format `pattern` as needed for case insensitivity and literal matching by RE2 -format_string_pattern <- function(pattern, ignore.case, fixed) { - # Arrow lacks native support for case-insensitive literal string matching and - # replacement, so we use the regular expression engine (RE2) to do this. - # https://github.com/google/re2/wiki/Syntax - if (ignore.case) { - if (fixed) { - # Everything between "\Q" and "\E" is treated as literal text. - # If the search text contains any literal "\E" strings, make them - # lowercase so they won't signal the end of the literal text: - pattern <- gsub("\\E", "\\e", pattern, fixed = TRUE) - pattern <- paste0("\\Q", pattern, "\\E") - } - # Prepend "(?i)" for case-insensitive matching - pattern <- paste0("(?i)", pattern) - } - pattern -} - -# format `replacement` as needed for literal replacement by RE2 -format_string_replacement <- function(replacement, ignore.case, fixed) { - # Arrow lacks native support for case-insensitive literal string - # replacement, so we use the regular expression engine (RE2) to do this. - # https://github.com/google/re2/wiki/Syntax - if (ignore.case && fixed) { - # Escape single backslashes in the regex replacement text so they are - # interpreted as literal backslashes: - replacement <- gsub("\\", "\\\\", replacement, fixed = TRUE) - } - replacement -} - -# Currently, Arrow does not supports a locale option for string case conversion -# functions, contrast to stringr's API, so the 'locale' argument is only valid -# for stringr's default value ("en"). The following are string functions that -# take a 'locale' option as its second argument: -# str_to_lower -# str_to_upper -# str_to_title -# -# Arrow locale will be supported with ARROW-14126 -stop_if_locale_provided <- function(locale) { - if (!identical(locale, "en")) { - stop("Providing a value for 'locale' other than the default ('en') is not supported in Arrow. ", - "To change locale, use 'Sys.setlocale()'", - call. = FALSE - ) - } -} - -register_string_translations <- function() { - - nse_funcs$nchar <- function(x, type = "chars", allowNA = FALSE, keepNA = NA) { - if (allowNA) { - arrow_not_supported("allowNA = TRUE") - } - if (is.na(keepNA)) { - keepNA <- !identical(type, "width") - } - if (!keepNA) { - # TODO: I think there is a fill_null kernel we could use, set null to 2 - arrow_not_supported("keepNA = TRUE") - } - if (identical(type, "bytes")) { - Expression$create("binary_length", x) - } else { - Expression$create("utf8_length", x) - } - } - - - arrow_string_join_function <- function(null_handling, null_replacement = NULL) { - # the `binary_join_element_wise` Arrow C++ compute kernel takes the separator - # as the last argument, so pass `sep` as the last dots arg to this function - function(...) { - args <- lapply(list(...), function(arg) { - # handle scalar literal args, and cast all args to string for - # consistency with base::paste(), base::paste0(), and stringr::str_c() - if (!inherits(arg, "Expression")) { - assert_that( - length(arg) == 1, - msg = "Literal vectors of length != 1 not supported in string concatenation" - ) - Expression$scalar(as.character(arg)) - } else { - nse_funcs$as.character(arg) - } - }) - Expression$create( - "binary_join_element_wise", - args = args, - options = list( - null_handling = null_handling, - null_replacement = null_replacement - ) - ) - } - } - - nse_funcs$paste <- function(..., sep = " ", collapse = NULL, recycle0 = FALSE) { - assert_that( - is.null(collapse), - msg = "paste() with the collapse argument is not yet supported in Arrow" - ) - if (!inherits(sep, "Expression")) { - assert_that(!is.na(sep), msg = "Invalid separator") - } - arrow_string_join_function(NullHandlingBehavior$REPLACE, "NA")(..., sep) - } - - nse_funcs$paste0 <- function(..., collapse = NULL, recycle0 = FALSE) { - assert_that( - is.null(collapse), - msg = "paste0() with the collapse argument is not yet supported in Arrow" - ) - arrow_string_join_function(NullHandlingBehavior$REPLACE, "NA")(..., "") - } - - nse_funcs$str_c <- function(..., sep = "", collapse = NULL) { - assert_that( - is.null(collapse), - msg = "str_c() with the collapse argument is not yet supported in Arrow" - ) - arrow_string_join_function(NullHandlingBehavior$EMIT_NULL)(..., sep) - } - - - nse_funcs$str_to_lower <- function(string, locale = "en") { - stop_if_locale_provided(locale) - Expression$create("utf8_lower", string) - } - - nse_funcs$str_to_upper <- function(string, locale = "en") { - stop_if_locale_provided(locale) - Expression$create("utf8_upper", string) - } - - nse_funcs$str_to_title <- function(string, locale = "en") { - stop_if_locale_provided(locale) - Expression$create("utf8_title", string) - } - - nse_funcs$str_trim <- function(string, side = c("both", "left", "right")) { - side <- match.arg(side) - trim_fun <- switch(side, - left = "utf8_ltrim_whitespace", - right = "utf8_rtrim_whitespace", - both = "utf8_trim_whitespace" - ) - Expression$create(trim_fun, string) - } - - nse_funcs$substr <- function(x, start, stop) { - assert_that( - length(start) == 1, - msg = "`start` must be length 1 - other lengths are not supported in Arrow" - ) - assert_that( - length(stop) == 1, - msg = "`stop` must be length 1 - other lengths are not supported in Arrow" - ) - - # substr treats values as if they're on a continous number line, so values - # 0 are effectively blank characters - set `start` to 1 here so Arrow mimics - # this behavior - if (start <= 0) { - start <- 1 - } - - # if `stop` is lower than `start`, this is invalid, so set `stop` to - # 0 so that an empty string will be returned (consistent with base::substr()) - if (stop < start) { - stop <- 0 - } - - Expression$create( - "utf8_slice_codeunits", - x, - # we don't need to subtract 1 from `stop` as C++ counts exclusively - # which effectively cancels out the difference in indexing between R & C++ - options = list(start = start - 1L, stop = stop) - ) - } - - nse_funcs$substring <- function(text, first, last) { - nse_funcs$substr(x = text, start = first, stop = last) - } - - nse_funcs$str_sub <- function(string, start = 1L, end = -1L) { - assert_that( - length(start) == 1, - msg = "`start` must be length 1 - other lengths are not supported in Arrow" - ) - assert_that( - length(end) == 1, - msg = "`end` must be length 1 - other lengths are not supported in Arrow" - ) - - # In stringr::str_sub, an `end` value of -1 means the end of the string, so - # set it to the maximum integer to match this behavior - if (end == -1) { - end <- .Machine$integer.max - } - - # An end value lower than a start value returns an empty string in - # stringr::str_sub so set end to 0 here to match this behavior - if (end < start) { - end <- 0 - } - - # subtract 1 from `start` because C++ is 0-based and R is 1-based - # str_sub treats a `start` value of 0 or 1 as the same thing so don't subtract 1 when `start` == 0 - # when `start` < 0, both str_sub and utf8_slice_codeunits count backwards from the end - if (start > 0) { - start <- start - 1L - } - - Expression$create( - "utf8_slice_codeunits", - string, - options = list(start = start, stop = end) - ) - } - - nse_funcs$grepl <- function(pattern, x, ignore.case = FALSE, fixed = FALSE) { - arrow_fun <- ifelse(fixed, "match_substring", "match_substring_regex") - Expression$create( - arrow_fun, - x, - options = list(pattern = pattern, ignore_case = ignore.case) - ) - } - - nse_funcs$str_detect <- function(string, pattern, negate = FALSE) { - opts <- get_stringr_pattern_options(enexpr(pattern)) - out <- nse_funcs$grepl( - pattern = opts$pattern, - x = string, - ignore.case = opts$ignore_case, - fixed = opts$fixed - ) - if (negate) { - out <- !out - } - out - } - - nse_funcs$str_like <- function(string, pattern, ignore_case = TRUE) { - Expression$create( - "match_like", - string, - options = list(pattern = pattern, ignore_case = ignore_case) - ) - } - - # Encapsulate some common logic for sub/gsub/str_replace/str_replace_all - arrow_r_string_replace_function <- function(max_replacements) { - function(pattern, replacement, x, ignore.case = FALSE, fixed = FALSE) { - Expression$create( - ifelse(fixed && !ignore.case, "replace_substring", "replace_substring_regex"), - x, - options = list( - pattern = format_string_pattern(pattern, ignore.case, fixed), - replacement = format_string_replacement(replacement, ignore.case, fixed), - max_replacements = max_replacements - ) - ) - } - } - - arrow_stringr_string_replace_function <- function(max_replacements) { - function(string, pattern, replacement) { - opts <- get_stringr_pattern_options(enexpr(pattern)) - arrow_r_string_replace_function(max_replacements)( - pattern = opts$pattern, - replacement = replacement, - x = string, - ignore.case = opts$ignore_case, - fixed = opts$fixed - ) - } - } - - nse_funcs$sub <- arrow_r_string_replace_function(1L) - nse_funcs$gsub <- arrow_r_string_replace_function(-1L) - nse_funcs$str_replace <- arrow_stringr_string_replace_function(1L) - nse_funcs$str_replace_all <- arrow_stringr_string_replace_function(-1L) - - nse_funcs$strsplit <- function(x, - split, - fixed = FALSE, - perl = FALSE, - useBytes = FALSE) { - assert_that(is.string(split)) - - arrow_fun <- ifelse(fixed, "split_pattern", "split_pattern_regex") - # warn when the user specifies both fixed = TRUE and perl = TRUE, for - # consistency with the behavior of base::strsplit() - if (fixed && perl) { - warning("Argument 'perl = TRUE' will be ignored", call. = FALSE) - } - # since split is not a regex, proceed without any warnings or errors regardless - # of the value of perl, for consistency with the behavior of base::strsplit() - Expression$create( - arrow_fun, - x, - options = list(pattern = split, reverse = FALSE, max_splits = -1L) - ) - } - - nse_funcs$str_split <- function(string, pattern, n = Inf, simplify = FALSE) { - opts <- get_stringr_pattern_options(enexpr(pattern)) - arrow_fun <- ifelse(opts$fixed, "split_pattern", "split_pattern_regex") - if (opts$ignore_case) { - arrow_not_supported("Case-insensitive string splitting") - } - if (n == 0) { - arrow_not_supported("Splitting strings into zero parts") - } - if (identical(n, Inf)) { - n <- 0L - } - if (simplify) { - warning("Argument 'simplify = TRUE' will be ignored", call. = FALSE) - } - # The max_splits option in the Arrow C++ library controls the maximum number - # of places at which the string is split, whereas the argument n to - # str_split() controls the maximum number of pieces to return. So we must - # subtract 1 from n to get max_splits. - Expression$create( - arrow_fun, - string, - options = list( - pattern = opts$pattern, - reverse = FALSE, - max_splits = n - 1L - ) - ) - } - - - nse_funcs$str_pad <- function(string, width, side = c("left", "right", "both"), pad = " ") { - assert_that(is_integerish(width)) - side <- match.arg(side) - assert_that(is.string(pad)) - - if (side == "left") { - pad_func <- "utf8_lpad" - } else if (side == "right") { - pad_func <- "utf8_rpad" - } else if (side == "both") { - pad_func <- "utf8_center" - } - - Expression$create( - pad_func, - string, - options = list(width = width, padding = pad) - ) - } - - nse_funcs$startsWith <- function(x, prefix) { - Expression$create( - "starts_with", - x, - options = list(pattern = prefix) - ) - } - - nse_funcs$endsWith <- function(x, suffix) { - Expression$create( - "ends_with", - x, - options = list(pattern = suffix) - ) - } - - nse_funcs$str_starts <- function(string, pattern, negate = FALSE) { - opts <- get_stringr_pattern_options(enexpr(pattern)) - if (opts$fixed) { - out <- nse_funcs$startsWith(x = string, prefix = opts$pattern) - } else { - out <- nse_funcs$grepl(pattern = paste0("^", opts$pattern), x = string, fixed = FALSE) - } - - if (negate) { - out <- !out - } - out - } - - nse_funcs$str_ends <- function(string, pattern, negate = FALSE) { - opts <- get_stringr_pattern_options(enexpr(pattern)) - if (opts$fixed) { - out <- nse_funcs$endsWith(x = string, suffix = opts$pattern) - } else { - out <- nse_funcs$grepl(pattern = paste0(opts$pattern, "$"), x = string, fixed = FALSE) - } - - if (negate) { - out <- !out - } - out - } - - nse_funcs$str_count <- function(string, pattern) { - opts <- get_stringr_pattern_options(enexpr(pattern)) - if (!is.string(pattern)) { - arrow_not_supported("`pattern` must be a length 1 character vector; other values") - } - arrow_fun <- ifelse(opts$fixed, "count_substring", "count_substring_regex") - Expression$create( - arrow_fun, - string, - options = list(pattern = opts$pattern, ignore_case = opts$ignore_case) - ) - } -} - register_datetime_translations <- function() { nse_funcs$strptime <- function(x, format = "%Y-%m-%d %H:%M:%S", tz = NULL, unit = "ms") { @@ -1002,94 +524,6 @@ register_math_translations <- function() { } -register_conditional_translations <- function() { - - nse_funcs$coalesce <- function(...) { - args <- list2(...) - if (length(args) < 1) { - abort("At least one argument must be supplied to coalesce()") - } - - # Treat NaN like NA for consistency with dplyr::coalesce(), but if *all* - # the values are NaN, we should return NaN, not NA, so don't replace - # NaN with NA in the final (or only) argument - # TODO: if an option is added to the coalesce kernel to treat NaN as NA, - # use that to simplify the code here (ARROW-13389) - attr(args[[length(args)]], "last") <- TRUE - args <- lapply(args, function(arg) { - last_arg <- is.null(attr(arg, "last")) - attr(arg, "last") <- NULL - - if (!inherits(arg, "Expression")) { - arg <- Expression$scalar(arg) - } - - if (last_arg && arg$type_id() %in% TYPES_WITH_NAN) { - # store the NA_real_ in the same type as arg to avoid avoid casting - # smaller float types to larger float types - NA_expr <- Expression$scalar(Scalar$create(NA_real_, type = arg$type())) - Expression$create("if_else", Expression$create("is_nan", arg), NA_expr, arg) - } else { - arg - } - }) - Expression$create("coalesce", args = args) - } - - nse_funcs$if_else <- function(condition, true, false, missing = NULL) { - if (!is.null(missing)) { - return(nse_funcs$if_else( - nse_funcs$is.na(condition), - missing, - nse_funcs$if_else(condition, true, false) - )) - } - - build_expr("if_else", condition, true, false) - } - - # Although base R ifelse allows `yes` and `no` to be different classes - nse_funcs$ifelse <- function(test, yes, no) { - nse_funcs$if_else(condition = test, true = yes, false = no) - } - - nse_funcs$case_when <- function(...) { - formulas <- list2(...) - n <- length(formulas) - if (n == 0) { - abort("No cases provided in case_when()") - } - query <- vector("list", n) - value <- vector("list", n) - mask <- caller_env() - for (i in seq_len(n)) { - f <- formulas[[i]] - if (!inherits(f, "formula")) { - abort("Each argument to case_when() must be a two-sided formula") - } - query[[i]] <- arrow_eval(f[[2]], mask) - value[[i]] <- arrow_eval(f[[3]], mask) - if (!nse_funcs$is.logical(query[[i]])) { - abort("Left side of each formula in case_when() must be a logical expression") - } - if (inherits(value[[i]], "try-error")) { - abort(handle_arrow_not_supported(value[[i]], format_expr(f[[3]]))) - } - } - build_expr( - "case_when", - args = c( - build_expr( - "make_struct", - args = query, - options = list(field_names = as.character(seq_along(query))) - ), - value - ) - ) - } -} - # Aggregation functions # These all return a list of: # @param fun string function name diff --git a/r/man/contains_regex.Rd b/r/man/contains_regex.Rd index 2e770a67fa26e..338e62aa964e7 100644 --- a/r/man/contains_regex.Rd +++ b/r/man/contains_regex.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/dplyr-funcs.R +% Please edit documentation in R/dplyr-funcs-string.R \name{contains_regex} \alias{contains_regex} \title{Does this string contain regex metacharacters?} diff --git a/r/man/get_stringr_pattern_options.Rd b/r/man/get_stringr_pattern_options.Rd index 8b191bafaa767..6fff979615948 100644 --- a/r/man/get_stringr_pattern_options.Rd +++ b/r/man/get_stringr_pattern_options.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/dplyr-funcs.R +% Please edit documentation in R/dplyr-funcs-string.R \name{get_stringr_pattern_options} \alias{get_stringr_pattern_options} \title{Get \code{stringr} pattern options} From 247297fba537aef298dcc38c811d4c9ffcc1e3c8 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Wed, 8 Dec 2021 09:59:50 -0400 Subject: [PATCH 14/49] separate datetime and type funcs --- r/DESCRIPTION | 2 + r/R/dplyr-funcs-datetime.R | 118 +++++++++++++ r/R/dplyr-funcs-type.R | 224 ++++++++++++++++++++++++ r/R/dplyr-funcs.R | 340 ------------------------------------- 4 files changed, 344 insertions(+), 340 deletions(-) create mode 100644 r/R/dplyr-funcs-datetime.R create mode 100644 r/R/dplyr-funcs-type.R diff --git a/r/DESCRIPTION b/r/DESCRIPTION index 60b4c4a5ef8de..25f46d411fe2a 100644 --- a/r/DESCRIPTION +++ b/r/DESCRIPTION @@ -91,7 +91,9 @@ Collate: 'dplyr-eval.R' 'dplyr-filter.R' 'dplyr-funcs-conditional.R' + 'dplyr-funcs-datetime.R' 'dplyr-funcs-string.R' + 'dplyr-funcs-type.R' 'expression.R' 'dplyr-funcs.R' 'dplyr-group-by.R' diff --git a/r/R/dplyr-funcs-datetime.R b/r/R/dplyr-funcs-datetime.R new file mode 100644 index 0000000000000..8ba33f33183b2 --- /dev/null +++ b/r/R/dplyr-funcs-datetime.R @@ -0,0 +1,118 @@ + + +register_datetime_translations <- function() { + + nse_funcs$strptime <- function(x, format = "%Y-%m-%d %H:%M:%S", tz = NULL, unit = "ms") { + # Arrow uses unit for time parsing, strptime() does not. + # Arrow has no default option for strptime (format, unit), + # we suggest following format = "%Y-%m-%d %H:%M:%S", unit = MILLI/1L/"ms", + # (ARROW-12809) + + # ParseTimestampStrptime currently ignores the timezone information (ARROW-12820). + # Stop if tz is provided. + if (is.character(tz)) { + arrow_not_supported("Time zone argument") + } + + unit <- make_valid_time_unit(unit, c(valid_time64_units, valid_time32_units)) + + Expression$create("strptime", x, options = list(format = format, unit = unit)) + } + + nse_funcs$strftime <- function(x, format = "", tz = "", usetz = FALSE) { + if (usetz) { + format <- paste(format, "%Z") + } + if (tz == "") { + tz <- Sys.timezone() + } + # Arrow's strftime prints in timezone of the timestamp. To match R's strftime behavior we first + # cast the timestamp to desired timezone. This is a metadata only change. + if (nse_funcs$is.POSIXct(x)) { + ts <- Expression$create("cast", x, options = list(to_type = timestamp(x$type()$unit(), tz))) + } else { + ts <- x + } + Expression$create("strftime", ts, options = list(format = format, locale = Sys.getlocale("LC_TIME"))) + } + + nse_funcs$format_ISO8601 <- function(x, usetz = FALSE, precision = NULL, ...) { + ISO8601_precision_map <- + list( + y = "%Y", + ym = "%Y-%m", + ymd = "%Y-%m-%d", + ymdh = "%Y-%m-%dT%H", + ymdhm = "%Y-%m-%dT%H:%M", + ymdhms = "%Y-%m-%dT%H:%M:%S" + ) + + if (is.null(precision)) { + precision <- "ymdhms" + } + if (!precision %in% names(ISO8601_precision_map)) { + abort( + paste( + "`precision` must be one of the following values:", + paste(names(ISO8601_precision_map), collapse = ", "), + "\nValue supplied was: ", + precision + ) + ) + } + format <- ISO8601_precision_map[[precision]] + if (usetz) { + format <- paste0(format, "%z") + } + Expression$create("strftime", x, options = list(format = format, locale = "C")) + } + + nse_funcs$second <- function(x) { + Expression$create("add", Expression$create("second", x), Expression$create("subsecond", x)) + } + + nse_funcs$wday <- function(x, + label = FALSE, + abbr = TRUE, + week_start = getOption("lubridate.week.start", 7), + locale = Sys.getlocale("LC_TIME")) { + if (label) { + if (abbr) { + format <- "%a" + } else { + format <- "%A" + } + return(Expression$create("strftime", x, options = list(format = format, locale = locale))) + } + + Expression$create("day_of_week", x, options = list(count_from_zero = FALSE, week_start = week_start)) + } + + nse_funcs$month <- function(x, label = FALSE, abbr = TRUE, locale = Sys.getlocale("LC_TIME")) { + if (label) { + if (abbr) { + format <- "%b" + } else { + format <- "%B" + } + return(Expression$create("strftime", x, options = list(format = format, locale = locale))) + } + + Expression$create("month", x) + } + + nse_funcs$is.Date <- function(x) { + inherits(x, "Date") || + (inherits(x, "Expression") && x$type_id() %in% Type[c("DATE32", "DATE64")]) + } + + nse_funcs$is.instant <- nse_funcs$is.timepoint <- function(x) { + inherits(x, c("POSIXt", "POSIXct", "POSIXlt", "Date")) || + (inherits(x, "Expression") && x$type_id() %in% Type[c("TIMESTAMP", "DATE32", "DATE64")]) + } + + nse_funcs$is.POSIXct <- function(x) { + inherits(x, "POSIXct") || + (inherits(x, "Expression") && x$type_id() %in% Type[c("TIMESTAMP")]) + } +} diff --git a/r/R/dplyr-funcs-type.R b/r/R/dplyr-funcs-type.R new file mode 100644 index 0000000000000..fe6bff86c762e --- /dev/null +++ b/r/R/dplyr-funcs-type.R @@ -0,0 +1,224 @@ + +register_type_translations <- function() { + + nse_funcs$cast <- function(x, target_type, safe = TRUE, ...) { + opts <- cast_options(safe, ...) + opts$to_type <- as_type(target_type) + Expression$create("cast", x, options = opts) + } + + nse_funcs$is.na <- function(x) { + build_expr("is_null", x, options = list(nan_is_null = TRUE)) + } + + nse_funcs$is.nan <- function(x) { + if (is.double(x) || (inherits(x, "Expression") && + x$type_id() %in% TYPES_WITH_NAN)) { + # TODO: if an option is added to the is_nan kernel to treat NA as NaN, + # use that to simplify the code here (ARROW-13366) + build_expr("is_nan", x) & build_expr("is_valid", x) + } else { + Expression$scalar(FALSE) + } + } + + nse_funcs$is <- function(object, class2) { + if (is.string(class2)) { + switch(class2, + # for R data types, pass off to is.*() functions + character = nse_funcs$is.character(object), + numeric = nse_funcs$is.numeric(object), + integer = nse_funcs$is.integer(object), + integer64 = nse_funcs$is.integer64(object), + logical = nse_funcs$is.logical(object), + factor = nse_funcs$is.factor(object), + list = nse_funcs$is.list(object), + # for Arrow data types, compare class2 with object$type()$ToString(), + # but first strip off any parameters to only compare the top-level data + # type, and canonicalize class2 + sub("^([^([<]+).*$", "\\1", object$type()$ToString()) == + canonical_type_str(class2) + ) + } else if (inherits(class2, "DataType")) { + object$type() == as_type(class2) + } else { + stop("Second argument to is() is not a string or DataType", call. = FALSE) + } + } + + nse_funcs$dictionary_encode <- function(x, + null_encoding_behavior = c("mask", "encode")) { + behavior <- toupper(match.arg(null_encoding_behavior)) + null_encoding_behavior <- NullEncodingBehavior[[behavior]] + Expression$create( + "dictionary_encode", + x, + options = list(null_encoding_behavior = null_encoding_behavior) + ) + } + + nse_funcs$between <- function(x, left, right) { + x >= left & x <= right + } + + nse_funcs$is.finite <- function(x) { + is_fin <- Expression$create("is_finite", x) + # for compatibility with base::is.finite(), return FALSE for NA_real_ + is_fin & !nse_funcs$is.na(is_fin) + } + + nse_funcs$is.infinite <- function(x) { + is_inf <- Expression$create("is_inf", x) + # for compatibility with base::is.infinite(), return FALSE for NA_real_ + is_inf & !nse_funcs$is.na(is_inf) + } + + # as.* type casting functions + # as.factor() is mapped in expression.R + nse_funcs$as.character <- function(x) { + Expression$create("cast", x, options = cast_options(to_type = string())) + } + nse_funcs$as.double <- function(x) { + Expression$create("cast", x, options = cast_options(to_type = float64())) + } + nse_funcs$as.integer <- function(x) { + Expression$create( + "cast", + x, + options = cast_options( + to_type = int32(), + allow_float_truncate = TRUE, + allow_decimal_truncate = TRUE + ) + ) + } + nse_funcs$as.integer64 <- function(x) { + Expression$create( + "cast", + x, + options = cast_options( + to_type = int64(), + allow_float_truncate = TRUE, + allow_decimal_truncate = TRUE + ) + ) + } + nse_funcs$as.logical <- function(x) { + Expression$create("cast", x, options = cast_options(to_type = boolean())) + } + nse_funcs$as.numeric <- function(x) { + Expression$create("cast", x, options = cast_options(to_type = float64())) + } + + # is.* type functions + nse_funcs$is.character <- function(x) { + is.character(x) || (inherits(x, "Expression") && + x$type_id() %in% Type[c("STRING", "LARGE_STRING")]) + } + nse_funcs$is.numeric <- function(x) { + is.numeric(x) || (inherits(x, "Expression") && x$type_id() %in% Type[c( + "UINT8", "INT8", "UINT16", "INT16", "UINT32", "INT32", + "UINT64", "INT64", "HALF_FLOAT", "FLOAT", "DOUBLE", + "DECIMAL128", "DECIMAL256" + )]) + } + nse_funcs$is.double <- function(x) { + is.double(x) || (inherits(x, "Expression") && x$type_id() == Type["DOUBLE"]) + } + nse_funcs$is.integer <- function(x) { + is.integer(x) || (inherits(x, "Expression") && x$type_id() %in% Type[c( + "UINT8", "INT8", "UINT16", "INT16", "UINT32", "INT32", + "UINT64", "INT64" + )]) + } + nse_funcs$is.integer64 <- function(x) { + is.integer64(x) || (inherits(x, "Expression") && x$type_id() == Type["INT64"]) + } + nse_funcs$is.logical <- function(x) { + is.logical(x) || (inherits(x, "Expression") && x$type_id() == Type["BOOL"]) + } + nse_funcs$is.factor <- function(x) { + is.factor(x) || (inherits(x, "Expression") && x$type_id() == Type["DICTIONARY"]) + } + nse_funcs$is.list <- function(x) { + is.list(x) || (inherits(x, "Expression") && x$type_id() %in% Type[c( + "LIST", "FIXED_SIZE_LIST", "LARGE_LIST" + )]) + } + + # rlang::is_* type functions + nse_funcs$is_character <- function(x, n = NULL) { + assert_that(is.null(n)) + nse_funcs$is.character(x) + } + nse_funcs$is_double <- function(x, n = NULL, finite = NULL) { + assert_that(is.null(n) && is.null(finite)) + nse_funcs$is.double(x) + } + nse_funcs$is_integer <- function(x, n = NULL) { + assert_that(is.null(n)) + nse_funcs$is.integer(x) + } + nse_funcs$is_list <- function(x, n = NULL) { + assert_that(is.null(n)) + nse_funcs$is.list(x) + } + nse_funcs$is_logical <- function(x, n = NULL) { + assert_that(is.null(n)) + nse_funcs$is.logical(x) + } + + # Create a data frame/tibble/struct column + nse_funcs$tibble <- function(..., .rows = NULL, .name_repair = NULL) { + if (!is.null(.rows)) arrow_not_supported(".rows") + if (!is.null(.name_repair)) arrow_not_supported(".name_repair") + + # use dots_list() because this is what tibble() uses to allow the + # useful shorthand of tibble(col1, col2) -> tibble(col1 = col1, col2 = col2) + # we have a stronger enforcement of unique names for arguments because + # it is difficult to replicate the .name_repair semantics and expanding of + # unnamed data frame arguments in the same way that the tibble() constructor + # does. + args <- rlang::dots_list(..., .named = TRUE, .homonyms = "error") + + build_expr( + "make_struct", + args = unname(args), + options = list(field_names = names(args)) + ) + } + + nse_funcs$data.frame <- function(..., row.names = NULL, + check.rows = NULL, check.names = TRUE, fix.empty.names = TRUE, + stringsAsFactors = FALSE) { + # we need a specific value of stringsAsFactors because the default was + # TRUE in R <= 3.6 + if (!identical(stringsAsFactors, FALSE)) { + arrow_not_supported("stringsAsFactors = TRUE") + } + + # ignore row.names and check.rows with a warning + if (!is.null(row.names)) arrow_not_supported("row.names") + if (!is.null(check.rows)) arrow_not_supported("check.rows") + + args <- rlang::dots_list(..., .named = fix.empty.names) + if (is.null(names(args))) { + names(args) <- rep("", length(args)) + } + + if (identical(check.names, TRUE)) { + if (identical(fix.empty.names, TRUE)) { + names(args) <- make.names(names(args), unique = TRUE) + } else { + name_emtpy <- names(args) == "" + names(args)[!name_emtpy] <- make.names(names(args)[!name_emtpy], unique = TRUE) + } + } + + build_expr( + "make_struct", + args = unname(args), + options = list(field_names = names(args)) + ) + } +} diff --git a/r/R/dplyr-funcs.R b/r/R/dplyr-funcs.R index a5220cba3d900..018abb4d00f89 100644 --- a/r/R/dplyr-funcs.R +++ b/r/R/dplyr-funcs.R @@ -116,346 +116,6 @@ register_array_function_map_translations <- function() { # because they manage the preparation of the user-provided inputs # and don't need to wrap scalars -register_type_translations <- function() { - - nse_funcs$cast <- function(x, target_type, safe = TRUE, ...) { - opts <- cast_options(safe, ...) - opts$to_type <- as_type(target_type) - Expression$create("cast", x, options = opts) - } - - nse_funcs$is.na <- function(x) { - build_expr("is_null", x, options = list(nan_is_null = TRUE)) - } - - nse_funcs$is.nan <- function(x) { - if (is.double(x) || (inherits(x, "Expression") && - x$type_id() %in% TYPES_WITH_NAN)) { - # TODO: if an option is added to the is_nan kernel to treat NA as NaN, - # use that to simplify the code here (ARROW-13366) - build_expr("is_nan", x) & build_expr("is_valid", x) - } else { - Expression$scalar(FALSE) - } - } - - nse_funcs$is <- function(object, class2) { - if (is.string(class2)) { - switch(class2, - # for R data types, pass off to is.*() functions - character = nse_funcs$is.character(object), - numeric = nse_funcs$is.numeric(object), - integer = nse_funcs$is.integer(object), - integer64 = nse_funcs$is.integer64(object), - logical = nse_funcs$is.logical(object), - factor = nse_funcs$is.factor(object), - list = nse_funcs$is.list(object), - # for Arrow data types, compare class2 with object$type()$ToString(), - # but first strip off any parameters to only compare the top-level data - # type, and canonicalize class2 - sub("^([^([<]+).*$", "\\1", object$type()$ToString()) == - canonical_type_str(class2) - ) - } else if (inherits(class2, "DataType")) { - object$type() == as_type(class2) - } else { - stop("Second argument to is() is not a string or DataType", call. = FALSE) - } - } - - nse_funcs$dictionary_encode <- function(x, - null_encoding_behavior = c("mask", "encode")) { - behavior <- toupper(match.arg(null_encoding_behavior)) - null_encoding_behavior <- NullEncodingBehavior[[behavior]] - Expression$create( - "dictionary_encode", - x, - options = list(null_encoding_behavior = null_encoding_behavior) - ) - } - - nse_funcs$between <- function(x, left, right) { - x >= left & x <= right - } - - nse_funcs$is.finite <- function(x) { - is_fin <- Expression$create("is_finite", x) - # for compatibility with base::is.finite(), return FALSE for NA_real_ - is_fin & !nse_funcs$is.na(is_fin) - } - - nse_funcs$is.infinite <- function(x) { - is_inf <- Expression$create("is_inf", x) - # for compatibility with base::is.infinite(), return FALSE for NA_real_ - is_inf & !nse_funcs$is.na(is_inf) - } - - # as.* type casting functions - # as.factor() is mapped in expression.R - nse_funcs$as.character <- function(x) { - Expression$create("cast", x, options = cast_options(to_type = string())) - } - nse_funcs$as.double <- function(x) { - Expression$create("cast", x, options = cast_options(to_type = float64())) - } - nse_funcs$as.integer <- function(x) { - Expression$create( - "cast", - x, - options = cast_options( - to_type = int32(), - allow_float_truncate = TRUE, - allow_decimal_truncate = TRUE - ) - ) - } - nse_funcs$as.integer64 <- function(x) { - Expression$create( - "cast", - x, - options = cast_options( - to_type = int64(), - allow_float_truncate = TRUE, - allow_decimal_truncate = TRUE - ) - ) - } - nse_funcs$as.logical <- function(x) { - Expression$create("cast", x, options = cast_options(to_type = boolean())) - } - nse_funcs$as.numeric <- function(x) { - Expression$create("cast", x, options = cast_options(to_type = float64())) - } - - # is.* type functions - nse_funcs$is.character <- function(x) { - is.character(x) || (inherits(x, "Expression") && - x$type_id() %in% Type[c("STRING", "LARGE_STRING")]) - } - nse_funcs$is.numeric <- function(x) { - is.numeric(x) || (inherits(x, "Expression") && x$type_id() %in% Type[c( - "UINT8", "INT8", "UINT16", "INT16", "UINT32", "INT32", - "UINT64", "INT64", "HALF_FLOAT", "FLOAT", "DOUBLE", - "DECIMAL128", "DECIMAL256" - )]) - } - nse_funcs$is.double <- function(x) { - is.double(x) || (inherits(x, "Expression") && x$type_id() == Type["DOUBLE"]) - } - nse_funcs$is.integer <- function(x) { - is.integer(x) || (inherits(x, "Expression") && x$type_id() %in% Type[c( - "UINT8", "INT8", "UINT16", "INT16", "UINT32", "INT32", - "UINT64", "INT64" - )]) - } - nse_funcs$is.integer64 <- function(x) { - is.integer64(x) || (inherits(x, "Expression") && x$type_id() == Type["INT64"]) - } - nse_funcs$is.logical <- function(x) { - is.logical(x) || (inherits(x, "Expression") && x$type_id() == Type["BOOL"]) - } - nse_funcs$is.factor <- function(x) { - is.factor(x) || (inherits(x, "Expression") && x$type_id() == Type["DICTIONARY"]) - } - nse_funcs$is.list <- function(x) { - is.list(x) || (inherits(x, "Expression") && x$type_id() %in% Type[c( - "LIST", "FIXED_SIZE_LIST", "LARGE_LIST" - )]) - } - - # rlang::is_* type functions - nse_funcs$is_character <- function(x, n = NULL) { - assert_that(is.null(n)) - nse_funcs$is.character(x) - } - nse_funcs$is_double <- function(x, n = NULL, finite = NULL) { - assert_that(is.null(n) && is.null(finite)) - nse_funcs$is.double(x) - } - nse_funcs$is_integer <- function(x, n = NULL) { - assert_that(is.null(n)) - nse_funcs$is.integer(x) - } - nse_funcs$is_list <- function(x, n = NULL) { - assert_that(is.null(n)) - nse_funcs$is.list(x) - } - nse_funcs$is_logical <- function(x, n = NULL) { - assert_that(is.null(n)) - nse_funcs$is.logical(x) - } - - # Create a data frame/tibble/struct column - nse_funcs$tibble <- function(..., .rows = NULL, .name_repair = NULL) { - if (!is.null(.rows)) arrow_not_supported(".rows") - if (!is.null(.name_repair)) arrow_not_supported(".name_repair") - - # use dots_list() because this is what tibble() uses to allow the - # useful shorthand of tibble(col1, col2) -> tibble(col1 = col1, col2 = col2) - # we have a stronger enforcement of unique names for arguments because - # it is difficult to replicate the .name_repair semantics and expanding of - # unnamed data frame arguments in the same way that the tibble() constructor - # does. - args <- rlang::dots_list(..., .named = TRUE, .homonyms = "error") - - build_expr( - "make_struct", - args = unname(args), - options = list(field_names = names(args)) - ) - } - - nse_funcs$data.frame <- function(..., row.names = NULL, - check.rows = NULL, check.names = TRUE, fix.empty.names = TRUE, - stringsAsFactors = FALSE) { - # we need a specific value of stringsAsFactors because the default was - # TRUE in R <= 3.6 - if (!identical(stringsAsFactors, FALSE)) { - arrow_not_supported("stringsAsFactors = TRUE") - } - - # ignore row.names and check.rows with a warning - if (!is.null(row.names)) arrow_not_supported("row.names") - if (!is.null(check.rows)) arrow_not_supported("check.rows") - - args <- rlang::dots_list(..., .named = fix.empty.names) - if (is.null(names(args))) { - names(args) <- rep("", length(args)) - } - - if (identical(check.names, TRUE)) { - if (identical(fix.empty.names, TRUE)) { - names(args) <- make.names(names(args), unique = TRUE) - } else { - name_emtpy <- names(args) == "" - names(args)[!name_emtpy] <- make.names(names(args)[!name_emtpy], unique = TRUE) - } - } - - build_expr( - "make_struct", - args = unname(args), - options = list(field_names = names(args)) - ) - } -} - -register_datetime_translations <- function() { - - nse_funcs$strptime <- function(x, format = "%Y-%m-%d %H:%M:%S", tz = NULL, unit = "ms") { - # Arrow uses unit for time parsing, strptime() does not. - # Arrow has no default option for strptime (format, unit), - # we suggest following format = "%Y-%m-%d %H:%M:%S", unit = MILLI/1L/"ms", - # (ARROW-12809) - - # ParseTimestampStrptime currently ignores the timezone information (ARROW-12820). - # Stop if tz is provided. - if (is.character(tz)) { - arrow_not_supported("Time zone argument") - } - - unit <- make_valid_time_unit(unit, c(valid_time64_units, valid_time32_units)) - - Expression$create("strptime", x, options = list(format = format, unit = unit)) - } - - nse_funcs$strftime <- function(x, format = "", tz = "", usetz = FALSE) { - if (usetz) { - format <- paste(format, "%Z") - } - if (tz == "") { - tz <- Sys.timezone() - } - # Arrow's strftime prints in timezone of the timestamp. To match R's strftime behavior we first - # cast the timestamp to desired timezone. This is a metadata only change. - if (nse_funcs$is.POSIXct(x)) { - ts <- Expression$create("cast", x, options = list(to_type = timestamp(x$type()$unit(), tz))) - } else { - ts <- x - } - Expression$create("strftime", ts, options = list(format = format, locale = Sys.getlocale("LC_TIME"))) - } - - nse_funcs$format_ISO8601 <- function(x, usetz = FALSE, precision = NULL, ...) { - ISO8601_precision_map <- - list( - y = "%Y", - ym = "%Y-%m", - ymd = "%Y-%m-%d", - ymdh = "%Y-%m-%dT%H", - ymdhm = "%Y-%m-%dT%H:%M", - ymdhms = "%Y-%m-%dT%H:%M:%S" - ) - - if (is.null(precision)) { - precision <- "ymdhms" - } - if (!precision %in% names(ISO8601_precision_map)) { - abort( - paste( - "`precision` must be one of the following values:", - paste(names(ISO8601_precision_map), collapse = ", "), - "\nValue supplied was: ", - precision - ) - ) - } - format <- ISO8601_precision_map[[precision]] - if (usetz) { - format <- paste0(format, "%z") - } - Expression$create("strftime", x, options = list(format = format, locale = "C")) - } - - nse_funcs$second <- function(x) { - Expression$create("add", Expression$create("second", x), Expression$create("subsecond", x)) - } - - nse_funcs$wday <- function(x, - label = FALSE, - abbr = TRUE, - week_start = getOption("lubridate.week.start", 7), - locale = Sys.getlocale("LC_TIME")) { - if (label) { - if (abbr) { - format <- "%a" - } else { - format <- "%A" - } - return(Expression$create("strftime", x, options = list(format = format, locale = locale))) - } - - Expression$create("day_of_week", x, options = list(count_from_zero = FALSE, week_start = week_start)) - } - - nse_funcs$month <- function(x, label = FALSE, abbr = TRUE, locale = Sys.getlocale("LC_TIME")) { - if (label) { - if (abbr) { - format <- "%b" - } else { - format <- "%B" - } - return(Expression$create("strftime", x, options = list(format = format, locale = locale))) - } - - Expression$create("month", x) - } - - nse_funcs$is.Date <- function(x) { - inherits(x, "Date") || - (inherits(x, "Expression") && x$type_id() %in% Type[c("DATE32", "DATE64")]) - } - - nse_funcs$is.instant <- nse_funcs$is.timepoint <- function(x) { - inherits(x, c("POSIXt", "POSIXct", "POSIXlt", "Date")) || - (inherits(x, "Expression") && x$type_id() %in% Type[c("TIMESTAMP", "DATE32", "DATE64")]) - } - - nse_funcs$is.POSIXct <- function(x) { - inherits(x, "POSIXct") || - (inherits(x, "Expression") && x$type_id() %in% Type[c("TIMESTAMP")]) - } -} register_math_translations <- function() { From dac53f05a41cc0e35144924cbc265c8998abde64 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Wed, 8 Dec 2021 10:01:23 -0400 Subject: [PATCH 15/49] separate math translations --- r/DESCRIPTION | 1 + r/R/dplyr-funcs-math.R | 67 ++++++++++++++++++++++++++++++++++++++++++ r/R/dplyr-funcs.R | 67 ------------------------------------------ 3 files changed, 68 insertions(+), 67 deletions(-) create mode 100644 r/R/dplyr-funcs-math.R diff --git a/r/DESCRIPTION b/r/DESCRIPTION index 25f46d411fe2a..89fd656daa4c2 100644 --- a/r/DESCRIPTION +++ b/r/DESCRIPTION @@ -92,6 +92,7 @@ Collate: 'dplyr-filter.R' 'dplyr-funcs-conditional.R' 'dplyr-funcs-datetime.R' + 'dplyr-funcs-math.R' 'dplyr-funcs-string.R' 'dplyr-funcs-type.R' 'expression.R' diff --git a/r/R/dplyr-funcs-math.R b/r/R/dplyr-funcs-math.R new file mode 100644 index 0000000000000..4857e085c470f --- /dev/null +++ b/r/R/dplyr-funcs-math.R @@ -0,0 +1,67 @@ + + +register_math_translations <- function() { + + nse_funcs$log <- nse_funcs$logb <- function(x, base = exp(1)) { + # like other binary functions, either `x` or `base` can be Expression or double(1) + if (is.numeric(x) && length(x) == 1) { + x <- Expression$scalar(x) + } else if (!inherits(x, "Expression")) { + arrow_not_supported("x must be a column or a length-1 numeric; other values") + } + + # handle `base` differently because we use the simpler ln, log2, and log10 + # functions for specific scalar base values + if (inherits(base, "Expression")) { + return(Expression$create("logb_checked", x, base)) + } + + if (!is.numeric(base) || length(base) != 1) { + arrow_not_supported("base must be a column or a length-1 numeric; other values") + } + + if (base == exp(1)) { + return(Expression$create("ln_checked", x)) + } + + if (base == 2) { + return(Expression$create("log2_checked", x)) + } + + if (base == 10) { + return(Expression$create("log10_checked", x)) + } + + Expression$create("logb_checked", x, Expression$scalar(base)) + } + + + nse_funcs$pmin <- function(..., na.rm = FALSE) { + build_expr( + "min_element_wise", + ..., + options = list(skip_nulls = na.rm) + ) + } + + nse_funcs$pmax <- function(..., na.rm = FALSE) { + build_expr( + "max_element_wise", + ..., + options = list(skip_nulls = na.rm) + ) + } + + nse_funcs$trunc <- function(x, ...) { + # accepts and ignores ... for consistency with base::trunc() + build_expr("trunc", x) + } + + nse_funcs$round <- function(x, digits = 0) { + build_expr( + "round", + x, + options = list(ndigits = digits, round_mode = RoundMode$HALF_TO_EVEN) + ) + } +} diff --git a/r/R/dplyr-funcs.R b/r/R/dplyr-funcs.R index 018abb4d00f89..e38177edbf971 100644 --- a/r/R/dplyr-funcs.R +++ b/r/R/dplyr-funcs.R @@ -117,73 +117,6 @@ register_array_function_map_translations <- function() { # and don't need to wrap scalars -register_math_translations <- function() { - - nse_funcs$log <- nse_funcs$logb <- function(x, base = exp(1)) { - # like other binary functions, either `x` or `base` can be Expression or double(1) - if (is.numeric(x) && length(x) == 1) { - x <- Expression$scalar(x) - } else if (!inherits(x, "Expression")) { - arrow_not_supported("x must be a column or a length-1 numeric; other values") - } - - # handle `base` differently because we use the simpler ln, log2, and log10 - # functions for specific scalar base values - if (inherits(base, "Expression")) { - return(Expression$create("logb_checked", x, base)) - } - - if (!is.numeric(base) || length(base) != 1) { - arrow_not_supported("base must be a column or a length-1 numeric; other values") - } - - if (base == exp(1)) { - return(Expression$create("ln_checked", x)) - } - - if (base == 2) { - return(Expression$create("log2_checked", x)) - } - - if (base == 10) { - return(Expression$create("log10_checked", x)) - } - - Expression$create("logb_checked", x, Expression$scalar(base)) - } - - - nse_funcs$pmin <- function(..., na.rm = FALSE) { - build_expr( - "min_element_wise", - ..., - options = list(skip_nulls = na.rm) - ) - } - - nse_funcs$pmax <- function(..., na.rm = FALSE) { - build_expr( - "max_element_wise", - ..., - options = list(skip_nulls = na.rm) - ) - } - - nse_funcs$trunc <- function(x, ...) { - # accepts and ignores ... for consistency with base::trunc() - build_expr("trunc", x) - } - - nse_funcs$round <- function(x, digits = 0) { - build_expr( - "round", - x, - options = list(ndigits = digits, round_mode = RoundMode$HALF_TO_EVEN) - ) - } - -} - # Aggregation functions # These all return a list of: # @param fun string function name From 78e1d089c19c7d56d3f21fec38b642223380c67b Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Wed, 8 Dec 2021 10:03:19 -0400 Subject: [PATCH 16/49] use Apache 2.0 file header --- r/R/dplyr-funcs-conditional.R | 16 ++++++++++++++++ r/R/dplyr-funcs-datetime.R | 17 ++++++++++++++++- r/R/dplyr-funcs-math.R | 17 ++++++++++++++++- r/R/dplyr-funcs-string.R | 16 ++++++++++++++++ r/R/dplyr-funcs-type.R | 16 ++++++++++++++++ 5 files changed, 80 insertions(+), 2 deletions(-) diff --git a/r/R/dplyr-funcs-conditional.R b/r/R/dplyr-funcs-conditional.R index 7aa0523101117..01b39978abdad 100644 --- a/r/R/dplyr-funcs-conditional.R +++ b/r/R/dplyr-funcs-conditional.R @@ -1,3 +1,19 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. register_conditional_translations <- function() { diff --git a/r/R/dplyr-funcs-datetime.R b/r/R/dplyr-funcs-datetime.R index 8ba33f33183b2..a3231aae8fdc8 100644 --- a/r/R/dplyr-funcs-datetime.R +++ b/r/R/dplyr-funcs-datetime.R @@ -1,4 +1,19 @@ - +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. register_datetime_translations <- function() { diff --git a/r/R/dplyr-funcs-math.R b/r/R/dplyr-funcs-math.R index 4857e085c470f..be5d688a87acc 100644 --- a/r/R/dplyr-funcs-math.R +++ b/r/R/dplyr-funcs-math.R @@ -1,4 +1,19 @@ - +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. register_math_translations <- function() { diff --git a/r/R/dplyr-funcs-string.R b/r/R/dplyr-funcs-string.R index 158a9565ba8b5..d270ae84f9487 100644 --- a/r/R/dplyr-funcs-string.R +++ b/r/R/dplyr-funcs-string.R @@ -1,3 +1,19 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. # String function helpers diff --git a/r/R/dplyr-funcs-type.R b/r/R/dplyr-funcs-type.R index fe6bff86c762e..f58354b52b79e 100644 --- a/r/R/dplyr-funcs-type.R +++ b/r/R/dplyr-funcs-type.R @@ -1,3 +1,19 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. register_type_translations <- function() { From b8ad4559af6586c3e397abf64b5d5684174587bc Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Wed, 8 Dec 2021 10:07:31 -0400 Subject: [PATCH 17/49] move aggregate functions to dplyr-summarise (because they're tested in test-dplyr-summarise.R) --- r/R/dplyr-funcs.R | 146 ------------------------------------------ r/R/dplyr-summarize.R | 144 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 144 insertions(+), 146 deletions(-) diff --git a/r/R/dplyr-funcs.R b/r/R/dplyr-funcs.R index e38177edbf971..fc968bca4d02c 100644 --- a/r/R/dplyr-funcs.R +++ b/r/R/dplyr-funcs.R @@ -115,149 +115,3 @@ register_array_function_map_translations <- function() { # `Expression$create()` is lower level. Most of the functions below use it # because they manage the preparation of the user-provided inputs # and don't need to wrap scalars - - -# Aggregation functions -# These all return a list of: -# @param fun string function name -# @param data Expression (these are all currently a single field) -# @param options list of function options, as passed to call_function -# For group-by aggregation, `hash_` gets prepended to the function name. -# So to see a list of available hash aggregation functions, -# you can use list_compute_functions("^hash_") - - -ensure_one_arg <- function(args, fun) { - if (length(args) == 0) { - arrow_not_supported(paste0(fun, "() with 0 arguments")) - } else if (length(args) > 1) { - arrow_not_supported(paste0("Multiple arguments to ", fun, "()")) - } - args[[1]] -} - -agg_fun_output_type <- function(fun, input_type, hash) { - # These are quick and dirty heuristics. - if (fun %in% c("any", "all")) { - bool() - } else if (fun %in% "sum") { - # It may upcast to a bigger type but this is close enough - input_type - } else if (fun %in% c("mean", "stddev", "variance", "approximate_median")) { - float64() - } else if (fun %in% "tdigest") { - if (hash) { - fixed_size_list_of(float64(), 1L) - } else { - float64() - } - } else { - # Just so things don't error, assume the resulting type is the same - input_type - } -} - -register_aggregate_translations <- function() { - - agg_funcs$sum <- function(..., na.rm = FALSE) { - list( - fun = "sum", - data = ensure_one_arg(list2(...), "sum"), - options = list(skip_nulls = na.rm, min_count = 0L) - ) - } - agg_funcs$any <- function(..., na.rm = FALSE) { - list( - fun = "any", - data = ensure_one_arg(list2(...), "any"), - options = list(skip_nulls = na.rm, min_count = 0L) - ) - } - agg_funcs$all <- function(..., na.rm = FALSE) { - list( - fun = "all", - data = ensure_one_arg(list2(...), "all"), - options = list(skip_nulls = na.rm, min_count = 0L) - ) - } - agg_funcs$mean <- function(x, na.rm = FALSE) { - list( - fun = "mean", - data = x, - options = list(skip_nulls = na.rm, min_count = 0L) - ) - } - agg_funcs$sd <- function(x, na.rm = FALSE, ddof = 1) { - list( - fun = "stddev", - data = x, - options = list(skip_nulls = na.rm, min_count = 0L, ddof = ddof) - ) - } - agg_funcs$var <- function(x, na.rm = FALSE, ddof = 1) { - list( - fun = "variance", - data = x, - options = list(skip_nulls = na.rm, min_count = 0L, ddof = ddof) - ) - } - agg_funcs$quantile <- function(x, probs, na.rm = FALSE) { - if (length(probs) != 1) { - arrow_not_supported("quantile() with length(probs) != 1") - } - # TODO: Bind to the Arrow function that returns an exact quantile and remove - # this warning (ARROW-14021) - warn( - "quantile() currently returns an approximate quantile in Arrow", - .frequency = ifelse(is_interactive(), "once", "always"), - .frequency_id = "arrow.quantile.approximate" - ) - list( - fun = "tdigest", - data = x, - options = list(skip_nulls = na.rm, q = probs) - ) - } - agg_funcs$median <- function(x, na.rm = FALSE) { - # TODO: Bind to the Arrow function that returns an exact median and remove - # this warning (ARROW-14021) - warn( - "median() currently returns an approximate median in Arrow", - .frequency = ifelse(is_interactive(), "once", "always"), - .frequency_id = "arrow.median.approximate" - ) - list( - fun = "approximate_median", - data = x, - options = list(skip_nulls = na.rm) - ) - } - agg_funcs$n_distinct <- function(..., na.rm = FALSE) { - list( - fun = "count_distinct", - data = ensure_one_arg(list2(...), "n_distinct"), - options = list(na.rm = na.rm) - ) - } - agg_funcs$n <- function() { - list( - fun = "sum", - data = Expression$scalar(1L), - options = list() - ) - } - agg_funcs$min <- function(..., na.rm = FALSE) { - list( - fun = "min", - data = ensure_one_arg(list2(...), "min"), - options = list(skip_nulls = na.rm, min_count = 0L) - ) - } - agg_funcs$max <- function(..., na.rm = FALSE) { - list( - fun = "max", - data = ensure_one_arg(list2(...), "max"), - options = list(skip_nulls = na.rm, min_count = 0L) - ) - } -} diff --git a/r/R/dplyr-summarize.R b/r/R/dplyr-summarize.R index 3b7d51ed47ecd..2c76ab1418676 100644 --- a/r/R/dplyr-summarize.R +++ b/r/R/dplyr-summarize.R @@ -15,6 +15,150 @@ # specific language governing permissions and limitations # under the License. +# Aggregation functions +# These all return a list of: +# @param fun string function name +# @param data Expression (these are all currently a single field) +# @param options list of function options, as passed to call_function +# For group-by aggregation, `hash_` gets prepended to the function name. +# So to see a list of available hash aggregation functions, +# you can use list_compute_functions("^hash_") + + +ensure_one_arg <- function(args, fun) { + if (length(args) == 0) { + arrow_not_supported(paste0(fun, "() with 0 arguments")) + } else if (length(args) > 1) { + arrow_not_supported(paste0("Multiple arguments to ", fun, "()")) + } + args[[1]] +} + +agg_fun_output_type <- function(fun, input_type, hash) { + # These are quick and dirty heuristics. + if (fun %in% c("any", "all")) { + bool() + } else if (fun %in% "sum") { + # It may upcast to a bigger type but this is close enough + input_type + } else if (fun %in% c("mean", "stddev", "variance", "approximate_median")) { + float64() + } else if (fun %in% "tdigest") { + if (hash) { + fixed_size_list_of(float64(), 1L) + } else { + float64() + } + } else { + # Just so things don't error, assume the resulting type is the same + input_type + } +} + +register_aggregate_translations <- function() { + + agg_funcs$sum <- function(..., na.rm = FALSE) { + list( + fun = "sum", + data = ensure_one_arg(list2(...), "sum"), + options = list(skip_nulls = na.rm, min_count = 0L) + ) + } + agg_funcs$any <- function(..., na.rm = FALSE) { + list( + fun = "any", + data = ensure_one_arg(list2(...), "any"), + options = list(skip_nulls = na.rm, min_count = 0L) + ) + } + agg_funcs$all <- function(..., na.rm = FALSE) { + list( + fun = "all", + data = ensure_one_arg(list2(...), "all"), + options = list(skip_nulls = na.rm, min_count = 0L) + ) + } + agg_funcs$mean <- function(x, na.rm = FALSE) { + list( + fun = "mean", + data = x, + options = list(skip_nulls = na.rm, min_count = 0L) + ) + } + agg_funcs$sd <- function(x, na.rm = FALSE, ddof = 1) { + list( + fun = "stddev", + data = x, + options = list(skip_nulls = na.rm, min_count = 0L, ddof = ddof) + ) + } + agg_funcs$var <- function(x, na.rm = FALSE, ddof = 1) { + list( + fun = "variance", + data = x, + options = list(skip_nulls = na.rm, min_count = 0L, ddof = ddof) + ) + } + agg_funcs$quantile <- function(x, probs, na.rm = FALSE) { + if (length(probs) != 1) { + arrow_not_supported("quantile() with length(probs) != 1") + } + # TODO: Bind to the Arrow function that returns an exact quantile and remove + # this warning (ARROW-14021) + warn( + "quantile() currently returns an approximate quantile in Arrow", + .frequency = ifelse(is_interactive(), "once", "always"), + .frequency_id = "arrow.quantile.approximate" + ) + list( + fun = "tdigest", + data = x, + options = list(skip_nulls = na.rm, q = probs) + ) + } + agg_funcs$median <- function(x, na.rm = FALSE) { + # TODO: Bind to the Arrow function that returns an exact median and remove + # this warning (ARROW-14021) + warn( + "median() currently returns an approximate median in Arrow", + .frequency = ifelse(is_interactive(), "once", "always"), + .frequency_id = "arrow.median.approximate" + ) + list( + fun = "approximate_median", + data = x, + options = list(skip_nulls = na.rm) + ) + } + agg_funcs$n_distinct <- function(..., na.rm = FALSE) { + list( + fun = "count_distinct", + data = ensure_one_arg(list2(...), "n_distinct"), + options = list(na.rm = na.rm) + ) + } + agg_funcs$n <- function() { + list( + fun = "sum", + data = Expression$scalar(1L), + options = list() + ) + } + agg_funcs$min <- function(..., na.rm = FALSE) { + list( + fun = "min", + data = ensure_one_arg(list2(...), "min"), + options = list(skip_nulls = na.rm, min_count = 0L) + ) + } + agg_funcs$max <- function(..., na.rm = FALSE) { + list( + fun = "max", + data = ensure_one_arg(list2(...), "max"), + options = list(skip_nulls = na.rm, min_count = 0L) + ) + } +} # The following S3 methods are registered on load if dplyr is present From 6bc82dfa9f4a90cd15c091ec76c6dc634b132b8b Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Wed, 8 Dec 2021 10:09:02 -0400 Subject: [PATCH 18/49] move array map registration to where the functions are defined --- r/R/dplyr-funcs.R | 14 -------------- r/R/expression.R | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/r/R/dplyr-funcs.R b/r/R/dplyr-funcs.R index fc968bca4d02c..e9331baf34dd1 100644 --- a/r/R/dplyr-funcs.R +++ b/r/R/dplyr-funcs.R @@ -87,20 +87,6 @@ register_translation_agg <- function(fun_name, fun, registry = translation_regis register_translation(fun_name, fun, registry = registry) } -# Start with mappings from R function name spellings -register_array_function_map_translations <- function() { - # use a function to generate the binding so that `operator` persists - # beyond execution time (another option would be to use quasiquotation - # and unquote `operator` directly into the function expression) - array_function_map_factory <- function(operator) { - force(operator) - function(...) build_expr(operator, ...) - } - - for (name in names(.array_function_map)) { - register_translation(name, array_function_map_factory(name)) - } -} # Now add functions to that list where the mapping from R to Arrow isn't 1:1 # Each of these functions should have the same signature as the R function diff --git a/r/R/expression.R b/r/R/expression.R index a76e16185cb56..7f0d7f5e9b163 100644 --- a/r/R/expression.R +++ b/r/R/expression.R @@ -106,6 +106,20 @@ .array_function_map <- c(.unary_function_map, .binary_function_map) +register_array_function_map_translations <- function() { + # use a function to generate the binding so that `operator` persists + # beyond execution time (another option would be to use quasiquotation + # and unquote `operator` directly into the function expression) + array_function_map_factory <- function(operator) { + force(operator) + function(...) build_expr(operator, ...) + } + + for (name in names(.array_function_map)) { + register_translation(name, array_function_map_factory(name)) + } +} + #' Arrow expressions #' #' @description From d5b149f9fc06295a5f102024612ed61e2da2729f Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Wed, 8 Dec 2021 10:36:02 -0400 Subject: [PATCH 19/49] move documentation from comments into internal documentation for register_translation() --- r/R/dplyr-funcs.R | 115 +++++++++++++++++++--------------- r/man/register_translation.Rd | 55 ++++++++++++++++ 2 files changed, 120 insertions(+), 50 deletions(-) create mode 100644 r/man/register_translation.Rd diff --git a/r/R/dplyr-funcs.R b/r/R/dplyr-funcs.R index e9331baf34dd1..54b4ea446be7c 100644 --- a/r/R/dplyr-funcs.R +++ b/r/R/dplyr-funcs.R @@ -19,8 +19,69 @@ #' @include expression.R NULL -# This environment contains a cache of nse_funcs as a list() -.cache <- new.env(parent = emptyenv()) + +#' Register compute translations +#' +#' The [register_translation()] and [register_translation_agg()] functions +#' are used to populate a list of functions that operate on (and return) +#' Expressions. These are the basis for the `.data` mask inside dplyr methods. +#' +#' @section Writing translations: +#' When to use `build_expr()` vs. `Expression$create()`? +#' +#' Use `build_expr()` if you need to +#' - map R function names to Arrow C++ functions +#' - wrap R inputs (vectors) as Array/Scalar +#' +#' `Expression$create()` is lower level. Most of the translations use it +#' because they manage the preparation of the user-provided inputs +#' and don't need or don't want to the automatic conversion of R objects +#' to [Scalar]. +#' +#' @param fun_name A function name in the form `"function"` or +#' `"package::function"`. The package name is currently not used but +#' may be used in the future to allow these types of function calls. +#' @param fun A function or `NULL` to un-register a previous function. +#' This function must accept [Expression] objects as arguments and return +#' [Expression] objects instead of regular R objects. +#' @param agg_fun An aggregate function or `NULL` to un-register a previous +#' aggregate function. This function must accept [Expression] objects as +#' arguments and return a [list()] with components: +#' - `fun`: string function name +#' - `data`: [Expression] (these are all currently a single field) +#' - `options`: list of function options, as passed to call_function +#' @param registry An [environment()] in which the functions should be +#' assigned. +#' +#' @return The previously registered function or `NULL` if no previously +#' registered function existed. +#' @keywords internal +register_translation <- function(fun_name, fun, registry = translation_registry()) { + name <- gsub("^.*?::", "", fun_name) + namespace <- gsub("::.*$", "", fun_name) + + previous_fun <- if (name %in% names(fun)) registry[[name]] else NULL + + if (is.null(fun)) { + rm(list = name, envir = registry) + } else { + registry[[name]] <- fun + } + + invisible(previous_fun) +} + +register_translation_agg <- function(fun_name, agg_fun, registry = translation_registry_agg()) { + register_translation(fun_name, agg_fun, registry = registry) +} + +translation_registry <- function() { + nse_funcs +} + +translation_registry_agg <- function() { + agg_funcs +} # Called in .onLoad() create_translation_cache <- function() { @@ -51,53 +112,7 @@ create_translation_cache <- function() { .cache$functions <- c(as.list(nse_funcs), arrow_funcs) } -# nse_funcs is a list of functions that operated on (and return) Expressions -# These will be the basis for a data_mask inside dplyr methods -# and will be added to .cache at package load time +# environments in the arrow namespace used in the above functions nse_funcs <- new.env(parent = emptyenv()) - -# agg_funcs is a list of functions with a different signature than nse_funcs; -# described below agg_funcs <- new.env(parent = emptyenv()) - -translation_registry <- function() { - nse_funcs -} - -translation_registry_agg <- function() { - agg_funcs -} - -register_translation <- function(fun_name, fun, registry = translation_registry()) { - name <- gsub("^.*?::", "", fun_name) - namespace <- gsub("::.*$", "", fun_name) - - previous_fun <- if (name %in% names(fun)) registry[[name]] else NULL - - if (is.null(fun)) { - rm(list = name, envir = registry) - } else { - registry[[name]] <- fun - } - - invisible(previous_fun) -} - -register_translation_agg <- function(fun_name, fun, registry = translation_registry_agg()) { - register_translation(fun_name, fun, registry = registry) -} - - -# Now add functions to that list where the mapping from R to Arrow isn't 1:1 -# Each of these functions should have the same signature as the R function -# they're replacing. -# -# When to use `build_expr()` vs. `Expression$create()`? -# -# Use `build_expr()` if you need to -# (1) map R function names to Arrow C++ functions -# (2) wrap R inputs (vectors) as Array/Scalar -# -# `Expression$create()` is lower level. Most of the functions below use it -# because they manage the preparation of the user-provided inputs -# and don't need to wrap scalars +.cache <- new.env(parent = emptyenv()) diff --git a/r/man/register_translation.Rd b/r/man/register_translation.Rd new file mode 100644 index 0000000000000..eb3c242e052f7 --- /dev/null +++ b/r/man/register_translation.Rd @@ -0,0 +1,55 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/dplyr-funcs.R +\name{register_translation} +\alias{register_translation} +\title{Register compute translations} +\usage{ +register_translation(fun_name, fun, registry = translation_registry()) +} +\arguments{ +\item{fun_name}{A function name in the form \code{"function"} or +\code{"package::function"}. The package name is currently not used but +may be used in the future to allow these types of function calls.} + +\item{fun}{A function or \code{NULL} to un-register a previous function. +This function must accept \link{Expression} objects as arguments and return +\link{Expression} objects instead of regular R objects.} + +\item{registry}{An \code{\link[=environment]{environment()}} in which the functions should be +assigned.} + +\item{agg_fun}{An aggregate function or \code{NULL} to un-register a previous +aggregate function. This function must accept \link{Expression} objects as +arguments and return a \code{\link[=list]{list()}} with components: +\itemize{ +\item \code{fun}: string function name +\item \code{data}: \link{Expression} (these are all currently a single field) +\item \code{options}: list of function options, as passed to call_function +}} +} +\value{ +The previously registered function or \code{NULL} if no previously +registered function existed. +} +\description{ +The \code{\link[=register_translation]{register_translation()}} and \code{\link[=register_translation_agg]{register_translation_agg()}} functions +are used to populate a list of functions that operate on (and return) +Expressions. These are the basis for the \code{.data} mask inside dplyr methods. +} +\section{Writing translations}{ + +When to use \code{build_expr()} vs. \code{Expression$create()}? + +Use \code{build_expr()} if you need to +\itemize{ +\item map R function names to Arrow C++ functions +\item wrap R inputs (vectors) as Array/Scalar +} + +\code{Expression$create()} is lower level. Most of the translations use it +because they manage the preparation of the user-provided inputs +and don't need or don't want to the automatic conversion of R objects +to \link{Scalar}. +} + +\keyword{internal} From 2c45de96fc2a6b0f99d368e1e9ed3abdcaf8f8d0 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Wed, 8 Dec 2021 10:41:29 -0400 Subject: [PATCH 20/49] don't use links in internal docs --- r/R/dplyr-funcs.R | 15 ++++++++------- r/man/register_translation.Rd | 14 +++++++------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/r/R/dplyr-funcs.R b/r/R/dplyr-funcs.R index 54b4ea446be7c..c527240a0e578 100644 --- a/r/R/dplyr-funcs.R +++ b/r/R/dplyr-funcs.R @@ -22,7 +22,7 @@ NULL #' Register compute translations #' -#' The [register_translation()] and [register_translation_agg()] functions +#' The `register_translation()` and `register_translation_agg()` functions #' are used to populate a list of functions that operate on (and return) #' Expressions. These are the basis for the `.data` mask inside dplyr methods. #' @@ -42,20 +42,21 @@ NULL #' `"package::function"`. The package name is currently not used but #' may be used in the future to allow these types of function calls. #' @param fun A function or `NULL` to un-register a previous function. -#' This function must accept [Expression] objects as arguments and return -#' [Expression] objects instead of regular R objects. +#' This function must accept `Expression` objects as arguments and return +#' `Expression` objects instead of regular R objects. #' @param agg_fun An aggregate function or `NULL` to un-register a previous -#' aggregate function. This function must accept [Expression] objects as -#' arguments and return a [list()] with components: +#' aggregate function. This function must accept `Expression` objects as +#' arguments and return a `list()` with components: #' - `fun`: string function name -#' - `data`: [Expression] (these are all currently a single field) +#' - `data`: `Expression` (these are all currently a single field) #' - `options`: list of function options, as passed to call_function -#' @param registry An [environment()] in which the functions should be +#' @param registry An `environment()` in which the functions should be #' assigned. #' #' @return The previously registered function or `NULL` if no previously #' registered function existed. #' @keywords internal +#' register_translation <- function(fun_name, fun, registry = translation_registry()) { name <- gsub("^.*?::", "", fun_name) namespace <- gsub("::.*$", "", fun_name) diff --git a/r/man/register_translation.Rd b/r/man/register_translation.Rd index eb3c242e052f7..3edcf71a214bb 100644 --- a/r/man/register_translation.Rd +++ b/r/man/register_translation.Rd @@ -12,18 +12,18 @@ register_translation(fun_name, fun, registry = translation_registry()) may be used in the future to allow these types of function calls.} \item{fun}{A function or \code{NULL} to un-register a previous function. -This function must accept \link{Expression} objects as arguments and return -\link{Expression} objects instead of regular R objects.} +This function must accept \code{Expression} objects as arguments and return +\code{Expression} objects instead of regular R objects.} -\item{registry}{An \code{\link[=environment]{environment()}} in which the functions should be +\item{registry}{An \code{environment()} in which the functions should be assigned.} \item{agg_fun}{An aggregate function or \code{NULL} to un-register a previous -aggregate function. This function must accept \link{Expression} objects as -arguments and return a \code{\link[=list]{list()}} with components: +aggregate function. This function must accept \code{Expression} objects as +arguments and return a \code{list()} with components: \itemize{ \item \code{fun}: string function name -\item \code{data}: \link{Expression} (these are all currently a single field) +\item \code{data}: \code{Expression} (these are all currently a single field) \item \code{options}: list of function options, as passed to call_function }} } @@ -32,7 +32,7 @@ The previously registered function or \code{NULL} if no previously registered function existed. } \description{ -The \code{\link[=register_translation]{register_translation()}} and \code{\link[=register_translation_agg]{register_translation_agg()}} functions +The \code{register_translation()} and \code{register_translation_agg()} functions are used to populate a list of functions that operate on (and return) Expressions. These are the basis for the \code{.data} mask inside dplyr methods. } From 04f380b17ea78cef9ab6ca7e5259bc215f38bcd5 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Wed, 8 Dec 2021 10:42:45 -0400 Subject: [PATCH 21/49] fix undefined variable error from CMD check --- r/R/dplyr-funcs-type.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r/R/dplyr-funcs-type.R b/r/R/dplyr-funcs-type.R index f58354b52b79e..5b9ba429a8ace 100644 --- a/r/R/dplyr-funcs-type.R +++ b/r/R/dplyr-funcs-type.R @@ -148,7 +148,7 @@ register_type_translations <- function() { )]) } nse_funcs$is.integer64 <- function(x) { - is.integer64(x) || (inherits(x, "Expression") && x$type_id() == Type["INT64"]) + inherits(x, "integer64") || (inherits(x, "Expression") && x$type_id() == Type["INT64"]) } nse_funcs$is.logical <- function(x) { is.logical(x) || (inherits(x, "Expression") && x$type_id() == Type["BOOL"]) From 312d83634ad59e855054d2d4b006a2505769753b Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Wed, 8 Dec 2021 10:54:47 -0400 Subject: [PATCH 22/49] test register_translation() --- r/R/dplyr-funcs.R | 6 ++-- r/tests/testthat/test-dplyr-funcs.R | 44 +++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 3 deletions(-) create mode 100644 r/tests/testthat/test-dplyr-funcs.R diff --git a/r/R/dplyr-funcs.R b/r/R/dplyr-funcs.R index c527240a0e578..30b7ba1e0c4a3 100644 --- a/r/R/dplyr-funcs.R +++ b/r/R/dplyr-funcs.R @@ -61,10 +61,10 @@ register_translation <- function(fun_name, fun, registry = translation_registry( name <- gsub("^.*?::", "", fun_name) namespace <- gsub("::.*$", "", fun_name) - previous_fun <- if (name %in% names(fun)) registry[[name]] else NULL + previous_fun <- if (name %in% names(registry)) registry[[name]] else NULL - if (is.null(fun)) { - rm(list = name, envir = registry) + if (is.null(fun) && !is.null(previous_fun)) { + rm(list = name, envir = registry, inherits = FALSE) } else { registry[[name]] <- fun } diff --git a/r/tests/testthat/test-dplyr-funcs.R b/r/tests/testthat/test-dplyr-funcs.R new file mode 100644 index 0000000000000..233fcb78fbcac --- /dev/null +++ b/r/tests/testthat/test-dplyr-funcs.R @@ -0,0 +1,44 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +test_that("register_translation() works", { + fake_registry <- new.env(parent = emptyenv()) + fun1 <- function() NULL + + expect_null(register_translation("some_fun", fun1, fake_registry)) + expect_identical(fake_registry$some_fun, fun1) + + expect_identical(register_translation("some_fun", NULL, fake_registry), fun1) + expect_false("some_fun" %in% names(fake_registry)) + expect_silent(expect_null(register_translation("some_fun", NULL, fake_registry))) + + expect_null(register_translation("some_pkg::some_fun", fun1, fake_registry)) + expect_identical(fake_registry$some_fun, fun1) +}) + +test_that("register_translation_agg() works", { + fake_registry <- new.env(parent = emptyenv()) + fun1 <- function() NULL + + expect_null(register_translation_agg("some_fun", fun1, fake_registry)) + expect_identical(fake_registry$some_fun, fun1) +}) + +test_that("translation_registry() works", { + expect_identical(translation_registry(), nse_funcs) + expect_identical(translation_registry_agg(), agg_funcs) +}) From ec6897ccff4699d15641d7a509fc5594ff729c12 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Wed, 8 Dec 2021 13:16:20 -0400 Subject: [PATCH 23/49] `nse_funcs$fun <- ` -> `register_translation("fun", ` for dplyr-funcs-math.R --- r/R/dplyr-funcs-math.R | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/r/R/dplyr-funcs-math.R b/r/R/dplyr-funcs-math.R index be5d688a87acc..086eecb443cf6 100644 --- a/r/R/dplyr-funcs-math.R +++ b/r/R/dplyr-funcs-math.R @@ -17,7 +17,7 @@ register_math_translations <- function() { - nse_funcs$log <- nse_funcs$logb <- function(x, base = exp(1)) { + log_translation <- function(x, base = exp(1)) { # like other binary functions, either `x` or `base` can be Expression or double(1) if (is.numeric(x) && length(x) == 1) { x <- Expression$scalar(x) @@ -50,33 +50,35 @@ register_math_translations <- function() { Expression$create("logb_checked", x, Expression$scalar(base)) } + register_translation("log", log_translation) + register_translation("logb", log_translation) - nse_funcs$pmin <- function(..., na.rm = FALSE) { + register_translation("pmin", function(..., na.rm = FALSE) { build_expr( "min_element_wise", ..., options = list(skip_nulls = na.rm) ) - } + }) - nse_funcs$pmax <- function(..., na.rm = FALSE) { + register_translation("pmax", function(..., na.rm = FALSE) { build_expr( "max_element_wise", ..., options = list(skip_nulls = na.rm) ) - } + }) - nse_funcs$trunc <- function(x, ...) { + register_translation("trunc", function(x, ...) { # accepts and ignores ... for consistency with base::trunc() build_expr("trunc", x) - } + }) - nse_funcs$round <- function(x, digits = 0) { + register_translation("round", function(x, digits = 0) { build_expr( "round", x, options = list(ndigits = digits, round_mode = RoundMode$HALF_TO_EVEN) ) - } + }) } From dfb6e7796d9e5f24980011147dbc2b6324c7ee59 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Wed, 8 Dec 2021 13:21:33 -0400 Subject: [PATCH 24/49] use register_translation for dplyr-funcs-conditional.R --- r/R/dplyr-funcs-conditional.R | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/r/R/dplyr-funcs-conditional.R b/r/R/dplyr-funcs-conditional.R index 01b39978abdad..2eedf0bfe14e3 100644 --- a/r/R/dplyr-funcs-conditional.R +++ b/r/R/dplyr-funcs-conditional.R @@ -17,7 +17,7 @@ register_conditional_translations <- function() { - nse_funcs$coalesce <- function(...) { + register_translation("coalesce", function(...) { args <- list2(...) if (length(args) < 1) { abort("At least one argument must be supplied to coalesce()") @@ -47,9 +47,9 @@ register_conditional_translations <- function() { } }) Expression$create("coalesce", args = args) - } + }) - nse_funcs$if_else <- function(condition, true, false, missing = NULL) { + if_else_translation <- function(condition, true, false, missing = NULL) { if (!is.null(missing)) { return(nse_funcs$if_else( nse_funcs$is.na(condition), @@ -61,12 +61,14 @@ register_conditional_translations <- function() { build_expr("if_else", condition, true, false) } + register_translation("if_else", if_else_translation) + # Although base R ifelse allows `yes` and `no` to be different classes - nse_funcs$ifelse <- function(test, yes, no) { - nse_funcs$if_else(condition = test, true = yes, false = no) - } + register_translation("ifelse", function(test, yes, no) { + if_else_translation(condition = test, true = yes, false = no) + }) - nse_funcs$case_when <- function(...) { + register_translation("case_when", function(...) { formulas <- list2(...) n <- length(formulas) if (n == 0) { @@ -100,5 +102,5 @@ register_conditional_translations <- function() { value ) ) - } + }) } From 3b017d7c79b2aa0655068a48c7fc913a4510bed0 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Wed, 8 Dec 2021 13:27:23 -0400 Subject: [PATCH 25/49] use_register_translation in dplyr-funcs-datetime.R --- r/R/dplyr-funcs-datetime.R | 43 +++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/r/R/dplyr-funcs-datetime.R b/r/R/dplyr-funcs-datetime.R index a3231aae8fdc8..2c81d9e394ea0 100644 --- a/r/R/dplyr-funcs-datetime.R +++ b/r/R/dplyr-funcs-datetime.R @@ -17,7 +17,8 @@ register_datetime_translations <- function() { - nse_funcs$strptime <- function(x, format = "%Y-%m-%d %H:%M:%S", tz = NULL, unit = "ms") { + register_translation("strptime", function(x, format = "%Y-%m-%d %H:%M:%S", tz = NULL, + unit = "ms") { # Arrow uses unit for time parsing, strptime() does not. # Arrow has no default option for strptime (format, unit), # we suggest following format = "%Y-%m-%d %H:%M:%S", unit = MILLI/1L/"ms", @@ -32,9 +33,9 @@ register_datetime_translations <- function() { unit <- make_valid_time_unit(unit, c(valid_time64_units, valid_time32_units)) Expression$create("strptime", x, options = list(format = format, unit = unit)) - } + }) - nse_funcs$strftime <- function(x, format = "", tz = "", usetz = FALSE) { + register_translation("strftime", function(x, format = "", tz = "", usetz = FALSE) { if (usetz) { format <- paste(format, "%Z") } @@ -49,9 +50,9 @@ register_datetime_translations <- function() { ts <- x } Expression$create("strftime", ts, options = list(format = format, locale = Sys.getlocale("LC_TIME"))) - } + }) - nse_funcs$format_ISO8601 <- function(x, usetz = FALSE, precision = NULL, ...) { + register_translation("format_ISO8601", function(x, usetz = FALSE, precision = NULL, ...) { ISO8601_precision_map <- list( y = "%Y", @@ -80,17 +81,15 @@ register_datetime_translations <- function() { format <- paste0(format, "%z") } Expression$create("strftime", x, options = list(format = format, locale = "C")) - } + }) - nse_funcs$second <- function(x) { + register_translation("second", function(x) { Expression$create("add", Expression$create("second", x), Expression$create("subsecond", x)) - } + }) - nse_funcs$wday <- function(x, - label = FALSE, - abbr = TRUE, - week_start = getOption("lubridate.week.start", 7), - locale = Sys.getlocale("LC_TIME")) { + register_translation("wday", function(x, label = FALSE, abbr = TRUE, + week_start = getOption("lubridate.week.start", 7), + locale = Sys.getlocale("LC_TIME")) { if (label) { if (abbr) { format <- "%a" @@ -101,9 +100,9 @@ register_datetime_translations <- function() { } Expression$create("day_of_week", x, options = list(count_from_zero = FALSE, week_start = week_start)) - } + }) - nse_funcs$month <- function(x, label = FALSE, abbr = TRUE, locale = Sys.getlocale("LC_TIME")) { + register_translation("month", function(x, label = FALSE, abbr = TRUE, locale = Sys.getlocale("LC_TIME")) { if (label) { if (abbr) { format <- "%b" @@ -114,20 +113,22 @@ register_datetime_translations <- function() { } Expression$create("month", x) - } + }) - nse_funcs$is.Date <- function(x) { + register_translation("is.Date", function(x) { inherits(x, "Date") || (inherits(x, "Expression") && x$type_id() %in% Type[c("DATE32", "DATE64")]) - } + }) - nse_funcs$is.instant <- nse_funcs$is.timepoint <- function(x) { + is_instant_translation <- function(x) { inherits(x, c("POSIXt", "POSIXct", "POSIXlt", "Date")) || (inherits(x, "Expression") && x$type_id() %in% Type[c("TIMESTAMP", "DATE32", "DATE64")]) } + register_translation("is.instant", is_instant_translation) + register_translation("is.timepoint", is_instant_translation) - nse_funcs$is.POSIXct <- function(x) { + register_translation("is.POSIXct", function(x) { inherits(x, "POSIXct") || (inherits(x, "Expression") && x$type_id() %in% Type[c("TIMESTAMP")]) - } + }) } From ed5835d8b013cbbd7e1d386b5e08e798b5548306 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Wed, 8 Dec 2021 13:41:58 -0400 Subject: [PATCH 26/49] use register_translation --- r/R/dplyr-funcs-type.R | 116 ++++++++++++++++++++--------------------- 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/r/R/dplyr-funcs-type.R b/r/R/dplyr-funcs-type.R index 5b9ba429a8ace..cf84f8199369d 100644 --- a/r/R/dplyr-funcs-type.R +++ b/r/R/dplyr-funcs-type.R @@ -17,17 +17,17 @@ register_type_translations <- function() { - nse_funcs$cast <- function(x, target_type, safe = TRUE, ...) { + register_translation("cast", function(x, target_type, safe = TRUE, ...) { opts <- cast_options(safe, ...) opts$to_type <- as_type(target_type) Expression$create("cast", x, options = opts) - } + }) - nse_funcs$is.na <- function(x) { + register_translation("is.na", function(x) { build_expr("is_null", x, options = list(nan_is_null = TRUE)) - } + }) - nse_funcs$is.nan <- function(x) { + register_translation("is.nan", function(x) { if (is.double(x) || (inherits(x, "Expression") && x$type_id() %in% TYPES_WITH_NAN)) { # TODO: if an option is added to the is_nan kernel to treat NA as NaN, @@ -36,9 +36,9 @@ register_type_translations <- function() { } else { Expression$scalar(FALSE) } - } + }) - nse_funcs$is <- function(object, class2) { + register_translation("is", function(object, class2) { if (is.string(class2)) { switch(class2, # for R data types, pass off to is.*() functions @@ -60,9 +60,9 @@ register_type_translations <- function() { } else { stop("Second argument to is() is not a string or DataType", call. = FALSE) } - } + }) - nse_funcs$dictionary_encode <- function(x, + register_translation("dictionary_encode", function(x, null_encoding_behavior = c("mask", "encode")) { behavior <- toupper(match.arg(null_encoding_behavior)) null_encoding_behavior <- NullEncodingBehavior[[behavior]] @@ -71,33 +71,33 @@ register_type_translations <- function() { x, options = list(null_encoding_behavior = null_encoding_behavior) ) - } + }) - nse_funcs$between <- function(x, left, right) { + register_translation("between", function(x, left, right) { x >= left & x <= right - } + }) - nse_funcs$is.finite <- function(x) { + register_translation("is.finite", function(x) { is_fin <- Expression$create("is_finite", x) # for compatibility with base::is.finite(), return FALSE for NA_real_ is_fin & !nse_funcs$is.na(is_fin) - } + }) - nse_funcs$is.infinite <- function(x) { + register_translation("is.infinite", function(x) { is_inf <- Expression$create("is_inf", x) # for compatibility with base::is.infinite(), return FALSE for NA_real_ is_inf & !nse_funcs$is.na(is_inf) - } + }) # as.* type casting functions # as.factor() is mapped in expression.R - nse_funcs$as.character <- function(x) { + register_translation("as.character", function(x) { Expression$create("cast", x, options = cast_options(to_type = string())) - } - nse_funcs$as.double <- function(x) { + }) + register_translation("as.double", function(x) { Expression$create("cast", x, options = cast_options(to_type = float64())) - } - nse_funcs$as.integer <- function(x) { + }) + register_translation("as.integer", function(x) { Expression$create( "cast", x, @@ -107,8 +107,8 @@ register_type_translations <- function() { allow_decimal_truncate = TRUE ) ) - } - nse_funcs$as.integer64 <- function(x) { + }) + register_translation("as.integer64", function(x) { Expression$create( "cast", x, @@ -118,74 +118,74 @@ register_type_translations <- function() { allow_decimal_truncate = TRUE ) ) - } - nse_funcs$as.logical <- function(x) { + }) + register_translation("as.logical", function(x) { Expression$create("cast", x, options = cast_options(to_type = boolean())) - } - nse_funcs$as.numeric <- function(x) { + }) + register_translation("as.numeric", function(x) { Expression$create("cast", x, options = cast_options(to_type = float64())) - } + }) # is.* type functions - nse_funcs$is.character <- function(x) { + register_translation("is.character", function(x) { is.character(x) || (inherits(x, "Expression") && x$type_id() %in% Type[c("STRING", "LARGE_STRING")]) - } - nse_funcs$is.numeric <- function(x) { + }) + register_translation("is.numeric", function(x) { is.numeric(x) || (inherits(x, "Expression") && x$type_id() %in% Type[c( "UINT8", "INT8", "UINT16", "INT16", "UINT32", "INT32", "UINT64", "INT64", "HALF_FLOAT", "FLOAT", "DOUBLE", "DECIMAL128", "DECIMAL256" )]) - } - nse_funcs$is.double <- function(x) { + }) + register_translation("is.double", function(x) { is.double(x) || (inherits(x, "Expression") && x$type_id() == Type["DOUBLE"]) - } - nse_funcs$is.integer <- function(x) { + }) + register_translation("is.integer", function(x) { is.integer(x) || (inherits(x, "Expression") && x$type_id() %in% Type[c( "UINT8", "INT8", "UINT16", "INT16", "UINT32", "INT32", "UINT64", "INT64" )]) - } - nse_funcs$is.integer64 <- function(x) { + }) + register_translation("is.integer64", function(x) { inherits(x, "integer64") || (inherits(x, "Expression") && x$type_id() == Type["INT64"]) - } - nse_funcs$is.logical <- function(x) { + }) + register_translation("is.logical", function(x) { is.logical(x) || (inherits(x, "Expression") && x$type_id() == Type["BOOL"]) - } - nse_funcs$is.factor <- function(x) { + }) + register_translation("is.factor", function(x) { is.factor(x) || (inherits(x, "Expression") && x$type_id() == Type["DICTIONARY"]) - } - nse_funcs$is.list <- function(x) { + }) + register_translation("is.list", function(x) { is.list(x) || (inherits(x, "Expression") && x$type_id() %in% Type[c( "LIST", "FIXED_SIZE_LIST", "LARGE_LIST" )]) - } + }) # rlang::is_* type functions - nse_funcs$is_character <- function(x, n = NULL) { + register_translation("is_character", function(x, n = NULL) { assert_that(is.null(n)) nse_funcs$is.character(x) - } - nse_funcs$is_double <- function(x, n = NULL, finite = NULL) { + }) + register_translation("is_double", function(x, n = NULL, finite = NULL) { assert_that(is.null(n) && is.null(finite)) nse_funcs$is.double(x) - } - nse_funcs$is_integer <- function(x, n = NULL) { + }) + register_translation("is_integer", function(x, n = NULL) { assert_that(is.null(n)) nse_funcs$is.integer(x) - } - nse_funcs$is_list <- function(x, n = NULL) { + }) + register_translation("is_list", function(x, n = NULL) { assert_that(is.null(n)) nse_funcs$is.list(x) - } - nse_funcs$is_logical <- function(x, n = NULL) { + }) + register_translation("is_logical", function(x, n = NULL) { assert_that(is.null(n)) nse_funcs$is.logical(x) - } + }) # Create a data frame/tibble/struct column - nse_funcs$tibble <- function(..., .rows = NULL, .name_repair = NULL) { + register_translation("tibble", function(..., .rows = NULL, .name_repair = NULL) { if (!is.null(.rows)) arrow_not_supported(".rows") if (!is.null(.name_repair)) arrow_not_supported(".name_repair") @@ -202,9 +202,9 @@ register_type_translations <- function() { args = unname(args), options = list(field_names = names(args)) ) - } + }) - nse_funcs$data.frame <- function(..., row.names = NULL, + register_translation("data.frame", function(..., row.names = NULL, check.rows = NULL, check.names = TRUE, fix.empty.names = TRUE, stringsAsFactors = FALSE) { # we need a specific value of stringsAsFactors because the default was @@ -236,5 +236,5 @@ register_type_translations <- function() { args = unname(args), options = list(field_names = names(args)) ) - } + }) } From 328373aa1158f9c789284b4982b21619209f0baf Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Wed, 8 Dec 2021 13:50:25 -0400 Subject: [PATCH 27/49] use_register_translation for dplyr-funcs-string.R --- r/R/dplyr-funcs-string.R | 100 +++++++++++++++++++-------------------- 1 file changed, 49 insertions(+), 51 deletions(-) diff --git a/r/R/dplyr-funcs-string.R b/r/R/dplyr-funcs-string.R index d270ae84f9487..bd9b7a8c38ce7 100644 --- a/r/R/dplyr-funcs-string.R +++ b/r/R/dplyr-funcs-string.R @@ -126,7 +126,7 @@ stop_if_locale_provided <- function(locale) { register_string_translations <- function() { - nse_funcs$nchar <- function(x, type = "chars", allowNA = FALSE, keepNA = NA) { + register_translation("nchar", function(x, type = "chars", allowNA = FALSE, keepNA = NA) { if (allowNA) { arrow_not_supported("allowNA = TRUE") } @@ -142,7 +142,7 @@ register_string_translations <- function() { } else { Expression$create("utf8_length", x) } - } + }) arrow_string_join_function <- function(null_handling, null_replacement = NULL) { @@ -173,7 +173,7 @@ register_string_translations <- function() { } } - nse_funcs$paste <- function(..., sep = " ", collapse = NULL, recycle0 = FALSE) { + register_translation("paste", function(..., sep = " ", collapse = NULL, recycle0 = FALSE) { assert_that( is.null(collapse), msg = "paste() with the collapse argument is not yet supported in Arrow" @@ -182,41 +182,41 @@ register_string_translations <- function() { assert_that(!is.na(sep), msg = "Invalid separator") } arrow_string_join_function(NullHandlingBehavior$REPLACE, "NA")(..., sep) - } + }) - nse_funcs$paste0 <- function(..., collapse = NULL, recycle0 = FALSE) { + register_translation("paste0", function(..., collapse = NULL, recycle0 = FALSE) { assert_that( is.null(collapse), msg = "paste0() with the collapse argument is not yet supported in Arrow" ) arrow_string_join_function(NullHandlingBehavior$REPLACE, "NA")(..., "") - } + }) - nse_funcs$str_c <- function(..., sep = "", collapse = NULL) { + register_translation("str_c", function(..., sep = "", collapse = NULL) { assert_that( is.null(collapse), msg = "str_c() with the collapse argument is not yet supported in Arrow" ) arrow_string_join_function(NullHandlingBehavior$EMIT_NULL)(..., sep) - } + }) - nse_funcs$str_to_lower <- function(string, locale = "en") { + register_translation("str_to_lower", function(string, locale = "en") { stop_if_locale_provided(locale) Expression$create("utf8_lower", string) - } + }) - nse_funcs$str_to_upper <- function(string, locale = "en") { + register_translation("str_to_upper", function(string, locale = "en") { stop_if_locale_provided(locale) Expression$create("utf8_upper", string) - } + }) - nse_funcs$str_to_title <- function(string, locale = "en") { + register_translation("str_to_title", function(string, locale = "en") { stop_if_locale_provided(locale) Expression$create("utf8_title", string) - } + }) - nse_funcs$str_trim <- function(string, side = c("both", "left", "right")) { + register_translation("str_trim", function(string, side = c("both", "left", "right")) { side <- match.arg(side) trim_fun <- switch(side, left = "utf8_ltrim_whitespace", @@ -224,9 +224,9 @@ register_string_translations <- function() { both = "utf8_trim_whitespace" ) Expression$create(trim_fun, string) - } + }) - nse_funcs$substr <- function(x, start, stop) { + register_translation("substr", function(x, start, stop) { assert_that( length(start) == 1, msg = "`start` must be length 1 - other lengths are not supported in Arrow" @@ -256,13 +256,13 @@ register_string_translations <- function() { # which effectively cancels out the difference in indexing between R & C++ options = list(start = start - 1L, stop = stop) ) - } + }) - nse_funcs$substring <- function(text, first, last) { + register_translation("substring", function(text, first, last) { nse_funcs$substr(x = text, start = first, stop = last) - } + }) - nse_funcs$str_sub <- function(string, start = 1L, end = -1L) { + register_translation("str_sub", function(string, start = 1L, end = -1L) { assert_that( length(start) == 1, msg = "`start` must be length 1 - other lengths are not supported in Arrow" @@ -296,18 +296,18 @@ register_string_translations <- function() { string, options = list(start = start, stop = end) ) - } + }) - nse_funcs$grepl <- function(pattern, x, ignore.case = FALSE, fixed = FALSE) { + register_translation("grepl", function(pattern, x, ignore.case = FALSE, fixed = FALSE) { arrow_fun <- ifelse(fixed, "match_substring", "match_substring_regex") Expression$create( arrow_fun, x, options = list(pattern = pattern, ignore_case = ignore.case) ) - } + }) - nse_funcs$str_detect <- function(string, pattern, negate = FALSE) { + register_translation("str_detect", function(string, pattern, negate = FALSE) { opts <- get_stringr_pattern_options(enexpr(pattern)) out <- nse_funcs$grepl( pattern = opts$pattern, @@ -319,15 +319,15 @@ register_string_translations <- function() { out <- !out } out - } + }) - nse_funcs$str_like <- function(string, pattern, ignore_case = TRUE) { + register_translation("str_like", function(string, pattern, ignore_case = TRUE) { Expression$create( "match_like", string, options = list(pattern = pattern, ignore_case = ignore_case) ) - } + }) # Encapsulate some common logic for sub/gsub/str_replace/str_replace_all arrow_r_string_replace_function <- function(max_replacements) { @@ -345,6 +345,7 @@ register_string_translations <- function() { } arrow_stringr_string_replace_function <- function(max_replacements) { + force(max_replacements) function(string, pattern, replacement) { opts <- get_stringr_pattern_options(enexpr(pattern)) arrow_r_string_replace_function(max_replacements)( @@ -357,15 +358,12 @@ register_string_translations <- function() { } } - nse_funcs$sub <- arrow_r_string_replace_function(1L) - nse_funcs$gsub <- arrow_r_string_replace_function(-1L) - nse_funcs$str_replace <- arrow_stringr_string_replace_function(1L) - nse_funcs$str_replace_all <- arrow_stringr_string_replace_function(-1L) + register_translation("sub", arrow_r_string_replace_function(1L)) + register_translation("gsub", arrow_r_string_replace_function(-1L)) + register_translation("str_replace", arrow_stringr_string_replace_function(1L)) + register_translation("str_replace_all", arrow_stringr_string_replace_function(-1L)) - nse_funcs$strsplit <- function(x, - split, - fixed = FALSE, - perl = FALSE, + register_translation("strsplit", function(x, split, fixed = FALSE, perl = FALSE, useBytes = FALSE) { assert_that(is.string(split)) @@ -382,9 +380,9 @@ register_string_translations <- function() { x, options = list(pattern = split, reverse = FALSE, max_splits = -1L) ) - } + }) - nse_funcs$str_split <- function(string, pattern, n = Inf, simplify = FALSE) { + register_translation("str_split", function(string, pattern, n = Inf, simplify = FALSE) { opts <- get_stringr_pattern_options(enexpr(pattern)) arrow_fun <- ifelse(opts$fixed, "split_pattern", "split_pattern_regex") if (opts$ignore_case) { @@ -412,10 +410,10 @@ register_string_translations <- function() { max_splits = n - 1L ) ) - } + }) - nse_funcs$str_pad <- function(string, width, side = c("left", "right", "both"), pad = " ") { + register_translation("str_pad", function(string, width, side = c("left", "right", "both"), pad = " ") { assert_that(is_integerish(width)) side <- match.arg(side) assert_that(is.string(pad)) @@ -433,25 +431,25 @@ register_string_translations <- function() { string, options = list(width = width, padding = pad) ) - } + }) - nse_funcs$startsWith <- function(x, prefix) { + register_translation("startsWith", function(x, prefix) { Expression$create( "starts_with", x, options = list(pattern = prefix) ) - } + }) - nse_funcs$endsWith <- function(x, suffix) { + register_translation("endsWith", function(x, suffix) { Expression$create( "ends_with", x, options = list(pattern = suffix) ) - } + }) - nse_funcs$str_starts <- function(string, pattern, negate = FALSE) { + register_translation("str_starts", function(string, pattern, negate = FALSE) { opts <- get_stringr_pattern_options(enexpr(pattern)) if (opts$fixed) { out <- nse_funcs$startsWith(x = string, prefix = opts$pattern) @@ -463,9 +461,9 @@ register_string_translations <- function() { out <- !out } out - } + }) - nse_funcs$str_ends <- function(string, pattern, negate = FALSE) { + register_translation("str_ends", function(string, pattern, negate = FALSE) { opts <- get_stringr_pattern_options(enexpr(pattern)) if (opts$fixed) { out <- nse_funcs$endsWith(x = string, suffix = opts$pattern) @@ -477,9 +475,9 @@ register_string_translations <- function() { out <- !out } out - } + }) - nse_funcs$str_count <- function(string, pattern) { + register_translation("str_count", function(string, pattern) { opts <- get_stringr_pattern_options(enexpr(pattern)) if (!is.string(pattern)) { arrow_not_supported("`pattern` must be a length 1 character vector; other values") @@ -490,5 +488,5 @@ register_string_translations <- function() { string, options = list(pattern = opts$pattern, ignore_case = opts$ignore_case) ) - } + }) } From a2e399f6e6067085e10e4d64a8df919a91f12b55 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Wed, 8 Dec 2021 14:13:55 -0400 Subject: [PATCH 28/49] remove more references to nse_funcs --- r/R/dplyr-funcs-conditional.R | 8 ++++---- r/R/dplyr-funcs-string.R | 14 +++++++------- r/R/dplyr-funcs-type.R | 28 ++++++++++++++-------------- r/R/dplyr-funcs.R | 6 ++++++ 4 files changed, 31 insertions(+), 25 deletions(-) diff --git a/r/R/dplyr-funcs-conditional.R b/r/R/dplyr-funcs-conditional.R index 2eedf0bfe14e3..65968be2066ea 100644 --- a/r/R/dplyr-funcs-conditional.R +++ b/r/R/dplyr-funcs-conditional.R @@ -51,10 +51,10 @@ register_conditional_translations <- function() { if_else_translation <- function(condition, true, false, missing = NULL) { if (!is.null(missing)) { - return(nse_funcs$if_else( - nse_funcs$is.na(condition), + return(if_else_translation( + call_translation("is.na", (condition)), missing, - nse_funcs$if_else(condition, true, false) + if_else_translation(condition, true, false) )) } @@ -84,7 +84,7 @@ register_conditional_translations <- function() { } query[[i]] <- arrow_eval(f[[2]], mask) value[[i]] <- arrow_eval(f[[3]], mask) - if (!nse_funcs$is.logical(query[[i]])) { + if (!call_translation("is.logical", query[[i]])) { abort("Left side of each formula in case_when() must be a logical expression") } if (inherits(value[[i]], "try-error")) { diff --git a/r/R/dplyr-funcs-string.R b/r/R/dplyr-funcs-string.R index bd9b7a8c38ce7..02b5c37e02922 100644 --- a/r/R/dplyr-funcs-string.R +++ b/r/R/dplyr-funcs-string.R @@ -159,7 +159,7 @@ register_string_translations <- function() { ) Expression$scalar(as.character(arg)) } else { - nse_funcs$as.character(arg) + call_translation("as.character", arg) } }) Expression$create( @@ -259,7 +259,7 @@ register_string_translations <- function() { }) register_translation("substring", function(text, first, last) { - nse_funcs$substr(x = text, start = first, stop = last) + call_translation("substr", x = text, start = first, stop = last) }) register_translation("str_sub", function(string, start = 1L, end = -1L) { @@ -309,7 +309,7 @@ register_string_translations <- function() { register_translation("str_detect", function(string, pattern, negate = FALSE) { opts <- get_stringr_pattern_options(enexpr(pattern)) - out <- nse_funcs$grepl( + out <- call_translation("grepl", pattern = opts$pattern, x = string, ignore.case = opts$ignore_case, @@ -452,9 +452,9 @@ register_string_translations <- function() { register_translation("str_starts", function(string, pattern, negate = FALSE) { opts <- get_stringr_pattern_options(enexpr(pattern)) if (opts$fixed) { - out <- nse_funcs$startsWith(x = string, prefix = opts$pattern) + out <- call_translation("startsWith", x = string, prefix = opts$pattern) } else { - out <- nse_funcs$grepl(pattern = paste0("^", opts$pattern), x = string, fixed = FALSE) + out <- call_translation("grepl", pattern = paste0("^", opts$pattern), x = string, fixed = FALSE) } if (negate) { @@ -466,9 +466,9 @@ register_string_translations <- function() { register_translation("str_ends", function(string, pattern, negate = FALSE) { opts <- get_stringr_pattern_options(enexpr(pattern)) if (opts$fixed) { - out <- nse_funcs$endsWith(x = string, suffix = opts$pattern) + out <- call_translation("endsWith", x = string, suffix = opts$pattern) } else { - out <- nse_funcs$grepl(pattern = paste0(opts$pattern, "$"), x = string, fixed = FALSE) + out <- call_translation("grepl", pattern = paste0(opts$pattern, "$"), x = string, fixed = FALSE) } if (negate) { diff --git a/r/R/dplyr-funcs-type.R b/r/R/dplyr-funcs-type.R index cf84f8199369d..c1853686d170d 100644 --- a/r/R/dplyr-funcs-type.R +++ b/r/R/dplyr-funcs-type.R @@ -42,13 +42,13 @@ register_type_translations <- function() { if (is.string(class2)) { switch(class2, # for R data types, pass off to is.*() functions - character = nse_funcs$is.character(object), - numeric = nse_funcs$is.numeric(object), - integer = nse_funcs$is.integer(object), - integer64 = nse_funcs$is.integer64(object), - logical = nse_funcs$is.logical(object), - factor = nse_funcs$is.factor(object), - list = nse_funcs$is.list(object), + character = call_translation("is.character", object), + numeric = call_translation("is.numeric", object), + integer = call_translation("is.integer", object), + integer64 = call_translation("is.integer64", object), + logical = call_translation("is.logical", object), + factor = call_translation("is.factor", object), + list = call_translation("is.list", object), # for Arrow data types, compare class2 with object$type()$ToString(), # but first strip off any parameters to only compare the top-level data # type, and canonicalize class2 @@ -80,13 +80,13 @@ register_type_translations <- function() { register_translation("is.finite", function(x) { is_fin <- Expression$create("is_finite", x) # for compatibility with base::is.finite(), return FALSE for NA_real_ - is_fin & !nse_funcs$is.na(is_fin) + is_fin & !call_translation("is.na", is_fin) }) register_translation("is.infinite", function(x) { is_inf <- Expression$create("is_inf", x) # for compatibility with base::is.infinite(), return FALSE for NA_real_ - is_inf & !nse_funcs$is.na(is_inf) + is_inf & !call_translation("is.na", is_inf) }) # as.* type casting functions @@ -165,23 +165,23 @@ register_type_translations <- function() { # rlang::is_* type functions register_translation("is_character", function(x, n = NULL) { assert_that(is.null(n)) - nse_funcs$is.character(x) + call_translation("is.character", x) }) register_translation("is_double", function(x, n = NULL, finite = NULL) { assert_that(is.null(n) && is.null(finite)) - nse_funcs$is.double(x) + call_translation("is.double", x) }) register_translation("is_integer", function(x, n = NULL) { assert_that(is.null(n)) - nse_funcs$is.integer(x) + call_translation("is.integer", x) }) register_translation("is_list", function(x, n = NULL) { assert_that(is.null(n)) - nse_funcs$is.list(x) + call_translation("is.list", x) }) register_translation("is_logical", function(x, n = NULL) { assert_that(is.null(n)) - nse_funcs$is.logical(x) + call_translation("is.logical", x) }) # Create a data frame/tibble/struct column diff --git a/r/R/dplyr-funcs.R b/r/R/dplyr-funcs.R index 30b7ba1e0c4a3..1fb274a9354f4 100644 --- a/r/R/dplyr-funcs.R +++ b/r/R/dplyr-funcs.R @@ -84,6 +84,12 @@ translation_registry_agg <- function() { agg_funcs } +# Supports a few functions that used nse_funcs$fun_name() to call +# previously-defined translations. +call_translation <- function(fun_name, ...) { + nse_funcs[[fun_name]](...) +} + # Called in .onLoad() create_translation_cache <- function() { arrow_funcs <- list() From c5fbdf1587a09b5a1672788c8690d16743d26bef Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Wed, 8 Dec 2021 14:16:49 -0400 Subject: [PATCH 29/49] remove more references to `nse_funcs` --- r/R/dplyr-funcs-datetime.R | 2 +- r/tests/testthat/test-dplyr-funcs-conditional.R | 2 +- r/tests/testthat/test-dplyr-funcs-datetime.R | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/r/R/dplyr-funcs-datetime.R b/r/R/dplyr-funcs-datetime.R index 2c81d9e394ea0..cf04bff84fc45 100644 --- a/r/R/dplyr-funcs-datetime.R +++ b/r/R/dplyr-funcs-datetime.R @@ -44,7 +44,7 @@ register_datetime_translations <- function() { } # Arrow's strftime prints in timezone of the timestamp. To match R's strftime behavior we first # cast the timestamp to desired timezone. This is a metadata only change. - if (nse_funcs$is.POSIXct(x)) { + if (call_translation("is.POSIXct", x)) { ts <- Expression$create("cast", x, options = list(to_type = timestamp(x$type()$unit(), tz))) } else { ts <- x diff --git a/r/tests/testthat/test-dplyr-funcs-conditional.R b/r/tests/testthat/test-dplyr-funcs-conditional.R index a5e6ce6ea0922..7258d20043dc3 100644 --- a/r/tests/testthat/test-dplyr-funcs-conditional.R +++ b/r/tests/testthat/test-dplyr-funcs-conditional.R @@ -407,7 +407,7 @@ test_that("coalesce()", { # no arguments expect_error( - nse_funcs$coalesce(), + call_translation("coalesce"), "At least one argument must be supplied to coalesce()", fixed = TRUE ) diff --git a/r/tests/testthat/test-dplyr-funcs-datetime.R b/r/tests/testthat/test-dplyr-funcs-datetime.R index 0aec2ca1e7b68..d21bc31f9701e 100644 --- a/r/tests/testthat/test-dplyr-funcs-datetime.R +++ b/r/tests/testthat/test-dplyr-funcs-datetime.R @@ -114,7 +114,7 @@ test_that("errors in strptime", { # Error when tz is passed x <- Expression$field_ref("x") expect_error( - nse_funcs$strptime(x, tz = "PDT"), + call_translation("strptime", x, tz = "PDT"), "Time zone argument not supported in Arrow" ) }) From 24eabdbb4e06ff449700eb409259f0440721916e Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Wed, 8 Dec 2021 14:19:33 -0400 Subject: [PATCH 30/49] remove more references to nse_funcs --- r/tests/testthat/test-dplyr-funcs-math.R | 4 +- r/tests/testthat/test-dplyr-funcs-string.R | 43 +++++++++++----------- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/r/tests/testthat/test-dplyr-funcs-math.R b/r/tests/testthat/test-dplyr-funcs-math.R index b5321945dccb2..f6831ed0fbdcb 100644 --- a/r/tests/testthat/test-dplyr-funcs-math.R +++ b/r/tests/testthat/test-dplyr-funcs-math.R @@ -177,14 +177,14 @@ test_that("log functions", { # test log(, base = (length != 1)) expect_error( - nse_funcs$log(10, base = 5:6), + call_translation("log", 10, base = 5:6), "base must be a column or a length-1 numeric; other values not supported in Arrow", fixed = TRUE ) # test log(x = (length != 1)) expect_error( - nse_funcs$log(10:11), + call_translation("log", 10:11), "x must be a column or a length-1 numeric; other values not supported in Arrow", fixed = TRUE ) diff --git a/r/tests/testthat/test-dplyr-funcs-string.R b/r/tests/testthat/test-dplyr-funcs-string.R index 1b40d65053ef6..c7656561da3a3 100644 --- a/r/tests/testthat/test-dplyr-funcs-string.R +++ b/r/tests/testthat/test-dplyr-funcs-string.R @@ -121,7 +121,7 @@ test_that("paste, paste0, and str_c", { # sep is literal NA # errors in paste() (consistent with base::paste()) expect_error( - nse_funcs$paste(x, y, sep = NA_character_), + call_translation("paste", x, y, sep = NA_character_), "Invalid separator" ) # emits null in str_c() (consistent with stringr::str_c()) @@ -156,25 +156,25 @@ test_that("paste, paste0, and str_c", { # collapse argument not supported expect_error( - nse_funcs$paste(x, y, collapse = ""), + call_translation("paste", x, y, collapse = ""), "collapse" ) expect_error( - nse_funcs$paste0(x, y, collapse = ""), + call_translation("paste0", x, y, collapse = ""), "collapse" ) expect_error( - nse_funcs$str_c(x, y, collapse = ""), + call_translation("str_c", x, y, collapse = ""), "collapse" ) # literal vectors of length != 1 not supported expect_error( - nse_funcs$paste(x, character(0), y), + call_translation("paste", x, character(0), y), "Literal vectors of length != 1 not supported in string concatenation" ) expect_error( - nse_funcs$paste(x, c(",", ";"), y), + call_translation("paste", x, c(",", ";"), y), "Literal vectors of length != 1 not supported in string concatenation" ) }) @@ -501,7 +501,7 @@ test_that("str_to_lower, str_to_upper, and str_to_title", { # Error checking a single function because they all use the same code path. expect_error( - nse_funcs$str_to_lower("Apache Arrow", locale = "sp"), + call_translation("str_to_lower", "Apache Arrow", locale = "sp"), "Providing a value for 'locale' other than the default ('en') is not supported in Arrow", fixed = TRUE ) @@ -565,27 +565,27 @@ test_that("errors and warnings in string splitting", { x <- Expression$field_ref("x") expect_error( - nse_funcs$str_split(x, fixed("and", ignore_case = TRUE)), + call_translation("str_split", x, fixed("and", ignore_case = TRUE)), "Case-insensitive string splitting not supported in Arrow" ) expect_error( - nse_funcs$str_split(x, coll("and.?")), + call_translation("str_split", x, coll("and.?")), "Pattern modifier `coll()` not supported in Arrow", fixed = TRUE ) expect_error( - nse_funcs$str_split(x, boundary(type = "word")), + call_translation("str_split", x, boundary(type = "word")), "Pattern modifier `boundary()` not supported in Arrow", fixed = TRUE ) expect_error( - nse_funcs$str_split(x, "and", n = 0), + call_translation("str_split", x, "and", n = 0), "Splitting strings into zero parts not supported in Arrow" ) # This condition generates a warning expect_warning( - nse_funcs$str_split(x, fixed("and"), simplify = TRUE), + call_translation("str_split", x, fixed("and"), simplify = TRUE), "Argument 'simplify = TRUE' will be ignored" ) }) @@ -594,19 +594,19 @@ test_that("errors and warnings in string detection and replacement", { x <- Expression$field_ref("x") expect_error( - nse_funcs$str_detect(x, boundary(type = "character")), + call_translation("str_detect", x, boundary(type = "character")), "Pattern modifier `boundary()` not supported in Arrow", fixed = TRUE ) expect_error( - nse_funcs$str_replace_all(x, coll("o", locale = "en"), "ó"), + call_translation("str_replace_all", x, coll("o", locale = "en"), "ó"), "Pattern modifier `coll()` not supported in Arrow", fixed = TRUE ) # This condition generates a warning expect_warning( - nse_funcs$str_replace_all(x, regex("o", multiline = TRUE), "u"), + call_translation("str_replace_all", x, regex("o", multiline = TRUE), "u"), "Ignoring pattern modifier argument not supported in Arrow: \"multiline\"" ) }) @@ -937,18 +937,19 @@ test_that("substr", { ) expect_error( - nse_funcs$substr("Apache Arrow", c(1, 2), 3), + call_translation("substr", "Apache Arrow", c(1, 2), 3), "`start` must be length 1 - other lengths are not supported in Arrow" ) expect_error( - nse_funcs$substr("Apache Arrow", 1, c(2, 3)), + call_translation("substr", "Apache Arrow", 1, c(2, 3)), "`stop` must be length 1 - other lengths are not supported in Arrow" ) }) test_that("substring", { - # nse_funcs$substring just calls nse_funcs$substr, tested extensively above + # translation for substring just calls call_translation("substr", ...), + # tested extensively above df <- tibble(x = "Apache Arrow") compare_dplyr_binding( @@ -1033,12 +1034,12 @@ test_that("str_sub", { ) expect_error( - nse_funcs$str_sub("Apache Arrow", c(1, 2), 3), + call_translation("str_sub", "Apache Arrow", c(1, 2), 3), "`start` must be length 1 - other lengths are not supported in Arrow" ) expect_error( - nse_funcs$str_sub("Apache Arrow", 1, c(2, 3)), + call_translation("str_sub", "Apache Arrow", 1, c(2, 3)), "`end` must be length 1 - other lengths are not supported in Arrow" ) }) @@ -1167,7 +1168,7 @@ test_that("str_count", { df ) - # nse_funcs$str_count() is not vectorised over pattern + # call_translation("str_count", ) is not vectorised over pattern compare_dplyr_binding( .input %>% mutate(let_count = str_count(cities, pattern = c("a", "b", "e", "g", "p", "n", "s"))) %>% From 76b4301371a18abaad91f189807f59218b75b90e Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Wed, 8 Dec 2021 14:33:23 -0400 Subject: [PATCH 31/49] remove references to agg_funcs --- r/R/dplyr-funcs.R | 7 ++-- r/R/dplyr-summarize.R | 48 ++++++++++++------------- r/tests/testthat/test-dplyr-summarize.R | 24 ++++++------- 3 files changed, 41 insertions(+), 38 deletions(-) diff --git a/r/R/dplyr-funcs.R b/r/R/dplyr-funcs.R index 1fb274a9354f4..7f2161b26ba7f 100644 --- a/r/R/dplyr-funcs.R +++ b/r/R/dplyr-funcs.R @@ -84,12 +84,15 @@ translation_registry_agg <- function() { agg_funcs } -# Supports a few functions that used nse_funcs$fun_name() to call -# previously-defined translations. +# Supports functions and tests that call previously-defined translations. call_translation <- function(fun_name, ...) { nse_funcs[[fun_name]](...) } +call_translation_agg <- function(fun_name, ...) { + agg_funcs[[fun_name]](...) +} + # Called in .onLoad() create_translation_cache <- function() { arrow_funcs <- list() diff --git a/r/R/dplyr-summarize.R b/r/R/dplyr-summarize.R index 2c76ab1418676..7d30602199ed5 100644 --- a/r/R/dplyr-summarize.R +++ b/r/R/dplyr-summarize.R @@ -57,49 +57,49 @@ agg_fun_output_type <- function(fun, input_type, hash) { register_aggregate_translations <- function() { - agg_funcs$sum <- function(..., na.rm = FALSE) { + register_translation_agg("sum", function(..., na.rm = FALSE) { list( fun = "sum", data = ensure_one_arg(list2(...), "sum"), options = list(skip_nulls = na.rm, min_count = 0L) ) - } - agg_funcs$any <- function(..., na.rm = FALSE) { + }) + register_translation_agg("any", function(..., na.rm = FALSE) { list( fun = "any", data = ensure_one_arg(list2(...), "any"), options = list(skip_nulls = na.rm, min_count = 0L) ) - } - agg_funcs$all <- function(..., na.rm = FALSE) { + }) + register_translation_agg("all", function(..., na.rm = FALSE) { list( fun = "all", data = ensure_one_arg(list2(...), "all"), options = list(skip_nulls = na.rm, min_count = 0L) ) - } - agg_funcs$mean <- function(x, na.rm = FALSE) { + }) + register_translation_agg("mean", function(x, na.rm = FALSE) { list( fun = "mean", data = x, options = list(skip_nulls = na.rm, min_count = 0L) ) - } - agg_funcs$sd <- function(x, na.rm = FALSE, ddof = 1) { + }) + register_translation_agg("sd", function(x, na.rm = FALSE, ddof = 1) { list( fun = "stddev", data = x, options = list(skip_nulls = na.rm, min_count = 0L, ddof = ddof) ) - } - agg_funcs$var <- function(x, na.rm = FALSE, ddof = 1) { + }) + register_translation_agg("var", function(x, na.rm = FALSE, ddof = 1) { list( fun = "variance", data = x, options = list(skip_nulls = na.rm, min_count = 0L, ddof = ddof) ) - } - agg_funcs$quantile <- function(x, probs, na.rm = FALSE) { + }) + register_translation_agg("quantile", function(x, probs, na.rm = FALSE) { if (length(probs) != 1) { arrow_not_supported("quantile() with length(probs) != 1") } @@ -115,8 +115,8 @@ register_aggregate_translations <- function() { data = x, options = list(skip_nulls = na.rm, q = probs) ) - } - agg_funcs$median <- function(x, na.rm = FALSE) { + }) + register_translation_agg("median", function(x, na.rm = FALSE) { # TODO: Bind to the Arrow function that returns an exact median and remove # this warning (ARROW-14021) warn( @@ -129,35 +129,35 @@ register_aggregate_translations <- function() { data = x, options = list(skip_nulls = na.rm) ) - } - agg_funcs$n_distinct <- function(..., na.rm = FALSE) { + }) + register_translation_agg("n_distinct", function(..., na.rm = FALSE) { list( fun = "count_distinct", data = ensure_one_arg(list2(...), "n_distinct"), options = list(na.rm = na.rm) ) - } - agg_funcs$n <- function() { + }) + register_translation_agg("n", function() { list( fun = "sum", data = Expression$scalar(1L), options = list() ) - } - agg_funcs$min <- function(..., na.rm = FALSE) { + }) + register_translation_agg("min", function(..., na.rm = FALSE) { list( fun = "min", data = ensure_one_arg(list2(...), "min"), options = list(skip_nulls = na.rm, min_count = 0L) ) - } - agg_funcs$max <- function(..., na.rm = FALSE) { + }) + register_translation_agg("max", function(..., na.rm = FALSE) { list( fun = "max", data = ensure_one_arg(list2(...), "max"), options = list(skip_nulls = na.rm, min_count = 0L) ) - } + }) } # The following S3 methods are registered on load if dplyr is present diff --git a/r/tests/testthat/test-dplyr-summarize.R b/r/tests/testthat/test-dplyr-summarize.R index 46a5e98c4c512..289135bc1382b 100644 --- a/r/tests/testthat/test-dplyr-summarize.R +++ b/r/tests/testthat/test-dplyr-summarize.R @@ -276,18 +276,18 @@ test_that("Functions that take ... but we only accept a single arg", { ) # Now that we've demonstrated that the whole machinery works, let's test # the agg_funcs directly - expect_error(agg_funcs$n_distinct(), "n_distinct() with 0 arguments", fixed = TRUE) - expect_error(agg_funcs$sum(), "sum() with 0 arguments", fixed = TRUE) - expect_error(agg_funcs$any(), "any() with 0 arguments", fixed = TRUE) - expect_error(agg_funcs$all(), "all() with 0 arguments", fixed = TRUE) - expect_error(agg_funcs$min(), "min() with 0 arguments", fixed = TRUE) - expect_error(agg_funcs$max(), "max() with 0 arguments", fixed = TRUE) - expect_error(agg_funcs$n_distinct(1, 2), "Multiple arguments to n_distinct()") - expect_error(agg_funcs$sum(1, 2), "Multiple arguments to sum") - expect_error(agg_funcs$any(1, 2), "Multiple arguments to any()") - expect_error(agg_funcs$all(1, 2), "Multiple arguments to all()") - expect_error(agg_funcs$min(1, 2), "Multiple arguments to min()") - expect_error(agg_funcs$max(1, 2), "Multiple arguments to max()") + expect_error(call_translation_agg("n_distinct"), "n_distinct() with 0 arguments", fixed = TRUE) + expect_error(call_translation_agg("sum"), "sum() with 0 arguments", fixed = TRUE) + expect_error(call_translation_agg("any"), "any() with 0 arguments", fixed = TRUE) + expect_error(call_translation_agg("all"), "all() with 0 arguments", fixed = TRUE) + expect_error(call_translation_agg("min"), "min() with 0 arguments", fixed = TRUE) + expect_error(call_translation_agg("max"), "max() with 0 arguments", fixed = TRUE) + expect_error(call_translation_agg("n_distinct", 1, 2), "Multiple arguments to n_distinct()") + expect_error(call_translation_agg("sum", 1, 2), "Multiple arguments to sum") + expect_error(call_translation_agg("any", 1, 2), "Multiple arguments to any()") + expect_error(call_translation_agg("all", 1, 2), "Multiple arguments to all()") + expect_error(call_translation_agg("min", 1, 2), "Multiple arguments to min()") + expect_error(call_translation_agg("max", 1, 2), "Multiple arguments to max()") }) test_that("median()", { From d02ad943599ccd9b598a13fa033dc011b47c7288 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Wed, 8 Dec 2021 19:58:42 -0400 Subject: [PATCH 32/49] try to reduce the complexity of the string register function for the linter --- r/R/dplyr-funcs-string.R | 348 ++++++++++++++++++++------------------- 1 file changed, 180 insertions(+), 168 deletions(-) diff --git a/r/R/dplyr-funcs-string.R b/r/R/dplyr-funcs-string.R index 02b5c37e02922..e0689ab256f1e 100644 --- a/r/R/dplyr-funcs-string.R +++ b/r/R/dplyr-funcs-string.R @@ -124,26 +124,15 @@ stop_if_locale_provided <- function(locale) { } } -register_string_translations <- function() { - register_translation("nchar", function(x, type = "chars", allowNA = FALSE, keepNA = NA) { - if (allowNA) { - arrow_not_supported("allowNA = TRUE") - } - if (is.na(keepNA)) { - keepNA <- !identical(type, "width") - } - if (!keepNA) { - # TODO: I think there is a fill_null kernel we could use, set null to 2 - arrow_not_supported("keepNA = TRUE") - } - if (identical(type, "bytes")) { - Expression$create("binary_length", x) - } else { - Expression$create("utf8_length", x) - } - }) +# Split up into several register functions by category to satisfy the linter +register_string_translations <- function() { + register_string_join_translations() + register_string_regex_translations() + register_string_other_translations() +} +register_string_join_translations <- function() { arrow_string_join_function <- function(null_handling, null_replacement = NULL) { # the `binary_join_element_wise` Arrow C++ compute kernel takes the separator @@ -199,134 +188,96 @@ register_string_translations <- function() { ) arrow_string_join_function(NullHandlingBehavior$EMIT_NULL)(..., sep) }) +} +register_string_regex_translations <- function() { - register_translation("str_to_lower", function(string, locale = "en") { - stop_if_locale_provided(locale) - Expression$create("utf8_lower", string) - }) - - register_translation("str_to_upper", function(string, locale = "en") { - stop_if_locale_provided(locale) - Expression$create("utf8_upper", string) - }) - - register_translation("str_to_title", function(string, locale = "en") { - stop_if_locale_provided(locale) - Expression$create("utf8_title", string) - }) - - register_translation("str_trim", function(string, side = c("both", "left", "right")) { - side <- match.arg(side) - trim_fun <- switch(side, - left = "utf8_ltrim_whitespace", - right = "utf8_rtrim_whitespace", - both = "utf8_trim_whitespace" + register_translation("grepl", function(pattern, x, ignore.case = FALSE, fixed = FALSE) { + arrow_fun <- ifelse(fixed, "match_substring", "match_substring_regex") + Expression$create( + arrow_fun, + x, + options = list(pattern = pattern, ignore_case = ignore.case) ) - Expression$create(trim_fun, string) }) - register_translation("substr", function(x, start, stop) { - assert_that( - length(start) == 1, - msg = "`start` must be length 1 - other lengths are not supported in Arrow" - ) - assert_that( - length(stop) == 1, - msg = "`stop` must be length 1 - other lengths are not supported in Arrow" + register_translation("str_detect", function(string, pattern, negate = FALSE) { + opts <- get_stringr_pattern_options(enexpr(pattern)) + out <- call_translation("grepl", + pattern = opts$pattern, + x = string, + ignore.case = opts$ignore_case, + fixed = opts$fixed ) - - # substr treats values as if they're on a continous number line, so values - # 0 are effectively blank characters - set `start` to 1 here so Arrow mimics - # this behavior - if (start <= 0) { - start <- 1 - } - - # if `stop` is lower than `start`, this is invalid, so set `stop` to - # 0 so that an empty string will be returned (consistent with base::substr()) - if (stop < start) { - stop <- 0 + if (negate) { + out <- !out } + out + }) + register_translation("str_like", function(string, pattern, ignore_case = TRUE) { Expression$create( - "utf8_slice_codeunits", - x, - # we don't need to subtract 1 from `stop` as C++ counts exclusively - # which effectively cancels out the difference in indexing between R & C++ - options = list(start = start - 1L, stop = stop) + "match_like", + string, + options = list(pattern = pattern, ignore_case = ignore_case) ) }) - register_translation("substring", function(text, first, last) { - call_translation("substr", x = text, start = first, stop = last) - }) - - register_translation("str_sub", function(string, start = 1L, end = -1L) { - assert_that( - length(start) == 1, - msg = "`start` must be length 1 - other lengths are not supported in Arrow" - ) - assert_that( - length(end) == 1, - msg = "`end` must be length 1 - other lengths are not supported in Arrow" - ) - - # In stringr::str_sub, an `end` value of -1 means the end of the string, so - # set it to the maximum integer to match this behavior - if (end == -1) { - end <- .Machine$integer.max - } - - # An end value lower than a start value returns an empty string in - # stringr::str_sub so set end to 0 here to match this behavior - if (end < start) { - end <- 0 - } - - # subtract 1 from `start` because C++ is 0-based and R is 1-based - # str_sub treats a `start` value of 0 or 1 as the same thing so don't subtract 1 when `start` == 0 - # when `start` < 0, both str_sub and utf8_slice_codeunits count backwards from the end - if (start > 0) { - start <- start - 1L + register_translation("str_count", function(string, pattern) { + opts <- get_stringr_pattern_options(enexpr(pattern)) + if (!is.string(pattern)) { + arrow_not_supported("`pattern` must be a length 1 character vector; other values") } - + arrow_fun <- ifelse(opts$fixed, "count_substring", "count_substring_regex") Expression$create( - "utf8_slice_codeunits", + arrow_fun, string, - options = list(start = start, stop = end) + options = list(pattern = opts$pattern, ignore_case = opts$ignore_case) ) }) - register_translation("grepl", function(pattern, x, ignore.case = FALSE, fixed = FALSE) { - arrow_fun <- ifelse(fixed, "match_substring", "match_substring_regex") + register_translation("startsWith", function(x, prefix) { Expression$create( - arrow_fun, + "starts_with", x, - options = list(pattern = pattern, ignore_case = ignore.case) + options = list(pattern = prefix) ) }) - register_translation("str_detect", function(string, pattern, negate = FALSE) { - opts <- get_stringr_pattern_options(enexpr(pattern)) - out <- call_translation("grepl", - pattern = opts$pattern, - x = string, - ignore.case = opts$ignore_case, - fixed = opts$fixed + register_translation("endsWith", function(x, suffix) { + Expression$create( + "ends_with", + x, + options = list(pattern = suffix) ) + }) + + register_translation("str_starts", function(string, pattern, negate = FALSE) { + opts <- get_stringr_pattern_options(enexpr(pattern)) + if (opts$fixed) { + out <- call_translation("startsWith", x = string, prefix = opts$pattern) + } else { + out <- call_translation("grepl", pattern = paste0("^", opts$pattern), x = string, fixed = FALSE) + } + if (negate) { out <- !out } out }) - register_translation("str_like", function(string, pattern, ignore_case = TRUE) { - Expression$create( - "match_like", - string, - options = list(pattern = pattern, ignore_case = ignore_case) - ) + register_translation("str_ends", function(string, pattern, negate = FALSE) { + opts <- get_stringr_pattern_options(enexpr(pattern)) + if (opts$fixed) { + out <- call_translation("endsWith", x = string, suffix = opts$pattern) + } else { + out <- call_translation("grepl", pattern = paste0(opts$pattern, "$"), x = string, fixed = FALSE) + } + + if (negate) { + out <- !out + } + out }) # Encapsulate some common logic for sub/gsub/str_replace/str_replace_all @@ -364,7 +315,7 @@ register_string_translations <- function() { register_translation("str_replace_all", arrow_stringr_string_replace_function(-1L)) register_translation("strsplit", function(x, split, fixed = FALSE, perl = FALSE, - useBytes = FALSE) { + useBytes = FALSE) { assert_that(is.string(split)) arrow_fun <- ifelse(fixed, "split_pattern", "split_pattern_regex") @@ -411,82 +362,143 @@ register_string_translations <- function() { ) ) }) +} +register_string_other_translations <- function() { - register_translation("str_pad", function(string, width, side = c("left", "right", "both"), pad = " ") { - assert_that(is_integerish(width)) - side <- match.arg(side) - assert_that(is.string(pad)) - - if (side == "left") { - pad_func <- "utf8_lpad" - } else if (side == "right") { - pad_func <- "utf8_rpad" - } else if (side == "both") { - pad_func <- "utf8_center" + register_translation("nchar", function(x, type = "chars", allowNA = FALSE, keepNA = NA) { + if (allowNA) { + arrow_not_supported("allowNA = TRUE") + } + if (is.na(keepNA)) { + keepNA <- !identical(type, "width") } + if (!keepNA) { + # TODO: I think there is a fill_null kernel we could use, set null to 2 + arrow_not_supported("keepNA = TRUE") + } + if (identical(type, "bytes")) { + Expression$create("binary_length", x) + } else { + Expression$create("utf8_length", x) + } + }) - Expression$create( - pad_func, - string, - options = list(width = width, padding = pad) - ) + register_translation("str_to_lower", function(string, locale = "en") { + stop_if_locale_provided(locale) + Expression$create("utf8_lower", string) }) - register_translation("startsWith", function(x, prefix) { - Expression$create( - "starts_with", - x, - options = list(pattern = prefix) + register_translation("str_to_upper", function(string, locale = "en") { + stop_if_locale_provided(locale) + Expression$create("utf8_upper", string) + }) + + register_translation("str_to_title", function(string, locale = "en") { + stop_if_locale_provided(locale) + Expression$create("utf8_title", string) + }) + + register_translation("str_trim", function(string, side = c("both", "left", "right")) { + side <- match.arg(side) + trim_fun <- switch(side, + left = "utf8_ltrim_whitespace", + right = "utf8_rtrim_whitespace", + both = "utf8_trim_whitespace" ) + Expression$create(trim_fun, string) }) - register_translation("endsWith", function(x, suffix) { + register_translation("substr", function(x, start, stop) { + assert_that( + length(start) == 1, + msg = "`start` must be length 1 - other lengths are not supported in Arrow" + ) + assert_that( + length(stop) == 1, + msg = "`stop` must be length 1 - other lengths are not supported in Arrow" + ) + + # substr treats values as if they're on a continous number line, so values + # 0 are effectively blank characters - set `start` to 1 here so Arrow mimics + # this behavior + if (start <= 0) { + start <- 1 + } + + # if `stop` is lower than `start`, this is invalid, so set `stop` to + # 0 so that an empty string will be returned (consistent with base::substr()) + if (stop < start) { + stop <- 0 + } + Expression$create( - "ends_with", + "utf8_slice_codeunits", x, - options = list(pattern = suffix) + # we don't need to subtract 1 from `stop` as C++ counts exclusively + # which effectively cancels out the difference in indexing between R & C++ + options = list(start = start - 1L, stop = stop) ) }) - register_translation("str_starts", function(string, pattern, negate = FALSE) { - opts <- get_stringr_pattern_options(enexpr(pattern)) - if (opts$fixed) { - out <- call_translation("startsWith", x = string, prefix = opts$pattern) - } else { - out <- call_translation("grepl", pattern = paste0("^", opts$pattern), x = string, fixed = FALSE) - } + register_translation("substring", function(text, first, last) { + call_translation("substr", x = text, start = first, stop = last) + }) - if (negate) { - out <- !out + register_translation("str_sub", function(string, start = 1L, end = -1L) { + assert_that( + length(start) == 1, + msg = "`start` must be length 1 - other lengths are not supported in Arrow" + ) + assert_that( + length(end) == 1, + msg = "`end` must be length 1 - other lengths are not supported in Arrow" + ) + + # In stringr::str_sub, an `end` value of -1 means the end of the string, so + # set it to the maximum integer to match this behavior + if (end == -1) { + end <- .Machine$integer.max } - out - }) - register_translation("str_ends", function(string, pattern, negate = FALSE) { - opts <- get_stringr_pattern_options(enexpr(pattern)) - if (opts$fixed) { - out <- call_translation("endsWith", x = string, suffix = opts$pattern) - } else { - out <- call_translation("grepl", pattern = paste0(opts$pattern, "$"), x = string, fixed = FALSE) + # An end value lower than a start value returns an empty string in + # stringr::str_sub so set end to 0 here to match this behavior + if (end < start) { + end <- 0 } - if (negate) { - out <- !out + # subtract 1 from `start` because C++ is 0-based and R is 1-based + # str_sub treats a `start` value of 0 or 1 as the same thing so don't subtract 1 when `start` == 0 + # when `start` < 0, both str_sub and utf8_slice_codeunits count backwards from the end + if (start > 0) { + start <- start - 1L } - out + + Expression$create( + "utf8_slice_codeunits", + string, + options = list(start = start, stop = end) + ) }) - register_translation("str_count", function(string, pattern) { - opts <- get_stringr_pattern_options(enexpr(pattern)) - if (!is.string(pattern)) { - arrow_not_supported("`pattern` must be a length 1 character vector; other values") + + register_translation("str_pad", function(string, width, side = c("left", "right", "both"), pad = " ") { + assert_that(is_integerish(width)) + side <- match.arg(side) + assert_that(is.string(pad)) + + if (side == "left") { + pad_func <- "utf8_lpad" + } else if (side == "right") { + pad_func <- "utf8_rpad" + } else if (side == "both") { + pad_func <- "utf8_center" } - arrow_fun <- ifelse(opts$fixed, "count_substring", "count_substring_regex") + Expression$create( - arrow_fun, + pad_func, string, - options = list(pattern = opts$pattern, ignore_case = opts$ignore_case) + options = list(width = width, padding = pad) ) }) } From 298e69a5bb977532f053b01a807811a6bfc4aab4 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Wed, 8 Dec 2021 21:04:18 -0400 Subject: [PATCH 33/49] split type functions into several chunks to satisfy the linter --- r/R/dplyr-funcs-type.R | 214 ++++++++++++++++++++++------------------- 1 file changed, 113 insertions(+), 101 deletions(-) diff --git a/r/R/dplyr-funcs-type.R b/r/R/dplyr-funcs-type.R index c1853686d170d..2b9e039ab45f4 100644 --- a/r/R/dplyr-funcs-type.R +++ b/r/R/dplyr-funcs-type.R @@ -15,7 +15,14 @@ # specific language governing permissions and limitations # under the License. +# Split up into several register functions by category to satisfy the linter register_type_translations <- function() { + register_type_cast_translations() + register_type_inspect_translations() + register_type_inspect_elementwise_translations() +} + +register_type_cast_translations <- function() { register_translation("cast", function(x, target_type, safe = TRUE, ...) { opts <- cast_options(safe, ...) @@ -23,47 +30,8 @@ register_type_translations <- function() { Expression$create("cast", x, options = opts) }) - register_translation("is.na", function(x) { - build_expr("is_null", x, options = list(nan_is_null = TRUE)) - }) - - register_translation("is.nan", function(x) { - if (is.double(x) || (inherits(x, "Expression") && - x$type_id() %in% TYPES_WITH_NAN)) { - # TODO: if an option is added to the is_nan kernel to treat NA as NaN, - # use that to simplify the code here (ARROW-13366) - build_expr("is_nan", x) & build_expr("is_valid", x) - } else { - Expression$scalar(FALSE) - } - }) - - register_translation("is", function(object, class2) { - if (is.string(class2)) { - switch(class2, - # for R data types, pass off to is.*() functions - character = call_translation("is.character", object), - numeric = call_translation("is.numeric", object), - integer = call_translation("is.integer", object), - integer64 = call_translation("is.integer64", object), - logical = call_translation("is.logical", object), - factor = call_translation("is.factor", object), - list = call_translation("is.list", object), - # for Arrow data types, compare class2 with object$type()$ToString(), - # but first strip off any parameters to only compare the top-level data - # type, and canonicalize class2 - sub("^([^([<]+).*$", "\\1", object$type()$ToString()) == - canonical_type_str(class2) - ) - } else if (inherits(class2, "DataType")) { - object$type() == as_type(class2) - } else { - stop("Second argument to is() is not a string or DataType", call. = FALSE) - } - }) - register_translation("dictionary_encode", function(x, - null_encoding_behavior = c("mask", "encode")) { + null_encoding_behavior = c("mask", "encode")) { behavior <- toupper(match.arg(null_encoding_behavior)) null_encoding_behavior <- NullEncodingBehavior[[behavior]] Expression$create( @@ -73,22 +41,6 @@ register_type_translations <- function() { ) }) - register_translation("between", function(x, left, right) { - x >= left & x <= right - }) - - register_translation("is.finite", function(x) { - is_fin <- Expression$create("is_finite", x) - # for compatibility with base::is.finite(), return FALSE for NA_real_ - is_fin & !call_translation("is.na", is_fin) - }) - - register_translation("is.infinite", function(x) { - is_inf <- Expression$create("is_inf", x) - # for compatibility with base::is.infinite(), return FALSE for NA_real_ - is_inf & !call_translation("is.na", is_inf) - }) - # as.* type casting functions # as.factor() is mapped in expression.R register_translation("as.character", function(x) { @@ -126,6 +78,86 @@ register_type_translations <- function() { Expression$create("cast", x, options = cast_options(to_type = float64())) }) + register_translation("is", function(object, class2) { + if (is.string(class2)) { + switch(class2, + # for R data types, pass off to is.*() functions + character = call_translation("is.character", object), + numeric = call_translation("is.numeric", object), + integer = call_translation("is.integer", object), + integer64 = call_translation("is.integer64", object), + logical = call_translation("is.logical", object), + factor = call_translation("is.factor", object), + list = call_translation("is.list", object), + # for Arrow data types, compare class2 with object$type()$ToString(), + # but first strip off any parameters to only compare the top-level data + # type, and canonicalize class2 + sub("^([^([<]+).*$", "\\1", object$type()$ToString()) == + canonical_type_str(class2) + ) + } else if (inherits(class2, "DataType")) { + object$type() == as_type(class2) + } else { + stop("Second argument to is() is not a string or DataType", call. = FALSE) + } + }) + + # Create a data frame/tibble/struct column + register_translation("tibble", function(..., .rows = NULL, .name_repair = NULL) { + if (!is.null(.rows)) arrow_not_supported(".rows") + if (!is.null(.name_repair)) arrow_not_supported(".name_repair") + + # use dots_list() because this is what tibble() uses to allow the + # useful shorthand of tibble(col1, col2) -> tibble(col1 = col1, col2 = col2) + # we have a stronger enforcement of unique names for arguments because + # it is difficult to replicate the .name_repair semantics and expanding of + # unnamed data frame arguments in the same way that the tibble() constructor + # does. + args <- rlang::dots_list(..., .named = TRUE, .homonyms = "error") + + build_expr( + "make_struct", + args = unname(args), + options = list(field_names = names(args)) + ) + }) + + register_translation("data.frame", function(..., row.names = NULL, + check.rows = NULL, check.names = TRUE, fix.empty.names = TRUE, + stringsAsFactors = FALSE) { + # we need a specific value of stringsAsFactors because the default was + # TRUE in R <= 3.6 + if (!identical(stringsAsFactors, FALSE)) { + arrow_not_supported("stringsAsFactors = TRUE") + } + + # ignore row.names and check.rows with a warning + if (!is.null(row.names)) arrow_not_supported("row.names") + if (!is.null(check.rows)) arrow_not_supported("check.rows") + + args <- rlang::dots_list(..., .named = fix.empty.names) + if (is.null(names(args))) { + names(args) <- rep("", length(args)) + } + + if (identical(check.names, TRUE)) { + if (identical(fix.empty.names, TRUE)) { + names(args) <- make.names(names(args), unique = TRUE) + } else { + name_emtpy <- names(args) == "" + names(args)[!name_emtpy] <- make.names(names(args)[!name_emtpy], unique = TRUE) + } + } + + build_expr( + "make_struct", + args = unname(args), + options = list(field_names = names(args)) + ) + }) +} + +register_type_inspect_translations <- function() { # is.* type functions register_translation("is.character", function(x) { is.character(x) || (inherits(x, "Expression") && @@ -183,58 +215,38 @@ register_type_translations <- function() { assert_that(is.null(n)) call_translation("is.logical", x) }) +} - # Create a data frame/tibble/struct column - register_translation("tibble", function(..., .rows = NULL, .name_repair = NULL) { - if (!is.null(.rows)) arrow_not_supported(".rows") - if (!is.null(.name_repair)) arrow_not_supported(".name_repair") - - # use dots_list() because this is what tibble() uses to allow the - # useful shorthand of tibble(col1, col2) -> tibble(col1 = col1, col2 = col2) - # we have a stronger enforcement of unique names for arguments because - # it is difficult to replicate the .name_repair semantics and expanding of - # unnamed data frame arguments in the same way that the tibble() constructor - # does. - args <- rlang::dots_list(..., .named = TRUE, .homonyms = "error") +register_type_inspect_elementwise_translations <- function() { - build_expr( - "make_struct", - args = unname(args), - options = list(field_names = names(args)) - ) + register_translation("is.na", function(x) { + build_expr("is_null", x, options = list(nan_is_null = TRUE)) }) - register_translation("data.frame", function(..., row.names = NULL, - check.rows = NULL, check.names = TRUE, fix.empty.names = TRUE, - stringsAsFactors = FALSE) { - # we need a specific value of stringsAsFactors because the default was - # TRUE in R <= 3.6 - if (!identical(stringsAsFactors, FALSE)) { - arrow_not_supported("stringsAsFactors = TRUE") + register_translation("is.nan", function(x) { + if (is.double(x) || (inherits(x, "Expression") && + x$type_id() %in% TYPES_WITH_NAN)) { + # TODO: if an option is added to the is_nan kernel to treat NA as NaN, + # use that to simplify the code here (ARROW-13366) + build_expr("is_nan", x) & build_expr("is_valid", x) + } else { + Expression$scalar(FALSE) } + }) - # ignore row.names and check.rows with a warning - if (!is.null(row.names)) arrow_not_supported("row.names") - if (!is.null(check.rows)) arrow_not_supported("check.rows") - - args <- rlang::dots_list(..., .named = fix.empty.names) - if (is.null(names(args))) { - names(args) <- rep("", length(args)) - } + register_translation("between", function(x, left, right) { + x >= left & x <= right + }) - if (identical(check.names, TRUE)) { - if (identical(fix.empty.names, TRUE)) { - names(args) <- make.names(names(args), unique = TRUE) - } else { - name_emtpy <- names(args) == "" - names(args)[!name_emtpy] <- make.names(names(args)[!name_emtpy], unique = TRUE) - } - } + register_translation("is.finite", function(x) { + is_fin <- Expression$create("is_finite", x) + # for compatibility with base::is.finite(), return FALSE for NA_real_ + is_fin & !call_translation("is.na", is_fin) + }) - build_expr( - "make_struct", - args = unname(args), - options = list(field_names = names(args)) - ) + register_translation("is.infinite", function(x) { + is_inf <- Expression$create("is_inf", x) + # for compatibility with base::is.infinite(), return FALSE for NA_real_ + is_inf & !call_translation("is.na", is_inf) }) } From 16baf9180494a2765729690518f8fe0addb1ae29 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Thu, 9 Dec 2021 09:03:35 -0400 Subject: [PATCH 34/49] fix lint on dplyr-funcs-type.R --- r/R/dplyr-funcs-type.R | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/r/R/dplyr-funcs-type.R b/r/R/dplyr-funcs-type.R index 2b9e039ab45f4..bf76935418757 100644 --- a/r/R/dplyr-funcs-type.R +++ b/r/R/dplyr-funcs-type.R @@ -19,7 +19,7 @@ register_type_translations <- function() { register_type_cast_translations() register_type_inspect_translations() - register_type_inspect_elementwise_translations() + register_type_elementwise_translations() } register_type_cast_translations <- function() { @@ -81,19 +81,19 @@ register_type_cast_translations <- function() { register_translation("is", function(object, class2) { if (is.string(class2)) { switch(class2, - # for R data types, pass off to is.*() functions - character = call_translation("is.character", object), - numeric = call_translation("is.numeric", object), - integer = call_translation("is.integer", object), - integer64 = call_translation("is.integer64", object), - logical = call_translation("is.logical", object), - factor = call_translation("is.factor", object), - list = call_translation("is.list", object), - # for Arrow data types, compare class2 with object$type()$ToString(), - # but first strip off any parameters to only compare the top-level data - # type, and canonicalize class2 - sub("^([^([<]+).*$", "\\1", object$type()$ToString()) == - canonical_type_str(class2) + # for R data types, pass off to is.*() functions + character = call_translation("is.character", object), + numeric = call_translation("is.numeric", object), + integer = call_translation("is.integer", object), + integer64 = call_translation("is.integer64", object), + logical = call_translation("is.logical", object), + factor = call_translation("is.factor", object), + list = call_translation("is.list", object), + # for Arrow data types, compare class2 with object$type()$ToString(), + # but first strip off any parameters to only compare the top-level data + # type, and canonicalize class2 + sub("^([^([<]+).*$", "\\1", object$type()$ToString()) == + canonical_type_str(class2) ) } else if (inherits(class2, "DataType")) { object$type() == as_type(class2) @@ -217,7 +217,7 @@ register_type_inspect_translations <- function() { }) } -register_type_inspect_elementwise_translations <- function() { +register_type_elementwise_translations <- function() { register_translation("is.na", function(x) { build_expr("is_null", x, options = list(nan_is_null = TRUE)) From 344b9864c328eb63ffc32969d1b565ae14b3e017 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Thu, 9 Dec 2021 16:09:40 -0400 Subject: [PATCH 35/49] fix arrowExports.cpp --- r/src/arrowExports.cpp | 7248 ++++++++++++++++++++-------------------- 1 file changed, 3624 insertions(+), 3624 deletions(-) diff --git a/r/src/arrowExports.cpp b/r/src/arrowExports.cpp index 527db478afb6c..ef388b0920818 100644 --- a/r/src/arrowExports.cpp +++ b/r/src/arrowExports.cpp @@ -5,8 +5,8 @@ #include "./arrow_types.h" // altrep.cpp - #if defined(ARROW_R_WITH_ARROW) - void test_SET_STRING_ELT(SEXP s); +#if defined(ARROW_R_WITH_ARROW) +void test_SET_STRING_ELT(SEXP s); extern "C" SEXP _arrow_test_SET_STRING_ELT(SEXP s_sexp){ BEGIN_CPP11 arrow::r::Input::type s(s_sexp); @@ -14,30 +14,30 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_test_SET_STRING_ELT(SEXP s_sexp){ - Rf_error("Cannot call test_SET_STRING_ELT(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_test_SET_STRING_ELT(SEXP s_sexp){ + Rf_error("Cannot call test_SET_STRING_ELT(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // altrep.cpp - #if defined(ARROW_R_WITH_ARROW) - bool is_arrow_altrep(SEXP x); +#if defined(ARROW_R_WITH_ARROW) +bool is_arrow_altrep(SEXP x); extern "C" SEXP _arrow_is_arrow_altrep(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input::type x(x_sexp); return cpp11::as_sexp(is_arrow_altrep(x)); END_CPP11 } - #else - extern "C" SEXP _arrow_is_arrow_altrep(SEXP x_sexp){ - Rf_error("Cannot call is_arrow_altrep(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_is_arrow_altrep(SEXP x_sexp){ + Rf_error("Cannot call is_arrow_altrep(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // array.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr Array__Slice1(const std::shared_ptr& array, R_xlen_t offset); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr Array__Slice1(const std::shared_ptr& array, R_xlen_t offset); extern "C" SEXP _arrow_Array__Slice1(SEXP array_sexp, SEXP offset_sexp){ BEGIN_CPP11 arrow::r::Input&>::type array(array_sexp); @@ -45,15 +45,15 @@ BEGIN_CPP11 return cpp11::as_sexp(Array__Slice1(array, offset)); END_CPP11 } - #else - extern "C" SEXP _arrow_Array__Slice1(SEXP array_sexp, SEXP offset_sexp){ - Rf_error("Cannot call Array__Slice1(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Array__Slice1(SEXP array_sexp, SEXP offset_sexp){ + Rf_error("Cannot call Array__Slice1(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // array.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr Array__Slice2(const std::shared_ptr& array, R_xlen_t offset, R_xlen_t length); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr Array__Slice2(const std::shared_ptr& array, R_xlen_t offset, R_xlen_t length); extern "C" SEXP _arrow_Array__Slice2(SEXP array_sexp, SEXP offset_sexp, SEXP length_sexp){ BEGIN_CPP11 arrow::r::Input&>::type array(array_sexp); @@ -62,15 +62,15 @@ BEGIN_CPP11 return cpp11::as_sexp(Array__Slice2(array, offset, length)); END_CPP11 } - #else - extern "C" SEXP _arrow_Array__Slice2(SEXP array_sexp, SEXP offset_sexp, SEXP length_sexp){ - Rf_error("Cannot call Array__Slice2(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Array__Slice2(SEXP array_sexp, SEXP offset_sexp, SEXP length_sexp){ + Rf_error("Cannot call Array__Slice2(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // array.cpp - #if defined(ARROW_R_WITH_ARROW) - bool Array__IsNull(const std::shared_ptr& x, R_xlen_t i); +#if defined(ARROW_R_WITH_ARROW) +bool Array__IsNull(const std::shared_ptr& x, R_xlen_t i); extern "C" SEXP _arrow_Array__IsNull(SEXP x_sexp, SEXP i_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); @@ -78,15 +78,15 @@ BEGIN_CPP11 return cpp11::as_sexp(Array__IsNull(x, i)); END_CPP11 } - #else - extern "C" SEXP _arrow_Array__IsNull(SEXP x_sexp, SEXP i_sexp){ - Rf_error("Cannot call Array__IsNull(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Array__IsNull(SEXP x_sexp, SEXP i_sexp){ + Rf_error("Cannot call Array__IsNull(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // array.cpp - #if defined(ARROW_R_WITH_ARROW) - bool Array__IsValid(const std::shared_ptr& x, R_xlen_t i); +#if defined(ARROW_R_WITH_ARROW) +bool Array__IsValid(const std::shared_ptr& x, R_xlen_t i); extern "C" SEXP _arrow_Array__IsValid(SEXP x_sexp, SEXP i_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); @@ -94,105 +94,105 @@ BEGIN_CPP11 return cpp11::as_sexp(Array__IsValid(x, i)); END_CPP11 } - #else - extern "C" SEXP _arrow_Array__IsValid(SEXP x_sexp, SEXP i_sexp){ - Rf_error("Cannot call Array__IsValid(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Array__IsValid(SEXP x_sexp, SEXP i_sexp){ + Rf_error("Cannot call Array__IsValid(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // array.cpp - #if defined(ARROW_R_WITH_ARROW) - int Array__length(const std::shared_ptr& x); +#if defined(ARROW_R_WITH_ARROW) +int Array__length(const std::shared_ptr& x); extern "C" SEXP _arrow_Array__length(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(Array__length(x)); END_CPP11 } - #else - extern "C" SEXP _arrow_Array__length(SEXP x_sexp){ - Rf_error("Cannot call Array__length(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Array__length(SEXP x_sexp){ + Rf_error("Cannot call Array__length(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // array.cpp - #if defined(ARROW_R_WITH_ARROW) - int Array__offset(const std::shared_ptr& x); +#if defined(ARROW_R_WITH_ARROW) +int Array__offset(const std::shared_ptr& x); extern "C" SEXP _arrow_Array__offset(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(Array__offset(x)); END_CPP11 } - #else - extern "C" SEXP _arrow_Array__offset(SEXP x_sexp){ - Rf_error("Cannot call Array__offset(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Array__offset(SEXP x_sexp){ + Rf_error("Cannot call Array__offset(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // array.cpp - #if defined(ARROW_R_WITH_ARROW) - int Array__null_count(const std::shared_ptr& x); +#if defined(ARROW_R_WITH_ARROW) +int Array__null_count(const std::shared_ptr& x); extern "C" SEXP _arrow_Array__null_count(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(Array__null_count(x)); END_CPP11 } - #else - extern "C" SEXP _arrow_Array__null_count(SEXP x_sexp){ - Rf_error("Cannot call Array__null_count(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Array__null_count(SEXP x_sexp){ + Rf_error("Cannot call Array__null_count(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // array.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr Array__type(const std::shared_ptr& x); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr Array__type(const std::shared_ptr& x); extern "C" SEXP _arrow_Array__type(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(Array__type(x)); END_CPP11 } - #else - extern "C" SEXP _arrow_Array__type(SEXP x_sexp){ - Rf_error("Cannot call Array__type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Array__type(SEXP x_sexp){ + Rf_error("Cannot call Array__type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // array.cpp - #if defined(ARROW_R_WITH_ARROW) - std::string Array__ToString(const std::shared_ptr& x); +#if defined(ARROW_R_WITH_ARROW) +std::string Array__ToString(const std::shared_ptr& x); extern "C" SEXP _arrow_Array__ToString(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(Array__ToString(x)); END_CPP11 } - #else - extern "C" SEXP _arrow_Array__ToString(SEXP x_sexp){ - Rf_error("Cannot call Array__ToString(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Array__ToString(SEXP x_sexp){ + Rf_error("Cannot call Array__ToString(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // array.cpp - #if defined(ARROW_R_WITH_ARROW) - arrow::Type::type Array__type_id(const std::shared_ptr& x); +#if defined(ARROW_R_WITH_ARROW) +arrow::Type::type Array__type_id(const std::shared_ptr& x); extern "C" SEXP _arrow_Array__type_id(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(Array__type_id(x)); END_CPP11 } - #else - extern "C" SEXP _arrow_Array__type_id(SEXP x_sexp){ - Rf_error("Cannot call Array__type_id(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Array__type_id(SEXP x_sexp){ + Rf_error("Cannot call Array__type_id(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // array.cpp - #if defined(ARROW_R_WITH_ARROW) - bool Array__Equals(const std::shared_ptr& lhs, const std::shared_ptr& rhs); +#if defined(ARROW_R_WITH_ARROW) +bool Array__Equals(const std::shared_ptr& lhs, const std::shared_ptr& rhs); extern "C" SEXP _arrow_Array__Equals(SEXP lhs_sexp, SEXP rhs_sexp){ BEGIN_CPP11 arrow::r::Input&>::type lhs(lhs_sexp); @@ -200,15 +200,15 @@ BEGIN_CPP11 return cpp11::as_sexp(Array__Equals(lhs, rhs)); END_CPP11 } - #else - extern "C" SEXP _arrow_Array__Equals(SEXP lhs_sexp, SEXP rhs_sexp){ - Rf_error("Cannot call Array__Equals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Array__Equals(SEXP lhs_sexp, SEXP rhs_sexp){ + Rf_error("Cannot call Array__Equals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // array.cpp - #if defined(ARROW_R_WITH_ARROW) - bool Array__ApproxEquals(const std::shared_ptr& lhs, const std::shared_ptr& rhs); +#if defined(ARROW_R_WITH_ARROW) +bool Array__ApproxEquals(const std::shared_ptr& lhs, const std::shared_ptr& rhs); extern "C" SEXP _arrow_Array__ApproxEquals(SEXP lhs_sexp, SEXP rhs_sexp){ BEGIN_CPP11 arrow::r::Input&>::type lhs(lhs_sexp); @@ -216,15 +216,15 @@ BEGIN_CPP11 return cpp11::as_sexp(Array__ApproxEquals(lhs, rhs)); END_CPP11 } - #else - extern "C" SEXP _arrow_Array__ApproxEquals(SEXP lhs_sexp, SEXP rhs_sexp){ - Rf_error("Cannot call Array__ApproxEquals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Array__ApproxEquals(SEXP lhs_sexp, SEXP rhs_sexp){ + Rf_error("Cannot call Array__ApproxEquals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // array.cpp - #if defined(ARROW_R_WITH_ARROW) - std::string Array__Diff(const std::shared_ptr& lhs, const std::shared_ptr& rhs); +#if defined(ARROW_R_WITH_ARROW) +std::string Array__Diff(const std::shared_ptr& lhs, const std::shared_ptr& rhs); extern "C" SEXP _arrow_Array__Diff(SEXP lhs_sexp, SEXP rhs_sexp){ BEGIN_CPP11 arrow::r::Input&>::type lhs(lhs_sexp); @@ -232,30 +232,30 @@ BEGIN_CPP11 return cpp11::as_sexp(Array__Diff(lhs, rhs)); END_CPP11 } - #else - extern "C" SEXP _arrow_Array__Diff(SEXP lhs_sexp, SEXP rhs_sexp){ - Rf_error("Cannot call Array__Diff(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Array__Diff(SEXP lhs_sexp, SEXP rhs_sexp){ + Rf_error("Cannot call Array__Diff(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // array.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr Array__data(const std::shared_ptr& array); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr Array__data(const std::shared_ptr& array); extern "C" SEXP _arrow_Array__data(SEXP array_sexp){ BEGIN_CPP11 arrow::r::Input&>::type array(array_sexp); return cpp11::as_sexp(Array__data(array)); END_CPP11 } - #else - extern "C" SEXP _arrow_Array__data(SEXP array_sexp){ - Rf_error("Cannot call Array__data(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Array__data(SEXP array_sexp){ + Rf_error("Cannot call Array__data(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // array.cpp - #if defined(ARROW_R_WITH_ARROW) - bool Array__RangeEquals(const std::shared_ptr& self, const std::shared_ptr& other, R_xlen_t start_idx, R_xlen_t end_idx, R_xlen_t other_start_idx); +#if defined(ARROW_R_WITH_ARROW) +bool Array__RangeEquals(const std::shared_ptr& self, const std::shared_ptr& other, R_xlen_t start_idx, R_xlen_t end_idx, R_xlen_t other_start_idx); extern "C" SEXP _arrow_Array__RangeEquals(SEXP self_sexp, SEXP other_sexp, SEXP start_idx_sexp, SEXP end_idx_sexp, SEXP other_start_idx_sexp){ BEGIN_CPP11 arrow::r::Input&>::type self(self_sexp); @@ -266,15 +266,15 @@ BEGIN_CPP11 return cpp11::as_sexp(Array__RangeEquals(self, other, start_idx, end_idx, other_start_idx)); END_CPP11 } - #else - extern "C" SEXP _arrow_Array__RangeEquals(SEXP self_sexp, SEXP other_sexp, SEXP start_idx_sexp, SEXP end_idx_sexp, SEXP other_start_idx_sexp){ - Rf_error("Cannot call Array__RangeEquals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Array__RangeEquals(SEXP self_sexp, SEXP other_sexp, SEXP start_idx_sexp, SEXP end_idx_sexp, SEXP other_start_idx_sexp){ + Rf_error("Cannot call Array__RangeEquals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // array.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr Array__View(const std::shared_ptr& array, const std::shared_ptr& type); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr Array__View(const std::shared_ptr& array, const std::shared_ptr& type); extern "C" SEXP _arrow_Array__View(SEXP array_sexp, SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type array(array_sexp); @@ -282,15 +282,15 @@ BEGIN_CPP11 return cpp11::as_sexp(Array__View(array, type)); END_CPP11 } - #else - extern "C" SEXP _arrow_Array__View(SEXP array_sexp, SEXP type_sexp){ - Rf_error("Cannot call Array__View(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Array__View(SEXP array_sexp, SEXP type_sexp){ + Rf_error("Cannot call Array__View(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // array.cpp - #if defined(ARROW_R_WITH_ARROW) - void Array__Validate(const std::shared_ptr& array); +#if defined(ARROW_R_WITH_ARROW) +void Array__Validate(const std::shared_ptr& array); extern "C" SEXP _arrow_Array__Validate(SEXP array_sexp){ BEGIN_CPP11 arrow::r::Input&>::type array(array_sexp); @@ -298,45 +298,45 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_Array__Validate(SEXP array_sexp){ - Rf_error("Cannot call Array__Validate(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Array__Validate(SEXP array_sexp){ + Rf_error("Cannot call Array__Validate(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // array.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr DictionaryArray__indices(const std::shared_ptr& array); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr DictionaryArray__indices(const std::shared_ptr& array); extern "C" SEXP _arrow_DictionaryArray__indices(SEXP array_sexp){ BEGIN_CPP11 arrow::r::Input&>::type array(array_sexp); return cpp11::as_sexp(DictionaryArray__indices(array)); END_CPP11 } - #else - extern "C" SEXP _arrow_DictionaryArray__indices(SEXP array_sexp){ - Rf_error("Cannot call DictionaryArray__indices(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_DictionaryArray__indices(SEXP array_sexp){ + Rf_error("Cannot call DictionaryArray__indices(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // array.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr DictionaryArray__dictionary(const std::shared_ptr& array); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr DictionaryArray__dictionary(const std::shared_ptr& array); extern "C" SEXP _arrow_DictionaryArray__dictionary(SEXP array_sexp){ BEGIN_CPP11 arrow::r::Input&>::type array(array_sexp); return cpp11::as_sexp(DictionaryArray__dictionary(array)); END_CPP11 } - #else - extern "C" SEXP _arrow_DictionaryArray__dictionary(SEXP array_sexp){ - Rf_error("Cannot call DictionaryArray__dictionary(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_DictionaryArray__dictionary(SEXP array_sexp){ + Rf_error("Cannot call DictionaryArray__dictionary(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // array.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr StructArray__field(const std::shared_ptr& array, int i); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr StructArray__field(const std::shared_ptr& array, int i); extern "C" SEXP _arrow_StructArray__field(SEXP array_sexp, SEXP i_sexp){ BEGIN_CPP11 arrow::r::Input&>::type array(array_sexp); @@ -344,15 +344,15 @@ BEGIN_CPP11 return cpp11::as_sexp(StructArray__field(array, i)); END_CPP11 } - #else - extern "C" SEXP _arrow_StructArray__field(SEXP array_sexp, SEXP i_sexp){ - Rf_error("Cannot call StructArray__field(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_StructArray__field(SEXP array_sexp, SEXP i_sexp){ + Rf_error("Cannot call StructArray__field(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // array.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr StructArray__GetFieldByName(const std::shared_ptr& array, const std::string& name); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr StructArray__GetFieldByName(const std::shared_ptr& array, const std::string& name); extern "C" SEXP _arrow_StructArray__GetFieldByName(SEXP array_sexp, SEXP name_sexp){ BEGIN_CPP11 arrow::r::Input&>::type array(array_sexp); @@ -360,90 +360,90 @@ BEGIN_CPP11 return cpp11::as_sexp(StructArray__GetFieldByName(array, name)); END_CPP11 } - #else - extern "C" SEXP _arrow_StructArray__GetFieldByName(SEXP array_sexp, SEXP name_sexp){ - Rf_error("Cannot call StructArray__GetFieldByName(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_StructArray__GetFieldByName(SEXP array_sexp, SEXP name_sexp){ + Rf_error("Cannot call StructArray__GetFieldByName(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // array.cpp - #if defined(ARROW_R_WITH_ARROW) - cpp11::list StructArray__Flatten(const std::shared_ptr& array); +#if defined(ARROW_R_WITH_ARROW) +cpp11::list StructArray__Flatten(const std::shared_ptr& array); extern "C" SEXP _arrow_StructArray__Flatten(SEXP array_sexp){ BEGIN_CPP11 arrow::r::Input&>::type array(array_sexp); return cpp11::as_sexp(StructArray__Flatten(array)); END_CPP11 } - #else - extern "C" SEXP _arrow_StructArray__Flatten(SEXP array_sexp){ - Rf_error("Cannot call StructArray__Flatten(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_StructArray__Flatten(SEXP array_sexp){ + Rf_error("Cannot call StructArray__Flatten(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // array.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr ListArray__value_type(const std::shared_ptr& array); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr ListArray__value_type(const std::shared_ptr& array); extern "C" SEXP _arrow_ListArray__value_type(SEXP array_sexp){ BEGIN_CPP11 arrow::r::Input&>::type array(array_sexp); return cpp11::as_sexp(ListArray__value_type(array)); END_CPP11 } - #else - extern "C" SEXP _arrow_ListArray__value_type(SEXP array_sexp){ - Rf_error("Cannot call ListArray__value_type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ListArray__value_type(SEXP array_sexp){ + Rf_error("Cannot call ListArray__value_type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // array.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr LargeListArray__value_type(const std::shared_ptr& array); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr LargeListArray__value_type(const std::shared_ptr& array); extern "C" SEXP _arrow_LargeListArray__value_type(SEXP array_sexp){ BEGIN_CPP11 arrow::r::Input&>::type array(array_sexp); return cpp11::as_sexp(LargeListArray__value_type(array)); END_CPP11 } - #else - extern "C" SEXP _arrow_LargeListArray__value_type(SEXP array_sexp){ - Rf_error("Cannot call LargeListArray__value_type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_LargeListArray__value_type(SEXP array_sexp){ + Rf_error("Cannot call LargeListArray__value_type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // array.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr ListArray__values(const std::shared_ptr& array); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr ListArray__values(const std::shared_ptr& array); extern "C" SEXP _arrow_ListArray__values(SEXP array_sexp){ BEGIN_CPP11 arrow::r::Input&>::type array(array_sexp); return cpp11::as_sexp(ListArray__values(array)); END_CPP11 } - #else - extern "C" SEXP _arrow_ListArray__values(SEXP array_sexp){ - Rf_error("Cannot call ListArray__values(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ListArray__values(SEXP array_sexp){ + Rf_error("Cannot call ListArray__values(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // array.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr LargeListArray__values(const std::shared_ptr& array); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr LargeListArray__values(const std::shared_ptr& array); extern "C" SEXP _arrow_LargeListArray__values(SEXP array_sexp){ BEGIN_CPP11 arrow::r::Input&>::type array(array_sexp); return cpp11::as_sexp(LargeListArray__values(array)); END_CPP11 } - #else - extern "C" SEXP _arrow_LargeListArray__values(SEXP array_sexp){ - Rf_error("Cannot call LargeListArray__values(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_LargeListArray__values(SEXP array_sexp){ + Rf_error("Cannot call LargeListArray__values(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // array.cpp - #if defined(ARROW_R_WITH_ARROW) - int32_t ListArray__value_length(const std::shared_ptr& array, int64_t i); +#if defined(ARROW_R_WITH_ARROW) +int32_t ListArray__value_length(const std::shared_ptr& array, int64_t i); extern "C" SEXP _arrow_ListArray__value_length(SEXP array_sexp, SEXP i_sexp){ BEGIN_CPP11 arrow::r::Input&>::type array(array_sexp); @@ -451,15 +451,15 @@ BEGIN_CPP11 return cpp11::as_sexp(ListArray__value_length(array, i)); END_CPP11 } - #else - extern "C" SEXP _arrow_ListArray__value_length(SEXP array_sexp, SEXP i_sexp){ - Rf_error("Cannot call ListArray__value_length(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ListArray__value_length(SEXP array_sexp, SEXP i_sexp){ + Rf_error("Cannot call ListArray__value_length(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // array.cpp - #if defined(ARROW_R_WITH_ARROW) - int64_t LargeListArray__value_length(const std::shared_ptr& array, int64_t i); +#if defined(ARROW_R_WITH_ARROW) +int64_t LargeListArray__value_length(const std::shared_ptr& array, int64_t i); extern "C" SEXP _arrow_LargeListArray__value_length(SEXP array_sexp, SEXP i_sexp){ BEGIN_CPP11 arrow::r::Input&>::type array(array_sexp); @@ -467,15 +467,15 @@ BEGIN_CPP11 return cpp11::as_sexp(LargeListArray__value_length(array, i)); END_CPP11 } - #else - extern "C" SEXP _arrow_LargeListArray__value_length(SEXP array_sexp, SEXP i_sexp){ - Rf_error("Cannot call LargeListArray__value_length(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_LargeListArray__value_length(SEXP array_sexp, SEXP i_sexp){ + Rf_error("Cannot call LargeListArray__value_length(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // array.cpp - #if defined(ARROW_R_WITH_ARROW) - int64_t FixedSizeListArray__value_length(const std::shared_ptr& array, int64_t i); +#if defined(ARROW_R_WITH_ARROW) +int64_t FixedSizeListArray__value_length(const std::shared_ptr& array, int64_t i); extern "C" SEXP _arrow_FixedSizeListArray__value_length(SEXP array_sexp, SEXP i_sexp){ BEGIN_CPP11 arrow::r::Input&>::type array(array_sexp); @@ -483,15 +483,15 @@ BEGIN_CPP11 return cpp11::as_sexp(FixedSizeListArray__value_length(array, i)); END_CPP11 } - #else - extern "C" SEXP _arrow_FixedSizeListArray__value_length(SEXP array_sexp, SEXP i_sexp){ - Rf_error("Cannot call FixedSizeListArray__value_length(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_FixedSizeListArray__value_length(SEXP array_sexp, SEXP i_sexp){ + Rf_error("Cannot call FixedSizeListArray__value_length(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // array.cpp - #if defined(ARROW_R_WITH_ARROW) - int32_t ListArray__value_offset(const std::shared_ptr& array, int64_t i); +#if defined(ARROW_R_WITH_ARROW) +int32_t ListArray__value_offset(const std::shared_ptr& array, int64_t i); extern "C" SEXP _arrow_ListArray__value_offset(SEXP array_sexp, SEXP i_sexp){ BEGIN_CPP11 arrow::r::Input&>::type array(array_sexp); @@ -499,15 +499,15 @@ BEGIN_CPP11 return cpp11::as_sexp(ListArray__value_offset(array, i)); END_CPP11 } - #else - extern "C" SEXP _arrow_ListArray__value_offset(SEXP array_sexp, SEXP i_sexp){ - Rf_error("Cannot call ListArray__value_offset(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ListArray__value_offset(SEXP array_sexp, SEXP i_sexp){ + Rf_error("Cannot call ListArray__value_offset(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // array.cpp - #if defined(ARROW_R_WITH_ARROW) - int64_t LargeListArray__value_offset(const std::shared_ptr& array, int64_t i); +#if defined(ARROW_R_WITH_ARROW) +int64_t LargeListArray__value_offset(const std::shared_ptr& array, int64_t i); extern "C" SEXP _arrow_LargeListArray__value_offset(SEXP array_sexp, SEXP i_sexp){ BEGIN_CPP11 arrow::r::Input&>::type array(array_sexp); @@ -515,15 +515,15 @@ BEGIN_CPP11 return cpp11::as_sexp(LargeListArray__value_offset(array, i)); END_CPP11 } - #else - extern "C" SEXP _arrow_LargeListArray__value_offset(SEXP array_sexp, SEXP i_sexp){ - Rf_error("Cannot call LargeListArray__value_offset(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_LargeListArray__value_offset(SEXP array_sexp, SEXP i_sexp){ + Rf_error("Cannot call LargeListArray__value_offset(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // array.cpp - #if defined(ARROW_R_WITH_ARROW) - int64_t FixedSizeListArray__value_offset(const std::shared_ptr& array, int64_t i); +#if defined(ARROW_R_WITH_ARROW) +int64_t FixedSizeListArray__value_offset(const std::shared_ptr& array, int64_t i); extern "C" SEXP _arrow_FixedSizeListArray__value_offset(SEXP array_sexp, SEXP i_sexp){ BEGIN_CPP11 arrow::r::Input&>::type array(array_sexp); @@ -531,45 +531,45 @@ BEGIN_CPP11 return cpp11::as_sexp(FixedSizeListArray__value_offset(array, i)); END_CPP11 } - #else - extern "C" SEXP _arrow_FixedSizeListArray__value_offset(SEXP array_sexp, SEXP i_sexp){ - Rf_error("Cannot call FixedSizeListArray__value_offset(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_FixedSizeListArray__value_offset(SEXP array_sexp, SEXP i_sexp){ + Rf_error("Cannot call FixedSizeListArray__value_offset(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // array.cpp - #if defined(ARROW_R_WITH_ARROW) - cpp11::writable::integers ListArray__raw_value_offsets(const std::shared_ptr& array); +#if defined(ARROW_R_WITH_ARROW) +cpp11::writable::integers ListArray__raw_value_offsets(const std::shared_ptr& array); extern "C" SEXP _arrow_ListArray__raw_value_offsets(SEXP array_sexp){ BEGIN_CPP11 arrow::r::Input&>::type array(array_sexp); return cpp11::as_sexp(ListArray__raw_value_offsets(array)); END_CPP11 } - #else - extern "C" SEXP _arrow_ListArray__raw_value_offsets(SEXP array_sexp){ - Rf_error("Cannot call ListArray__raw_value_offsets(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ListArray__raw_value_offsets(SEXP array_sexp){ + Rf_error("Cannot call ListArray__raw_value_offsets(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // array.cpp - #if defined(ARROW_R_WITH_ARROW) - cpp11::writable::integers LargeListArray__raw_value_offsets(const std::shared_ptr& array); +#if defined(ARROW_R_WITH_ARROW) +cpp11::writable::integers LargeListArray__raw_value_offsets(const std::shared_ptr& array); extern "C" SEXP _arrow_LargeListArray__raw_value_offsets(SEXP array_sexp){ BEGIN_CPP11 arrow::r::Input&>::type array(array_sexp); return cpp11::as_sexp(LargeListArray__raw_value_offsets(array)); END_CPP11 } - #else - extern "C" SEXP _arrow_LargeListArray__raw_value_offsets(SEXP array_sexp){ - Rf_error("Cannot call LargeListArray__raw_value_offsets(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_LargeListArray__raw_value_offsets(SEXP array_sexp){ + Rf_error("Cannot call LargeListArray__raw_value_offsets(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // array.cpp - #if defined(ARROW_R_WITH_ARROW) - bool Array__Same(const std::shared_ptr& x, const std::shared_ptr& y); +#if defined(ARROW_R_WITH_ARROW) +bool Array__Same(const std::shared_ptr& x, const std::shared_ptr& y); extern "C" SEXP _arrow_Array__Same(SEXP x_sexp, SEXP y_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); @@ -577,30 +577,30 @@ BEGIN_CPP11 return cpp11::as_sexp(Array__Same(x, y)); END_CPP11 } - #else - extern "C" SEXP _arrow_Array__Same(SEXP x_sexp, SEXP y_sexp){ - Rf_error("Cannot call Array__Same(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - -// array_to_vector.cpp - #if defined(ARROW_R_WITH_ARROW) - SEXP Array__as_vector(const std::shared_ptr& array); -extern "C" SEXP _arrow_Array__as_vector(SEXP array_sexp){ +#else +extern "C" SEXP _arrow_Array__Same(SEXP x_sexp, SEXP y_sexp){ + Rf_error("Cannot call Array__Same(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + +// array_to_vector.cpp +#if defined(ARROW_R_WITH_ARROW) +SEXP Array__as_vector(const std::shared_ptr& array); +extern "C" SEXP _arrow_Array__as_vector(SEXP array_sexp){ BEGIN_CPP11 arrow::r::Input&>::type array(array_sexp); return cpp11::as_sexp(Array__as_vector(array)); END_CPP11 } - #else - extern "C" SEXP _arrow_Array__as_vector(SEXP array_sexp){ - Rf_error("Cannot call Array__as_vector(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Array__as_vector(SEXP array_sexp){ + Rf_error("Cannot call Array__as_vector(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // array_to_vector.cpp - #if defined(ARROW_R_WITH_ARROW) - SEXP ChunkedArray__as_vector(const std::shared_ptr& chunked_array, bool use_threads); +#if defined(ARROW_R_WITH_ARROW) +SEXP ChunkedArray__as_vector(const std::shared_ptr& chunked_array, bool use_threads); extern "C" SEXP _arrow_ChunkedArray__as_vector(SEXP chunked_array_sexp, SEXP use_threads_sexp){ BEGIN_CPP11 arrow::r::Input&>::type chunked_array(chunked_array_sexp); @@ -608,15 +608,15 @@ BEGIN_CPP11 return cpp11::as_sexp(ChunkedArray__as_vector(chunked_array, use_threads)); END_CPP11 } - #else - extern "C" SEXP _arrow_ChunkedArray__as_vector(SEXP chunked_array_sexp, SEXP use_threads_sexp){ - Rf_error("Cannot call ChunkedArray__as_vector(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ChunkedArray__as_vector(SEXP chunked_array_sexp, SEXP use_threads_sexp){ + Rf_error("Cannot call ChunkedArray__as_vector(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // array_to_vector.cpp - #if defined(ARROW_R_WITH_ARROW) - cpp11::writable::list RecordBatch__to_dataframe(const std::shared_ptr& batch, bool use_threads); +#if defined(ARROW_R_WITH_ARROW) +cpp11::writable::list RecordBatch__to_dataframe(const std::shared_ptr& batch, bool use_threads); extern "C" SEXP _arrow_RecordBatch__to_dataframe(SEXP batch_sexp, SEXP use_threads_sexp){ BEGIN_CPP11 arrow::r::Input&>::type batch(batch_sexp); @@ -624,15 +624,15 @@ BEGIN_CPP11 return cpp11::as_sexp(RecordBatch__to_dataframe(batch, use_threads)); END_CPP11 } - #else - extern "C" SEXP _arrow_RecordBatch__to_dataframe(SEXP batch_sexp, SEXP use_threads_sexp){ - Rf_error("Cannot call RecordBatch__to_dataframe(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_RecordBatch__to_dataframe(SEXP batch_sexp, SEXP use_threads_sexp){ + Rf_error("Cannot call RecordBatch__to_dataframe(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // array_to_vector.cpp - #if defined(ARROW_R_WITH_ARROW) - cpp11::writable::list Table__to_dataframe(const std::shared_ptr& table, bool use_threads); +#if defined(ARROW_R_WITH_ARROW) +cpp11::writable::list Table__to_dataframe(const std::shared_ptr& table, bool use_threads); extern "C" SEXP _arrow_Table__to_dataframe(SEXP table_sexp, SEXP use_threads_sexp){ BEGIN_CPP11 arrow::r::Input&>::type table(table_sexp); @@ -640,105 +640,105 @@ BEGIN_CPP11 return cpp11::as_sexp(Table__to_dataframe(table, use_threads)); END_CPP11 } - #else - extern "C" SEXP _arrow_Table__to_dataframe(SEXP table_sexp, SEXP use_threads_sexp){ - Rf_error("Cannot call Table__to_dataframe(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Table__to_dataframe(SEXP table_sexp, SEXP use_threads_sexp){ + Rf_error("Cannot call Table__to_dataframe(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // arraydata.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr ArrayData__get_type(const std::shared_ptr& x); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr ArrayData__get_type(const std::shared_ptr& x); extern "C" SEXP _arrow_ArrayData__get_type(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(ArrayData__get_type(x)); END_CPP11 } - #else - extern "C" SEXP _arrow_ArrayData__get_type(SEXP x_sexp){ - Rf_error("Cannot call ArrayData__get_type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ArrayData__get_type(SEXP x_sexp){ + Rf_error("Cannot call ArrayData__get_type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // arraydata.cpp - #if defined(ARROW_R_WITH_ARROW) - int ArrayData__get_length(const std::shared_ptr& x); +#if defined(ARROW_R_WITH_ARROW) +int ArrayData__get_length(const std::shared_ptr& x); extern "C" SEXP _arrow_ArrayData__get_length(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(ArrayData__get_length(x)); END_CPP11 } - #else - extern "C" SEXP _arrow_ArrayData__get_length(SEXP x_sexp){ - Rf_error("Cannot call ArrayData__get_length(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ArrayData__get_length(SEXP x_sexp){ + Rf_error("Cannot call ArrayData__get_length(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // arraydata.cpp - #if defined(ARROW_R_WITH_ARROW) - int ArrayData__get_null_count(const std::shared_ptr& x); +#if defined(ARROW_R_WITH_ARROW) +int ArrayData__get_null_count(const std::shared_ptr& x); extern "C" SEXP _arrow_ArrayData__get_null_count(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(ArrayData__get_null_count(x)); END_CPP11 } - #else - extern "C" SEXP _arrow_ArrayData__get_null_count(SEXP x_sexp){ - Rf_error("Cannot call ArrayData__get_null_count(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ArrayData__get_null_count(SEXP x_sexp){ + Rf_error("Cannot call ArrayData__get_null_count(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // arraydata.cpp - #if defined(ARROW_R_WITH_ARROW) - int ArrayData__get_offset(const std::shared_ptr& x); +#if defined(ARROW_R_WITH_ARROW) +int ArrayData__get_offset(const std::shared_ptr& x); extern "C" SEXP _arrow_ArrayData__get_offset(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(ArrayData__get_offset(x)); END_CPP11 } - #else - extern "C" SEXP _arrow_ArrayData__get_offset(SEXP x_sexp){ - Rf_error("Cannot call ArrayData__get_offset(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ArrayData__get_offset(SEXP x_sexp){ + Rf_error("Cannot call ArrayData__get_offset(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // arraydata.cpp - #if defined(ARROW_R_WITH_ARROW) - cpp11::list ArrayData__buffers(const std::shared_ptr& x); +#if defined(ARROW_R_WITH_ARROW) +cpp11::list ArrayData__buffers(const std::shared_ptr& x); extern "C" SEXP _arrow_ArrayData__buffers(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(ArrayData__buffers(x)); END_CPP11 } - #else - extern "C" SEXP _arrow_ArrayData__buffers(SEXP x_sexp){ - Rf_error("Cannot call ArrayData__buffers(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ArrayData__buffers(SEXP x_sexp){ + Rf_error("Cannot call ArrayData__buffers(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // buffer.cpp - #if defined(ARROW_R_WITH_ARROW) - bool Buffer__is_mutable(const std::shared_ptr& buffer); +#if defined(ARROW_R_WITH_ARROW) +bool Buffer__is_mutable(const std::shared_ptr& buffer); extern "C" SEXP _arrow_Buffer__is_mutable(SEXP buffer_sexp){ BEGIN_CPP11 arrow::r::Input&>::type buffer(buffer_sexp); return cpp11::as_sexp(Buffer__is_mutable(buffer)); END_CPP11 } - #else - extern "C" SEXP _arrow_Buffer__is_mutable(SEXP buffer_sexp){ - Rf_error("Cannot call Buffer__is_mutable(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Buffer__is_mutable(SEXP buffer_sexp){ + Rf_error("Cannot call Buffer__is_mutable(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // buffer.cpp - #if defined(ARROW_R_WITH_ARROW) - void Buffer__ZeroPadding(const std::shared_ptr& buffer); +#if defined(ARROW_R_WITH_ARROW) +void Buffer__ZeroPadding(const std::shared_ptr& buffer); extern "C" SEXP _arrow_Buffer__ZeroPadding(SEXP buffer_sexp){ BEGIN_CPP11 arrow::r::Input&>::type buffer(buffer_sexp); @@ -746,75 +746,75 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_Buffer__ZeroPadding(SEXP buffer_sexp){ - Rf_error("Cannot call Buffer__ZeroPadding(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Buffer__ZeroPadding(SEXP buffer_sexp){ + Rf_error("Cannot call Buffer__ZeroPadding(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // buffer.cpp - #if defined(ARROW_R_WITH_ARROW) - int64_t Buffer__capacity(const std::shared_ptr& buffer); +#if defined(ARROW_R_WITH_ARROW) +int64_t Buffer__capacity(const std::shared_ptr& buffer); extern "C" SEXP _arrow_Buffer__capacity(SEXP buffer_sexp){ BEGIN_CPP11 arrow::r::Input&>::type buffer(buffer_sexp); return cpp11::as_sexp(Buffer__capacity(buffer)); END_CPP11 } - #else - extern "C" SEXP _arrow_Buffer__capacity(SEXP buffer_sexp){ - Rf_error("Cannot call Buffer__capacity(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Buffer__capacity(SEXP buffer_sexp){ + Rf_error("Cannot call Buffer__capacity(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // buffer.cpp - #if defined(ARROW_R_WITH_ARROW) - int64_t Buffer__size(const std::shared_ptr& buffer); +#if defined(ARROW_R_WITH_ARROW) +int64_t Buffer__size(const std::shared_ptr& buffer); extern "C" SEXP _arrow_Buffer__size(SEXP buffer_sexp){ BEGIN_CPP11 arrow::r::Input&>::type buffer(buffer_sexp); return cpp11::as_sexp(Buffer__size(buffer)); END_CPP11 } - #else - extern "C" SEXP _arrow_Buffer__size(SEXP buffer_sexp){ - Rf_error("Cannot call Buffer__size(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Buffer__size(SEXP buffer_sexp){ + Rf_error("Cannot call Buffer__size(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // buffer.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr r___RBuffer__initialize(SEXP x); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr r___RBuffer__initialize(SEXP x); extern "C" SEXP _arrow_r___RBuffer__initialize(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input::type x(x_sexp); return cpp11::as_sexp(r___RBuffer__initialize(x)); END_CPP11 } - #else - extern "C" SEXP _arrow_r___RBuffer__initialize(SEXP x_sexp){ - Rf_error("Cannot call r___RBuffer__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_r___RBuffer__initialize(SEXP x_sexp){ + Rf_error("Cannot call r___RBuffer__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // buffer.cpp - #if defined(ARROW_R_WITH_ARROW) - cpp11::writable::raws Buffer__data(const std::shared_ptr& buffer); +#if defined(ARROW_R_WITH_ARROW) +cpp11::writable::raws Buffer__data(const std::shared_ptr& buffer); extern "C" SEXP _arrow_Buffer__data(SEXP buffer_sexp){ BEGIN_CPP11 arrow::r::Input&>::type buffer(buffer_sexp); return cpp11::as_sexp(Buffer__data(buffer)); END_CPP11 } - #else - extern "C" SEXP _arrow_Buffer__data(SEXP buffer_sexp){ - Rf_error("Cannot call Buffer__data(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Buffer__data(SEXP buffer_sexp){ + Rf_error("Cannot call Buffer__data(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // buffer.cpp - #if defined(ARROW_R_WITH_ARROW) - bool Buffer__Equals(const std::shared_ptr& x, const std::shared_ptr& y); +#if defined(ARROW_R_WITH_ARROW) +bool Buffer__Equals(const std::shared_ptr& x, const std::shared_ptr& y); extern "C" SEXP _arrow_Buffer__Equals(SEXP x_sexp, SEXP y_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); @@ -822,60 +822,60 @@ BEGIN_CPP11 return cpp11::as_sexp(Buffer__Equals(x, y)); END_CPP11 } - #else - extern "C" SEXP _arrow_Buffer__Equals(SEXP x_sexp, SEXP y_sexp){ - Rf_error("Cannot call Buffer__Equals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Buffer__Equals(SEXP x_sexp, SEXP y_sexp){ + Rf_error("Cannot call Buffer__Equals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // chunkedarray.cpp - #if defined(ARROW_R_WITH_ARROW) - int ChunkedArray__length(const std::shared_ptr& chunked_array); +#if defined(ARROW_R_WITH_ARROW) +int ChunkedArray__length(const std::shared_ptr& chunked_array); extern "C" SEXP _arrow_ChunkedArray__length(SEXP chunked_array_sexp){ BEGIN_CPP11 arrow::r::Input&>::type chunked_array(chunked_array_sexp); return cpp11::as_sexp(ChunkedArray__length(chunked_array)); END_CPP11 } - #else - extern "C" SEXP _arrow_ChunkedArray__length(SEXP chunked_array_sexp){ - Rf_error("Cannot call ChunkedArray__length(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ChunkedArray__length(SEXP chunked_array_sexp){ + Rf_error("Cannot call ChunkedArray__length(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // chunkedarray.cpp - #if defined(ARROW_R_WITH_ARROW) - int ChunkedArray__null_count(const std::shared_ptr& chunked_array); +#if defined(ARROW_R_WITH_ARROW) +int ChunkedArray__null_count(const std::shared_ptr& chunked_array); extern "C" SEXP _arrow_ChunkedArray__null_count(SEXP chunked_array_sexp){ BEGIN_CPP11 arrow::r::Input&>::type chunked_array(chunked_array_sexp); return cpp11::as_sexp(ChunkedArray__null_count(chunked_array)); END_CPP11 } - #else - extern "C" SEXP _arrow_ChunkedArray__null_count(SEXP chunked_array_sexp){ - Rf_error("Cannot call ChunkedArray__null_count(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ChunkedArray__null_count(SEXP chunked_array_sexp){ + Rf_error("Cannot call ChunkedArray__null_count(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // chunkedarray.cpp - #if defined(ARROW_R_WITH_ARROW) - int ChunkedArray__num_chunks(const std::shared_ptr& chunked_array); +#if defined(ARROW_R_WITH_ARROW) +int ChunkedArray__num_chunks(const std::shared_ptr& chunked_array); extern "C" SEXP _arrow_ChunkedArray__num_chunks(SEXP chunked_array_sexp){ BEGIN_CPP11 arrow::r::Input&>::type chunked_array(chunked_array_sexp); return cpp11::as_sexp(ChunkedArray__num_chunks(chunked_array)); END_CPP11 } - #else - extern "C" SEXP _arrow_ChunkedArray__num_chunks(SEXP chunked_array_sexp){ - Rf_error("Cannot call ChunkedArray__num_chunks(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ChunkedArray__num_chunks(SEXP chunked_array_sexp){ + Rf_error("Cannot call ChunkedArray__num_chunks(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // chunkedarray.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr ChunkedArray__chunk(const std::shared_ptr& chunked_array, int i); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr ChunkedArray__chunk(const std::shared_ptr& chunked_array, int i); extern "C" SEXP _arrow_ChunkedArray__chunk(SEXP chunked_array_sexp, SEXP i_sexp){ BEGIN_CPP11 arrow::r::Input&>::type chunked_array(chunked_array_sexp); @@ -883,45 +883,45 @@ BEGIN_CPP11 return cpp11::as_sexp(ChunkedArray__chunk(chunked_array, i)); END_CPP11 } - #else - extern "C" SEXP _arrow_ChunkedArray__chunk(SEXP chunked_array_sexp, SEXP i_sexp){ - Rf_error("Cannot call ChunkedArray__chunk(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ChunkedArray__chunk(SEXP chunked_array_sexp, SEXP i_sexp){ + Rf_error("Cannot call ChunkedArray__chunk(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // chunkedarray.cpp - #if defined(ARROW_R_WITH_ARROW) - cpp11::list ChunkedArray__chunks(const std::shared_ptr& chunked_array); +#if defined(ARROW_R_WITH_ARROW) +cpp11::list ChunkedArray__chunks(const std::shared_ptr& chunked_array); extern "C" SEXP _arrow_ChunkedArray__chunks(SEXP chunked_array_sexp){ BEGIN_CPP11 arrow::r::Input&>::type chunked_array(chunked_array_sexp); return cpp11::as_sexp(ChunkedArray__chunks(chunked_array)); END_CPP11 } - #else - extern "C" SEXP _arrow_ChunkedArray__chunks(SEXP chunked_array_sexp){ - Rf_error("Cannot call ChunkedArray__chunks(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ChunkedArray__chunks(SEXP chunked_array_sexp){ + Rf_error("Cannot call ChunkedArray__chunks(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // chunkedarray.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr ChunkedArray__type(const std::shared_ptr& chunked_array); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr ChunkedArray__type(const std::shared_ptr& chunked_array); extern "C" SEXP _arrow_ChunkedArray__type(SEXP chunked_array_sexp){ BEGIN_CPP11 arrow::r::Input&>::type chunked_array(chunked_array_sexp); return cpp11::as_sexp(ChunkedArray__type(chunked_array)); END_CPP11 } - #else - extern "C" SEXP _arrow_ChunkedArray__type(SEXP chunked_array_sexp){ - Rf_error("Cannot call ChunkedArray__type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ChunkedArray__type(SEXP chunked_array_sexp){ + Rf_error("Cannot call ChunkedArray__type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // chunkedarray.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr ChunkedArray__Slice1(const std::shared_ptr& chunked_array, R_xlen_t offset); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr ChunkedArray__Slice1(const std::shared_ptr& chunked_array, R_xlen_t offset); extern "C" SEXP _arrow_ChunkedArray__Slice1(SEXP chunked_array_sexp, SEXP offset_sexp){ BEGIN_CPP11 arrow::r::Input&>::type chunked_array(chunked_array_sexp); @@ -929,15 +929,15 @@ BEGIN_CPP11 return cpp11::as_sexp(ChunkedArray__Slice1(chunked_array, offset)); END_CPP11 } - #else - extern "C" SEXP _arrow_ChunkedArray__Slice1(SEXP chunked_array_sexp, SEXP offset_sexp){ - Rf_error("Cannot call ChunkedArray__Slice1(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ChunkedArray__Slice1(SEXP chunked_array_sexp, SEXP offset_sexp){ + Rf_error("Cannot call ChunkedArray__Slice1(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // chunkedarray.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr ChunkedArray__Slice2(const std::shared_ptr& chunked_array, R_xlen_t offset, R_xlen_t length); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr ChunkedArray__Slice2(const std::shared_ptr& chunked_array, R_xlen_t offset, R_xlen_t length); extern "C" SEXP _arrow_ChunkedArray__Slice2(SEXP chunked_array_sexp, SEXP offset_sexp, SEXP length_sexp){ BEGIN_CPP11 arrow::r::Input&>::type chunked_array(chunked_array_sexp); @@ -946,15 +946,15 @@ BEGIN_CPP11 return cpp11::as_sexp(ChunkedArray__Slice2(chunked_array, offset, length)); END_CPP11 } - #else - extern "C" SEXP _arrow_ChunkedArray__Slice2(SEXP chunked_array_sexp, SEXP offset_sexp, SEXP length_sexp){ - Rf_error("Cannot call ChunkedArray__Slice2(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ChunkedArray__Slice2(SEXP chunked_array_sexp, SEXP offset_sexp, SEXP length_sexp){ + Rf_error("Cannot call ChunkedArray__Slice2(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // chunkedarray.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr ChunkedArray__View(const std::shared_ptr& array, const std::shared_ptr& type); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr ChunkedArray__View(const std::shared_ptr& array, const std::shared_ptr& type); extern "C" SEXP _arrow_ChunkedArray__View(SEXP array_sexp, SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type array(array_sexp); @@ -962,15 +962,15 @@ BEGIN_CPP11 return cpp11::as_sexp(ChunkedArray__View(array, type)); END_CPP11 } - #else - extern "C" SEXP _arrow_ChunkedArray__View(SEXP array_sexp, SEXP type_sexp){ - Rf_error("Cannot call ChunkedArray__View(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ChunkedArray__View(SEXP array_sexp, SEXP type_sexp){ + Rf_error("Cannot call ChunkedArray__View(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // chunkedarray.cpp - #if defined(ARROW_R_WITH_ARROW) - void ChunkedArray__Validate(const std::shared_ptr& chunked_array); +#if defined(ARROW_R_WITH_ARROW) +void ChunkedArray__Validate(const std::shared_ptr& chunked_array); extern "C" SEXP _arrow_ChunkedArray__Validate(SEXP chunked_array_sexp){ BEGIN_CPP11 arrow::r::Input&>::type chunked_array(chunked_array_sexp); @@ -978,15 +978,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_ChunkedArray__Validate(SEXP chunked_array_sexp){ - Rf_error("Cannot call ChunkedArray__Validate(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ChunkedArray__Validate(SEXP chunked_array_sexp){ + Rf_error("Cannot call ChunkedArray__Validate(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // chunkedarray.cpp - #if defined(ARROW_R_WITH_ARROW) - bool ChunkedArray__Equals(const std::shared_ptr& x, const std::shared_ptr& y); +#if defined(ARROW_R_WITH_ARROW) +bool ChunkedArray__Equals(const std::shared_ptr& x, const std::shared_ptr& y); extern "C" SEXP _arrow_ChunkedArray__Equals(SEXP x_sexp, SEXP y_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); @@ -994,30 +994,30 @@ BEGIN_CPP11 return cpp11::as_sexp(ChunkedArray__Equals(x, y)); END_CPP11 } - #else - extern "C" SEXP _arrow_ChunkedArray__Equals(SEXP x_sexp, SEXP y_sexp){ - Rf_error("Cannot call ChunkedArray__Equals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ChunkedArray__Equals(SEXP x_sexp, SEXP y_sexp){ + Rf_error("Cannot call ChunkedArray__Equals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // chunkedarray.cpp - #if defined(ARROW_R_WITH_ARROW) - std::string ChunkedArray__ToString(const std::shared_ptr& x); +#if defined(ARROW_R_WITH_ARROW) +std::string ChunkedArray__ToString(const std::shared_ptr& x); extern "C" SEXP _arrow_ChunkedArray__ToString(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(ChunkedArray__ToString(x)); END_CPP11 } - #else - extern "C" SEXP _arrow_ChunkedArray__ToString(SEXP x_sexp){ - Rf_error("Cannot call ChunkedArray__ToString(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ChunkedArray__ToString(SEXP x_sexp){ + Rf_error("Cannot call ChunkedArray__ToString(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // chunkedarray.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr ChunkedArray__from_list(cpp11::list chunks, SEXP s_type); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr ChunkedArray__from_list(cpp11::list chunks, SEXP s_type); extern "C" SEXP _arrow_ChunkedArray__from_list(SEXP chunks_sexp, SEXP s_type_sexp){ BEGIN_CPP11 arrow::r::Input::type chunks(chunks_sexp); @@ -1025,15 +1025,15 @@ BEGIN_CPP11 return cpp11::as_sexp(ChunkedArray__from_list(chunks, s_type)); END_CPP11 } - #else - extern "C" SEXP _arrow_ChunkedArray__from_list(SEXP chunks_sexp, SEXP s_type_sexp){ - Rf_error("Cannot call ChunkedArray__from_list(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ChunkedArray__from_list(SEXP chunks_sexp, SEXP s_type_sexp){ + Rf_error("Cannot call ChunkedArray__from_list(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // compression.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr util___Codec__Create(arrow::Compression::type codec, R_xlen_t compression_level); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr util___Codec__Create(arrow::Compression::type codec, R_xlen_t compression_level); extern "C" SEXP _arrow_util___Codec__Create(SEXP codec_sexp, SEXP compression_level_sexp){ BEGIN_CPP11 arrow::r::Input::type codec(codec_sexp); @@ -1041,45 +1041,45 @@ BEGIN_CPP11 return cpp11::as_sexp(util___Codec__Create(codec, compression_level)); END_CPP11 } - #else - extern "C" SEXP _arrow_util___Codec__Create(SEXP codec_sexp, SEXP compression_level_sexp){ - Rf_error("Cannot call util___Codec__Create(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_util___Codec__Create(SEXP codec_sexp, SEXP compression_level_sexp){ + Rf_error("Cannot call util___Codec__Create(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // compression.cpp - #if defined(ARROW_R_WITH_ARROW) - std::string util___Codec__name(const std::shared_ptr& codec); +#if defined(ARROW_R_WITH_ARROW) +std::string util___Codec__name(const std::shared_ptr& codec); extern "C" SEXP _arrow_util___Codec__name(SEXP codec_sexp){ BEGIN_CPP11 arrow::r::Input&>::type codec(codec_sexp); return cpp11::as_sexp(util___Codec__name(codec)); END_CPP11 } - #else - extern "C" SEXP _arrow_util___Codec__name(SEXP codec_sexp){ - Rf_error("Cannot call util___Codec__name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_util___Codec__name(SEXP codec_sexp){ + Rf_error("Cannot call util___Codec__name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // compression.cpp - #if defined(ARROW_R_WITH_ARROW) - bool util___Codec__IsAvailable(arrow::Compression::type codec); +#if defined(ARROW_R_WITH_ARROW) +bool util___Codec__IsAvailable(arrow::Compression::type codec); extern "C" SEXP _arrow_util___Codec__IsAvailable(SEXP codec_sexp){ BEGIN_CPP11 arrow::r::Input::type codec(codec_sexp); return cpp11::as_sexp(util___Codec__IsAvailable(codec)); END_CPP11 } - #else - extern "C" SEXP _arrow_util___Codec__IsAvailable(SEXP codec_sexp){ - Rf_error("Cannot call util___Codec__IsAvailable(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_util___Codec__IsAvailable(SEXP codec_sexp){ + Rf_error("Cannot call util___Codec__IsAvailable(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // compression.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr io___CompressedOutputStream__Make(const std::shared_ptr& codec, const std::shared_ptr& raw); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr io___CompressedOutputStream__Make(const std::shared_ptr& codec, const std::shared_ptr& raw); extern "C" SEXP _arrow_io___CompressedOutputStream__Make(SEXP codec_sexp, SEXP raw_sexp){ BEGIN_CPP11 arrow::r::Input&>::type codec(codec_sexp); @@ -1087,15 +1087,15 @@ BEGIN_CPP11 return cpp11::as_sexp(io___CompressedOutputStream__Make(codec, raw)); END_CPP11 } - #else - extern "C" SEXP _arrow_io___CompressedOutputStream__Make(SEXP codec_sexp, SEXP raw_sexp){ - Rf_error("Cannot call io___CompressedOutputStream__Make(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_io___CompressedOutputStream__Make(SEXP codec_sexp, SEXP raw_sexp){ + Rf_error("Cannot call io___CompressedOutputStream__Make(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // compression.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr io___CompressedInputStream__Make(const std::shared_ptr& codec, const std::shared_ptr& raw); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr io___CompressedInputStream__Make(const std::shared_ptr& codec, const std::shared_ptr& raw); extern "C" SEXP _arrow_io___CompressedInputStream__Make(SEXP codec_sexp, SEXP raw_sexp){ BEGIN_CPP11 arrow::r::Input&>::type codec(codec_sexp); @@ -1103,30 +1103,30 @@ BEGIN_CPP11 return cpp11::as_sexp(io___CompressedInputStream__Make(codec, raw)); END_CPP11 } - #else - extern "C" SEXP _arrow_io___CompressedInputStream__Make(SEXP codec_sexp, SEXP raw_sexp){ - Rf_error("Cannot call io___CompressedInputStream__Make(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_io___CompressedInputStream__Make(SEXP codec_sexp, SEXP raw_sexp){ + Rf_error("Cannot call io___CompressedInputStream__Make(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // compute-exec.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr ExecPlan_create(bool use_threads); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr ExecPlan_create(bool use_threads); extern "C" SEXP _arrow_ExecPlan_create(SEXP use_threads_sexp){ BEGIN_CPP11 arrow::r::Input::type use_threads(use_threads_sexp); return cpp11::as_sexp(ExecPlan_create(use_threads)); END_CPP11 } - #else - extern "C" SEXP _arrow_ExecPlan_create(SEXP use_threads_sexp){ - Rf_error("Cannot call ExecPlan_create(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ExecPlan_create(SEXP use_threads_sexp){ + Rf_error("Cannot call ExecPlan_create(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // compute-exec.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr ExecPlan_run(const std::shared_ptr& plan, const std::shared_ptr& final_node, cpp11::list sort_options, int64_t head); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr ExecPlan_run(const std::shared_ptr& plan, const std::shared_ptr& final_node, cpp11::list sort_options, int64_t head); extern "C" SEXP _arrow_ExecPlan_run(SEXP plan_sexp, SEXP final_node_sexp, SEXP sort_options_sexp, SEXP head_sexp){ BEGIN_CPP11 arrow::r::Input&>::type plan(plan_sexp); @@ -1136,46 +1136,46 @@ BEGIN_CPP11 return cpp11::as_sexp(ExecPlan_run(plan, final_node, sort_options, head)); END_CPP11 } - #else - extern "C" SEXP _arrow_ExecPlan_run(SEXP plan_sexp, SEXP final_node_sexp, SEXP sort_options_sexp, SEXP head_sexp){ - Rf_error("Cannot call ExecPlan_run(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - -// compute-exec.cpp - #if defined(ARROW_R_WITH_ARROW) - void ExecPlan_StopProducing(const std::shared_ptr& plan); -extern "C" SEXP _arrow_ExecPlan_StopProducing(SEXP plan_sexp){ +#else +extern "C" SEXP _arrow_ExecPlan_run(SEXP plan_sexp, SEXP final_node_sexp, SEXP sort_options_sexp, SEXP head_sexp){ + Rf_error("Cannot call ExecPlan_run(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + +// compute-exec.cpp +#if defined(ARROW_R_WITH_ARROW) +void ExecPlan_StopProducing(const std::shared_ptr& plan); +extern "C" SEXP _arrow_ExecPlan_StopProducing(SEXP plan_sexp){ BEGIN_CPP11 arrow::r::Input&>::type plan(plan_sexp); ExecPlan_StopProducing(plan); return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_ExecPlan_StopProducing(SEXP plan_sexp){ - Rf_error("Cannot call ExecPlan_StopProducing(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ExecPlan_StopProducing(SEXP plan_sexp){ + Rf_error("Cannot call ExecPlan_StopProducing(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // compute-exec.cpp - #if defined(ARROW_R_WITH_DATASET) - std::shared_ptr ExecNode_output_schema(const std::shared_ptr& node); +#if defined(ARROW_R_WITH_DATASET) +std::shared_ptr ExecNode_output_schema(const std::shared_ptr& node); extern "C" SEXP _arrow_ExecNode_output_schema(SEXP node_sexp){ BEGIN_CPP11 arrow::r::Input&>::type node(node_sexp); return cpp11::as_sexp(ExecNode_output_schema(node)); END_CPP11 } - #else - extern "C" SEXP _arrow_ExecNode_output_schema(SEXP node_sexp){ - Rf_error("Cannot call ExecNode_output_schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ExecNode_output_schema(SEXP node_sexp){ + Rf_error("Cannot call ExecNode_output_schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // compute-exec.cpp - #if defined(ARROW_R_WITH_DATASET) - std::shared_ptr ExecNode_Scan(const std::shared_ptr& plan, const std::shared_ptr& dataset, const std::shared_ptr& filter, std::vector materialized_field_names); +#if defined(ARROW_R_WITH_DATASET) +std::shared_ptr ExecNode_Scan(const std::shared_ptr& plan, const std::shared_ptr& dataset, const std::shared_ptr& filter, std::vector materialized_field_names); extern "C" SEXP _arrow_ExecNode_Scan(SEXP plan_sexp, SEXP dataset_sexp, SEXP filter_sexp, SEXP materialized_field_names_sexp){ BEGIN_CPP11 arrow::r::Input&>::type plan(plan_sexp); @@ -1185,15 +1185,15 @@ BEGIN_CPP11 return cpp11::as_sexp(ExecNode_Scan(plan, dataset, filter, materialized_field_names)); END_CPP11 } - #else - extern "C" SEXP _arrow_ExecNode_Scan(SEXP plan_sexp, SEXP dataset_sexp, SEXP filter_sexp, SEXP materialized_field_names_sexp){ - Rf_error("Cannot call ExecNode_Scan(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ExecNode_Scan(SEXP plan_sexp, SEXP dataset_sexp, SEXP filter_sexp, SEXP materialized_field_names_sexp){ + Rf_error("Cannot call ExecNode_Scan(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // compute-exec.cpp - #if defined(ARROW_R_WITH_DATASET) - std::shared_ptr ExecNode_Filter(const std::shared_ptr& input, const std::shared_ptr& filter); +#if defined(ARROW_R_WITH_DATASET) +std::shared_ptr ExecNode_Filter(const std::shared_ptr& input, const std::shared_ptr& filter); extern "C" SEXP _arrow_ExecNode_Filter(SEXP input_sexp, SEXP filter_sexp){ BEGIN_CPP11 arrow::r::Input&>::type input(input_sexp); @@ -1201,15 +1201,15 @@ BEGIN_CPP11 return cpp11::as_sexp(ExecNode_Filter(input, filter)); END_CPP11 } - #else - extern "C" SEXP _arrow_ExecNode_Filter(SEXP input_sexp, SEXP filter_sexp){ - Rf_error("Cannot call ExecNode_Filter(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ExecNode_Filter(SEXP input_sexp, SEXP filter_sexp){ + Rf_error("Cannot call ExecNode_Filter(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // compute-exec.cpp - #if defined(ARROW_R_WITH_DATASET) - std::shared_ptr ExecNode_Project(const std::shared_ptr& input, const std::vector>& exprs, std::vector names); +#if defined(ARROW_R_WITH_DATASET) +std::shared_ptr ExecNode_Project(const std::shared_ptr& input, const std::vector>& exprs, std::vector names); extern "C" SEXP _arrow_ExecNode_Project(SEXP input_sexp, SEXP exprs_sexp, SEXP names_sexp){ BEGIN_CPP11 arrow::r::Input&>::type input(input_sexp); @@ -1218,15 +1218,15 @@ BEGIN_CPP11 return cpp11::as_sexp(ExecNode_Project(input, exprs, names)); END_CPP11 } - #else - extern "C" SEXP _arrow_ExecNode_Project(SEXP input_sexp, SEXP exprs_sexp, SEXP names_sexp){ - Rf_error("Cannot call ExecNode_Project(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ExecNode_Project(SEXP input_sexp, SEXP exprs_sexp, SEXP names_sexp){ + Rf_error("Cannot call ExecNode_Project(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // compute-exec.cpp - #if defined(ARROW_R_WITH_DATASET) - std::shared_ptr ExecNode_Aggregate(const std::shared_ptr& input, cpp11::list options, std::vector target_names, std::vector out_field_names, std::vector key_names); +#if defined(ARROW_R_WITH_DATASET) +std::shared_ptr ExecNode_Aggregate(const std::shared_ptr& input, cpp11::list options, std::vector target_names, std::vector out_field_names, std::vector key_names); extern "C" SEXP _arrow_ExecNode_Aggregate(SEXP input_sexp, SEXP options_sexp, SEXP target_names_sexp, SEXP out_field_names_sexp, SEXP key_names_sexp){ BEGIN_CPP11 arrow::r::Input&>::type input(input_sexp); @@ -1237,15 +1237,15 @@ BEGIN_CPP11 return cpp11::as_sexp(ExecNode_Aggregate(input, options, target_names, out_field_names, key_names)); END_CPP11 } - #else - extern "C" SEXP _arrow_ExecNode_Aggregate(SEXP input_sexp, SEXP options_sexp, SEXP target_names_sexp, SEXP out_field_names_sexp, SEXP key_names_sexp){ - Rf_error("Cannot call ExecNode_Aggregate(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ExecNode_Aggregate(SEXP input_sexp, SEXP options_sexp, SEXP target_names_sexp, SEXP out_field_names_sexp, SEXP key_names_sexp){ + Rf_error("Cannot call ExecNode_Aggregate(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // compute-exec.cpp - #if defined(ARROW_R_WITH_DATASET) - std::shared_ptr ExecNode_Join(const std::shared_ptr& input, int type, const std::shared_ptr& right_data, std::vector left_keys, std::vector right_keys, std::vector left_output, std::vector right_output); +#if defined(ARROW_R_WITH_DATASET) +std::shared_ptr ExecNode_Join(const std::shared_ptr& input, int type, const std::shared_ptr& right_data, std::vector left_keys, std::vector right_keys, std::vector left_output, std::vector right_output); extern "C" SEXP _arrow_ExecNode_Join(SEXP input_sexp, SEXP type_sexp, SEXP right_data_sexp, SEXP left_keys_sexp, SEXP right_keys_sexp, SEXP left_output_sexp, SEXP right_output_sexp){ BEGIN_CPP11 arrow::r::Input&>::type input(input_sexp); @@ -1258,15 +1258,15 @@ BEGIN_CPP11 return cpp11::as_sexp(ExecNode_Join(input, type, right_data, left_keys, right_keys, left_output, right_output)); END_CPP11 } - #else - extern "C" SEXP _arrow_ExecNode_Join(SEXP input_sexp, SEXP type_sexp, SEXP right_data_sexp, SEXP left_keys_sexp, SEXP right_keys_sexp, SEXP left_output_sexp, SEXP right_output_sexp){ - Rf_error("Cannot call ExecNode_Join(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ExecNode_Join(SEXP input_sexp, SEXP type_sexp, SEXP right_data_sexp, SEXP left_keys_sexp, SEXP right_keys_sexp, SEXP left_output_sexp, SEXP right_output_sexp){ + Rf_error("Cannot call ExecNode_Join(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // compute-exec.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr ExecNode_ReadFromRecordBatchReader(const std::shared_ptr& plan, const std::shared_ptr& reader); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr ExecNode_ReadFromRecordBatchReader(const std::shared_ptr& plan, const std::shared_ptr& reader); extern "C" SEXP _arrow_ExecNode_ReadFromRecordBatchReader(SEXP plan_sexp, SEXP reader_sexp){ BEGIN_CPP11 arrow::r::Input&>::type plan(plan_sexp); @@ -1274,15 +1274,15 @@ BEGIN_CPP11 return cpp11::as_sexp(ExecNode_ReadFromRecordBatchReader(plan, reader)); END_CPP11 } - #else - extern "C" SEXP _arrow_ExecNode_ReadFromRecordBatchReader(SEXP plan_sexp, SEXP reader_sexp){ - Rf_error("Cannot call ExecNode_ReadFromRecordBatchReader(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ExecNode_ReadFromRecordBatchReader(SEXP plan_sexp, SEXP reader_sexp){ + Rf_error("Cannot call ExecNode_ReadFromRecordBatchReader(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // compute.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr RecordBatch__cast(const std::shared_ptr& batch, const std::shared_ptr& schema, cpp11::list options); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr RecordBatch__cast(const std::shared_ptr& batch, const std::shared_ptr& schema, cpp11::list options); extern "C" SEXP _arrow_RecordBatch__cast(SEXP batch_sexp, SEXP schema_sexp, SEXP options_sexp){ BEGIN_CPP11 arrow::r::Input&>::type batch(batch_sexp); @@ -1291,15 +1291,15 @@ BEGIN_CPP11 return cpp11::as_sexp(RecordBatch__cast(batch, schema, options)); END_CPP11 } - #else - extern "C" SEXP _arrow_RecordBatch__cast(SEXP batch_sexp, SEXP schema_sexp, SEXP options_sexp){ - Rf_error("Cannot call RecordBatch__cast(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_RecordBatch__cast(SEXP batch_sexp, SEXP schema_sexp, SEXP options_sexp){ + Rf_error("Cannot call RecordBatch__cast(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // compute.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr Table__cast(const std::shared_ptr& table, const std::shared_ptr& schema, cpp11::list options); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr Table__cast(const std::shared_ptr& table, const std::shared_ptr& schema, cpp11::list options); extern "C" SEXP _arrow_Table__cast(SEXP table_sexp, SEXP schema_sexp, SEXP options_sexp){ BEGIN_CPP11 arrow::r::Input&>::type table(table_sexp); @@ -1308,15 +1308,15 @@ BEGIN_CPP11 return cpp11::as_sexp(Table__cast(table, schema, options)); END_CPP11 } - #else - extern "C" SEXP _arrow_Table__cast(SEXP table_sexp, SEXP schema_sexp, SEXP options_sexp){ - Rf_error("Cannot call Table__cast(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Table__cast(SEXP table_sexp, SEXP schema_sexp, SEXP options_sexp){ + Rf_error("Cannot call Table__cast(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // compute.cpp - #if defined(ARROW_R_WITH_ARROW) - SEXP compute__CallFunction(std::string func_name, cpp11::list args, cpp11::list options); +#if defined(ARROW_R_WITH_ARROW) +SEXP compute__CallFunction(std::string func_name, cpp11::list args, cpp11::list options); extern "C" SEXP _arrow_compute__CallFunction(SEXP func_name_sexp, SEXP args_sexp, SEXP options_sexp){ BEGIN_CPP11 arrow::r::Input::type func_name(func_name_sexp); @@ -1325,132 +1325,132 @@ BEGIN_CPP11 return cpp11::as_sexp(compute__CallFunction(func_name, args, options)); END_CPP11 } - #else - extern "C" SEXP _arrow_compute__CallFunction(SEXP func_name_sexp, SEXP args_sexp, SEXP options_sexp){ - Rf_error("Cannot call compute__CallFunction(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_compute__CallFunction(SEXP func_name_sexp, SEXP args_sexp, SEXP options_sexp){ + Rf_error("Cannot call compute__CallFunction(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // compute.cpp - #if defined(ARROW_R_WITH_ARROW) - std::vector compute__GetFunctionNames(); +#if defined(ARROW_R_WITH_ARROW) +std::vector compute__GetFunctionNames(); extern "C" SEXP _arrow_compute__GetFunctionNames(){ BEGIN_CPP11 return cpp11::as_sexp(compute__GetFunctionNames()); END_CPP11 } - #else - extern "C" SEXP _arrow_compute__GetFunctionNames(){ - Rf_error("Cannot call compute__GetFunctionNames(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_compute__GetFunctionNames(){ + Rf_error("Cannot call compute__GetFunctionNames(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // config.cpp - #if defined(ARROW_R_WITH_ARROW) - std::vector build_info(); +#if defined(ARROW_R_WITH_ARROW) +std::vector build_info(); extern "C" SEXP _arrow_build_info(){ BEGIN_CPP11 return cpp11::as_sexp(build_info()); END_CPP11 } - #else - extern "C" SEXP _arrow_build_info(){ - Rf_error("Cannot call build_info(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_build_info(){ + Rf_error("Cannot call build_info(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // config.cpp - #if defined(ARROW_R_WITH_ARROW) - std::vector runtime_info(); +#if defined(ARROW_R_WITH_ARROW) +std::vector runtime_info(); extern "C" SEXP _arrow_runtime_info(){ BEGIN_CPP11 return cpp11::as_sexp(runtime_info()); END_CPP11 } - #else - extern "C" SEXP _arrow_runtime_info(){ - Rf_error("Cannot call runtime_info(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_runtime_info(){ + Rf_error("Cannot call runtime_info(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // csv.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr csv___WriteOptions__initialize(cpp11::list options); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr csv___WriteOptions__initialize(cpp11::list options); extern "C" SEXP _arrow_csv___WriteOptions__initialize(SEXP options_sexp){ BEGIN_CPP11 arrow::r::Input::type options(options_sexp); return cpp11::as_sexp(csv___WriteOptions__initialize(options)); END_CPP11 } - #else - extern "C" SEXP _arrow_csv___WriteOptions__initialize(SEXP options_sexp){ - Rf_error("Cannot call csv___WriteOptions__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_csv___WriteOptions__initialize(SEXP options_sexp){ + Rf_error("Cannot call csv___WriteOptions__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // csv.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr csv___ReadOptions__initialize(cpp11::list options); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr csv___ReadOptions__initialize(cpp11::list options); extern "C" SEXP _arrow_csv___ReadOptions__initialize(SEXP options_sexp){ BEGIN_CPP11 arrow::r::Input::type options(options_sexp); return cpp11::as_sexp(csv___ReadOptions__initialize(options)); END_CPP11 } - #else - extern "C" SEXP _arrow_csv___ReadOptions__initialize(SEXP options_sexp){ - Rf_error("Cannot call csv___ReadOptions__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_csv___ReadOptions__initialize(SEXP options_sexp){ + Rf_error("Cannot call csv___ReadOptions__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // csv.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr csv___ParseOptions__initialize(cpp11::list options); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr csv___ParseOptions__initialize(cpp11::list options); extern "C" SEXP _arrow_csv___ParseOptions__initialize(SEXP options_sexp){ BEGIN_CPP11 arrow::r::Input::type options(options_sexp); return cpp11::as_sexp(csv___ParseOptions__initialize(options)); END_CPP11 } - #else - extern "C" SEXP _arrow_csv___ParseOptions__initialize(SEXP options_sexp){ - Rf_error("Cannot call csv___ParseOptions__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_csv___ParseOptions__initialize(SEXP options_sexp){ + Rf_error("Cannot call csv___ParseOptions__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // csv.cpp - #if defined(ARROW_R_WITH_ARROW) - SEXP csv___ReadOptions__column_names(const std::shared_ptr& options); +#if defined(ARROW_R_WITH_ARROW) +SEXP csv___ReadOptions__column_names(const std::shared_ptr& options); extern "C" SEXP _arrow_csv___ReadOptions__column_names(SEXP options_sexp){ BEGIN_CPP11 arrow::r::Input&>::type options(options_sexp); return cpp11::as_sexp(csv___ReadOptions__column_names(options)); END_CPP11 } - #else - extern "C" SEXP _arrow_csv___ReadOptions__column_names(SEXP options_sexp){ - Rf_error("Cannot call csv___ReadOptions__column_names(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_csv___ReadOptions__column_names(SEXP options_sexp){ + Rf_error("Cannot call csv___ReadOptions__column_names(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // csv.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr csv___ConvertOptions__initialize(cpp11::list options); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr csv___ConvertOptions__initialize(cpp11::list options); extern "C" SEXP _arrow_csv___ConvertOptions__initialize(SEXP options_sexp){ BEGIN_CPP11 arrow::r::Input::type options(options_sexp); return cpp11::as_sexp(csv___ConvertOptions__initialize(options)); END_CPP11 } - #else - extern "C" SEXP _arrow_csv___ConvertOptions__initialize(SEXP options_sexp){ - Rf_error("Cannot call csv___ConvertOptions__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_csv___ConvertOptions__initialize(SEXP options_sexp){ + Rf_error("Cannot call csv___ConvertOptions__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // csv.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr csv___TableReader__Make(const std::shared_ptr& input, const std::shared_ptr& read_options, const std::shared_ptr& parse_options, const std::shared_ptr& convert_options); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr csv___TableReader__Make(const std::shared_ptr& input, const std::shared_ptr& read_options, const std::shared_ptr& parse_options, const std::shared_ptr& convert_options); extern "C" SEXP _arrow_csv___TableReader__Make(SEXP input_sexp, SEXP read_options_sexp, SEXP parse_options_sexp, SEXP convert_options_sexp){ BEGIN_CPP11 arrow::r::Input&>::type input(input_sexp); @@ -1460,89 +1460,89 @@ BEGIN_CPP11 return cpp11::as_sexp(csv___TableReader__Make(input, read_options, parse_options, convert_options)); END_CPP11 } - #else - extern "C" SEXP _arrow_csv___TableReader__Make(SEXP input_sexp, SEXP read_options_sexp, SEXP parse_options_sexp, SEXP convert_options_sexp){ - Rf_error("Cannot call csv___TableReader__Make(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_csv___TableReader__Make(SEXP input_sexp, SEXP read_options_sexp, SEXP parse_options_sexp, SEXP convert_options_sexp){ + Rf_error("Cannot call csv___TableReader__Make(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // csv.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr csv___TableReader__Read(const std::shared_ptr& table_reader); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr csv___TableReader__Read(const std::shared_ptr& table_reader); extern "C" SEXP _arrow_csv___TableReader__Read(SEXP table_reader_sexp){ BEGIN_CPP11 arrow::r::Input&>::type table_reader(table_reader_sexp); return cpp11::as_sexp(csv___TableReader__Read(table_reader)); END_CPP11 } - #else - extern "C" SEXP _arrow_csv___TableReader__Read(SEXP table_reader_sexp){ - Rf_error("Cannot call csv___TableReader__Read(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_csv___TableReader__Read(SEXP table_reader_sexp){ + Rf_error("Cannot call csv___TableReader__Read(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // csv.cpp - #if defined(ARROW_R_WITH_ARROW) - std::string TimestampParser__kind(const std::shared_ptr& parser); +#if defined(ARROW_R_WITH_ARROW) +std::string TimestampParser__kind(const std::shared_ptr& parser); extern "C" SEXP _arrow_TimestampParser__kind(SEXP parser_sexp){ BEGIN_CPP11 arrow::r::Input&>::type parser(parser_sexp); return cpp11::as_sexp(TimestampParser__kind(parser)); END_CPP11 } - #else - extern "C" SEXP _arrow_TimestampParser__kind(SEXP parser_sexp){ - Rf_error("Cannot call TimestampParser__kind(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_TimestampParser__kind(SEXP parser_sexp){ + Rf_error("Cannot call TimestampParser__kind(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // csv.cpp - #if defined(ARROW_R_WITH_ARROW) - std::string TimestampParser__format(const std::shared_ptr& parser); +#if defined(ARROW_R_WITH_ARROW) +std::string TimestampParser__format(const std::shared_ptr& parser); extern "C" SEXP _arrow_TimestampParser__format(SEXP parser_sexp){ BEGIN_CPP11 arrow::r::Input&>::type parser(parser_sexp); return cpp11::as_sexp(TimestampParser__format(parser)); END_CPP11 } - #else - extern "C" SEXP _arrow_TimestampParser__format(SEXP parser_sexp){ - Rf_error("Cannot call TimestampParser__format(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_TimestampParser__format(SEXP parser_sexp){ + Rf_error("Cannot call TimestampParser__format(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // csv.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr TimestampParser__MakeStrptime(std::string format); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr TimestampParser__MakeStrptime(std::string format); extern "C" SEXP _arrow_TimestampParser__MakeStrptime(SEXP format_sexp){ BEGIN_CPP11 arrow::r::Input::type format(format_sexp); return cpp11::as_sexp(TimestampParser__MakeStrptime(format)); END_CPP11 } - #else - extern "C" SEXP _arrow_TimestampParser__MakeStrptime(SEXP format_sexp){ - Rf_error("Cannot call TimestampParser__MakeStrptime(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_TimestampParser__MakeStrptime(SEXP format_sexp){ + Rf_error("Cannot call TimestampParser__MakeStrptime(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // csv.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr TimestampParser__MakeISO8601(); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr TimestampParser__MakeISO8601(); extern "C" SEXP _arrow_TimestampParser__MakeISO8601(){ BEGIN_CPP11 return cpp11::as_sexp(TimestampParser__MakeISO8601()); END_CPP11 } - #else - extern "C" SEXP _arrow_TimestampParser__MakeISO8601(){ - Rf_error("Cannot call TimestampParser__MakeISO8601(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_TimestampParser__MakeISO8601(){ + Rf_error("Cannot call TimestampParser__MakeISO8601(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // csv.cpp - #if defined(ARROW_R_WITH_ARROW) - void csv___WriteCSV__Table(const std::shared_ptr& table, const std::shared_ptr& write_options, const std::shared_ptr& stream); +#if defined(ARROW_R_WITH_ARROW) +void csv___WriteCSV__Table(const std::shared_ptr& table, const std::shared_ptr& write_options, const std::shared_ptr& stream); extern "C" SEXP _arrow_csv___WriteCSV__Table(SEXP table_sexp, SEXP write_options_sexp, SEXP stream_sexp){ BEGIN_CPP11 arrow::r::Input&>::type table(table_sexp); @@ -1552,15 +1552,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_csv___WriteCSV__Table(SEXP table_sexp, SEXP write_options_sexp, SEXP stream_sexp){ - Rf_error("Cannot call csv___WriteCSV__Table(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_csv___WriteCSV__Table(SEXP table_sexp, SEXP write_options_sexp, SEXP stream_sexp){ + Rf_error("Cannot call csv___WriteCSV__Table(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // csv.cpp - #if defined(ARROW_R_WITH_ARROW) - void csv___WriteCSV__RecordBatch(const std::shared_ptr& record_batch, const std::shared_ptr& write_options, const std::shared_ptr& stream); +#if defined(ARROW_R_WITH_ARROW) +void csv___WriteCSV__RecordBatch(const std::shared_ptr& record_batch, const std::shared_ptr& write_options, const std::shared_ptr& stream); extern "C" SEXP _arrow_csv___WriteCSV__RecordBatch(SEXP record_batch_sexp, SEXP write_options_sexp, SEXP stream_sexp){ BEGIN_CPP11 arrow::r::Input&>::type record_batch(record_batch_sexp); @@ -1570,60 +1570,60 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_csv___WriteCSV__RecordBatch(SEXP record_batch_sexp, SEXP write_options_sexp, SEXP stream_sexp){ - Rf_error("Cannot call csv___WriteCSV__RecordBatch(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_csv___WriteCSV__RecordBatch(SEXP record_batch_sexp, SEXP write_options_sexp, SEXP stream_sexp){ + Rf_error("Cannot call csv___WriteCSV__RecordBatch(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - std::shared_ptr dataset___Dataset__NewScan(const std::shared_ptr& ds); +#if defined(ARROW_R_WITH_DATASET) +std::shared_ptr dataset___Dataset__NewScan(const std::shared_ptr& ds); extern "C" SEXP _arrow_dataset___Dataset__NewScan(SEXP ds_sexp){ BEGIN_CPP11 arrow::r::Input&>::type ds(ds_sexp); return cpp11::as_sexp(dataset___Dataset__NewScan(ds)); END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___Dataset__NewScan(SEXP ds_sexp){ - Rf_error("Cannot call dataset___Dataset__NewScan(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___Dataset__NewScan(SEXP ds_sexp){ + Rf_error("Cannot call dataset___Dataset__NewScan(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - std::shared_ptr dataset___Dataset__schema(const std::shared_ptr& dataset); +#if defined(ARROW_R_WITH_DATASET) +std::shared_ptr dataset___Dataset__schema(const std::shared_ptr& dataset); extern "C" SEXP _arrow_dataset___Dataset__schema(SEXP dataset_sexp){ BEGIN_CPP11 arrow::r::Input&>::type dataset(dataset_sexp); return cpp11::as_sexp(dataset___Dataset__schema(dataset)); END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___Dataset__schema(SEXP dataset_sexp){ - Rf_error("Cannot call dataset___Dataset__schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___Dataset__schema(SEXP dataset_sexp){ + Rf_error("Cannot call dataset___Dataset__schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - std::string dataset___Dataset__type_name(const std::shared_ptr& dataset); +#if defined(ARROW_R_WITH_DATASET) +std::string dataset___Dataset__type_name(const std::shared_ptr& dataset); extern "C" SEXP _arrow_dataset___Dataset__type_name(SEXP dataset_sexp){ BEGIN_CPP11 arrow::r::Input&>::type dataset(dataset_sexp); return cpp11::as_sexp(dataset___Dataset__type_name(dataset)); END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___Dataset__type_name(SEXP dataset_sexp){ - Rf_error("Cannot call dataset___Dataset__type_name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___Dataset__type_name(SEXP dataset_sexp){ + Rf_error("Cannot call dataset___Dataset__type_name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - std::shared_ptr dataset___Dataset__ReplaceSchema(const std::shared_ptr& dataset, const std::shared_ptr& schm); +#if defined(ARROW_R_WITH_DATASET) +std::shared_ptr dataset___Dataset__ReplaceSchema(const std::shared_ptr& dataset, const std::shared_ptr& schm); extern "C" SEXP _arrow_dataset___Dataset__ReplaceSchema(SEXP dataset_sexp, SEXP schm_sexp){ BEGIN_CPP11 arrow::r::Input&>::type dataset(dataset_sexp); @@ -1631,15 +1631,15 @@ BEGIN_CPP11 return cpp11::as_sexp(dataset___Dataset__ReplaceSchema(dataset, schm)); END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___Dataset__ReplaceSchema(SEXP dataset_sexp, SEXP schm_sexp){ - Rf_error("Cannot call dataset___Dataset__ReplaceSchema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___Dataset__ReplaceSchema(SEXP dataset_sexp, SEXP schm_sexp){ + Rf_error("Cannot call dataset___Dataset__ReplaceSchema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - std::shared_ptr dataset___UnionDataset__create(const ds::DatasetVector& datasets, const std::shared_ptr& schm); +#if defined(ARROW_R_WITH_DATASET) +std::shared_ptr dataset___UnionDataset__create(const ds::DatasetVector& datasets, const std::shared_ptr& schm); extern "C" SEXP _arrow_dataset___UnionDataset__create(SEXP datasets_sexp, SEXP schm_sexp){ BEGIN_CPP11 arrow::r::Input::type datasets(datasets_sexp); @@ -1647,90 +1647,90 @@ BEGIN_CPP11 return cpp11::as_sexp(dataset___UnionDataset__create(datasets, schm)); END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___UnionDataset__create(SEXP datasets_sexp, SEXP schm_sexp){ - Rf_error("Cannot call dataset___UnionDataset__create(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___UnionDataset__create(SEXP datasets_sexp, SEXP schm_sexp){ + Rf_error("Cannot call dataset___UnionDataset__create(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - std::shared_ptr dataset___InMemoryDataset__create(const std::shared_ptr& table); +#if defined(ARROW_R_WITH_DATASET) +std::shared_ptr dataset___InMemoryDataset__create(const std::shared_ptr& table); extern "C" SEXP _arrow_dataset___InMemoryDataset__create(SEXP table_sexp){ BEGIN_CPP11 arrow::r::Input&>::type table(table_sexp); return cpp11::as_sexp(dataset___InMemoryDataset__create(table)); END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___InMemoryDataset__create(SEXP table_sexp){ - Rf_error("Cannot call dataset___InMemoryDataset__create(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___InMemoryDataset__create(SEXP table_sexp){ + Rf_error("Cannot call dataset___InMemoryDataset__create(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - cpp11::list dataset___UnionDataset__children(const std::shared_ptr& ds); +#if defined(ARROW_R_WITH_DATASET) +cpp11::list dataset___UnionDataset__children(const std::shared_ptr& ds); extern "C" SEXP _arrow_dataset___UnionDataset__children(SEXP ds_sexp){ BEGIN_CPP11 arrow::r::Input&>::type ds(ds_sexp); return cpp11::as_sexp(dataset___UnionDataset__children(ds)); END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___UnionDataset__children(SEXP ds_sexp){ - Rf_error("Cannot call dataset___UnionDataset__children(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___UnionDataset__children(SEXP ds_sexp){ + Rf_error("Cannot call dataset___UnionDataset__children(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - std::shared_ptr dataset___FileSystemDataset__format(const std::shared_ptr& dataset); +#if defined(ARROW_R_WITH_DATASET) +std::shared_ptr dataset___FileSystemDataset__format(const std::shared_ptr& dataset); extern "C" SEXP _arrow_dataset___FileSystemDataset__format(SEXP dataset_sexp){ BEGIN_CPP11 arrow::r::Input&>::type dataset(dataset_sexp); return cpp11::as_sexp(dataset___FileSystemDataset__format(dataset)); END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___FileSystemDataset__format(SEXP dataset_sexp){ - Rf_error("Cannot call dataset___FileSystemDataset__format(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___FileSystemDataset__format(SEXP dataset_sexp){ + Rf_error("Cannot call dataset___FileSystemDataset__format(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - std::shared_ptr dataset___FileSystemDataset__filesystem(const std::shared_ptr& dataset); +#if defined(ARROW_R_WITH_DATASET) +std::shared_ptr dataset___FileSystemDataset__filesystem(const std::shared_ptr& dataset); extern "C" SEXP _arrow_dataset___FileSystemDataset__filesystem(SEXP dataset_sexp){ BEGIN_CPP11 arrow::r::Input&>::type dataset(dataset_sexp); return cpp11::as_sexp(dataset___FileSystemDataset__filesystem(dataset)); END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___FileSystemDataset__filesystem(SEXP dataset_sexp){ - Rf_error("Cannot call dataset___FileSystemDataset__filesystem(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - -// dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - std::vector dataset___FileSystemDataset__files(const std::shared_ptr& dataset); -extern "C" SEXP _arrow_dataset___FileSystemDataset__files(SEXP dataset_sexp){ +#else +extern "C" SEXP _arrow_dataset___FileSystemDataset__filesystem(SEXP dataset_sexp){ + Rf_error("Cannot call dataset___FileSystemDataset__filesystem(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + +// dataset.cpp +#if defined(ARROW_R_WITH_DATASET) +std::vector dataset___FileSystemDataset__files(const std::shared_ptr& dataset); +extern "C" SEXP _arrow_dataset___FileSystemDataset__files(SEXP dataset_sexp){ BEGIN_CPP11 arrow::r::Input&>::type dataset(dataset_sexp); return cpp11::as_sexp(dataset___FileSystemDataset__files(dataset)); END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___FileSystemDataset__files(SEXP dataset_sexp){ - Rf_error("Cannot call dataset___FileSystemDataset__files(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___FileSystemDataset__files(SEXP dataset_sexp){ + Rf_error("Cannot call dataset___FileSystemDataset__files(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - std::shared_ptr dataset___DatasetFactory__Finish1(const std::shared_ptr& factory, bool unify_schemas); +#if defined(ARROW_R_WITH_DATASET) +std::shared_ptr dataset___DatasetFactory__Finish1(const std::shared_ptr& factory, bool unify_schemas); extern "C" SEXP _arrow_dataset___DatasetFactory__Finish1(SEXP factory_sexp, SEXP unify_schemas_sexp){ BEGIN_CPP11 arrow::r::Input&>::type factory(factory_sexp); @@ -1738,15 +1738,15 @@ BEGIN_CPP11 return cpp11::as_sexp(dataset___DatasetFactory__Finish1(factory, unify_schemas)); END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___DatasetFactory__Finish1(SEXP factory_sexp, SEXP unify_schemas_sexp){ - Rf_error("Cannot call dataset___DatasetFactory__Finish1(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___DatasetFactory__Finish1(SEXP factory_sexp, SEXP unify_schemas_sexp){ + Rf_error("Cannot call dataset___DatasetFactory__Finish1(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - std::shared_ptr dataset___DatasetFactory__Finish2(const std::shared_ptr& factory, const std::shared_ptr& schema); +#if defined(ARROW_R_WITH_DATASET) +std::shared_ptr dataset___DatasetFactory__Finish2(const std::shared_ptr& factory, const std::shared_ptr& schema); extern "C" SEXP _arrow_dataset___DatasetFactory__Finish2(SEXP factory_sexp, SEXP schema_sexp){ BEGIN_CPP11 arrow::r::Input&>::type factory(factory_sexp); @@ -1754,15 +1754,15 @@ BEGIN_CPP11 return cpp11::as_sexp(dataset___DatasetFactory__Finish2(factory, schema)); END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___DatasetFactory__Finish2(SEXP factory_sexp, SEXP schema_sexp){ - Rf_error("Cannot call dataset___DatasetFactory__Finish2(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___DatasetFactory__Finish2(SEXP factory_sexp, SEXP schema_sexp){ + Rf_error("Cannot call dataset___DatasetFactory__Finish2(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - std::shared_ptr dataset___DatasetFactory__Inspect(const std::shared_ptr& factory, bool unify_schemas); +#if defined(ARROW_R_WITH_DATASET) +std::shared_ptr dataset___DatasetFactory__Inspect(const std::shared_ptr& factory, bool unify_schemas); extern "C" SEXP _arrow_dataset___DatasetFactory__Inspect(SEXP factory_sexp, SEXP unify_schemas_sexp){ BEGIN_CPP11 arrow::r::Input&>::type factory(factory_sexp); @@ -1770,30 +1770,30 @@ BEGIN_CPP11 return cpp11::as_sexp(dataset___DatasetFactory__Inspect(factory, unify_schemas)); END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___DatasetFactory__Inspect(SEXP factory_sexp, SEXP unify_schemas_sexp){ - Rf_error("Cannot call dataset___DatasetFactory__Inspect(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___DatasetFactory__Inspect(SEXP factory_sexp, SEXP unify_schemas_sexp){ + Rf_error("Cannot call dataset___DatasetFactory__Inspect(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - std::shared_ptr dataset___UnionDatasetFactory__Make(const std::vector>& children); +#if defined(ARROW_R_WITH_DATASET) +std::shared_ptr dataset___UnionDatasetFactory__Make(const std::vector>& children); extern "C" SEXP _arrow_dataset___UnionDatasetFactory__Make(SEXP children_sexp){ BEGIN_CPP11 arrow::r::Input>&>::type children(children_sexp); return cpp11::as_sexp(dataset___UnionDatasetFactory__Make(children)); END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___UnionDatasetFactory__Make(SEXP children_sexp){ - Rf_error("Cannot call dataset___UnionDatasetFactory__Make(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___UnionDatasetFactory__Make(SEXP children_sexp){ + Rf_error("Cannot call dataset___UnionDatasetFactory__Make(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - std::shared_ptr dataset___FileSystemDatasetFactory__Make0(const std::shared_ptr& fs, const std::vector& paths, const std::shared_ptr& format); +#if defined(ARROW_R_WITH_DATASET) +std::shared_ptr dataset___FileSystemDatasetFactory__Make0(const std::shared_ptr& fs, const std::vector& paths, const std::shared_ptr& format); extern "C" SEXP _arrow_dataset___FileSystemDatasetFactory__Make0(SEXP fs_sexp, SEXP paths_sexp, SEXP format_sexp){ BEGIN_CPP11 arrow::r::Input&>::type fs(fs_sexp); @@ -1802,15 +1802,15 @@ BEGIN_CPP11 return cpp11::as_sexp(dataset___FileSystemDatasetFactory__Make0(fs, paths, format)); END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___FileSystemDatasetFactory__Make0(SEXP fs_sexp, SEXP paths_sexp, SEXP format_sexp){ - Rf_error("Cannot call dataset___FileSystemDatasetFactory__Make0(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___FileSystemDatasetFactory__Make0(SEXP fs_sexp, SEXP paths_sexp, SEXP format_sexp){ + Rf_error("Cannot call dataset___FileSystemDatasetFactory__Make0(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - std::shared_ptr dataset___FileSystemDatasetFactory__Make2(const std::shared_ptr& fs, const std::shared_ptr& selector, const std::shared_ptr& format, const std::shared_ptr& partitioning); +#if defined(ARROW_R_WITH_DATASET) +std::shared_ptr dataset___FileSystemDatasetFactory__Make2(const std::shared_ptr& fs, const std::shared_ptr& selector, const std::shared_ptr& format, const std::shared_ptr& partitioning); extern "C" SEXP _arrow_dataset___FileSystemDatasetFactory__Make2(SEXP fs_sexp, SEXP selector_sexp, SEXP format_sexp, SEXP partitioning_sexp){ BEGIN_CPP11 arrow::r::Input&>::type fs(fs_sexp); @@ -1820,15 +1820,15 @@ BEGIN_CPP11 return cpp11::as_sexp(dataset___FileSystemDatasetFactory__Make2(fs, selector, format, partitioning)); END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___FileSystemDatasetFactory__Make2(SEXP fs_sexp, SEXP selector_sexp, SEXP format_sexp, SEXP partitioning_sexp){ - Rf_error("Cannot call dataset___FileSystemDatasetFactory__Make2(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___FileSystemDatasetFactory__Make2(SEXP fs_sexp, SEXP selector_sexp, SEXP format_sexp, SEXP partitioning_sexp){ + Rf_error("Cannot call dataset___FileSystemDatasetFactory__Make2(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - std::shared_ptr dataset___FileSystemDatasetFactory__Make1(const std::shared_ptr& fs, const std::shared_ptr& selector, const std::shared_ptr& format); +#if defined(ARROW_R_WITH_DATASET) +std::shared_ptr dataset___FileSystemDatasetFactory__Make1(const std::shared_ptr& fs, const std::shared_ptr& selector, const std::shared_ptr& format); extern "C" SEXP _arrow_dataset___FileSystemDatasetFactory__Make1(SEXP fs_sexp, SEXP selector_sexp, SEXP format_sexp){ BEGIN_CPP11 arrow::r::Input&>::type fs(fs_sexp); @@ -1837,15 +1837,15 @@ BEGIN_CPP11 return cpp11::as_sexp(dataset___FileSystemDatasetFactory__Make1(fs, selector, format)); END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___FileSystemDatasetFactory__Make1(SEXP fs_sexp, SEXP selector_sexp, SEXP format_sexp){ - Rf_error("Cannot call dataset___FileSystemDatasetFactory__Make1(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___FileSystemDatasetFactory__Make1(SEXP fs_sexp, SEXP selector_sexp, SEXP format_sexp){ + Rf_error("Cannot call dataset___FileSystemDatasetFactory__Make1(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - std::shared_ptr dataset___FileSystemDatasetFactory__Make3(const std::shared_ptr& fs, const std::shared_ptr& selector, const std::shared_ptr& format, const std::shared_ptr& factory); +#if defined(ARROW_R_WITH_DATASET) +std::shared_ptr dataset___FileSystemDatasetFactory__Make3(const std::shared_ptr& fs, const std::shared_ptr& selector, const std::shared_ptr& format, const std::shared_ptr& factory); extern "C" SEXP _arrow_dataset___FileSystemDatasetFactory__Make3(SEXP fs_sexp, SEXP selector_sexp, SEXP format_sexp, SEXP factory_sexp){ BEGIN_CPP11 arrow::r::Input&>::type fs(fs_sexp); @@ -1855,45 +1855,45 @@ BEGIN_CPP11 return cpp11::as_sexp(dataset___FileSystemDatasetFactory__Make3(fs, selector, format, factory)); END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___FileSystemDatasetFactory__Make3(SEXP fs_sexp, SEXP selector_sexp, SEXP format_sexp, SEXP factory_sexp){ - Rf_error("Cannot call dataset___FileSystemDatasetFactory__Make3(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___FileSystemDatasetFactory__Make3(SEXP fs_sexp, SEXP selector_sexp, SEXP format_sexp, SEXP factory_sexp){ + Rf_error("Cannot call dataset___FileSystemDatasetFactory__Make3(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - std::string dataset___FileFormat__type_name(const std::shared_ptr& format); +#if defined(ARROW_R_WITH_DATASET) +std::string dataset___FileFormat__type_name(const std::shared_ptr& format); extern "C" SEXP _arrow_dataset___FileFormat__type_name(SEXP format_sexp){ BEGIN_CPP11 arrow::r::Input&>::type format(format_sexp); return cpp11::as_sexp(dataset___FileFormat__type_name(format)); END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___FileFormat__type_name(SEXP format_sexp){ - Rf_error("Cannot call dataset___FileFormat__type_name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___FileFormat__type_name(SEXP format_sexp){ + Rf_error("Cannot call dataset___FileFormat__type_name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - std::shared_ptr dataset___FileFormat__DefaultWriteOptions(const std::shared_ptr& fmt); +#if defined(ARROW_R_WITH_DATASET) +std::shared_ptr dataset___FileFormat__DefaultWriteOptions(const std::shared_ptr& fmt); extern "C" SEXP _arrow_dataset___FileFormat__DefaultWriteOptions(SEXP fmt_sexp){ BEGIN_CPP11 arrow::r::Input&>::type fmt(fmt_sexp); return cpp11::as_sexp(dataset___FileFormat__DefaultWriteOptions(fmt)); END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___FileFormat__DefaultWriteOptions(SEXP fmt_sexp){ - Rf_error("Cannot call dataset___FileFormat__DefaultWriteOptions(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___FileFormat__DefaultWriteOptions(SEXP fmt_sexp){ + Rf_error("Cannot call dataset___FileFormat__DefaultWriteOptions(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - std::shared_ptr dataset___ParquetFileFormat__Make(const std::shared_ptr& options, cpp11::strings dict_columns); +#if defined(ARROW_R_WITH_DATASET) +std::shared_ptr dataset___ParquetFileFormat__Make(const std::shared_ptr& options, cpp11::strings dict_columns); extern "C" SEXP _arrow_dataset___ParquetFileFormat__Make(SEXP options_sexp, SEXP dict_columns_sexp){ BEGIN_CPP11 arrow::r::Input&>::type options(options_sexp); @@ -1901,30 +1901,30 @@ BEGIN_CPP11 return cpp11::as_sexp(dataset___ParquetFileFormat__Make(options, dict_columns)); END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___ParquetFileFormat__Make(SEXP options_sexp, SEXP dict_columns_sexp){ - Rf_error("Cannot call dataset___ParquetFileFormat__Make(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___ParquetFileFormat__Make(SEXP options_sexp, SEXP dict_columns_sexp){ + Rf_error("Cannot call dataset___ParquetFileFormat__Make(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - std::string dataset___FileWriteOptions__type_name(const std::shared_ptr& options); +#if defined(ARROW_R_WITH_DATASET) +std::string dataset___FileWriteOptions__type_name(const std::shared_ptr& options); extern "C" SEXP _arrow_dataset___FileWriteOptions__type_name(SEXP options_sexp){ BEGIN_CPP11 arrow::r::Input&>::type options(options_sexp); return cpp11::as_sexp(dataset___FileWriteOptions__type_name(options)); END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___FileWriteOptions__type_name(SEXP options_sexp){ - Rf_error("Cannot call dataset___FileWriteOptions__type_name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___FileWriteOptions__type_name(SEXP options_sexp){ + Rf_error("Cannot call dataset___FileWriteOptions__type_name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - void dataset___ParquetFileWriteOptions__update(const std::shared_ptr& options, const std::shared_ptr& writer_props, const std::shared_ptr& arrow_writer_props); +#if defined(ARROW_R_WITH_DATASET) +void dataset___ParquetFileWriteOptions__update(const std::shared_ptr& options, const std::shared_ptr& writer_props, const std::shared_ptr& arrow_writer_props); extern "C" SEXP _arrow_dataset___ParquetFileWriteOptions__update(SEXP options_sexp, SEXP writer_props_sexp, SEXP arrow_writer_props_sexp){ BEGIN_CPP11 arrow::r::Input&>::type options(options_sexp); @@ -1934,15 +1934,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___ParquetFileWriteOptions__update(SEXP options_sexp, SEXP writer_props_sexp, SEXP arrow_writer_props_sexp){ - Rf_error("Cannot call dataset___ParquetFileWriteOptions__update(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___ParquetFileWriteOptions__update(SEXP options_sexp, SEXP writer_props_sexp, SEXP arrow_writer_props_sexp){ + Rf_error("Cannot call dataset___ParquetFileWriteOptions__update(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - void dataset___IpcFileWriteOptions__update2(const std::shared_ptr& ipc_options, bool use_legacy_format, const std::shared_ptr& codec, arrow::ipc::MetadataVersion metadata_version); +#if defined(ARROW_R_WITH_DATASET) +void dataset___IpcFileWriteOptions__update2(const std::shared_ptr& ipc_options, bool use_legacy_format, const std::shared_ptr& codec, arrow::ipc::MetadataVersion metadata_version); extern "C" SEXP _arrow_dataset___IpcFileWriteOptions__update2(SEXP ipc_options_sexp, SEXP use_legacy_format_sexp, SEXP codec_sexp, SEXP metadata_version_sexp){ BEGIN_CPP11 arrow::r::Input&>::type ipc_options(ipc_options_sexp); @@ -1953,15 +1953,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___IpcFileWriteOptions__update2(SEXP ipc_options_sexp, SEXP use_legacy_format_sexp, SEXP codec_sexp, SEXP metadata_version_sexp){ - Rf_error("Cannot call dataset___IpcFileWriteOptions__update2(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___IpcFileWriteOptions__update2(SEXP ipc_options_sexp, SEXP use_legacy_format_sexp, SEXP codec_sexp, SEXP metadata_version_sexp){ + Rf_error("Cannot call dataset___IpcFileWriteOptions__update2(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - void dataset___IpcFileWriteOptions__update1(const std::shared_ptr& ipc_options, bool use_legacy_format, arrow::ipc::MetadataVersion metadata_version); +#if defined(ARROW_R_WITH_DATASET) +void dataset___IpcFileWriteOptions__update1(const std::shared_ptr& ipc_options, bool use_legacy_format, arrow::ipc::MetadataVersion metadata_version); extern "C" SEXP _arrow_dataset___IpcFileWriteOptions__update1(SEXP ipc_options_sexp, SEXP use_legacy_format_sexp, SEXP metadata_version_sexp){ BEGIN_CPP11 arrow::r::Input&>::type ipc_options(ipc_options_sexp); @@ -1971,15 +1971,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___IpcFileWriteOptions__update1(SEXP ipc_options_sexp, SEXP use_legacy_format_sexp, SEXP metadata_version_sexp){ - Rf_error("Cannot call dataset___IpcFileWriteOptions__update1(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___IpcFileWriteOptions__update1(SEXP ipc_options_sexp, SEXP use_legacy_format_sexp, SEXP metadata_version_sexp){ + Rf_error("Cannot call dataset___IpcFileWriteOptions__update1(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - void dataset___CsvFileWriteOptions__update(const std::shared_ptr& csv_options, const std::shared_ptr& write_options); +#if defined(ARROW_R_WITH_DATASET) +void dataset___CsvFileWriteOptions__update(const std::shared_ptr& csv_options, const std::shared_ptr& write_options); extern "C" SEXP _arrow_dataset___CsvFileWriteOptions__update(SEXP csv_options_sexp, SEXP write_options_sexp){ BEGIN_CPP11 arrow::r::Input&>::type csv_options(csv_options_sexp); @@ -1988,29 +1988,29 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___CsvFileWriteOptions__update(SEXP csv_options_sexp, SEXP write_options_sexp){ - Rf_error("Cannot call dataset___CsvFileWriteOptions__update(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___CsvFileWriteOptions__update(SEXP csv_options_sexp, SEXP write_options_sexp){ + Rf_error("Cannot call dataset___CsvFileWriteOptions__update(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - std::shared_ptr dataset___IpcFileFormat__Make(); +#if defined(ARROW_R_WITH_DATASET) +std::shared_ptr dataset___IpcFileFormat__Make(); extern "C" SEXP _arrow_dataset___IpcFileFormat__Make(){ BEGIN_CPP11 return cpp11::as_sexp(dataset___IpcFileFormat__Make()); END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___IpcFileFormat__Make(){ - Rf_error("Cannot call dataset___IpcFileFormat__Make(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___IpcFileFormat__Make(){ + Rf_error("Cannot call dataset___IpcFileFormat__Make(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - std::shared_ptr dataset___CsvFileFormat__Make(const std::shared_ptr& parse_options, const std::shared_ptr& convert_options, const std::shared_ptr& read_options); +#if defined(ARROW_R_WITH_DATASET) +std::shared_ptr dataset___CsvFileFormat__Make(const std::shared_ptr& parse_options, const std::shared_ptr& convert_options, const std::shared_ptr& read_options); extern "C" SEXP _arrow_dataset___CsvFileFormat__Make(SEXP parse_options_sexp, SEXP convert_options_sexp, SEXP read_options_sexp){ BEGIN_CPP11 arrow::r::Input&>::type parse_options(parse_options_sexp); @@ -2019,30 +2019,30 @@ BEGIN_CPP11 return cpp11::as_sexp(dataset___CsvFileFormat__Make(parse_options, convert_options, read_options)); END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___CsvFileFormat__Make(SEXP parse_options_sexp, SEXP convert_options_sexp, SEXP read_options_sexp){ - Rf_error("Cannot call dataset___CsvFileFormat__Make(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___CsvFileFormat__Make(SEXP parse_options_sexp, SEXP convert_options_sexp, SEXP read_options_sexp){ + Rf_error("Cannot call dataset___CsvFileFormat__Make(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - std::string dataset___FragmentScanOptions__type_name(const std::shared_ptr& fragment_scan_options); +#if defined(ARROW_R_WITH_DATASET) +std::string dataset___FragmentScanOptions__type_name(const std::shared_ptr& fragment_scan_options); extern "C" SEXP _arrow_dataset___FragmentScanOptions__type_name(SEXP fragment_scan_options_sexp){ BEGIN_CPP11 arrow::r::Input&>::type fragment_scan_options(fragment_scan_options_sexp); return cpp11::as_sexp(dataset___FragmentScanOptions__type_name(fragment_scan_options)); END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___FragmentScanOptions__type_name(SEXP fragment_scan_options_sexp){ - Rf_error("Cannot call dataset___FragmentScanOptions__type_name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___FragmentScanOptions__type_name(SEXP fragment_scan_options_sexp){ + Rf_error("Cannot call dataset___FragmentScanOptions__type_name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - std::shared_ptr dataset___CsvFragmentScanOptions__Make(const std::shared_ptr& convert_options, const std::shared_ptr& read_options); +#if defined(ARROW_R_WITH_DATASET) +std::shared_ptr dataset___CsvFragmentScanOptions__Make(const std::shared_ptr& convert_options, const std::shared_ptr& read_options); extern "C" SEXP _arrow_dataset___CsvFragmentScanOptions__Make(SEXP convert_options_sexp, SEXP read_options_sexp){ BEGIN_CPP11 arrow::r::Input&>::type convert_options(convert_options_sexp); @@ -2050,15 +2050,15 @@ BEGIN_CPP11 return cpp11::as_sexp(dataset___CsvFragmentScanOptions__Make(convert_options, read_options)); END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___CsvFragmentScanOptions__Make(SEXP convert_options_sexp, SEXP read_options_sexp){ - Rf_error("Cannot call dataset___CsvFragmentScanOptions__Make(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___CsvFragmentScanOptions__Make(SEXP convert_options_sexp, SEXP read_options_sexp){ + Rf_error("Cannot call dataset___CsvFragmentScanOptions__Make(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - std::shared_ptr dataset___ParquetFragmentScanOptions__Make(bool use_buffered_stream, int64_t buffer_size, bool pre_buffer); +#if defined(ARROW_R_WITH_DATASET) +std::shared_ptr dataset___ParquetFragmentScanOptions__Make(bool use_buffered_stream, int64_t buffer_size, bool pre_buffer); extern "C" SEXP _arrow_dataset___ParquetFragmentScanOptions__Make(SEXP use_buffered_stream_sexp, SEXP buffer_size_sexp, SEXP pre_buffer_sexp){ BEGIN_CPP11 arrow::r::Input::type use_buffered_stream(use_buffered_stream_sexp); @@ -2067,15 +2067,15 @@ BEGIN_CPP11 return cpp11::as_sexp(dataset___ParquetFragmentScanOptions__Make(use_buffered_stream, buffer_size, pre_buffer)); END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___ParquetFragmentScanOptions__Make(SEXP use_buffered_stream_sexp, SEXP buffer_size_sexp, SEXP pre_buffer_sexp){ - Rf_error("Cannot call dataset___ParquetFragmentScanOptions__Make(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___ParquetFragmentScanOptions__Make(SEXP use_buffered_stream_sexp, SEXP buffer_size_sexp, SEXP pre_buffer_sexp){ + Rf_error("Cannot call dataset___ParquetFragmentScanOptions__Make(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - std::shared_ptr dataset___DirectoryPartitioning(const std::shared_ptr& schm, const std::string& segment_encoding); +#if defined(ARROW_R_WITH_DATASET) +std::shared_ptr dataset___DirectoryPartitioning(const std::shared_ptr& schm, const std::string& segment_encoding); extern "C" SEXP _arrow_dataset___DirectoryPartitioning(SEXP schm_sexp, SEXP segment_encoding_sexp){ BEGIN_CPP11 arrow::r::Input&>::type schm(schm_sexp); @@ -2083,15 +2083,15 @@ BEGIN_CPP11 return cpp11::as_sexp(dataset___DirectoryPartitioning(schm, segment_encoding)); END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___DirectoryPartitioning(SEXP schm_sexp, SEXP segment_encoding_sexp){ - Rf_error("Cannot call dataset___DirectoryPartitioning(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___DirectoryPartitioning(SEXP schm_sexp, SEXP segment_encoding_sexp){ + Rf_error("Cannot call dataset___DirectoryPartitioning(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - std::shared_ptr dataset___DirectoryPartitioning__MakeFactory(const std::vector& field_names, const std::string& segment_encoding); +#if defined(ARROW_R_WITH_DATASET) +std::shared_ptr dataset___DirectoryPartitioning__MakeFactory(const std::vector& field_names, const std::string& segment_encoding); extern "C" SEXP _arrow_dataset___DirectoryPartitioning__MakeFactory(SEXP field_names_sexp, SEXP segment_encoding_sexp){ BEGIN_CPP11 arrow::r::Input&>::type field_names(field_names_sexp); @@ -2099,15 +2099,15 @@ BEGIN_CPP11 return cpp11::as_sexp(dataset___DirectoryPartitioning__MakeFactory(field_names, segment_encoding)); END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___DirectoryPartitioning__MakeFactory(SEXP field_names_sexp, SEXP segment_encoding_sexp){ - Rf_error("Cannot call dataset___DirectoryPartitioning__MakeFactory(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___DirectoryPartitioning__MakeFactory(SEXP field_names_sexp, SEXP segment_encoding_sexp){ + Rf_error("Cannot call dataset___DirectoryPartitioning__MakeFactory(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - std::shared_ptr dataset___HivePartitioning(const std::shared_ptr& schm, const std::string& null_fallback, const std::string& segment_encoding); +#if defined(ARROW_R_WITH_DATASET) +std::shared_ptr dataset___HivePartitioning(const std::shared_ptr& schm, const std::string& null_fallback, const std::string& segment_encoding); extern "C" SEXP _arrow_dataset___HivePartitioning(SEXP schm_sexp, SEXP null_fallback_sexp, SEXP segment_encoding_sexp){ BEGIN_CPP11 arrow::r::Input&>::type schm(schm_sexp); @@ -2116,15 +2116,15 @@ BEGIN_CPP11 return cpp11::as_sexp(dataset___HivePartitioning(schm, null_fallback, segment_encoding)); END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___HivePartitioning(SEXP schm_sexp, SEXP null_fallback_sexp, SEXP segment_encoding_sexp){ - Rf_error("Cannot call dataset___HivePartitioning(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___HivePartitioning(SEXP schm_sexp, SEXP null_fallback_sexp, SEXP segment_encoding_sexp){ + Rf_error("Cannot call dataset___HivePartitioning(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - std::shared_ptr dataset___HivePartitioning__MakeFactory(const std::string& null_fallback, const std::string& segment_encoding); +#if defined(ARROW_R_WITH_DATASET) +std::shared_ptr dataset___HivePartitioning__MakeFactory(const std::string& null_fallback, const std::string& segment_encoding); extern "C" SEXP _arrow_dataset___HivePartitioning__MakeFactory(SEXP null_fallback_sexp, SEXP segment_encoding_sexp){ BEGIN_CPP11 arrow::r::Input::type null_fallback(null_fallback_sexp); @@ -2132,15 +2132,15 @@ BEGIN_CPP11 return cpp11::as_sexp(dataset___HivePartitioning__MakeFactory(null_fallback, segment_encoding)); END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___HivePartitioning__MakeFactory(SEXP null_fallback_sexp, SEXP segment_encoding_sexp){ - Rf_error("Cannot call dataset___HivePartitioning__MakeFactory(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___HivePartitioning__MakeFactory(SEXP null_fallback_sexp, SEXP segment_encoding_sexp){ + Rf_error("Cannot call dataset___HivePartitioning__MakeFactory(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - void dataset___ScannerBuilder__ProjectNames(const std::shared_ptr& sb, const std::vector& cols); +#if defined(ARROW_R_WITH_DATASET) +void dataset___ScannerBuilder__ProjectNames(const std::shared_ptr& sb, const std::vector& cols); extern "C" SEXP _arrow_dataset___ScannerBuilder__ProjectNames(SEXP sb_sexp, SEXP cols_sexp){ BEGIN_CPP11 arrow::r::Input&>::type sb(sb_sexp); @@ -2149,15 +2149,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___ScannerBuilder__ProjectNames(SEXP sb_sexp, SEXP cols_sexp){ - Rf_error("Cannot call dataset___ScannerBuilder__ProjectNames(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___ScannerBuilder__ProjectNames(SEXP sb_sexp, SEXP cols_sexp){ + Rf_error("Cannot call dataset___ScannerBuilder__ProjectNames(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - void dataset___ScannerBuilder__ProjectExprs(const std::shared_ptr& sb, const std::vector>& exprs, const std::vector& names); +#if defined(ARROW_R_WITH_DATASET) +void dataset___ScannerBuilder__ProjectExprs(const std::shared_ptr& sb, const std::vector>& exprs, const std::vector& names); extern "C" SEXP _arrow_dataset___ScannerBuilder__ProjectExprs(SEXP sb_sexp, SEXP exprs_sexp, SEXP names_sexp){ BEGIN_CPP11 arrow::r::Input&>::type sb(sb_sexp); @@ -2167,15 +2167,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___ScannerBuilder__ProjectExprs(SEXP sb_sexp, SEXP exprs_sexp, SEXP names_sexp){ - Rf_error("Cannot call dataset___ScannerBuilder__ProjectExprs(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___ScannerBuilder__ProjectExprs(SEXP sb_sexp, SEXP exprs_sexp, SEXP names_sexp){ + Rf_error("Cannot call dataset___ScannerBuilder__ProjectExprs(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - void dataset___ScannerBuilder__Filter(const std::shared_ptr& sb, const std::shared_ptr& expr); +#if defined(ARROW_R_WITH_DATASET) +void dataset___ScannerBuilder__Filter(const std::shared_ptr& sb, const std::shared_ptr& expr); extern "C" SEXP _arrow_dataset___ScannerBuilder__Filter(SEXP sb_sexp, SEXP expr_sexp){ BEGIN_CPP11 arrow::r::Input&>::type sb(sb_sexp); @@ -2184,15 +2184,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___ScannerBuilder__Filter(SEXP sb_sexp, SEXP expr_sexp){ - Rf_error("Cannot call dataset___ScannerBuilder__Filter(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___ScannerBuilder__Filter(SEXP sb_sexp, SEXP expr_sexp){ + Rf_error("Cannot call dataset___ScannerBuilder__Filter(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - void dataset___ScannerBuilder__UseThreads(const std::shared_ptr& sb, bool threads); +#if defined(ARROW_R_WITH_DATASET) +void dataset___ScannerBuilder__UseThreads(const std::shared_ptr& sb, bool threads); extern "C" SEXP _arrow_dataset___ScannerBuilder__UseThreads(SEXP sb_sexp, SEXP threads_sexp){ BEGIN_CPP11 arrow::r::Input&>::type sb(sb_sexp); @@ -2201,15 +2201,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___ScannerBuilder__UseThreads(SEXP sb_sexp, SEXP threads_sexp){ - Rf_error("Cannot call dataset___ScannerBuilder__UseThreads(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___ScannerBuilder__UseThreads(SEXP sb_sexp, SEXP threads_sexp){ + Rf_error("Cannot call dataset___ScannerBuilder__UseThreads(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - void dataset___ScannerBuilder__UseAsync(const std::shared_ptr& sb, bool use_async); +#if defined(ARROW_R_WITH_DATASET) +void dataset___ScannerBuilder__UseAsync(const std::shared_ptr& sb, bool use_async); extern "C" SEXP _arrow_dataset___ScannerBuilder__UseAsync(SEXP sb_sexp, SEXP use_async_sexp){ BEGIN_CPP11 arrow::r::Input&>::type sb(sb_sexp); @@ -2218,15 +2218,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___ScannerBuilder__UseAsync(SEXP sb_sexp, SEXP use_async_sexp){ - Rf_error("Cannot call dataset___ScannerBuilder__UseAsync(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___ScannerBuilder__UseAsync(SEXP sb_sexp, SEXP use_async_sexp){ + Rf_error("Cannot call dataset___ScannerBuilder__UseAsync(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - void dataset___ScannerBuilder__BatchSize(const std::shared_ptr& sb, int64_t batch_size); +#if defined(ARROW_R_WITH_DATASET) +void dataset___ScannerBuilder__BatchSize(const std::shared_ptr& sb, int64_t batch_size); extern "C" SEXP _arrow_dataset___ScannerBuilder__BatchSize(SEXP sb_sexp, SEXP batch_size_sexp){ BEGIN_CPP11 arrow::r::Input&>::type sb(sb_sexp); @@ -2235,15 +2235,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___ScannerBuilder__BatchSize(SEXP sb_sexp, SEXP batch_size_sexp){ - Rf_error("Cannot call dataset___ScannerBuilder__BatchSize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___ScannerBuilder__BatchSize(SEXP sb_sexp, SEXP batch_size_sexp){ + Rf_error("Cannot call dataset___ScannerBuilder__BatchSize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - void dataset___ScannerBuilder__FragmentScanOptions(const std::shared_ptr& sb, const std::shared_ptr& options); +#if defined(ARROW_R_WITH_DATASET) +void dataset___ScannerBuilder__FragmentScanOptions(const std::shared_ptr& sb, const std::shared_ptr& options); extern "C" SEXP _arrow_dataset___ScannerBuilder__FragmentScanOptions(SEXP sb_sexp, SEXP options_sexp){ BEGIN_CPP11 arrow::r::Input&>::type sb(sb_sexp); @@ -2252,105 +2252,105 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___ScannerBuilder__FragmentScanOptions(SEXP sb_sexp, SEXP options_sexp){ - Rf_error("Cannot call dataset___ScannerBuilder__FragmentScanOptions(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___ScannerBuilder__FragmentScanOptions(SEXP sb_sexp, SEXP options_sexp){ + Rf_error("Cannot call dataset___ScannerBuilder__FragmentScanOptions(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - std::shared_ptr dataset___ScannerBuilder__schema(const std::shared_ptr& sb); +#if defined(ARROW_R_WITH_DATASET) +std::shared_ptr dataset___ScannerBuilder__schema(const std::shared_ptr& sb); extern "C" SEXP _arrow_dataset___ScannerBuilder__schema(SEXP sb_sexp){ BEGIN_CPP11 arrow::r::Input&>::type sb(sb_sexp); return cpp11::as_sexp(dataset___ScannerBuilder__schema(sb)); END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___ScannerBuilder__schema(SEXP sb_sexp){ - Rf_error("Cannot call dataset___ScannerBuilder__schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___ScannerBuilder__schema(SEXP sb_sexp){ + Rf_error("Cannot call dataset___ScannerBuilder__schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - std::shared_ptr dataset___ScannerBuilder__Finish(const std::shared_ptr& sb); +#if defined(ARROW_R_WITH_DATASET) +std::shared_ptr dataset___ScannerBuilder__Finish(const std::shared_ptr& sb); extern "C" SEXP _arrow_dataset___ScannerBuilder__Finish(SEXP sb_sexp){ BEGIN_CPP11 arrow::r::Input&>::type sb(sb_sexp); return cpp11::as_sexp(dataset___ScannerBuilder__Finish(sb)); END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___ScannerBuilder__Finish(SEXP sb_sexp){ - Rf_error("Cannot call dataset___ScannerBuilder__Finish(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___ScannerBuilder__Finish(SEXP sb_sexp){ + Rf_error("Cannot call dataset___ScannerBuilder__Finish(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - std::shared_ptr dataset___ScannerBuilder__FromRecordBatchReader(const std::shared_ptr& reader); +#if defined(ARROW_R_WITH_DATASET) +std::shared_ptr dataset___ScannerBuilder__FromRecordBatchReader(const std::shared_ptr& reader); extern "C" SEXP _arrow_dataset___ScannerBuilder__FromRecordBatchReader(SEXP reader_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); return cpp11::as_sexp(dataset___ScannerBuilder__FromRecordBatchReader(reader)); END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___ScannerBuilder__FromRecordBatchReader(SEXP reader_sexp){ - Rf_error("Cannot call dataset___ScannerBuilder__FromRecordBatchReader(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - -// dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - std::shared_ptr dataset___Scanner__ToTable(const std::shared_ptr& scanner); -extern "C" SEXP _arrow_dataset___Scanner__ToTable(SEXP scanner_sexp){ +#else +extern "C" SEXP _arrow_dataset___ScannerBuilder__FromRecordBatchReader(SEXP reader_sexp){ + Rf_error("Cannot call dataset___ScannerBuilder__FromRecordBatchReader(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + +// dataset.cpp +#if defined(ARROW_R_WITH_DATASET) +std::shared_ptr dataset___Scanner__ToTable(const std::shared_ptr& scanner); +extern "C" SEXP _arrow_dataset___Scanner__ToTable(SEXP scanner_sexp){ BEGIN_CPP11 arrow::r::Input&>::type scanner(scanner_sexp); return cpp11::as_sexp(dataset___Scanner__ToTable(scanner)); END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___Scanner__ToTable(SEXP scanner_sexp){ - Rf_error("Cannot call dataset___Scanner__ToTable(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___Scanner__ToTable(SEXP scanner_sexp){ + Rf_error("Cannot call dataset___Scanner__ToTable(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - cpp11::list dataset___Scanner__ScanBatches(const std::shared_ptr& scanner); +#if defined(ARROW_R_WITH_DATASET) +cpp11::list dataset___Scanner__ScanBatches(const std::shared_ptr& scanner); extern "C" SEXP _arrow_dataset___Scanner__ScanBatches(SEXP scanner_sexp){ BEGIN_CPP11 arrow::r::Input&>::type scanner(scanner_sexp); return cpp11::as_sexp(dataset___Scanner__ScanBatches(scanner)); END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___Scanner__ScanBatches(SEXP scanner_sexp){ - Rf_error("Cannot call dataset___Scanner__ScanBatches(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___Scanner__ScanBatches(SEXP scanner_sexp){ + Rf_error("Cannot call dataset___Scanner__ScanBatches(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - std::shared_ptr dataset___Scanner__ToRecordBatchReader(const std::shared_ptr& scanner); +#if defined(ARROW_R_WITH_DATASET) +std::shared_ptr dataset___Scanner__ToRecordBatchReader(const std::shared_ptr& scanner); extern "C" SEXP _arrow_dataset___Scanner__ToRecordBatchReader(SEXP scanner_sexp){ BEGIN_CPP11 arrow::r::Input&>::type scanner(scanner_sexp); return cpp11::as_sexp(dataset___Scanner__ToRecordBatchReader(scanner)); END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___Scanner__ToRecordBatchReader(SEXP scanner_sexp){ - Rf_error("Cannot call dataset___Scanner__ToRecordBatchReader(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___Scanner__ToRecordBatchReader(SEXP scanner_sexp){ + Rf_error("Cannot call dataset___Scanner__ToRecordBatchReader(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - std::shared_ptr dataset___Scanner__head(const std::shared_ptr& scanner, int n); +#if defined(ARROW_R_WITH_DATASET) +std::shared_ptr dataset___Scanner__head(const std::shared_ptr& scanner, int n); extern "C" SEXP _arrow_dataset___Scanner__head(SEXP scanner_sexp, SEXP n_sexp){ BEGIN_CPP11 arrow::r::Input&>::type scanner(scanner_sexp); @@ -2358,45 +2358,45 @@ BEGIN_CPP11 return cpp11::as_sexp(dataset___Scanner__head(scanner, n)); END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___Scanner__head(SEXP scanner_sexp, SEXP n_sexp){ - Rf_error("Cannot call dataset___Scanner__head(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___Scanner__head(SEXP scanner_sexp, SEXP n_sexp){ + Rf_error("Cannot call dataset___Scanner__head(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - std::shared_ptr dataset___Scanner__schema(const std::shared_ptr& sc); +#if defined(ARROW_R_WITH_DATASET) +std::shared_ptr dataset___Scanner__schema(const std::shared_ptr& sc); extern "C" SEXP _arrow_dataset___Scanner__schema(SEXP sc_sexp){ BEGIN_CPP11 arrow::r::Input&>::type sc(sc_sexp); return cpp11::as_sexp(dataset___Scanner__schema(sc)); END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___Scanner__schema(SEXP sc_sexp){ - Rf_error("Cannot call dataset___Scanner__schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___Scanner__schema(SEXP sc_sexp){ + Rf_error("Cannot call dataset___Scanner__schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - cpp11::list dataset___ScanTask__get_batches(const std::shared_ptr& scan_task); +#if defined(ARROW_R_WITH_DATASET) +cpp11::list dataset___ScanTask__get_batches(const std::shared_ptr& scan_task); extern "C" SEXP _arrow_dataset___ScanTask__get_batches(SEXP scan_task_sexp){ BEGIN_CPP11 arrow::r::Input&>::type scan_task(scan_task_sexp); return cpp11::as_sexp(dataset___ScanTask__get_batches(scan_task)); END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___ScanTask__get_batches(SEXP scan_task_sexp){ - Rf_error("Cannot call dataset___ScanTask__get_batches(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___ScanTask__get_batches(SEXP scan_task_sexp){ + Rf_error("Cannot call dataset___ScanTask__get_batches(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - void dataset___Dataset__Write(const std::shared_ptr& file_write_options, const std::shared_ptr& filesystem, std::string base_dir, const std::shared_ptr& partitioning, std::string basename_template, const std::shared_ptr& scanner, arrow::dataset::ExistingDataBehavior existing_data_behavior, int max_partitions); +#if defined(ARROW_R_WITH_DATASET) +void dataset___Dataset__Write(const std::shared_ptr& file_write_options, const std::shared_ptr& filesystem, std::string base_dir, const std::shared_ptr& partitioning, std::string basename_template, const std::shared_ptr& scanner, arrow::dataset::ExistingDataBehavior existing_data_behavior, int max_partitions); extern "C" SEXP _arrow_dataset___Dataset__Write(SEXP file_write_options_sexp, SEXP filesystem_sexp, SEXP base_dir_sexp, SEXP partitioning_sexp, SEXP basename_template_sexp, SEXP scanner_sexp, SEXP existing_data_behavior_sexp, SEXP max_partitions_sexp){ BEGIN_CPP11 arrow::r::Input&>::type file_write_options(file_write_options_sexp); @@ -2411,15 +2411,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___Dataset__Write(SEXP file_write_options_sexp, SEXP filesystem_sexp, SEXP base_dir_sexp, SEXP partitioning_sexp, SEXP basename_template_sexp, SEXP scanner_sexp, SEXP existing_data_behavior_sexp, SEXP max_partitions_sexp){ - Rf_error("Cannot call dataset___Dataset__Write(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___Dataset__Write(SEXP file_write_options_sexp, SEXP filesystem_sexp, SEXP base_dir_sexp, SEXP partitioning_sexp, SEXP basename_template_sexp, SEXP scanner_sexp, SEXP existing_data_behavior_sexp, SEXP max_partitions_sexp){ + Rf_error("Cannot call dataset___Dataset__Write(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - std::shared_ptr dataset___Scanner__TakeRows(const std::shared_ptr& scanner, const std::shared_ptr& indices); +#if defined(ARROW_R_WITH_DATASET) +std::shared_ptr dataset___Scanner__TakeRows(const std::shared_ptr& scanner, const std::shared_ptr& indices); extern "C" SEXP _arrow_dataset___Scanner__TakeRows(SEXP scanner_sexp, SEXP indices_sexp){ BEGIN_CPP11 arrow::r::Input&>::type scanner(scanner_sexp); @@ -2427,296 +2427,296 @@ BEGIN_CPP11 return cpp11::as_sexp(dataset___Scanner__TakeRows(scanner, indices)); END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___Scanner__TakeRows(SEXP scanner_sexp, SEXP indices_sexp){ - Rf_error("Cannot call dataset___Scanner__TakeRows(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___Scanner__TakeRows(SEXP scanner_sexp, SEXP indices_sexp){ + Rf_error("Cannot call dataset___Scanner__TakeRows(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // dataset.cpp - #if defined(ARROW_R_WITH_DATASET) - int64_t dataset___Scanner__CountRows(const std::shared_ptr& scanner); +#if defined(ARROW_R_WITH_DATASET) +int64_t dataset___Scanner__CountRows(const std::shared_ptr& scanner); extern "C" SEXP _arrow_dataset___Scanner__CountRows(SEXP scanner_sexp){ BEGIN_CPP11 arrow::r::Input&>::type scanner(scanner_sexp); return cpp11::as_sexp(dataset___Scanner__CountRows(scanner)); END_CPP11 } - #else - extern "C" SEXP _arrow_dataset___Scanner__CountRows(SEXP scanner_sexp){ - Rf_error("Cannot call dataset___Scanner__CountRows(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_dataset___Scanner__CountRows(SEXP scanner_sexp){ + Rf_error("Cannot call dataset___Scanner__CountRows(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr Int8__initialize(); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr Int8__initialize(); extern "C" SEXP _arrow_Int8__initialize(){ BEGIN_CPP11 return cpp11::as_sexp(Int8__initialize()); END_CPP11 } - #else - extern "C" SEXP _arrow_Int8__initialize(){ - Rf_error("Cannot call Int8__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Int8__initialize(){ + Rf_error("Cannot call Int8__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr Int16__initialize(); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr Int16__initialize(); extern "C" SEXP _arrow_Int16__initialize(){ BEGIN_CPP11 return cpp11::as_sexp(Int16__initialize()); END_CPP11 } - #else - extern "C" SEXP _arrow_Int16__initialize(){ - Rf_error("Cannot call Int16__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Int16__initialize(){ + Rf_error("Cannot call Int16__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr Int32__initialize(); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr Int32__initialize(); extern "C" SEXP _arrow_Int32__initialize(){ BEGIN_CPP11 return cpp11::as_sexp(Int32__initialize()); END_CPP11 } - #else - extern "C" SEXP _arrow_Int32__initialize(){ - Rf_error("Cannot call Int32__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Int32__initialize(){ + Rf_error("Cannot call Int32__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr Int64__initialize(); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr Int64__initialize(); extern "C" SEXP _arrow_Int64__initialize(){ BEGIN_CPP11 return cpp11::as_sexp(Int64__initialize()); END_CPP11 } - #else - extern "C" SEXP _arrow_Int64__initialize(){ - Rf_error("Cannot call Int64__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Int64__initialize(){ + Rf_error("Cannot call Int64__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr UInt8__initialize(); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr UInt8__initialize(); extern "C" SEXP _arrow_UInt8__initialize(){ BEGIN_CPP11 return cpp11::as_sexp(UInt8__initialize()); END_CPP11 } - #else - extern "C" SEXP _arrow_UInt8__initialize(){ - Rf_error("Cannot call UInt8__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_UInt8__initialize(){ + Rf_error("Cannot call UInt8__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr UInt16__initialize(); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr UInt16__initialize(); extern "C" SEXP _arrow_UInt16__initialize(){ BEGIN_CPP11 return cpp11::as_sexp(UInt16__initialize()); END_CPP11 } - #else - extern "C" SEXP _arrow_UInt16__initialize(){ - Rf_error("Cannot call UInt16__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_UInt16__initialize(){ + Rf_error("Cannot call UInt16__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr UInt32__initialize(); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr UInt32__initialize(); extern "C" SEXP _arrow_UInt32__initialize(){ BEGIN_CPP11 return cpp11::as_sexp(UInt32__initialize()); END_CPP11 } - #else - extern "C" SEXP _arrow_UInt32__initialize(){ - Rf_error("Cannot call UInt32__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_UInt32__initialize(){ + Rf_error("Cannot call UInt32__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr UInt64__initialize(); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr UInt64__initialize(); extern "C" SEXP _arrow_UInt64__initialize(){ BEGIN_CPP11 return cpp11::as_sexp(UInt64__initialize()); END_CPP11 } - #else - extern "C" SEXP _arrow_UInt64__initialize(){ - Rf_error("Cannot call UInt64__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_UInt64__initialize(){ + Rf_error("Cannot call UInt64__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr Float16__initialize(); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr Float16__initialize(); extern "C" SEXP _arrow_Float16__initialize(){ BEGIN_CPP11 return cpp11::as_sexp(Float16__initialize()); END_CPP11 } - #else - extern "C" SEXP _arrow_Float16__initialize(){ - Rf_error("Cannot call Float16__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Float16__initialize(){ + Rf_error("Cannot call Float16__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr Float32__initialize(); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr Float32__initialize(); extern "C" SEXP _arrow_Float32__initialize(){ BEGIN_CPP11 return cpp11::as_sexp(Float32__initialize()); END_CPP11 } - #else - extern "C" SEXP _arrow_Float32__initialize(){ - Rf_error("Cannot call Float32__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Float32__initialize(){ + Rf_error("Cannot call Float32__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr Float64__initialize(); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr Float64__initialize(); extern "C" SEXP _arrow_Float64__initialize(){ BEGIN_CPP11 return cpp11::as_sexp(Float64__initialize()); END_CPP11 } - #else - extern "C" SEXP _arrow_Float64__initialize(){ - Rf_error("Cannot call Float64__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Float64__initialize(){ + Rf_error("Cannot call Float64__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr Boolean__initialize(); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr Boolean__initialize(); extern "C" SEXP _arrow_Boolean__initialize(){ BEGIN_CPP11 return cpp11::as_sexp(Boolean__initialize()); END_CPP11 } - #else - extern "C" SEXP _arrow_Boolean__initialize(){ - Rf_error("Cannot call Boolean__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Boolean__initialize(){ + Rf_error("Cannot call Boolean__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr Utf8__initialize(); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr Utf8__initialize(); extern "C" SEXP _arrow_Utf8__initialize(){ BEGIN_CPP11 return cpp11::as_sexp(Utf8__initialize()); END_CPP11 } - #else - extern "C" SEXP _arrow_Utf8__initialize(){ - Rf_error("Cannot call Utf8__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Utf8__initialize(){ + Rf_error("Cannot call Utf8__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr LargeUtf8__initialize(); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr LargeUtf8__initialize(); extern "C" SEXP _arrow_LargeUtf8__initialize(){ BEGIN_CPP11 return cpp11::as_sexp(LargeUtf8__initialize()); END_CPP11 } - #else - extern "C" SEXP _arrow_LargeUtf8__initialize(){ - Rf_error("Cannot call LargeUtf8__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_LargeUtf8__initialize(){ + Rf_error("Cannot call LargeUtf8__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr Binary__initialize(); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr Binary__initialize(); extern "C" SEXP _arrow_Binary__initialize(){ BEGIN_CPP11 return cpp11::as_sexp(Binary__initialize()); END_CPP11 } - #else - extern "C" SEXP _arrow_Binary__initialize(){ - Rf_error("Cannot call Binary__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Binary__initialize(){ + Rf_error("Cannot call Binary__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr LargeBinary__initialize(); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr LargeBinary__initialize(); extern "C" SEXP _arrow_LargeBinary__initialize(){ BEGIN_CPP11 return cpp11::as_sexp(LargeBinary__initialize()); END_CPP11 } - #else - extern "C" SEXP _arrow_LargeBinary__initialize(){ - Rf_error("Cannot call LargeBinary__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_LargeBinary__initialize(){ + Rf_error("Cannot call LargeBinary__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr Date32__initialize(); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr Date32__initialize(); extern "C" SEXP _arrow_Date32__initialize(){ BEGIN_CPP11 return cpp11::as_sexp(Date32__initialize()); END_CPP11 } - #else - extern "C" SEXP _arrow_Date32__initialize(){ - Rf_error("Cannot call Date32__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Date32__initialize(){ + Rf_error("Cannot call Date32__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr Date64__initialize(); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr Date64__initialize(); extern "C" SEXP _arrow_Date64__initialize(){ BEGIN_CPP11 return cpp11::as_sexp(Date64__initialize()); END_CPP11 } - #else - extern "C" SEXP _arrow_Date64__initialize(){ - Rf_error("Cannot call Date64__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Date64__initialize(){ + Rf_error("Cannot call Date64__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr Null__initialize(); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr Null__initialize(); extern "C" SEXP _arrow_Null__initialize(){ BEGIN_CPP11 return cpp11::as_sexp(Null__initialize()); END_CPP11 } - #else - extern "C" SEXP _arrow_Null__initialize(){ - Rf_error("Cannot call Null__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Null__initialize(){ + Rf_error("Cannot call Null__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr Decimal128Type__initialize(int32_t precision, int32_t scale); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr Decimal128Type__initialize(int32_t precision, int32_t scale); extern "C" SEXP _arrow_Decimal128Type__initialize(SEXP precision_sexp, SEXP scale_sexp){ BEGIN_CPP11 arrow::r::Input::type precision(precision_sexp); @@ -2724,30 +2724,30 @@ BEGIN_CPP11 return cpp11::as_sexp(Decimal128Type__initialize(precision, scale)); END_CPP11 } - #else - extern "C" SEXP _arrow_Decimal128Type__initialize(SEXP precision_sexp, SEXP scale_sexp){ - Rf_error("Cannot call Decimal128Type__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Decimal128Type__initialize(SEXP precision_sexp, SEXP scale_sexp){ + Rf_error("Cannot call Decimal128Type__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr FixedSizeBinary__initialize(R_xlen_t byte_width); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr FixedSizeBinary__initialize(R_xlen_t byte_width); extern "C" SEXP _arrow_FixedSizeBinary__initialize(SEXP byte_width_sexp){ BEGIN_CPP11 arrow::r::Input::type byte_width(byte_width_sexp); return cpp11::as_sexp(FixedSizeBinary__initialize(byte_width)); END_CPP11 } - #else - extern "C" SEXP _arrow_FixedSizeBinary__initialize(SEXP byte_width_sexp){ - Rf_error("Cannot call FixedSizeBinary__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_FixedSizeBinary__initialize(SEXP byte_width_sexp){ + Rf_error("Cannot call FixedSizeBinary__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr Timestamp__initialize(arrow::TimeUnit::type unit, const std::string& timezone); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr Timestamp__initialize(arrow::TimeUnit::type unit, const std::string& timezone); extern "C" SEXP _arrow_Timestamp__initialize(SEXP unit_sexp, SEXP timezone_sexp){ BEGIN_CPP11 arrow::r::Input::type unit(unit_sexp); @@ -2755,75 +2755,75 @@ BEGIN_CPP11 return cpp11::as_sexp(Timestamp__initialize(unit, timezone)); END_CPP11 } - #else - extern "C" SEXP _arrow_Timestamp__initialize(SEXP unit_sexp, SEXP timezone_sexp){ - Rf_error("Cannot call Timestamp__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Timestamp__initialize(SEXP unit_sexp, SEXP timezone_sexp){ + Rf_error("Cannot call Timestamp__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr Time32__initialize(arrow::TimeUnit::type unit); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr Time32__initialize(arrow::TimeUnit::type unit); extern "C" SEXP _arrow_Time32__initialize(SEXP unit_sexp){ BEGIN_CPP11 arrow::r::Input::type unit(unit_sexp); return cpp11::as_sexp(Time32__initialize(unit)); END_CPP11 } - #else - extern "C" SEXP _arrow_Time32__initialize(SEXP unit_sexp){ - Rf_error("Cannot call Time32__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Time32__initialize(SEXP unit_sexp){ + Rf_error("Cannot call Time32__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr Time64__initialize(arrow::TimeUnit::type unit); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr Time64__initialize(arrow::TimeUnit::type unit); extern "C" SEXP _arrow_Time64__initialize(SEXP unit_sexp){ BEGIN_CPP11 arrow::r::Input::type unit(unit_sexp); return cpp11::as_sexp(Time64__initialize(unit)); END_CPP11 } - #else - extern "C" SEXP _arrow_Time64__initialize(SEXP unit_sexp){ - Rf_error("Cannot call Time64__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Time64__initialize(SEXP unit_sexp){ + Rf_error("Cannot call Time64__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr list__(SEXP x); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr list__(SEXP x); extern "C" SEXP _arrow_list__(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input::type x(x_sexp); return cpp11::as_sexp(list__(x)); END_CPP11 } - #else - extern "C" SEXP _arrow_list__(SEXP x_sexp){ - Rf_error("Cannot call list__(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_list__(SEXP x_sexp){ + Rf_error("Cannot call list__(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr large_list__(SEXP x); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr large_list__(SEXP x); extern "C" SEXP _arrow_large_list__(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input::type x(x_sexp); return cpp11::as_sexp(large_list__(x)); END_CPP11 } - #else - extern "C" SEXP _arrow_large_list__(SEXP x_sexp){ - Rf_error("Cannot call large_list__(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_large_list__(SEXP x_sexp){ + Rf_error("Cannot call large_list__(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr fixed_size_list__(SEXP x, int list_size); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr fixed_size_list__(SEXP x, int list_size); extern "C" SEXP _arrow_fixed_size_list__(SEXP x_sexp, SEXP list_size_sexp){ BEGIN_CPP11 arrow::r::Input::type x(x_sexp); @@ -2831,60 +2831,60 @@ BEGIN_CPP11 return cpp11::as_sexp(fixed_size_list__(x, list_size)); END_CPP11 } - #else - extern "C" SEXP _arrow_fixed_size_list__(SEXP x_sexp, SEXP list_size_sexp){ - Rf_error("Cannot call fixed_size_list__(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_fixed_size_list__(SEXP x_sexp, SEXP list_size_sexp){ + Rf_error("Cannot call fixed_size_list__(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr struct__(const std::vector>& fields); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr struct__(const std::vector>& fields); extern "C" SEXP _arrow_struct__(SEXP fields_sexp){ BEGIN_CPP11 arrow::r::Input>&>::type fields(fields_sexp); return cpp11::as_sexp(struct__(fields)); END_CPP11 } - #else - extern "C" SEXP _arrow_struct__(SEXP fields_sexp){ - Rf_error("Cannot call struct__(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_struct__(SEXP fields_sexp){ + Rf_error("Cannot call struct__(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - std::string DataType__ToString(const std::shared_ptr& type); +#if defined(ARROW_R_WITH_ARROW) +std::string DataType__ToString(const std::shared_ptr& type); extern "C" SEXP _arrow_DataType__ToString(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(DataType__ToString(type)); END_CPP11 } - #else - extern "C" SEXP _arrow_DataType__ToString(SEXP type_sexp){ - Rf_error("Cannot call DataType__ToString(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_DataType__ToString(SEXP type_sexp){ + Rf_error("Cannot call DataType__ToString(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - std::string DataType__name(const std::shared_ptr& type); +#if defined(ARROW_R_WITH_ARROW) +std::string DataType__name(const std::shared_ptr& type); extern "C" SEXP _arrow_DataType__name(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(DataType__name(type)); END_CPP11 } - #else - extern "C" SEXP _arrow_DataType__name(SEXP type_sexp){ - Rf_error("Cannot call DataType__name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_DataType__name(SEXP type_sexp){ + Rf_error("Cannot call DataType__name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - bool DataType__Equals(const std::shared_ptr& lhs, const std::shared_ptr& rhs); +#if defined(ARROW_R_WITH_ARROW) +bool DataType__Equals(const std::shared_ptr& lhs, const std::shared_ptr& rhs); extern "C" SEXP _arrow_DataType__Equals(SEXP lhs_sexp, SEXP rhs_sexp){ BEGIN_CPP11 arrow::r::Input&>::type lhs(lhs_sexp); @@ -2892,180 +2892,180 @@ BEGIN_CPP11 return cpp11::as_sexp(DataType__Equals(lhs, rhs)); END_CPP11 } - #else - extern "C" SEXP _arrow_DataType__Equals(SEXP lhs_sexp, SEXP rhs_sexp){ - Rf_error("Cannot call DataType__Equals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_DataType__Equals(SEXP lhs_sexp, SEXP rhs_sexp){ + Rf_error("Cannot call DataType__Equals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - int DataType__num_fields(const std::shared_ptr& type); +#if defined(ARROW_R_WITH_ARROW) +int DataType__num_fields(const std::shared_ptr& type); extern "C" SEXP _arrow_DataType__num_fields(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(DataType__num_fields(type)); END_CPP11 } - #else - extern "C" SEXP _arrow_DataType__num_fields(SEXP type_sexp){ - Rf_error("Cannot call DataType__num_fields(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_DataType__num_fields(SEXP type_sexp){ + Rf_error("Cannot call DataType__num_fields(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - cpp11::list DataType__fields(const std::shared_ptr& type); +#if defined(ARROW_R_WITH_ARROW) +cpp11::list DataType__fields(const std::shared_ptr& type); extern "C" SEXP _arrow_DataType__fields(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(DataType__fields(type)); END_CPP11 } - #else - extern "C" SEXP _arrow_DataType__fields(SEXP type_sexp){ - Rf_error("Cannot call DataType__fields(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_DataType__fields(SEXP type_sexp){ + Rf_error("Cannot call DataType__fields(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - arrow::Type::type DataType__id(const std::shared_ptr& type); +#if defined(ARROW_R_WITH_ARROW) +arrow::Type::type DataType__id(const std::shared_ptr& type); extern "C" SEXP _arrow_DataType__id(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(DataType__id(type)); END_CPP11 } - #else - extern "C" SEXP _arrow_DataType__id(SEXP type_sexp){ - Rf_error("Cannot call DataType__id(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_DataType__id(SEXP type_sexp){ + Rf_error("Cannot call DataType__id(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - std::string ListType__ToString(const std::shared_ptr& type); +#if defined(ARROW_R_WITH_ARROW) +std::string ListType__ToString(const std::shared_ptr& type); extern "C" SEXP _arrow_ListType__ToString(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(ListType__ToString(type)); END_CPP11 } - #else - extern "C" SEXP _arrow_ListType__ToString(SEXP type_sexp){ - Rf_error("Cannot call ListType__ToString(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ListType__ToString(SEXP type_sexp){ + Rf_error("Cannot call ListType__ToString(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - int FixedWidthType__bit_width(const std::shared_ptr& type); +#if defined(ARROW_R_WITH_ARROW) +int FixedWidthType__bit_width(const std::shared_ptr& type); extern "C" SEXP _arrow_FixedWidthType__bit_width(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(FixedWidthType__bit_width(type)); END_CPP11 } - #else - extern "C" SEXP _arrow_FixedWidthType__bit_width(SEXP type_sexp){ - Rf_error("Cannot call FixedWidthType__bit_width(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_FixedWidthType__bit_width(SEXP type_sexp){ + Rf_error("Cannot call FixedWidthType__bit_width(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - arrow::DateUnit DateType__unit(const std::shared_ptr& type); +#if defined(ARROW_R_WITH_ARROW) +arrow::DateUnit DateType__unit(const std::shared_ptr& type); extern "C" SEXP _arrow_DateType__unit(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(DateType__unit(type)); END_CPP11 } - #else - extern "C" SEXP _arrow_DateType__unit(SEXP type_sexp){ - Rf_error("Cannot call DateType__unit(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_DateType__unit(SEXP type_sexp){ + Rf_error("Cannot call DateType__unit(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - arrow::TimeUnit::type TimeType__unit(const std::shared_ptr& type); +#if defined(ARROW_R_WITH_ARROW) +arrow::TimeUnit::type TimeType__unit(const std::shared_ptr& type); extern "C" SEXP _arrow_TimeType__unit(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(TimeType__unit(type)); END_CPP11 } - #else - extern "C" SEXP _arrow_TimeType__unit(SEXP type_sexp){ - Rf_error("Cannot call TimeType__unit(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_TimeType__unit(SEXP type_sexp){ + Rf_error("Cannot call TimeType__unit(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - int32_t DecimalType__precision(const std::shared_ptr& type); +#if defined(ARROW_R_WITH_ARROW) +int32_t DecimalType__precision(const std::shared_ptr& type); extern "C" SEXP _arrow_DecimalType__precision(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(DecimalType__precision(type)); END_CPP11 } - #else - extern "C" SEXP _arrow_DecimalType__precision(SEXP type_sexp){ - Rf_error("Cannot call DecimalType__precision(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_DecimalType__precision(SEXP type_sexp){ + Rf_error("Cannot call DecimalType__precision(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - int32_t DecimalType__scale(const std::shared_ptr& type); +#if defined(ARROW_R_WITH_ARROW) +int32_t DecimalType__scale(const std::shared_ptr& type); extern "C" SEXP _arrow_DecimalType__scale(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(DecimalType__scale(type)); END_CPP11 } - #else - extern "C" SEXP _arrow_DecimalType__scale(SEXP type_sexp){ - Rf_error("Cannot call DecimalType__scale(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_DecimalType__scale(SEXP type_sexp){ + Rf_error("Cannot call DecimalType__scale(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - std::string TimestampType__timezone(const std::shared_ptr& type); +#if defined(ARROW_R_WITH_ARROW) +std::string TimestampType__timezone(const std::shared_ptr& type); extern "C" SEXP _arrow_TimestampType__timezone(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(TimestampType__timezone(type)); END_CPP11 } - #else - extern "C" SEXP _arrow_TimestampType__timezone(SEXP type_sexp){ - Rf_error("Cannot call TimestampType__timezone(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_TimestampType__timezone(SEXP type_sexp){ + Rf_error("Cannot call TimestampType__timezone(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - arrow::TimeUnit::type TimestampType__unit(const std::shared_ptr& type); +#if defined(ARROW_R_WITH_ARROW) +arrow::TimeUnit::type TimestampType__unit(const std::shared_ptr& type); extern "C" SEXP _arrow_TimestampType__unit(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(TimestampType__unit(type)); END_CPP11 } - #else - extern "C" SEXP _arrow_TimestampType__unit(SEXP type_sexp){ - Rf_error("Cannot call TimestampType__unit(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_TimestampType__unit(SEXP type_sexp){ + Rf_error("Cannot call TimestampType__unit(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr DictionaryType__initialize(const std::shared_ptr& index_type, const std::shared_ptr& value_type, bool ordered); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr DictionaryType__initialize(const std::shared_ptr& index_type, const std::shared_ptr& value_type, bool ordered); extern "C" SEXP _arrow_DictionaryType__initialize(SEXP index_type_sexp, SEXP value_type_sexp, SEXP ordered_sexp){ BEGIN_CPP11 arrow::r::Input&>::type index_type(index_type_sexp); @@ -3074,75 +3074,75 @@ BEGIN_CPP11 return cpp11::as_sexp(DictionaryType__initialize(index_type, value_type, ordered)); END_CPP11 } - #else - extern "C" SEXP _arrow_DictionaryType__initialize(SEXP index_type_sexp, SEXP value_type_sexp, SEXP ordered_sexp){ - Rf_error("Cannot call DictionaryType__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_DictionaryType__initialize(SEXP index_type_sexp, SEXP value_type_sexp, SEXP ordered_sexp){ + Rf_error("Cannot call DictionaryType__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr DictionaryType__index_type(const std::shared_ptr& type); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr DictionaryType__index_type(const std::shared_ptr& type); extern "C" SEXP _arrow_DictionaryType__index_type(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(DictionaryType__index_type(type)); END_CPP11 } - #else - extern "C" SEXP _arrow_DictionaryType__index_type(SEXP type_sexp){ - Rf_error("Cannot call DictionaryType__index_type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_DictionaryType__index_type(SEXP type_sexp){ + Rf_error("Cannot call DictionaryType__index_type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr DictionaryType__value_type(const std::shared_ptr& type); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr DictionaryType__value_type(const std::shared_ptr& type); extern "C" SEXP _arrow_DictionaryType__value_type(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(DictionaryType__value_type(type)); END_CPP11 } - #else - extern "C" SEXP _arrow_DictionaryType__value_type(SEXP type_sexp){ - Rf_error("Cannot call DictionaryType__value_type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_DictionaryType__value_type(SEXP type_sexp){ + Rf_error("Cannot call DictionaryType__value_type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - std::string DictionaryType__name(const std::shared_ptr& type); +#if defined(ARROW_R_WITH_ARROW) +std::string DictionaryType__name(const std::shared_ptr& type); extern "C" SEXP _arrow_DictionaryType__name(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(DictionaryType__name(type)); END_CPP11 } - #else - extern "C" SEXP _arrow_DictionaryType__name(SEXP type_sexp){ - Rf_error("Cannot call DictionaryType__name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_DictionaryType__name(SEXP type_sexp){ + Rf_error("Cannot call DictionaryType__name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - bool DictionaryType__ordered(const std::shared_ptr& type); +#if defined(ARROW_R_WITH_ARROW) +bool DictionaryType__ordered(const std::shared_ptr& type); extern "C" SEXP _arrow_DictionaryType__ordered(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(DictionaryType__ordered(type)); END_CPP11 } - #else - extern "C" SEXP _arrow_DictionaryType__ordered(SEXP type_sexp){ - Rf_error("Cannot call DictionaryType__ordered(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_DictionaryType__ordered(SEXP type_sexp){ + Rf_error("Cannot call DictionaryType__ordered(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr StructType__GetFieldByName(const std::shared_ptr& type, const std::string& name); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr StructType__GetFieldByName(const std::shared_ptr& type, const std::string& name); extern "C" SEXP _arrow_StructType__GetFieldByName(SEXP type_sexp, SEXP name_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); @@ -3150,15 +3150,15 @@ BEGIN_CPP11 return cpp11::as_sexp(StructType__GetFieldByName(type, name)); END_CPP11 } - #else - extern "C" SEXP _arrow_StructType__GetFieldByName(SEXP type_sexp, SEXP name_sexp){ - Rf_error("Cannot call StructType__GetFieldByName(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_StructType__GetFieldByName(SEXP type_sexp, SEXP name_sexp){ + Rf_error("Cannot call StructType__GetFieldByName(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - int StructType__GetFieldIndex(const std::shared_ptr& type, const std::string& name); +#if defined(ARROW_R_WITH_ARROW) +int StructType__GetFieldIndex(const std::shared_ptr& type, const std::string& name); extern "C" SEXP _arrow_StructType__GetFieldIndex(SEXP type_sexp, SEXP name_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); @@ -3166,135 +3166,135 @@ BEGIN_CPP11 return cpp11::as_sexp(StructType__GetFieldIndex(type, name)); END_CPP11 } - #else - extern "C" SEXP _arrow_StructType__GetFieldIndex(SEXP type_sexp, SEXP name_sexp){ - Rf_error("Cannot call StructType__GetFieldIndex(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_StructType__GetFieldIndex(SEXP type_sexp, SEXP name_sexp){ + Rf_error("Cannot call StructType__GetFieldIndex(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - std::vector StructType__field_names(const std::shared_ptr& type); +#if defined(ARROW_R_WITH_ARROW) +std::vector StructType__field_names(const std::shared_ptr& type); extern "C" SEXP _arrow_StructType__field_names(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(StructType__field_names(type)); END_CPP11 } - #else - extern "C" SEXP _arrow_StructType__field_names(SEXP type_sexp){ - Rf_error("Cannot call StructType__field_names(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_StructType__field_names(SEXP type_sexp){ + Rf_error("Cannot call StructType__field_names(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr ListType__value_field(const std::shared_ptr& type); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr ListType__value_field(const std::shared_ptr& type); extern "C" SEXP _arrow_ListType__value_field(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(ListType__value_field(type)); END_CPP11 } - #else - extern "C" SEXP _arrow_ListType__value_field(SEXP type_sexp){ - Rf_error("Cannot call ListType__value_field(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ListType__value_field(SEXP type_sexp){ + Rf_error("Cannot call ListType__value_field(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr ListType__value_type(const std::shared_ptr& type); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr ListType__value_type(const std::shared_ptr& type); extern "C" SEXP _arrow_ListType__value_type(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(ListType__value_type(type)); END_CPP11 } - #else - extern "C" SEXP _arrow_ListType__value_type(SEXP type_sexp){ - Rf_error("Cannot call ListType__value_type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ListType__value_type(SEXP type_sexp){ + Rf_error("Cannot call ListType__value_type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr LargeListType__value_field(const std::shared_ptr& type); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr LargeListType__value_field(const std::shared_ptr& type); extern "C" SEXP _arrow_LargeListType__value_field(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(LargeListType__value_field(type)); END_CPP11 } - #else - extern "C" SEXP _arrow_LargeListType__value_field(SEXP type_sexp){ - Rf_error("Cannot call LargeListType__value_field(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_LargeListType__value_field(SEXP type_sexp){ + Rf_error("Cannot call LargeListType__value_field(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr LargeListType__value_type(const std::shared_ptr& type); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr LargeListType__value_type(const std::shared_ptr& type); extern "C" SEXP _arrow_LargeListType__value_type(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(LargeListType__value_type(type)); END_CPP11 } - #else - extern "C" SEXP _arrow_LargeListType__value_type(SEXP type_sexp){ - Rf_error("Cannot call LargeListType__value_type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_LargeListType__value_type(SEXP type_sexp){ + Rf_error("Cannot call LargeListType__value_type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr FixedSizeListType__value_field(const std::shared_ptr& type); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr FixedSizeListType__value_field(const std::shared_ptr& type); extern "C" SEXP _arrow_FixedSizeListType__value_field(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(FixedSizeListType__value_field(type)); END_CPP11 } - #else - extern "C" SEXP _arrow_FixedSizeListType__value_field(SEXP type_sexp){ - Rf_error("Cannot call FixedSizeListType__value_field(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_FixedSizeListType__value_field(SEXP type_sexp){ + Rf_error("Cannot call FixedSizeListType__value_field(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr FixedSizeListType__value_type(const std::shared_ptr& type); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr FixedSizeListType__value_type(const std::shared_ptr& type); extern "C" SEXP _arrow_FixedSizeListType__value_type(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(FixedSizeListType__value_type(type)); END_CPP11 } - #else - extern "C" SEXP _arrow_FixedSizeListType__value_type(SEXP type_sexp){ - Rf_error("Cannot call FixedSizeListType__value_type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_FixedSizeListType__value_type(SEXP type_sexp){ + Rf_error("Cannot call FixedSizeListType__value_type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // datatype.cpp - #if defined(ARROW_R_WITH_ARROW) - int FixedSizeListType__list_size(const std::shared_ptr& type); +#if defined(ARROW_R_WITH_ARROW) +int FixedSizeListType__list_size(const std::shared_ptr& type); extern "C" SEXP _arrow_FixedSizeListType__list_size(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(FixedSizeListType__list_size(type)); END_CPP11 } - #else - extern "C" SEXP _arrow_FixedSizeListType__list_size(SEXP type_sexp){ - Rf_error("Cannot call FixedSizeListType__list_size(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_FixedSizeListType__list_size(SEXP type_sexp){ + Rf_error("Cannot call FixedSizeListType__list_size(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // expression.cpp - #if defined(ARROW_R_WITH_ARROW) - bool compute___expr__equals(const std::shared_ptr& lhs, const std::shared_ptr& rhs); +#if defined(ARROW_R_WITH_ARROW) +bool compute___expr__equals(const std::shared_ptr& lhs, const std::shared_ptr& rhs); extern "C" SEXP _arrow_compute___expr__equals(SEXP lhs_sexp, SEXP rhs_sexp){ BEGIN_CPP11 arrow::r::Input&>::type lhs(lhs_sexp); @@ -3302,15 +3302,15 @@ BEGIN_CPP11 return cpp11::as_sexp(compute___expr__equals(lhs, rhs)); END_CPP11 } - #else - extern "C" SEXP _arrow_compute___expr__equals(SEXP lhs_sexp, SEXP rhs_sexp){ - Rf_error("Cannot call compute___expr__equals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_compute___expr__equals(SEXP lhs_sexp, SEXP rhs_sexp){ + Rf_error("Cannot call compute___expr__equals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // expression.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr compute___expr__call(std::string func_name, cpp11::list argument_list, cpp11::list options); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr compute___expr__call(std::string func_name, cpp11::list argument_list, cpp11::list options); extern "C" SEXP _arrow_compute___expr__call(SEXP func_name_sexp, SEXP argument_list_sexp, SEXP options_sexp){ BEGIN_CPP11 arrow::r::Input::type func_name(func_name_sexp); @@ -3319,90 +3319,90 @@ BEGIN_CPP11 return cpp11::as_sexp(compute___expr__call(func_name, argument_list, options)); END_CPP11 } - #else - extern "C" SEXP _arrow_compute___expr__call(SEXP func_name_sexp, SEXP argument_list_sexp, SEXP options_sexp){ - Rf_error("Cannot call compute___expr__call(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_compute___expr__call(SEXP func_name_sexp, SEXP argument_list_sexp, SEXP options_sexp){ + Rf_error("Cannot call compute___expr__call(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // expression.cpp - #if defined(ARROW_R_WITH_ARROW) - std::vector field_names_in_expression(const std::shared_ptr& x); +#if defined(ARROW_R_WITH_ARROW) +std::vector field_names_in_expression(const std::shared_ptr& x); extern "C" SEXP _arrow_field_names_in_expression(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(field_names_in_expression(x)); END_CPP11 } - #else - extern "C" SEXP _arrow_field_names_in_expression(SEXP x_sexp){ - Rf_error("Cannot call field_names_in_expression(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_field_names_in_expression(SEXP x_sexp){ + Rf_error("Cannot call field_names_in_expression(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // expression.cpp - #if defined(ARROW_R_WITH_ARROW) - std::string compute___expr__get_field_ref_name(const std::shared_ptr& x); +#if defined(ARROW_R_WITH_ARROW) +std::string compute___expr__get_field_ref_name(const std::shared_ptr& x); extern "C" SEXP _arrow_compute___expr__get_field_ref_name(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(compute___expr__get_field_ref_name(x)); END_CPP11 } - #else - extern "C" SEXP _arrow_compute___expr__get_field_ref_name(SEXP x_sexp){ - Rf_error("Cannot call compute___expr__get_field_ref_name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_compute___expr__get_field_ref_name(SEXP x_sexp){ + Rf_error("Cannot call compute___expr__get_field_ref_name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // expression.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr compute___expr__field_ref(std::string name); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr compute___expr__field_ref(std::string name); extern "C" SEXP _arrow_compute___expr__field_ref(SEXP name_sexp){ BEGIN_CPP11 arrow::r::Input::type name(name_sexp); return cpp11::as_sexp(compute___expr__field_ref(name)); END_CPP11 } - #else - extern "C" SEXP _arrow_compute___expr__field_ref(SEXP name_sexp){ - Rf_error("Cannot call compute___expr__field_ref(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_compute___expr__field_ref(SEXP name_sexp){ + Rf_error("Cannot call compute___expr__field_ref(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // expression.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr compute___expr__scalar(const std::shared_ptr& x); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr compute___expr__scalar(const std::shared_ptr& x); extern "C" SEXP _arrow_compute___expr__scalar(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(compute___expr__scalar(x)); END_CPP11 } - #else - extern "C" SEXP _arrow_compute___expr__scalar(SEXP x_sexp){ - Rf_error("Cannot call compute___expr__scalar(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_compute___expr__scalar(SEXP x_sexp){ + Rf_error("Cannot call compute___expr__scalar(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // expression.cpp - #if defined(ARROW_R_WITH_ARROW) - std::string compute___expr__ToString(const std::shared_ptr& x); +#if defined(ARROW_R_WITH_ARROW) +std::string compute___expr__ToString(const std::shared_ptr& x); extern "C" SEXP _arrow_compute___expr__ToString(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(compute___expr__ToString(x)); END_CPP11 } - #else - extern "C" SEXP _arrow_compute___expr__ToString(SEXP x_sexp){ - Rf_error("Cannot call compute___expr__ToString(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_compute___expr__ToString(SEXP x_sexp){ + Rf_error("Cannot call compute___expr__ToString(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // expression.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr compute___expr__type(const std::shared_ptr& x, const std::shared_ptr& schema); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr compute___expr__type(const std::shared_ptr& x, const std::shared_ptr& schema); extern "C" SEXP _arrow_compute___expr__type(SEXP x_sexp, SEXP schema_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); @@ -3410,15 +3410,15 @@ BEGIN_CPP11 return cpp11::as_sexp(compute___expr__type(x, schema)); END_CPP11 } - #else - extern "C" SEXP _arrow_compute___expr__type(SEXP x_sexp, SEXP schema_sexp){ - Rf_error("Cannot call compute___expr__type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_compute___expr__type(SEXP x_sexp, SEXP schema_sexp){ + Rf_error("Cannot call compute___expr__type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // expression.cpp - #if defined(ARROW_R_WITH_ARROW) - arrow::Type::type compute___expr__type_id(const std::shared_ptr& x, const std::shared_ptr& schema); +#if defined(ARROW_R_WITH_ARROW) +arrow::Type::type compute___expr__type_id(const std::shared_ptr& x, const std::shared_ptr& schema); extern "C" SEXP _arrow_compute___expr__type_id(SEXP x_sexp, SEXP schema_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); @@ -3426,15 +3426,15 @@ BEGIN_CPP11 return cpp11::as_sexp(compute___expr__type_id(x, schema)); END_CPP11 } - #else - extern "C" SEXP _arrow_compute___expr__type_id(SEXP x_sexp, SEXP schema_sexp){ - Rf_error("Cannot call compute___expr__type_id(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_compute___expr__type_id(SEXP x_sexp, SEXP schema_sexp){ + Rf_error("Cannot call compute___expr__type_id(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // feather.cpp - #if defined(ARROW_R_WITH_ARROW) - void ipc___WriteFeather__Table(const std::shared_ptr& stream, const std::shared_ptr& table, int version, int chunk_size, arrow::Compression::type compression, int compression_level); +#if defined(ARROW_R_WITH_ARROW) +void ipc___WriteFeather__Table(const std::shared_ptr& stream, const std::shared_ptr& table, int version, int chunk_size, arrow::Compression::type compression, int compression_level); extern "C" SEXP _arrow_ipc___WriteFeather__Table(SEXP stream_sexp, SEXP table_sexp, SEXP version_sexp, SEXP chunk_size_sexp, SEXP compression_sexp, SEXP compression_level_sexp){ BEGIN_CPP11 arrow::r::Input&>::type stream(stream_sexp); @@ -3447,30 +3447,30 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_ipc___WriteFeather__Table(SEXP stream_sexp, SEXP table_sexp, SEXP version_sexp, SEXP chunk_size_sexp, SEXP compression_sexp, SEXP compression_level_sexp){ - Rf_error("Cannot call ipc___WriteFeather__Table(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ipc___WriteFeather__Table(SEXP stream_sexp, SEXP table_sexp, SEXP version_sexp, SEXP chunk_size_sexp, SEXP compression_sexp, SEXP compression_level_sexp){ + Rf_error("Cannot call ipc___WriteFeather__Table(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // feather.cpp - #if defined(ARROW_R_WITH_ARROW) - int ipc___feather___Reader__version(const std::shared_ptr& reader); +#if defined(ARROW_R_WITH_ARROW) +int ipc___feather___Reader__version(const std::shared_ptr& reader); extern "C" SEXP _arrow_ipc___feather___Reader__version(SEXP reader_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); return cpp11::as_sexp(ipc___feather___Reader__version(reader)); END_CPP11 } - #else - extern "C" SEXP _arrow_ipc___feather___Reader__version(SEXP reader_sexp){ - Rf_error("Cannot call ipc___feather___Reader__version(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ipc___feather___Reader__version(SEXP reader_sexp){ + Rf_error("Cannot call ipc___feather___Reader__version(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // feather.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr ipc___feather___Reader__Read(const std::shared_ptr& reader, SEXP columns); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr ipc___feather___Reader__Read(const std::shared_ptr& reader, SEXP columns); extern "C" SEXP _arrow_ipc___feather___Reader__Read(SEXP reader_sexp, SEXP columns_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); @@ -3478,45 +3478,45 @@ BEGIN_CPP11 return cpp11::as_sexp(ipc___feather___Reader__Read(reader, columns)); END_CPP11 } - #else - extern "C" SEXP _arrow_ipc___feather___Reader__Read(SEXP reader_sexp, SEXP columns_sexp){ - Rf_error("Cannot call ipc___feather___Reader__Read(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ipc___feather___Reader__Read(SEXP reader_sexp, SEXP columns_sexp){ + Rf_error("Cannot call ipc___feather___Reader__Read(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // feather.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr ipc___feather___Reader__Open(const std::shared_ptr& stream); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr ipc___feather___Reader__Open(const std::shared_ptr& stream); extern "C" SEXP _arrow_ipc___feather___Reader__Open(SEXP stream_sexp){ BEGIN_CPP11 arrow::r::Input&>::type stream(stream_sexp); return cpp11::as_sexp(ipc___feather___Reader__Open(stream)); END_CPP11 } - #else - extern "C" SEXP _arrow_ipc___feather___Reader__Open(SEXP stream_sexp){ - Rf_error("Cannot call ipc___feather___Reader__Open(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ipc___feather___Reader__Open(SEXP stream_sexp){ + Rf_error("Cannot call ipc___feather___Reader__Open(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // feather.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr ipc___feather___Reader__schema(const std::shared_ptr& reader); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr ipc___feather___Reader__schema(const std::shared_ptr& reader); extern "C" SEXP _arrow_ipc___feather___Reader__schema(SEXP reader_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); return cpp11::as_sexp(ipc___feather___Reader__schema(reader)); END_CPP11 } - #else - extern "C" SEXP _arrow_ipc___feather___Reader__schema(SEXP reader_sexp){ - Rf_error("Cannot call ipc___feather___Reader__schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ipc___feather___Reader__schema(SEXP reader_sexp){ + Rf_error("Cannot call ipc___feather___Reader__schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // field.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr Field__initialize(const std::string& name, const std::shared_ptr& field, bool nullable); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr Field__initialize(const std::string& name, const std::shared_ptr& field, bool nullable); extern "C" SEXP _arrow_Field__initialize(SEXP name_sexp, SEXP field_sexp, SEXP nullable_sexp){ BEGIN_CPP11 arrow::r::Input::type name(name_sexp); @@ -3525,45 +3525,45 @@ BEGIN_CPP11 return cpp11::as_sexp(Field__initialize(name, field, nullable)); END_CPP11 } - #else - extern "C" SEXP _arrow_Field__initialize(SEXP name_sexp, SEXP field_sexp, SEXP nullable_sexp){ - Rf_error("Cannot call Field__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Field__initialize(SEXP name_sexp, SEXP field_sexp, SEXP nullable_sexp){ + Rf_error("Cannot call Field__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // field.cpp - #if defined(ARROW_R_WITH_ARROW) - std::string Field__ToString(const std::shared_ptr& field); +#if defined(ARROW_R_WITH_ARROW) +std::string Field__ToString(const std::shared_ptr& field); extern "C" SEXP _arrow_Field__ToString(SEXP field_sexp){ BEGIN_CPP11 arrow::r::Input&>::type field(field_sexp); return cpp11::as_sexp(Field__ToString(field)); END_CPP11 } - #else - extern "C" SEXP _arrow_Field__ToString(SEXP field_sexp){ - Rf_error("Cannot call Field__ToString(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Field__ToString(SEXP field_sexp){ + Rf_error("Cannot call Field__ToString(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // field.cpp - #if defined(ARROW_R_WITH_ARROW) - std::string Field__name(const std::shared_ptr& field); +#if defined(ARROW_R_WITH_ARROW) +std::string Field__name(const std::shared_ptr& field); extern "C" SEXP _arrow_Field__name(SEXP field_sexp){ BEGIN_CPP11 arrow::r::Input&>::type field(field_sexp); return cpp11::as_sexp(Field__name(field)); END_CPP11 } - #else - extern "C" SEXP _arrow_Field__name(SEXP field_sexp){ - Rf_error("Cannot call Field__name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Field__name(SEXP field_sexp){ + Rf_error("Cannot call Field__name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // field.cpp - #if defined(ARROW_R_WITH_ARROW) - bool Field__Equals(const std::shared_ptr& field, const std::shared_ptr& other); +#if defined(ARROW_R_WITH_ARROW) +bool Field__Equals(const std::shared_ptr& field, const std::shared_ptr& other); extern "C" SEXP _arrow_Field__Equals(SEXP field_sexp, SEXP other_sexp){ BEGIN_CPP11 arrow::r::Input&>::type field(field_sexp); @@ -3571,60 +3571,60 @@ BEGIN_CPP11 return cpp11::as_sexp(Field__Equals(field, other)); END_CPP11 } - #else - extern "C" SEXP _arrow_Field__Equals(SEXP field_sexp, SEXP other_sexp){ - Rf_error("Cannot call Field__Equals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Field__Equals(SEXP field_sexp, SEXP other_sexp){ + Rf_error("Cannot call Field__Equals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // field.cpp - #if defined(ARROW_R_WITH_ARROW) - bool Field__nullable(const std::shared_ptr& field); +#if defined(ARROW_R_WITH_ARROW) +bool Field__nullable(const std::shared_ptr& field); extern "C" SEXP _arrow_Field__nullable(SEXP field_sexp){ BEGIN_CPP11 arrow::r::Input&>::type field(field_sexp); return cpp11::as_sexp(Field__nullable(field)); END_CPP11 } - #else - extern "C" SEXP _arrow_Field__nullable(SEXP field_sexp){ - Rf_error("Cannot call Field__nullable(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Field__nullable(SEXP field_sexp){ + Rf_error("Cannot call Field__nullable(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // field.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr Field__type(const std::shared_ptr& field); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr Field__type(const std::shared_ptr& field); extern "C" SEXP _arrow_Field__type(SEXP field_sexp){ BEGIN_CPP11 arrow::r::Input&>::type field(field_sexp); return cpp11::as_sexp(Field__type(field)); END_CPP11 } - #else - extern "C" SEXP _arrow_Field__type(SEXP field_sexp){ - Rf_error("Cannot call Field__type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Field__type(SEXP field_sexp){ + Rf_error("Cannot call Field__type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // filesystem.cpp - #if defined(ARROW_R_WITH_ARROW) - fs::FileType fs___FileInfo__type(const std::shared_ptr& x); +#if defined(ARROW_R_WITH_ARROW) +fs::FileType fs___FileInfo__type(const std::shared_ptr& x); extern "C" SEXP _arrow_fs___FileInfo__type(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(fs___FileInfo__type(x)); END_CPP11 } - #else - extern "C" SEXP _arrow_fs___FileInfo__type(SEXP x_sexp){ - Rf_error("Cannot call fs___FileInfo__type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_fs___FileInfo__type(SEXP x_sexp){ + Rf_error("Cannot call fs___FileInfo__type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // filesystem.cpp - #if defined(ARROW_R_WITH_ARROW) - void fs___FileInfo__set_type(const std::shared_ptr& x, fs::FileType type); +#if defined(ARROW_R_WITH_ARROW) +void fs___FileInfo__set_type(const std::shared_ptr& x, fs::FileType type); extern "C" SEXP _arrow_fs___FileInfo__set_type(SEXP x_sexp, SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); @@ -3633,30 +3633,30 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_fs___FileInfo__set_type(SEXP x_sexp, SEXP type_sexp){ - Rf_error("Cannot call fs___FileInfo__set_type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_fs___FileInfo__set_type(SEXP x_sexp, SEXP type_sexp){ + Rf_error("Cannot call fs___FileInfo__set_type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // filesystem.cpp - #if defined(ARROW_R_WITH_ARROW) - std::string fs___FileInfo__path(const std::shared_ptr& x); +#if defined(ARROW_R_WITH_ARROW) +std::string fs___FileInfo__path(const std::shared_ptr& x); extern "C" SEXP _arrow_fs___FileInfo__path(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(fs___FileInfo__path(x)); END_CPP11 } - #else - extern "C" SEXP _arrow_fs___FileInfo__path(SEXP x_sexp){ - Rf_error("Cannot call fs___FileInfo__path(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_fs___FileInfo__path(SEXP x_sexp){ + Rf_error("Cannot call fs___FileInfo__path(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // filesystem.cpp - #if defined(ARROW_R_WITH_ARROW) - void fs___FileInfo__set_path(const std::shared_ptr& x, const std::string& path); +#if defined(ARROW_R_WITH_ARROW) +void fs___FileInfo__set_path(const std::shared_ptr& x, const std::string& path); extern "C" SEXP _arrow_fs___FileInfo__set_path(SEXP x_sexp, SEXP path_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); @@ -3665,30 +3665,30 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_fs___FileInfo__set_path(SEXP x_sexp, SEXP path_sexp){ - Rf_error("Cannot call fs___FileInfo__set_path(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_fs___FileInfo__set_path(SEXP x_sexp, SEXP path_sexp){ + Rf_error("Cannot call fs___FileInfo__set_path(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // filesystem.cpp - #if defined(ARROW_R_WITH_ARROW) - int64_t fs___FileInfo__size(const std::shared_ptr& x); +#if defined(ARROW_R_WITH_ARROW) +int64_t fs___FileInfo__size(const std::shared_ptr& x); extern "C" SEXP _arrow_fs___FileInfo__size(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(fs___FileInfo__size(x)); END_CPP11 } - #else - extern "C" SEXP _arrow_fs___FileInfo__size(SEXP x_sexp){ - Rf_error("Cannot call fs___FileInfo__size(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_fs___FileInfo__size(SEXP x_sexp){ + Rf_error("Cannot call fs___FileInfo__size(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // filesystem.cpp - #if defined(ARROW_R_WITH_ARROW) - void fs___FileInfo__set_size(const std::shared_ptr& x, int64_t size); +#if defined(ARROW_R_WITH_ARROW) +void fs___FileInfo__set_size(const std::shared_ptr& x, int64_t size); extern "C" SEXP _arrow_fs___FileInfo__set_size(SEXP x_sexp, SEXP size_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); @@ -3697,60 +3697,60 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_fs___FileInfo__set_size(SEXP x_sexp, SEXP size_sexp){ - Rf_error("Cannot call fs___FileInfo__set_size(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_fs___FileInfo__set_size(SEXP x_sexp, SEXP size_sexp){ + Rf_error("Cannot call fs___FileInfo__set_size(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // filesystem.cpp - #if defined(ARROW_R_WITH_ARROW) - std::string fs___FileInfo__base_name(const std::shared_ptr& x); +#if defined(ARROW_R_WITH_ARROW) +std::string fs___FileInfo__base_name(const std::shared_ptr& x); extern "C" SEXP _arrow_fs___FileInfo__base_name(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(fs___FileInfo__base_name(x)); END_CPP11 } - #else - extern "C" SEXP _arrow_fs___FileInfo__base_name(SEXP x_sexp){ - Rf_error("Cannot call fs___FileInfo__base_name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_fs___FileInfo__base_name(SEXP x_sexp){ + Rf_error("Cannot call fs___FileInfo__base_name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // filesystem.cpp - #if defined(ARROW_R_WITH_ARROW) - std::string fs___FileInfo__extension(const std::shared_ptr& x); +#if defined(ARROW_R_WITH_ARROW) +std::string fs___FileInfo__extension(const std::shared_ptr& x); extern "C" SEXP _arrow_fs___FileInfo__extension(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(fs___FileInfo__extension(x)); END_CPP11 } - #else - extern "C" SEXP _arrow_fs___FileInfo__extension(SEXP x_sexp){ - Rf_error("Cannot call fs___FileInfo__extension(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_fs___FileInfo__extension(SEXP x_sexp){ + Rf_error("Cannot call fs___FileInfo__extension(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // filesystem.cpp - #if defined(ARROW_R_WITH_ARROW) - SEXP fs___FileInfo__mtime(const std::shared_ptr& x); +#if defined(ARROW_R_WITH_ARROW) +SEXP fs___FileInfo__mtime(const std::shared_ptr& x); extern "C" SEXP _arrow_fs___FileInfo__mtime(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(fs___FileInfo__mtime(x)); END_CPP11 } - #else - extern "C" SEXP _arrow_fs___FileInfo__mtime(SEXP x_sexp){ - Rf_error("Cannot call fs___FileInfo__mtime(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_fs___FileInfo__mtime(SEXP x_sexp){ + Rf_error("Cannot call fs___FileInfo__mtime(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // filesystem.cpp - #if defined(ARROW_R_WITH_ARROW) - void fs___FileInfo__set_mtime(const std::shared_ptr& x, SEXP time); +#if defined(ARROW_R_WITH_ARROW) +void fs___FileInfo__set_mtime(const std::shared_ptr& x, SEXP time); extern "C" SEXP _arrow_fs___FileInfo__set_mtime(SEXP x_sexp, SEXP time_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); @@ -3759,60 +3759,60 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_fs___FileInfo__set_mtime(SEXP x_sexp, SEXP time_sexp){ - Rf_error("Cannot call fs___FileInfo__set_mtime(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_fs___FileInfo__set_mtime(SEXP x_sexp, SEXP time_sexp){ + Rf_error("Cannot call fs___FileInfo__set_mtime(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // filesystem.cpp - #if defined(ARROW_R_WITH_ARROW) - std::string fs___FileSelector__base_dir(const std::shared_ptr& selector); +#if defined(ARROW_R_WITH_ARROW) +std::string fs___FileSelector__base_dir(const std::shared_ptr& selector); extern "C" SEXP _arrow_fs___FileSelector__base_dir(SEXP selector_sexp){ BEGIN_CPP11 arrow::r::Input&>::type selector(selector_sexp); return cpp11::as_sexp(fs___FileSelector__base_dir(selector)); END_CPP11 } - #else - extern "C" SEXP _arrow_fs___FileSelector__base_dir(SEXP selector_sexp){ - Rf_error("Cannot call fs___FileSelector__base_dir(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_fs___FileSelector__base_dir(SEXP selector_sexp){ + Rf_error("Cannot call fs___FileSelector__base_dir(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // filesystem.cpp - #if defined(ARROW_R_WITH_ARROW) - bool fs___FileSelector__allow_not_found(const std::shared_ptr& selector); +#if defined(ARROW_R_WITH_ARROW) +bool fs___FileSelector__allow_not_found(const std::shared_ptr& selector); extern "C" SEXP _arrow_fs___FileSelector__allow_not_found(SEXP selector_sexp){ BEGIN_CPP11 arrow::r::Input&>::type selector(selector_sexp); return cpp11::as_sexp(fs___FileSelector__allow_not_found(selector)); END_CPP11 } - #else - extern "C" SEXP _arrow_fs___FileSelector__allow_not_found(SEXP selector_sexp){ - Rf_error("Cannot call fs___FileSelector__allow_not_found(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_fs___FileSelector__allow_not_found(SEXP selector_sexp){ + Rf_error("Cannot call fs___FileSelector__allow_not_found(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // filesystem.cpp - #if defined(ARROW_R_WITH_ARROW) - bool fs___FileSelector__recursive(const std::shared_ptr& selector); +#if defined(ARROW_R_WITH_ARROW) +bool fs___FileSelector__recursive(const std::shared_ptr& selector); extern "C" SEXP _arrow_fs___FileSelector__recursive(SEXP selector_sexp){ BEGIN_CPP11 arrow::r::Input&>::type selector(selector_sexp); return cpp11::as_sexp(fs___FileSelector__recursive(selector)); END_CPP11 } - #else - extern "C" SEXP _arrow_fs___FileSelector__recursive(SEXP selector_sexp){ - Rf_error("Cannot call fs___FileSelector__recursive(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_fs___FileSelector__recursive(SEXP selector_sexp){ + Rf_error("Cannot call fs___FileSelector__recursive(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // filesystem.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr fs___FileSelector__create(const std::string& base_dir, bool allow_not_found, bool recursive); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr fs___FileSelector__create(const std::string& base_dir, bool allow_not_found, bool recursive); extern "C" SEXP _arrow_fs___FileSelector__create(SEXP base_dir_sexp, SEXP allow_not_found_sexp, SEXP recursive_sexp){ BEGIN_CPP11 arrow::r::Input::type base_dir(base_dir_sexp); @@ -3821,15 +3821,15 @@ BEGIN_CPP11 return cpp11::as_sexp(fs___FileSelector__create(base_dir, allow_not_found, recursive)); END_CPP11 } - #else - extern "C" SEXP _arrow_fs___FileSelector__create(SEXP base_dir_sexp, SEXP allow_not_found_sexp, SEXP recursive_sexp){ - Rf_error("Cannot call fs___FileSelector__create(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_fs___FileSelector__create(SEXP base_dir_sexp, SEXP allow_not_found_sexp, SEXP recursive_sexp){ + Rf_error("Cannot call fs___FileSelector__create(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // filesystem.cpp - #if defined(ARROW_R_WITH_ARROW) - cpp11::list fs___FileSystem__GetTargetInfos_Paths(const std::shared_ptr& file_system, const std::vector& paths); +#if defined(ARROW_R_WITH_ARROW) +cpp11::list fs___FileSystem__GetTargetInfos_Paths(const std::shared_ptr& file_system, const std::vector& paths); extern "C" SEXP _arrow_fs___FileSystem__GetTargetInfos_Paths(SEXP file_system_sexp, SEXP paths_sexp){ BEGIN_CPP11 arrow::r::Input&>::type file_system(file_system_sexp); @@ -3837,15 +3837,15 @@ BEGIN_CPP11 return cpp11::as_sexp(fs___FileSystem__GetTargetInfos_Paths(file_system, paths)); END_CPP11 } - #else - extern "C" SEXP _arrow_fs___FileSystem__GetTargetInfos_Paths(SEXP file_system_sexp, SEXP paths_sexp){ - Rf_error("Cannot call fs___FileSystem__GetTargetInfos_Paths(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_fs___FileSystem__GetTargetInfos_Paths(SEXP file_system_sexp, SEXP paths_sexp){ + Rf_error("Cannot call fs___FileSystem__GetTargetInfos_Paths(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // filesystem.cpp - #if defined(ARROW_R_WITH_ARROW) - cpp11::list fs___FileSystem__GetTargetInfos_FileSelector(const std::shared_ptr& file_system, const std::shared_ptr& selector); +#if defined(ARROW_R_WITH_ARROW) +cpp11::list fs___FileSystem__GetTargetInfos_FileSelector(const std::shared_ptr& file_system, const std::shared_ptr& selector); extern "C" SEXP _arrow_fs___FileSystem__GetTargetInfos_FileSelector(SEXP file_system_sexp, SEXP selector_sexp){ BEGIN_CPP11 arrow::r::Input&>::type file_system(file_system_sexp); @@ -3853,15 +3853,15 @@ BEGIN_CPP11 return cpp11::as_sexp(fs___FileSystem__GetTargetInfos_FileSelector(file_system, selector)); END_CPP11 } - #else - extern "C" SEXP _arrow_fs___FileSystem__GetTargetInfos_FileSelector(SEXP file_system_sexp, SEXP selector_sexp){ - Rf_error("Cannot call fs___FileSystem__GetTargetInfos_FileSelector(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_fs___FileSystem__GetTargetInfos_FileSelector(SEXP file_system_sexp, SEXP selector_sexp){ + Rf_error("Cannot call fs___FileSystem__GetTargetInfos_FileSelector(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // filesystem.cpp - #if defined(ARROW_R_WITH_ARROW) - void fs___FileSystem__CreateDir(const std::shared_ptr& file_system, const std::string& path, bool recursive); +#if defined(ARROW_R_WITH_ARROW) +void fs___FileSystem__CreateDir(const std::shared_ptr& file_system, const std::string& path, bool recursive); extern "C" SEXP _arrow_fs___FileSystem__CreateDir(SEXP file_system_sexp, SEXP path_sexp, SEXP recursive_sexp){ BEGIN_CPP11 arrow::r::Input&>::type file_system(file_system_sexp); @@ -3871,15 +3871,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_fs___FileSystem__CreateDir(SEXP file_system_sexp, SEXP path_sexp, SEXP recursive_sexp){ - Rf_error("Cannot call fs___FileSystem__CreateDir(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_fs___FileSystem__CreateDir(SEXP file_system_sexp, SEXP path_sexp, SEXP recursive_sexp){ + Rf_error("Cannot call fs___FileSystem__CreateDir(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // filesystem.cpp - #if defined(ARROW_R_WITH_ARROW) - void fs___FileSystem__DeleteDir(const std::shared_ptr& file_system, const std::string& path); +#if defined(ARROW_R_WITH_ARROW) +void fs___FileSystem__DeleteDir(const std::shared_ptr& file_system, const std::string& path); extern "C" SEXP _arrow_fs___FileSystem__DeleteDir(SEXP file_system_sexp, SEXP path_sexp){ BEGIN_CPP11 arrow::r::Input&>::type file_system(file_system_sexp); @@ -3888,15 +3888,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_fs___FileSystem__DeleteDir(SEXP file_system_sexp, SEXP path_sexp){ - Rf_error("Cannot call fs___FileSystem__DeleteDir(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_fs___FileSystem__DeleteDir(SEXP file_system_sexp, SEXP path_sexp){ + Rf_error("Cannot call fs___FileSystem__DeleteDir(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // filesystem.cpp - #if defined(ARROW_R_WITH_ARROW) - void fs___FileSystem__DeleteDirContents(const std::shared_ptr& file_system, const std::string& path); +#if defined(ARROW_R_WITH_ARROW) +void fs___FileSystem__DeleteDirContents(const std::shared_ptr& file_system, const std::string& path); extern "C" SEXP _arrow_fs___FileSystem__DeleteDirContents(SEXP file_system_sexp, SEXP path_sexp){ BEGIN_CPP11 arrow::r::Input&>::type file_system(file_system_sexp); @@ -3905,15 +3905,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_fs___FileSystem__DeleteDirContents(SEXP file_system_sexp, SEXP path_sexp){ - Rf_error("Cannot call fs___FileSystem__DeleteDirContents(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_fs___FileSystem__DeleteDirContents(SEXP file_system_sexp, SEXP path_sexp){ + Rf_error("Cannot call fs___FileSystem__DeleteDirContents(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // filesystem.cpp - #if defined(ARROW_R_WITH_ARROW) - void fs___FileSystem__DeleteFile(const std::shared_ptr& file_system, const std::string& path); +#if defined(ARROW_R_WITH_ARROW) +void fs___FileSystem__DeleteFile(const std::shared_ptr& file_system, const std::string& path); extern "C" SEXP _arrow_fs___FileSystem__DeleteFile(SEXP file_system_sexp, SEXP path_sexp){ BEGIN_CPP11 arrow::r::Input&>::type file_system(file_system_sexp); @@ -3922,15 +3922,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_fs___FileSystem__DeleteFile(SEXP file_system_sexp, SEXP path_sexp){ - Rf_error("Cannot call fs___FileSystem__DeleteFile(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_fs___FileSystem__DeleteFile(SEXP file_system_sexp, SEXP path_sexp){ + Rf_error("Cannot call fs___FileSystem__DeleteFile(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // filesystem.cpp - #if defined(ARROW_R_WITH_ARROW) - void fs___FileSystem__DeleteFiles(const std::shared_ptr& file_system, const std::vector& paths); +#if defined(ARROW_R_WITH_ARROW) +void fs___FileSystem__DeleteFiles(const std::shared_ptr& file_system, const std::vector& paths); extern "C" SEXP _arrow_fs___FileSystem__DeleteFiles(SEXP file_system_sexp, SEXP paths_sexp){ BEGIN_CPP11 arrow::r::Input&>::type file_system(file_system_sexp); @@ -3939,15 +3939,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_fs___FileSystem__DeleteFiles(SEXP file_system_sexp, SEXP paths_sexp){ - Rf_error("Cannot call fs___FileSystem__DeleteFiles(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_fs___FileSystem__DeleteFiles(SEXP file_system_sexp, SEXP paths_sexp){ + Rf_error("Cannot call fs___FileSystem__DeleteFiles(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // filesystem.cpp - #if defined(ARROW_R_WITH_ARROW) - void fs___FileSystem__Move(const std::shared_ptr& file_system, const std::string& src, const std::string& dest); +#if defined(ARROW_R_WITH_ARROW) +void fs___FileSystem__Move(const std::shared_ptr& file_system, const std::string& src, const std::string& dest); extern "C" SEXP _arrow_fs___FileSystem__Move(SEXP file_system_sexp, SEXP src_sexp, SEXP dest_sexp){ BEGIN_CPP11 arrow::r::Input&>::type file_system(file_system_sexp); @@ -3957,15 +3957,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_fs___FileSystem__Move(SEXP file_system_sexp, SEXP src_sexp, SEXP dest_sexp){ - Rf_error("Cannot call fs___FileSystem__Move(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_fs___FileSystem__Move(SEXP file_system_sexp, SEXP src_sexp, SEXP dest_sexp){ + Rf_error("Cannot call fs___FileSystem__Move(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // filesystem.cpp - #if defined(ARROW_R_WITH_ARROW) - void fs___FileSystem__CopyFile(const std::shared_ptr& file_system, const std::string& src, const std::string& dest); +#if defined(ARROW_R_WITH_ARROW) +void fs___FileSystem__CopyFile(const std::shared_ptr& file_system, const std::string& src, const std::string& dest); extern "C" SEXP _arrow_fs___FileSystem__CopyFile(SEXP file_system_sexp, SEXP src_sexp, SEXP dest_sexp){ BEGIN_CPP11 arrow::r::Input&>::type file_system(file_system_sexp); @@ -3975,15 +3975,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_fs___FileSystem__CopyFile(SEXP file_system_sexp, SEXP src_sexp, SEXP dest_sexp){ - Rf_error("Cannot call fs___FileSystem__CopyFile(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_fs___FileSystem__CopyFile(SEXP file_system_sexp, SEXP src_sexp, SEXP dest_sexp){ + Rf_error("Cannot call fs___FileSystem__CopyFile(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // filesystem.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr fs___FileSystem__OpenInputStream(const std::shared_ptr& file_system, const std::string& path); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr fs___FileSystem__OpenInputStream(const std::shared_ptr& file_system, const std::string& path); extern "C" SEXP _arrow_fs___FileSystem__OpenInputStream(SEXP file_system_sexp, SEXP path_sexp){ BEGIN_CPP11 arrow::r::Input&>::type file_system(file_system_sexp); @@ -3991,15 +3991,15 @@ BEGIN_CPP11 return cpp11::as_sexp(fs___FileSystem__OpenInputStream(file_system, path)); END_CPP11 } - #else - extern "C" SEXP _arrow_fs___FileSystem__OpenInputStream(SEXP file_system_sexp, SEXP path_sexp){ - Rf_error("Cannot call fs___FileSystem__OpenInputStream(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_fs___FileSystem__OpenInputStream(SEXP file_system_sexp, SEXP path_sexp){ + Rf_error("Cannot call fs___FileSystem__OpenInputStream(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // filesystem.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr fs___FileSystem__OpenInputFile(const std::shared_ptr& file_system, const std::string& path); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr fs___FileSystem__OpenInputFile(const std::shared_ptr& file_system, const std::string& path); extern "C" SEXP _arrow_fs___FileSystem__OpenInputFile(SEXP file_system_sexp, SEXP path_sexp){ BEGIN_CPP11 arrow::r::Input&>::type file_system(file_system_sexp); @@ -4007,15 +4007,15 @@ BEGIN_CPP11 return cpp11::as_sexp(fs___FileSystem__OpenInputFile(file_system, path)); END_CPP11 } - #else - extern "C" SEXP _arrow_fs___FileSystem__OpenInputFile(SEXP file_system_sexp, SEXP path_sexp){ - Rf_error("Cannot call fs___FileSystem__OpenInputFile(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_fs___FileSystem__OpenInputFile(SEXP file_system_sexp, SEXP path_sexp){ + Rf_error("Cannot call fs___FileSystem__OpenInputFile(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // filesystem.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr fs___FileSystem__OpenOutputStream(const std::shared_ptr& file_system, const std::string& path); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr fs___FileSystem__OpenOutputStream(const std::shared_ptr& file_system, const std::string& path); extern "C" SEXP _arrow_fs___FileSystem__OpenOutputStream(SEXP file_system_sexp, SEXP path_sexp){ BEGIN_CPP11 arrow::r::Input&>::type file_system(file_system_sexp); @@ -4023,15 +4023,15 @@ BEGIN_CPP11 return cpp11::as_sexp(fs___FileSystem__OpenOutputStream(file_system, path)); END_CPP11 } - #else - extern "C" SEXP _arrow_fs___FileSystem__OpenOutputStream(SEXP file_system_sexp, SEXP path_sexp){ - Rf_error("Cannot call fs___FileSystem__OpenOutputStream(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_fs___FileSystem__OpenOutputStream(SEXP file_system_sexp, SEXP path_sexp){ + Rf_error("Cannot call fs___FileSystem__OpenOutputStream(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // filesystem.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr fs___FileSystem__OpenAppendStream(const std::shared_ptr& file_system, const std::string& path); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr fs___FileSystem__OpenAppendStream(const std::shared_ptr& file_system, const std::string& path); extern "C" SEXP _arrow_fs___FileSystem__OpenAppendStream(SEXP file_system_sexp, SEXP path_sexp){ BEGIN_CPP11 arrow::r::Input&>::type file_system(file_system_sexp); @@ -4039,44 +4039,44 @@ BEGIN_CPP11 return cpp11::as_sexp(fs___FileSystem__OpenAppendStream(file_system, path)); END_CPP11 } - #else - extern "C" SEXP _arrow_fs___FileSystem__OpenAppendStream(SEXP file_system_sexp, SEXP path_sexp){ - Rf_error("Cannot call fs___FileSystem__OpenAppendStream(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_fs___FileSystem__OpenAppendStream(SEXP file_system_sexp, SEXP path_sexp){ + Rf_error("Cannot call fs___FileSystem__OpenAppendStream(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // filesystem.cpp - #if defined(ARROW_R_WITH_ARROW) - std::string fs___FileSystem__type_name(const std::shared_ptr& file_system); +#if defined(ARROW_R_WITH_ARROW) +std::string fs___FileSystem__type_name(const std::shared_ptr& file_system); extern "C" SEXP _arrow_fs___FileSystem__type_name(SEXP file_system_sexp){ BEGIN_CPP11 arrow::r::Input&>::type file_system(file_system_sexp); return cpp11::as_sexp(fs___FileSystem__type_name(file_system)); END_CPP11 } - #else - extern "C" SEXP _arrow_fs___FileSystem__type_name(SEXP file_system_sexp){ - Rf_error("Cannot call fs___FileSystem__type_name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_fs___FileSystem__type_name(SEXP file_system_sexp){ + Rf_error("Cannot call fs___FileSystem__type_name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // filesystem.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr fs___LocalFileSystem__create(); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr fs___LocalFileSystem__create(); extern "C" SEXP _arrow_fs___LocalFileSystem__create(){ BEGIN_CPP11 return cpp11::as_sexp(fs___LocalFileSystem__create()); END_CPP11 } - #else - extern "C" SEXP _arrow_fs___LocalFileSystem__create(){ - Rf_error("Cannot call fs___LocalFileSystem__create(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_fs___LocalFileSystem__create(){ + Rf_error("Cannot call fs___LocalFileSystem__create(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // filesystem.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr fs___SubTreeFileSystem__create(const std::string& base_path, const std::shared_ptr& base_fs); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr fs___SubTreeFileSystem__create(const std::string& base_path, const std::shared_ptr& base_fs); extern "C" SEXP _arrow_fs___SubTreeFileSystem__create(SEXP base_path_sexp, SEXP base_fs_sexp){ BEGIN_CPP11 arrow::r::Input::type base_path(base_path_sexp); @@ -4084,60 +4084,60 @@ BEGIN_CPP11 return cpp11::as_sexp(fs___SubTreeFileSystem__create(base_path, base_fs)); END_CPP11 } - #else - extern "C" SEXP _arrow_fs___SubTreeFileSystem__create(SEXP base_path_sexp, SEXP base_fs_sexp){ - Rf_error("Cannot call fs___SubTreeFileSystem__create(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_fs___SubTreeFileSystem__create(SEXP base_path_sexp, SEXP base_fs_sexp){ + Rf_error("Cannot call fs___SubTreeFileSystem__create(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // filesystem.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr fs___SubTreeFileSystem__base_fs(const std::shared_ptr& file_system); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr fs___SubTreeFileSystem__base_fs(const std::shared_ptr& file_system); extern "C" SEXP _arrow_fs___SubTreeFileSystem__base_fs(SEXP file_system_sexp){ BEGIN_CPP11 arrow::r::Input&>::type file_system(file_system_sexp); return cpp11::as_sexp(fs___SubTreeFileSystem__base_fs(file_system)); END_CPP11 } - #else - extern "C" SEXP _arrow_fs___SubTreeFileSystem__base_fs(SEXP file_system_sexp){ - Rf_error("Cannot call fs___SubTreeFileSystem__base_fs(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_fs___SubTreeFileSystem__base_fs(SEXP file_system_sexp){ + Rf_error("Cannot call fs___SubTreeFileSystem__base_fs(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // filesystem.cpp - #if defined(ARROW_R_WITH_ARROW) - std::string fs___SubTreeFileSystem__base_path(const std::shared_ptr& file_system); +#if defined(ARROW_R_WITH_ARROW) +std::string fs___SubTreeFileSystem__base_path(const std::shared_ptr& file_system); extern "C" SEXP _arrow_fs___SubTreeFileSystem__base_path(SEXP file_system_sexp){ BEGIN_CPP11 arrow::r::Input&>::type file_system(file_system_sexp); return cpp11::as_sexp(fs___SubTreeFileSystem__base_path(file_system)); END_CPP11 } - #else - extern "C" SEXP _arrow_fs___SubTreeFileSystem__base_path(SEXP file_system_sexp){ - Rf_error("Cannot call fs___SubTreeFileSystem__base_path(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_fs___SubTreeFileSystem__base_path(SEXP file_system_sexp){ + Rf_error("Cannot call fs___SubTreeFileSystem__base_path(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // filesystem.cpp - #if defined(ARROW_R_WITH_ARROW) - cpp11::writable::list fs___FileSystemFromUri(const std::string& path); +#if defined(ARROW_R_WITH_ARROW) +cpp11::writable::list fs___FileSystemFromUri(const std::string& path); extern "C" SEXP _arrow_fs___FileSystemFromUri(SEXP path_sexp){ BEGIN_CPP11 arrow::r::Input::type path(path_sexp); return cpp11::as_sexp(fs___FileSystemFromUri(path)); END_CPP11 } - #else - extern "C" SEXP _arrow_fs___FileSystemFromUri(SEXP path_sexp){ - Rf_error("Cannot call fs___FileSystemFromUri(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_fs___FileSystemFromUri(SEXP path_sexp){ + Rf_error("Cannot call fs___FileSystemFromUri(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // filesystem.cpp - #if defined(ARROW_R_WITH_ARROW) - void fs___CopyFiles(const std::shared_ptr& source_fs, const std::shared_ptr& source_sel, const std::shared_ptr& destination_fs, const std::string& destination_base_dir, int64_t chunk_size, bool use_threads); +#if defined(ARROW_R_WITH_ARROW) +void fs___CopyFiles(const std::shared_ptr& source_fs, const std::shared_ptr& source_sel, const std::shared_ptr& destination_fs, const std::string& destination_base_dir, int64_t chunk_size, bool use_threads); extern "C" SEXP _arrow_fs___CopyFiles(SEXP source_fs_sexp, SEXP source_sel_sexp, SEXP destination_fs_sexp, SEXP destination_base_dir_sexp, SEXP chunk_size_sexp, SEXP use_threads_sexp){ BEGIN_CPP11 arrow::r::Input&>::type source_fs(source_fs_sexp); @@ -4150,15 +4150,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_fs___CopyFiles(SEXP source_fs_sexp, SEXP source_sel_sexp, SEXP destination_fs_sexp, SEXP destination_base_dir_sexp, SEXP chunk_size_sexp, SEXP use_threads_sexp){ - Rf_error("Cannot call fs___CopyFiles(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_fs___CopyFiles(SEXP source_fs_sexp, SEXP source_sel_sexp, SEXP destination_fs_sexp, SEXP destination_base_dir_sexp, SEXP chunk_size_sexp, SEXP use_threads_sexp){ + Rf_error("Cannot call fs___CopyFiles(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // filesystem.cpp - #if defined(ARROW_R_WITH_S3) - std::shared_ptr fs___S3FileSystem__create(bool anonymous, std::string access_key, std::string secret_key, std::string session_token, std::string role_arn, std::string session_name, std::string external_id, int load_frequency, std::string region, std::string endpoint_override, std::string scheme, std::string proxy_options, bool background_writes); +#if defined(ARROW_R_WITH_S3) +std::shared_ptr fs___S3FileSystem__create(bool anonymous, std::string access_key, std::string secret_key, std::string session_token, std::string role_arn, std::string session_name, std::string external_id, int load_frequency, std::string region, std::string endpoint_override, std::string scheme, std::string proxy_options, bool background_writes); extern "C" SEXP _arrow_fs___S3FileSystem__create(SEXP anonymous_sexp, SEXP access_key_sexp, SEXP secret_key_sexp, SEXP session_token_sexp, SEXP role_arn_sexp, SEXP session_name_sexp, SEXP external_id_sexp, SEXP load_frequency_sexp, SEXP region_sexp, SEXP endpoint_override_sexp, SEXP scheme_sexp, SEXP proxy_options_sexp, SEXP background_writes_sexp){ BEGIN_CPP11 arrow::r::Input::type anonymous(anonymous_sexp); @@ -4177,30 +4177,30 @@ BEGIN_CPP11 return cpp11::as_sexp(fs___S3FileSystem__create(anonymous, access_key, secret_key, session_token, role_arn, session_name, external_id, load_frequency, region, endpoint_override, scheme, proxy_options, background_writes)); END_CPP11 } - #else - extern "C" SEXP _arrow_fs___S3FileSystem__create(SEXP anonymous_sexp, SEXP access_key_sexp, SEXP secret_key_sexp, SEXP session_token_sexp, SEXP role_arn_sexp, SEXP session_name_sexp, SEXP external_id_sexp, SEXP load_frequency_sexp, SEXP region_sexp, SEXP endpoint_override_sexp, SEXP scheme_sexp, SEXP proxy_options_sexp, SEXP background_writes_sexp){ - Rf_error("Cannot call fs___S3FileSystem__create(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_fs___S3FileSystem__create(SEXP anonymous_sexp, SEXP access_key_sexp, SEXP secret_key_sexp, SEXP session_token_sexp, SEXP role_arn_sexp, SEXP session_name_sexp, SEXP external_id_sexp, SEXP load_frequency_sexp, SEXP region_sexp, SEXP endpoint_override_sexp, SEXP scheme_sexp, SEXP proxy_options_sexp, SEXP background_writes_sexp){ + Rf_error("Cannot call fs___S3FileSystem__create(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // filesystem.cpp - #if defined(ARROW_R_WITH_S3) - std::string fs___S3FileSystem__region(const std::shared_ptr& fs); +#if defined(ARROW_R_WITH_S3) +std::string fs___S3FileSystem__region(const std::shared_ptr& fs); extern "C" SEXP _arrow_fs___S3FileSystem__region(SEXP fs_sexp){ BEGIN_CPP11 arrow::r::Input&>::type fs(fs_sexp); return cpp11::as_sexp(fs___S3FileSystem__region(fs)); END_CPP11 } - #else - extern "C" SEXP _arrow_fs___S3FileSystem__region(SEXP fs_sexp){ - Rf_error("Cannot call fs___S3FileSystem__region(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_fs___S3FileSystem__region(SEXP fs_sexp){ + Rf_error("Cannot call fs___S3FileSystem__region(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // io.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr io___Readable__Read(const std::shared_ptr& x, int64_t nbytes); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr io___Readable__Read(const std::shared_ptr& x, int64_t nbytes); extern "C" SEXP _arrow_io___Readable__Read(SEXP x_sexp, SEXP nbytes_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); @@ -4208,15 +4208,15 @@ BEGIN_CPP11 return cpp11::as_sexp(io___Readable__Read(x, nbytes)); END_CPP11 } - #else - extern "C" SEXP _arrow_io___Readable__Read(SEXP x_sexp, SEXP nbytes_sexp){ - Rf_error("Cannot call io___Readable__Read(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_io___Readable__Read(SEXP x_sexp, SEXP nbytes_sexp){ + Rf_error("Cannot call io___Readable__Read(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // io.cpp - #if defined(ARROW_R_WITH_ARROW) - void io___InputStream__Close(const std::shared_ptr& x); +#if defined(ARROW_R_WITH_ARROW) +void io___InputStream__Close(const std::shared_ptr& x); extern "C" SEXP _arrow_io___InputStream__Close(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); @@ -4224,15 +4224,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_io___InputStream__Close(SEXP x_sexp){ - Rf_error("Cannot call io___InputStream__Close(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_io___InputStream__Close(SEXP x_sexp){ + Rf_error("Cannot call io___InputStream__Close(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // io.cpp - #if defined(ARROW_R_WITH_ARROW) - void io___OutputStream__Close(const std::shared_ptr& x); +#if defined(ARROW_R_WITH_ARROW) +void io___OutputStream__Close(const std::shared_ptr& x); extern "C" SEXP _arrow_io___OutputStream__Close(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); @@ -4240,45 +4240,45 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_io___OutputStream__Close(SEXP x_sexp){ - Rf_error("Cannot call io___OutputStream__Close(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_io___OutputStream__Close(SEXP x_sexp){ + Rf_error("Cannot call io___OutputStream__Close(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // io.cpp - #if defined(ARROW_R_WITH_ARROW) - int64_t io___RandomAccessFile__GetSize(const std::shared_ptr& x); +#if defined(ARROW_R_WITH_ARROW) +int64_t io___RandomAccessFile__GetSize(const std::shared_ptr& x); extern "C" SEXP _arrow_io___RandomAccessFile__GetSize(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(io___RandomAccessFile__GetSize(x)); END_CPP11 } - #else - extern "C" SEXP _arrow_io___RandomAccessFile__GetSize(SEXP x_sexp){ - Rf_error("Cannot call io___RandomAccessFile__GetSize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_io___RandomAccessFile__GetSize(SEXP x_sexp){ + Rf_error("Cannot call io___RandomAccessFile__GetSize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // io.cpp - #if defined(ARROW_R_WITH_ARROW) - bool io___RandomAccessFile__supports_zero_copy(const std::shared_ptr& x); +#if defined(ARROW_R_WITH_ARROW) +bool io___RandomAccessFile__supports_zero_copy(const std::shared_ptr& x); extern "C" SEXP _arrow_io___RandomAccessFile__supports_zero_copy(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(io___RandomAccessFile__supports_zero_copy(x)); END_CPP11 } - #else - extern "C" SEXP _arrow_io___RandomAccessFile__supports_zero_copy(SEXP x_sexp){ - Rf_error("Cannot call io___RandomAccessFile__supports_zero_copy(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_io___RandomAccessFile__supports_zero_copy(SEXP x_sexp){ + Rf_error("Cannot call io___RandomAccessFile__supports_zero_copy(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // io.cpp - #if defined(ARROW_R_WITH_ARROW) - void io___RandomAccessFile__Seek(const std::shared_ptr& x, int64_t position); +#if defined(ARROW_R_WITH_ARROW) +void io___RandomAccessFile__Seek(const std::shared_ptr& x, int64_t position); extern "C" SEXP _arrow_io___RandomAccessFile__Seek(SEXP x_sexp, SEXP position_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); @@ -4287,45 +4287,45 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_io___RandomAccessFile__Seek(SEXP x_sexp, SEXP position_sexp){ - Rf_error("Cannot call io___RandomAccessFile__Seek(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_io___RandomAccessFile__Seek(SEXP x_sexp, SEXP position_sexp){ + Rf_error("Cannot call io___RandomAccessFile__Seek(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // io.cpp - #if defined(ARROW_R_WITH_ARROW) - int64_t io___RandomAccessFile__Tell(const std::shared_ptr& x); +#if defined(ARROW_R_WITH_ARROW) +int64_t io___RandomAccessFile__Tell(const std::shared_ptr& x); extern "C" SEXP _arrow_io___RandomAccessFile__Tell(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(io___RandomAccessFile__Tell(x)); END_CPP11 } - #else - extern "C" SEXP _arrow_io___RandomAccessFile__Tell(SEXP x_sexp){ - Rf_error("Cannot call io___RandomAccessFile__Tell(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_io___RandomAccessFile__Tell(SEXP x_sexp){ + Rf_error("Cannot call io___RandomAccessFile__Tell(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // io.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr io___RandomAccessFile__Read0(const std::shared_ptr& x); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr io___RandomAccessFile__Read0(const std::shared_ptr& x); extern "C" SEXP _arrow_io___RandomAccessFile__Read0(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(io___RandomAccessFile__Read0(x)); END_CPP11 } - #else - extern "C" SEXP _arrow_io___RandomAccessFile__Read0(SEXP x_sexp){ - Rf_error("Cannot call io___RandomAccessFile__Read0(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_io___RandomAccessFile__Read0(SEXP x_sexp){ + Rf_error("Cannot call io___RandomAccessFile__Read0(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // io.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr io___RandomAccessFile__ReadAt(const std::shared_ptr& x, int64_t position, int64_t nbytes); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr io___RandomAccessFile__ReadAt(const std::shared_ptr& x, int64_t position, int64_t nbytes); extern "C" SEXP _arrow_io___RandomAccessFile__ReadAt(SEXP x_sexp, SEXP position_sexp, SEXP nbytes_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); @@ -4334,15 +4334,15 @@ BEGIN_CPP11 return cpp11::as_sexp(io___RandomAccessFile__ReadAt(x, position, nbytes)); END_CPP11 } - #else - extern "C" SEXP _arrow_io___RandomAccessFile__ReadAt(SEXP x_sexp, SEXP position_sexp, SEXP nbytes_sexp){ - Rf_error("Cannot call io___RandomAccessFile__ReadAt(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_io___RandomAccessFile__ReadAt(SEXP x_sexp, SEXP position_sexp, SEXP nbytes_sexp){ + Rf_error("Cannot call io___RandomAccessFile__ReadAt(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // io.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr io___MemoryMappedFile__Create(const std::string& path, int64_t size); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr io___MemoryMappedFile__Create(const std::string& path, int64_t size); extern "C" SEXP _arrow_io___MemoryMappedFile__Create(SEXP path_sexp, SEXP size_sexp){ BEGIN_CPP11 arrow::r::Input::type path(path_sexp); @@ -4350,15 +4350,15 @@ BEGIN_CPP11 return cpp11::as_sexp(io___MemoryMappedFile__Create(path, size)); END_CPP11 } - #else - extern "C" SEXP _arrow_io___MemoryMappedFile__Create(SEXP path_sexp, SEXP size_sexp){ - Rf_error("Cannot call io___MemoryMappedFile__Create(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_io___MemoryMappedFile__Create(SEXP path_sexp, SEXP size_sexp){ + Rf_error("Cannot call io___MemoryMappedFile__Create(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // io.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr io___MemoryMappedFile__Open(const std::string& path, arrow::io::FileMode::type mode); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr io___MemoryMappedFile__Open(const std::string& path, arrow::io::FileMode::type mode); extern "C" SEXP _arrow_io___MemoryMappedFile__Open(SEXP path_sexp, SEXP mode_sexp){ BEGIN_CPP11 arrow::r::Input::type path(path_sexp); @@ -4366,15 +4366,15 @@ BEGIN_CPP11 return cpp11::as_sexp(io___MemoryMappedFile__Open(path, mode)); END_CPP11 } - #else - extern "C" SEXP _arrow_io___MemoryMappedFile__Open(SEXP path_sexp, SEXP mode_sexp){ - Rf_error("Cannot call io___MemoryMappedFile__Open(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_io___MemoryMappedFile__Open(SEXP path_sexp, SEXP mode_sexp){ + Rf_error("Cannot call io___MemoryMappedFile__Open(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // io.cpp - #if defined(ARROW_R_WITH_ARROW) - void io___MemoryMappedFile__Resize(const std::shared_ptr& x, int64_t size); +#if defined(ARROW_R_WITH_ARROW) +void io___MemoryMappedFile__Resize(const std::shared_ptr& x, int64_t size); extern "C" SEXP _arrow_io___MemoryMappedFile__Resize(SEXP x_sexp, SEXP size_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); @@ -4383,45 +4383,45 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_io___MemoryMappedFile__Resize(SEXP x_sexp, SEXP size_sexp){ - Rf_error("Cannot call io___MemoryMappedFile__Resize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_io___MemoryMappedFile__Resize(SEXP x_sexp, SEXP size_sexp){ + Rf_error("Cannot call io___MemoryMappedFile__Resize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // io.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr io___ReadableFile__Open(const std::string& path); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr io___ReadableFile__Open(const std::string& path); extern "C" SEXP _arrow_io___ReadableFile__Open(SEXP path_sexp){ BEGIN_CPP11 arrow::r::Input::type path(path_sexp); return cpp11::as_sexp(io___ReadableFile__Open(path)); END_CPP11 } - #else - extern "C" SEXP _arrow_io___ReadableFile__Open(SEXP path_sexp){ - Rf_error("Cannot call io___ReadableFile__Open(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_io___ReadableFile__Open(SEXP path_sexp){ + Rf_error("Cannot call io___ReadableFile__Open(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // io.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr io___BufferReader__initialize(const std::shared_ptr& buffer); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr io___BufferReader__initialize(const std::shared_ptr& buffer); extern "C" SEXP _arrow_io___BufferReader__initialize(SEXP buffer_sexp){ BEGIN_CPP11 arrow::r::Input&>::type buffer(buffer_sexp); return cpp11::as_sexp(io___BufferReader__initialize(buffer)); END_CPP11 } - #else - extern "C" SEXP _arrow_io___BufferReader__initialize(SEXP buffer_sexp){ - Rf_error("Cannot call io___BufferReader__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_io___BufferReader__initialize(SEXP buffer_sexp){ + Rf_error("Cannot call io___BufferReader__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // io.cpp - #if defined(ARROW_R_WITH_ARROW) - void io___Writable__write(const std::shared_ptr& stream, const std::shared_ptr& buf); +#if defined(ARROW_R_WITH_ARROW) +void io___Writable__write(const std::shared_ptr& stream, const std::shared_ptr& buf); extern "C" SEXP _arrow_io___Writable__write(SEXP stream_sexp, SEXP buf_sexp){ BEGIN_CPP11 arrow::r::Input&>::type stream(stream_sexp); @@ -4430,105 +4430,105 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_io___Writable__write(SEXP stream_sexp, SEXP buf_sexp){ - Rf_error("Cannot call io___Writable__write(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_io___Writable__write(SEXP stream_sexp, SEXP buf_sexp){ + Rf_error("Cannot call io___Writable__write(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // io.cpp - #if defined(ARROW_R_WITH_ARROW) - int64_t io___OutputStream__Tell(const std::shared_ptr& stream); +#if defined(ARROW_R_WITH_ARROW) +int64_t io___OutputStream__Tell(const std::shared_ptr& stream); extern "C" SEXP _arrow_io___OutputStream__Tell(SEXP stream_sexp){ BEGIN_CPP11 arrow::r::Input&>::type stream(stream_sexp); return cpp11::as_sexp(io___OutputStream__Tell(stream)); END_CPP11 } - #else - extern "C" SEXP _arrow_io___OutputStream__Tell(SEXP stream_sexp){ - Rf_error("Cannot call io___OutputStream__Tell(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_io___OutputStream__Tell(SEXP stream_sexp){ + Rf_error("Cannot call io___OutputStream__Tell(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // io.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr io___FileOutputStream__Open(const std::string& path); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr io___FileOutputStream__Open(const std::string& path); extern "C" SEXP _arrow_io___FileOutputStream__Open(SEXP path_sexp){ BEGIN_CPP11 arrow::r::Input::type path(path_sexp); return cpp11::as_sexp(io___FileOutputStream__Open(path)); END_CPP11 } - #else - extern "C" SEXP _arrow_io___FileOutputStream__Open(SEXP path_sexp){ - Rf_error("Cannot call io___FileOutputStream__Open(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_io___FileOutputStream__Open(SEXP path_sexp){ + Rf_error("Cannot call io___FileOutputStream__Open(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // io.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr io___BufferOutputStream__Create(int64_t initial_capacity); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr io___BufferOutputStream__Create(int64_t initial_capacity); extern "C" SEXP _arrow_io___BufferOutputStream__Create(SEXP initial_capacity_sexp){ BEGIN_CPP11 arrow::r::Input::type initial_capacity(initial_capacity_sexp); return cpp11::as_sexp(io___BufferOutputStream__Create(initial_capacity)); END_CPP11 } - #else - extern "C" SEXP _arrow_io___BufferOutputStream__Create(SEXP initial_capacity_sexp){ - Rf_error("Cannot call io___BufferOutputStream__Create(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_io___BufferOutputStream__Create(SEXP initial_capacity_sexp){ + Rf_error("Cannot call io___BufferOutputStream__Create(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // io.cpp - #if defined(ARROW_R_WITH_ARROW) - int64_t io___BufferOutputStream__capacity(const std::shared_ptr& stream); +#if defined(ARROW_R_WITH_ARROW) +int64_t io___BufferOutputStream__capacity(const std::shared_ptr& stream); extern "C" SEXP _arrow_io___BufferOutputStream__capacity(SEXP stream_sexp){ BEGIN_CPP11 arrow::r::Input&>::type stream(stream_sexp); return cpp11::as_sexp(io___BufferOutputStream__capacity(stream)); END_CPP11 } - #else - extern "C" SEXP _arrow_io___BufferOutputStream__capacity(SEXP stream_sexp){ - Rf_error("Cannot call io___BufferOutputStream__capacity(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_io___BufferOutputStream__capacity(SEXP stream_sexp){ + Rf_error("Cannot call io___BufferOutputStream__capacity(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // io.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr io___BufferOutputStream__Finish(const std::shared_ptr& stream); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr io___BufferOutputStream__Finish(const std::shared_ptr& stream); extern "C" SEXP _arrow_io___BufferOutputStream__Finish(SEXP stream_sexp){ BEGIN_CPP11 arrow::r::Input&>::type stream(stream_sexp); return cpp11::as_sexp(io___BufferOutputStream__Finish(stream)); END_CPP11 } - #else - extern "C" SEXP _arrow_io___BufferOutputStream__Finish(SEXP stream_sexp){ - Rf_error("Cannot call io___BufferOutputStream__Finish(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_io___BufferOutputStream__Finish(SEXP stream_sexp){ + Rf_error("Cannot call io___BufferOutputStream__Finish(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // io.cpp - #if defined(ARROW_R_WITH_ARROW) - int64_t io___BufferOutputStream__Tell(const std::shared_ptr& stream); +#if defined(ARROW_R_WITH_ARROW) +int64_t io___BufferOutputStream__Tell(const std::shared_ptr& stream); extern "C" SEXP _arrow_io___BufferOutputStream__Tell(SEXP stream_sexp){ BEGIN_CPP11 arrow::r::Input&>::type stream(stream_sexp); return cpp11::as_sexp(io___BufferOutputStream__Tell(stream)); END_CPP11 } - #else - extern "C" SEXP _arrow_io___BufferOutputStream__Tell(SEXP stream_sexp){ - Rf_error("Cannot call io___BufferOutputStream__Tell(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_io___BufferOutputStream__Tell(SEXP stream_sexp){ + Rf_error("Cannot call io___BufferOutputStream__Tell(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // io.cpp - #if defined(ARROW_R_WITH_ARROW) - void io___BufferOutputStream__Write(const std::shared_ptr& stream, cpp11::raws bytes); +#if defined(ARROW_R_WITH_ARROW) +void io___BufferOutputStream__Write(const std::shared_ptr& stream, cpp11::raws bytes); extern "C" SEXP _arrow_io___BufferOutputStream__Write(SEXP stream_sexp, SEXP bytes_sexp){ BEGIN_CPP11 arrow::r::Input&>::type stream(stream_sexp); @@ -4537,15 +4537,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_io___BufferOutputStream__Write(SEXP stream_sexp, SEXP bytes_sexp){ - Rf_error("Cannot call io___BufferOutputStream__Write(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_io___BufferOutputStream__Write(SEXP stream_sexp, SEXP bytes_sexp){ + Rf_error("Cannot call io___BufferOutputStream__Write(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // json.cpp - #if defined(ARROW_R_WITH_JSON) - std::shared_ptr json___ReadOptions__initialize(bool use_threads, int block_size); +#if defined(ARROW_R_WITH_JSON) +std::shared_ptr json___ReadOptions__initialize(bool use_threads, int block_size); extern "C" SEXP _arrow_json___ReadOptions__initialize(SEXP use_threads_sexp, SEXP block_size_sexp){ BEGIN_CPP11 arrow::r::Input::type use_threads(use_threads_sexp); @@ -4553,30 +4553,30 @@ BEGIN_CPP11 return cpp11::as_sexp(json___ReadOptions__initialize(use_threads, block_size)); END_CPP11 } - #else - extern "C" SEXP _arrow_json___ReadOptions__initialize(SEXP use_threads_sexp, SEXP block_size_sexp){ - Rf_error("Cannot call json___ReadOptions__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_json___ReadOptions__initialize(SEXP use_threads_sexp, SEXP block_size_sexp){ + Rf_error("Cannot call json___ReadOptions__initialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // json.cpp - #if defined(ARROW_R_WITH_JSON) - std::shared_ptr json___ParseOptions__initialize1(bool newlines_in_values); +#if defined(ARROW_R_WITH_JSON) +std::shared_ptr json___ParseOptions__initialize1(bool newlines_in_values); extern "C" SEXP _arrow_json___ParseOptions__initialize1(SEXP newlines_in_values_sexp){ BEGIN_CPP11 arrow::r::Input::type newlines_in_values(newlines_in_values_sexp); return cpp11::as_sexp(json___ParseOptions__initialize1(newlines_in_values)); END_CPP11 } - #else - extern "C" SEXP _arrow_json___ParseOptions__initialize1(SEXP newlines_in_values_sexp){ - Rf_error("Cannot call json___ParseOptions__initialize1(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_json___ParseOptions__initialize1(SEXP newlines_in_values_sexp){ + Rf_error("Cannot call json___ParseOptions__initialize1(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // json.cpp - #if defined(ARROW_R_WITH_JSON) - std::shared_ptr json___ParseOptions__initialize2(bool newlines_in_values, const std::shared_ptr& explicit_schema); +#if defined(ARROW_R_WITH_JSON) +std::shared_ptr json___ParseOptions__initialize2(bool newlines_in_values, const std::shared_ptr& explicit_schema); extern "C" SEXP _arrow_json___ParseOptions__initialize2(SEXP newlines_in_values_sexp, SEXP explicit_schema_sexp){ BEGIN_CPP11 arrow::r::Input::type newlines_in_values(newlines_in_values_sexp); @@ -4584,15 +4584,15 @@ BEGIN_CPP11 return cpp11::as_sexp(json___ParseOptions__initialize2(newlines_in_values, explicit_schema)); END_CPP11 } - #else - extern "C" SEXP _arrow_json___ParseOptions__initialize2(SEXP newlines_in_values_sexp, SEXP explicit_schema_sexp){ - Rf_error("Cannot call json___ParseOptions__initialize2(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_json___ParseOptions__initialize2(SEXP newlines_in_values_sexp, SEXP explicit_schema_sexp){ + Rf_error("Cannot call json___ParseOptions__initialize2(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // json.cpp - #if defined(ARROW_R_WITH_JSON) - std::shared_ptr json___TableReader__Make(const std::shared_ptr& input, const std::shared_ptr& read_options, const std::shared_ptr& parse_options); +#if defined(ARROW_R_WITH_JSON) +std::shared_ptr json___TableReader__Make(const std::shared_ptr& input, const std::shared_ptr& read_options, const std::shared_ptr& parse_options); extern "C" SEXP _arrow_json___TableReader__Make(SEXP input_sexp, SEXP read_options_sexp, SEXP parse_options_sexp){ BEGIN_CPP11 arrow::r::Input&>::type input(input_sexp); @@ -4601,178 +4601,178 @@ BEGIN_CPP11 return cpp11::as_sexp(json___TableReader__Make(input, read_options, parse_options)); END_CPP11 } - #else - extern "C" SEXP _arrow_json___TableReader__Make(SEXP input_sexp, SEXP read_options_sexp, SEXP parse_options_sexp){ - Rf_error("Cannot call json___TableReader__Make(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_json___TableReader__Make(SEXP input_sexp, SEXP read_options_sexp, SEXP parse_options_sexp){ + Rf_error("Cannot call json___TableReader__Make(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // json.cpp - #if defined(ARROW_R_WITH_JSON) - std::shared_ptr json___TableReader__Read(const std::shared_ptr& table_reader); +#if defined(ARROW_R_WITH_JSON) +std::shared_ptr json___TableReader__Read(const std::shared_ptr& table_reader); extern "C" SEXP _arrow_json___TableReader__Read(SEXP table_reader_sexp){ BEGIN_CPP11 arrow::r::Input&>::type table_reader(table_reader_sexp); return cpp11::as_sexp(json___TableReader__Read(table_reader)); END_CPP11 } - #else - extern "C" SEXP _arrow_json___TableReader__Read(SEXP table_reader_sexp){ - Rf_error("Cannot call json___TableReader__Read(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_json___TableReader__Read(SEXP table_reader_sexp){ + Rf_error("Cannot call json___TableReader__Read(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // memorypool.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr MemoryPool__default(); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr MemoryPool__default(); extern "C" SEXP _arrow_MemoryPool__default(){ BEGIN_CPP11 return cpp11::as_sexp(MemoryPool__default()); END_CPP11 } - #else - extern "C" SEXP _arrow_MemoryPool__default(){ - Rf_error("Cannot call MemoryPool__default(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_MemoryPool__default(){ + Rf_error("Cannot call MemoryPool__default(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // memorypool.cpp - #if defined(ARROW_R_WITH_ARROW) - double MemoryPool__bytes_allocated(const std::shared_ptr& pool); +#if defined(ARROW_R_WITH_ARROW) +double MemoryPool__bytes_allocated(const std::shared_ptr& pool); extern "C" SEXP _arrow_MemoryPool__bytes_allocated(SEXP pool_sexp){ BEGIN_CPP11 arrow::r::Input&>::type pool(pool_sexp); return cpp11::as_sexp(MemoryPool__bytes_allocated(pool)); END_CPP11 } - #else - extern "C" SEXP _arrow_MemoryPool__bytes_allocated(SEXP pool_sexp){ - Rf_error("Cannot call MemoryPool__bytes_allocated(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_MemoryPool__bytes_allocated(SEXP pool_sexp){ + Rf_error("Cannot call MemoryPool__bytes_allocated(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // memorypool.cpp - #if defined(ARROW_R_WITH_ARROW) - double MemoryPool__max_memory(const std::shared_ptr& pool); +#if defined(ARROW_R_WITH_ARROW) +double MemoryPool__max_memory(const std::shared_ptr& pool); extern "C" SEXP _arrow_MemoryPool__max_memory(SEXP pool_sexp){ BEGIN_CPP11 arrow::r::Input&>::type pool(pool_sexp); return cpp11::as_sexp(MemoryPool__max_memory(pool)); END_CPP11 } - #else - extern "C" SEXP _arrow_MemoryPool__max_memory(SEXP pool_sexp){ - Rf_error("Cannot call MemoryPool__max_memory(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_MemoryPool__max_memory(SEXP pool_sexp){ + Rf_error("Cannot call MemoryPool__max_memory(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // memorypool.cpp - #if defined(ARROW_R_WITH_ARROW) - std::string MemoryPool__backend_name(const std::shared_ptr& pool); +#if defined(ARROW_R_WITH_ARROW) +std::string MemoryPool__backend_name(const std::shared_ptr& pool); extern "C" SEXP _arrow_MemoryPool__backend_name(SEXP pool_sexp){ BEGIN_CPP11 arrow::r::Input&>::type pool(pool_sexp); return cpp11::as_sexp(MemoryPool__backend_name(pool)); END_CPP11 } - #else - extern "C" SEXP _arrow_MemoryPool__backend_name(SEXP pool_sexp){ - Rf_error("Cannot call MemoryPool__backend_name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_MemoryPool__backend_name(SEXP pool_sexp){ + Rf_error("Cannot call MemoryPool__backend_name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // memorypool.cpp - #if defined(ARROW_R_WITH_ARROW) - std::vector supported_memory_backends(); +#if defined(ARROW_R_WITH_ARROW) +std::vector supported_memory_backends(); extern "C" SEXP _arrow_supported_memory_backends(){ BEGIN_CPP11 return cpp11::as_sexp(supported_memory_backends()); END_CPP11 } - #else - extern "C" SEXP _arrow_supported_memory_backends(){ - Rf_error("Cannot call supported_memory_backends(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_supported_memory_backends(){ + Rf_error("Cannot call supported_memory_backends(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // message.cpp - #if defined(ARROW_R_WITH_ARROW) - int64_t ipc___Message__body_length(const std::unique_ptr& message); +#if defined(ARROW_R_WITH_ARROW) +int64_t ipc___Message__body_length(const std::unique_ptr& message); extern "C" SEXP _arrow_ipc___Message__body_length(SEXP message_sexp){ BEGIN_CPP11 arrow::r::Input&>::type message(message_sexp); return cpp11::as_sexp(ipc___Message__body_length(message)); END_CPP11 } - #else - extern "C" SEXP _arrow_ipc___Message__body_length(SEXP message_sexp){ - Rf_error("Cannot call ipc___Message__body_length(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ipc___Message__body_length(SEXP message_sexp){ + Rf_error("Cannot call ipc___Message__body_length(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // message.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr ipc___Message__metadata(const std::unique_ptr& message); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr ipc___Message__metadata(const std::unique_ptr& message); extern "C" SEXP _arrow_ipc___Message__metadata(SEXP message_sexp){ BEGIN_CPP11 arrow::r::Input&>::type message(message_sexp); return cpp11::as_sexp(ipc___Message__metadata(message)); END_CPP11 } - #else - extern "C" SEXP _arrow_ipc___Message__metadata(SEXP message_sexp){ - Rf_error("Cannot call ipc___Message__metadata(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ipc___Message__metadata(SEXP message_sexp){ + Rf_error("Cannot call ipc___Message__metadata(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // message.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr ipc___Message__body(const std::unique_ptr& message); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr ipc___Message__body(const std::unique_ptr& message); extern "C" SEXP _arrow_ipc___Message__body(SEXP message_sexp){ BEGIN_CPP11 arrow::r::Input&>::type message(message_sexp); return cpp11::as_sexp(ipc___Message__body(message)); END_CPP11 } - #else - extern "C" SEXP _arrow_ipc___Message__body(SEXP message_sexp){ - Rf_error("Cannot call ipc___Message__body(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ipc___Message__body(SEXP message_sexp){ + Rf_error("Cannot call ipc___Message__body(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // message.cpp - #if defined(ARROW_R_WITH_ARROW) - int64_t ipc___Message__Verify(const std::unique_ptr& message); +#if defined(ARROW_R_WITH_ARROW) +int64_t ipc___Message__Verify(const std::unique_ptr& message); extern "C" SEXP _arrow_ipc___Message__Verify(SEXP message_sexp){ BEGIN_CPP11 arrow::r::Input&>::type message(message_sexp); return cpp11::as_sexp(ipc___Message__Verify(message)); END_CPP11 } - #else - extern "C" SEXP _arrow_ipc___Message__Verify(SEXP message_sexp){ - Rf_error("Cannot call ipc___Message__Verify(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ipc___Message__Verify(SEXP message_sexp){ + Rf_error("Cannot call ipc___Message__Verify(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // message.cpp - #if defined(ARROW_R_WITH_ARROW) - arrow::ipc::MessageType ipc___Message__type(const std::unique_ptr& message); +#if defined(ARROW_R_WITH_ARROW) +arrow::ipc::MessageType ipc___Message__type(const std::unique_ptr& message); extern "C" SEXP _arrow_ipc___Message__type(SEXP message_sexp){ BEGIN_CPP11 arrow::r::Input&>::type message(message_sexp); return cpp11::as_sexp(ipc___Message__type(message)); END_CPP11 } - #else - extern "C" SEXP _arrow_ipc___Message__type(SEXP message_sexp){ - Rf_error("Cannot call ipc___Message__type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ipc___Message__type(SEXP message_sexp){ + Rf_error("Cannot call ipc___Message__type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // message.cpp - #if defined(ARROW_R_WITH_ARROW) - bool ipc___Message__Equals(const std::unique_ptr& x, const std::unique_ptr& y); +#if defined(ARROW_R_WITH_ARROW) +bool ipc___Message__Equals(const std::unique_ptr& x, const std::unique_ptr& y); extern "C" SEXP _arrow_ipc___Message__Equals(SEXP x_sexp, SEXP y_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); @@ -4780,15 +4780,15 @@ BEGIN_CPP11 return cpp11::as_sexp(ipc___Message__Equals(x, y)); END_CPP11 } - #else - extern "C" SEXP _arrow_ipc___Message__Equals(SEXP x_sexp, SEXP y_sexp){ - Rf_error("Cannot call ipc___Message__Equals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ipc___Message__Equals(SEXP x_sexp, SEXP y_sexp){ + Rf_error("Cannot call ipc___Message__Equals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // message.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr ipc___ReadRecordBatch__Message__Schema(const std::unique_ptr& message, const std::shared_ptr& schema); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr ipc___ReadRecordBatch__Message__Schema(const std::unique_ptr& message, const std::shared_ptr& schema); extern "C" SEXP _arrow_ipc___ReadRecordBatch__Message__Schema(SEXP message_sexp, SEXP schema_sexp){ BEGIN_CPP11 arrow::r::Input&>::type message(message_sexp); @@ -4796,105 +4796,105 @@ BEGIN_CPP11 return cpp11::as_sexp(ipc___ReadRecordBatch__Message__Schema(message, schema)); END_CPP11 } - #else - extern "C" SEXP _arrow_ipc___ReadRecordBatch__Message__Schema(SEXP message_sexp, SEXP schema_sexp){ - Rf_error("Cannot call ipc___ReadRecordBatch__Message__Schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ipc___ReadRecordBatch__Message__Schema(SEXP message_sexp, SEXP schema_sexp){ + Rf_error("Cannot call ipc___ReadRecordBatch__Message__Schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // message.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr ipc___ReadSchema_InputStream(const std::shared_ptr& stream); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr ipc___ReadSchema_InputStream(const std::shared_ptr& stream); extern "C" SEXP _arrow_ipc___ReadSchema_InputStream(SEXP stream_sexp){ BEGIN_CPP11 arrow::r::Input&>::type stream(stream_sexp); return cpp11::as_sexp(ipc___ReadSchema_InputStream(stream)); END_CPP11 } - #else - extern "C" SEXP _arrow_ipc___ReadSchema_InputStream(SEXP stream_sexp){ - Rf_error("Cannot call ipc___ReadSchema_InputStream(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ipc___ReadSchema_InputStream(SEXP stream_sexp){ + Rf_error("Cannot call ipc___ReadSchema_InputStream(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // message.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr ipc___ReadSchema_Message(const std::unique_ptr& message); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr ipc___ReadSchema_Message(const std::unique_ptr& message); extern "C" SEXP _arrow_ipc___ReadSchema_Message(SEXP message_sexp){ BEGIN_CPP11 arrow::r::Input&>::type message(message_sexp); return cpp11::as_sexp(ipc___ReadSchema_Message(message)); END_CPP11 } - #else - extern "C" SEXP _arrow_ipc___ReadSchema_Message(SEXP message_sexp){ - Rf_error("Cannot call ipc___ReadSchema_Message(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ipc___ReadSchema_Message(SEXP message_sexp){ + Rf_error("Cannot call ipc___ReadSchema_Message(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // message.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr ipc___MessageReader__Open(const std::shared_ptr& stream); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr ipc___MessageReader__Open(const std::shared_ptr& stream); extern "C" SEXP _arrow_ipc___MessageReader__Open(SEXP stream_sexp){ BEGIN_CPP11 arrow::r::Input&>::type stream(stream_sexp); return cpp11::as_sexp(ipc___MessageReader__Open(stream)); END_CPP11 } - #else - extern "C" SEXP _arrow_ipc___MessageReader__Open(SEXP stream_sexp){ - Rf_error("Cannot call ipc___MessageReader__Open(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ipc___MessageReader__Open(SEXP stream_sexp){ + Rf_error("Cannot call ipc___MessageReader__Open(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // message.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr ipc___MessageReader__ReadNextMessage(const std::unique_ptr& reader); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr ipc___MessageReader__ReadNextMessage(const std::unique_ptr& reader); extern "C" SEXP _arrow_ipc___MessageReader__ReadNextMessage(SEXP reader_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); return cpp11::as_sexp(ipc___MessageReader__ReadNextMessage(reader)); END_CPP11 } - #else - extern "C" SEXP _arrow_ipc___MessageReader__ReadNextMessage(SEXP reader_sexp){ - Rf_error("Cannot call ipc___MessageReader__ReadNextMessage(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ipc___MessageReader__ReadNextMessage(SEXP reader_sexp){ + Rf_error("Cannot call ipc___MessageReader__ReadNextMessage(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // message.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr ipc___ReadMessage(const std::shared_ptr& stream); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr ipc___ReadMessage(const std::shared_ptr& stream); extern "C" SEXP _arrow_ipc___ReadMessage(SEXP stream_sexp){ BEGIN_CPP11 arrow::r::Input&>::type stream(stream_sexp); return cpp11::as_sexp(ipc___ReadMessage(stream)); END_CPP11 } - #else - extern "C" SEXP _arrow_ipc___ReadMessage(SEXP stream_sexp){ - Rf_error("Cannot call ipc___ReadMessage(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ipc___ReadMessage(SEXP stream_sexp){ + Rf_error("Cannot call ipc___ReadMessage(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // parquet.cpp - #if defined(ARROW_R_WITH_PARQUET) - std::shared_ptr parquet___arrow___ArrowReaderProperties__Make(bool use_threads); +#if defined(ARROW_R_WITH_PARQUET) +std::shared_ptr parquet___arrow___ArrowReaderProperties__Make(bool use_threads); extern "C" SEXP _arrow_parquet___arrow___ArrowReaderProperties__Make(SEXP use_threads_sexp){ BEGIN_CPP11 arrow::r::Input::type use_threads(use_threads_sexp); return cpp11::as_sexp(parquet___arrow___ArrowReaderProperties__Make(use_threads)); END_CPP11 } - #else - extern "C" SEXP _arrow_parquet___arrow___ArrowReaderProperties__Make(SEXP use_threads_sexp){ - Rf_error("Cannot call parquet___arrow___ArrowReaderProperties__Make(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_parquet___arrow___ArrowReaderProperties__Make(SEXP use_threads_sexp){ + Rf_error("Cannot call parquet___arrow___ArrowReaderProperties__Make(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // parquet.cpp - #if defined(ARROW_R_WITH_PARQUET) - void parquet___arrow___ArrowReaderProperties__set_use_threads(const std::shared_ptr& properties, bool use_threads); +#if defined(ARROW_R_WITH_PARQUET) +void parquet___arrow___ArrowReaderProperties__set_use_threads(const std::shared_ptr& properties, bool use_threads); extern "C" SEXP _arrow_parquet___arrow___ArrowReaderProperties__set_use_threads(SEXP properties_sexp, SEXP use_threads_sexp){ BEGIN_CPP11 arrow::r::Input&>::type properties(properties_sexp); @@ -4903,15 +4903,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_parquet___arrow___ArrowReaderProperties__set_use_threads(SEXP properties_sexp, SEXP use_threads_sexp){ - Rf_error("Cannot call parquet___arrow___ArrowReaderProperties__set_use_threads(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_parquet___arrow___ArrowReaderProperties__set_use_threads(SEXP properties_sexp, SEXP use_threads_sexp){ + Rf_error("Cannot call parquet___arrow___ArrowReaderProperties__set_use_threads(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // parquet.cpp - #if defined(ARROW_R_WITH_PARQUET) - bool parquet___arrow___ArrowReaderProperties__get_use_threads(const std::shared_ptr& properties, bool use_threads); +#if defined(ARROW_R_WITH_PARQUET) +bool parquet___arrow___ArrowReaderProperties__get_use_threads(const std::shared_ptr& properties, bool use_threads); extern "C" SEXP _arrow_parquet___arrow___ArrowReaderProperties__get_use_threads(SEXP properties_sexp, SEXP use_threads_sexp){ BEGIN_CPP11 arrow::r::Input&>::type properties(properties_sexp); @@ -4919,15 +4919,15 @@ BEGIN_CPP11 return cpp11::as_sexp(parquet___arrow___ArrowReaderProperties__get_use_threads(properties, use_threads)); END_CPP11 } - #else - extern "C" SEXP _arrow_parquet___arrow___ArrowReaderProperties__get_use_threads(SEXP properties_sexp, SEXP use_threads_sexp){ - Rf_error("Cannot call parquet___arrow___ArrowReaderProperties__get_use_threads(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_parquet___arrow___ArrowReaderProperties__get_use_threads(SEXP properties_sexp, SEXP use_threads_sexp){ + Rf_error("Cannot call parquet___arrow___ArrowReaderProperties__get_use_threads(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // parquet.cpp - #if defined(ARROW_R_WITH_PARQUET) - bool parquet___arrow___ArrowReaderProperties__get_read_dictionary(const std::shared_ptr& properties, int column_index); +#if defined(ARROW_R_WITH_PARQUET) +bool parquet___arrow___ArrowReaderProperties__get_read_dictionary(const std::shared_ptr& properties, int column_index); extern "C" SEXP _arrow_parquet___arrow___ArrowReaderProperties__get_read_dictionary(SEXP properties_sexp, SEXP column_index_sexp){ BEGIN_CPP11 arrow::r::Input&>::type properties(properties_sexp); @@ -4935,15 +4935,15 @@ BEGIN_CPP11 return cpp11::as_sexp(parquet___arrow___ArrowReaderProperties__get_read_dictionary(properties, column_index)); END_CPP11 } - #else - extern "C" SEXP _arrow_parquet___arrow___ArrowReaderProperties__get_read_dictionary(SEXP properties_sexp, SEXP column_index_sexp){ - Rf_error("Cannot call parquet___arrow___ArrowReaderProperties__get_read_dictionary(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_parquet___arrow___ArrowReaderProperties__get_read_dictionary(SEXP properties_sexp, SEXP column_index_sexp){ + Rf_error("Cannot call parquet___arrow___ArrowReaderProperties__get_read_dictionary(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // parquet.cpp - #if defined(ARROW_R_WITH_PARQUET) - void parquet___arrow___ArrowReaderProperties__set_read_dictionary(const std::shared_ptr& properties, int column_index, bool read_dict); +#if defined(ARROW_R_WITH_PARQUET) +void parquet___arrow___ArrowReaderProperties__set_read_dictionary(const std::shared_ptr& properties, int column_index, bool read_dict); extern "C" SEXP _arrow_parquet___arrow___ArrowReaderProperties__set_read_dictionary(SEXP properties_sexp, SEXP column_index_sexp, SEXP read_dict_sexp){ BEGIN_CPP11 arrow::r::Input&>::type properties(properties_sexp); @@ -4953,15 +4953,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_parquet___arrow___ArrowReaderProperties__set_read_dictionary(SEXP properties_sexp, SEXP column_index_sexp, SEXP read_dict_sexp){ - Rf_error("Cannot call parquet___arrow___ArrowReaderProperties__set_read_dictionary(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_parquet___arrow___ArrowReaderProperties__set_read_dictionary(SEXP properties_sexp, SEXP column_index_sexp, SEXP read_dict_sexp){ + Rf_error("Cannot call parquet___arrow___ArrowReaderProperties__set_read_dictionary(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // parquet.cpp - #if defined(ARROW_R_WITH_PARQUET) - std::shared_ptr parquet___arrow___FileReader__OpenFile(const std::shared_ptr& file, const std::shared_ptr& props); +#if defined(ARROW_R_WITH_PARQUET) +std::shared_ptr parquet___arrow___FileReader__OpenFile(const std::shared_ptr& file, const std::shared_ptr& props); extern "C" SEXP _arrow_parquet___arrow___FileReader__OpenFile(SEXP file_sexp, SEXP props_sexp){ BEGIN_CPP11 arrow::r::Input&>::type file(file_sexp); @@ -4969,30 +4969,30 @@ BEGIN_CPP11 return cpp11::as_sexp(parquet___arrow___FileReader__OpenFile(file, props)); END_CPP11 } - #else - extern "C" SEXP _arrow_parquet___arrow___FileReader__OpenFile(SEXP file_sexp, SEXP props_sexp){ - Rf_error("Cannot call parquet___arrow___FileReader__OpenFile(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_parquet___arrow___FileReader__OpenFile(SEXP file_sexp, SEXP props_sexp){ + Rf_error("Cannot call parquet___arrow___FileReader__OpenFile(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // parquet.cpp - #if defined(ARROW_R_WITH_PARQUET) - std::shared_ptr parquet___arrow___FileReader__ReadTable1(const std::shared_ptr& reader); +#if defined(ARROW_R_WITH_PARQUET) +std::shared_ptr parquet___arrow___FileReader__ReadTable1(const std::shared_ptr& reader); extern "C" SEXP _arrow_parquet___arrow___FileReader__ReadTable1(SEXP reader_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); return cpp11::as_sexp(parquet___arrow___FileReader__ReadTable1(reader)); END_CPP11 } - #else - extern "C" SEXP _arrow_parquet___arrow___FileReader__ReadTable1(SEXP reader_sexp){ - Rf_error("Cannot call parquet___arrow___FileReader__ReadTable1(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_parquet___arrow___FileReader__ReadTable1(SEXP reader_sexp){ + Rf_error("Cannot call parquet___arrow___FileReader__ReadTable1(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // parquet.cpp - #if defined(ARROW_R_WITH_PARQUET) - std::shared_ptr parquet___arrow___FileReader__ReadTable2(const std::shared_ptr& reader, const std::vector& column_indices); +#if defined(ARROW_R_WITH_PARQUET) +std::shared_ptr parquet___arrow___FileReader__ReadTable2(const std::shared_ptr& reader, const std::vector& column_indices); extern "C" SEXP _arrow_parquet___arrow___FileReader__ReadTable2(SEXP reader_sexp, SEXP column_indices_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); @@ -5000,15 +5000,15 @@ BEGIN_CPP11 return cpp11::as_sexp(parquet___arrow___FileReader__ReadTable2(reader, column_indices)); END_CPP11 } - #else - extern "C" SEXP _arrow_parquet___arrow___FileReader__ReadTable2(SEXP reader_sexp, SEXP column_indices_sexp){ - Rf_error("Cannot call parquet___arrow___FileReader__ReadTable2(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_parquet___arrow___FileReader__ReadTable2(SEXP reader_sexp, SEXP column_indices_sexp){ + Rf_error("Cannot call parquet___arrow___FileReader__ReadTable2(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // parquet.cpp - #if defined(ARROW_R_WITH_PARQUET) - std::shared_ptr parquet___arrow___FileReader__ReadRowGroup1(const std::shared_ptr& reader, int i); +#if defined(ARROW_R_WITH_PARQUET) +std::shared_ptr parquet___arrow___FileReader__ReadRowGroup1(const std::shared_ptr& reader, int i); extern "C" SEXP _arrow_parquet___arrow___FileReader__ReadRowGroup1(SEXP reader_sexp, SEXP i_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); @@ -5016,15 +5016,15 @@ BEGIN_CPP11 return cpp11::as_sexp(parquet___arrow___FileReader__ReadRowGroup1(reader, i)); END_CPP11 } - #else - extern "C" SEXP _arrow_parquet___arrow___FileReader__ReadRowGroup1(SEXP reader_sexp, SEXP i_sexp){ - Rf_error("Cannot call parquet___arrow___FileReader__ReadRowGroup1(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_parquet___arrow___FileReader__ReadRowGroup1(SEXP reader_sexp, SEXP i_sexp){ + Rf_error("Cannot call parquet___arrow___FileReader__ReadRowGroup1(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // parquet.cpp - #if defined(ARROW_R_WITH_PARQUET) - std::shared_ptr parquet___arrow___FileReader__ReadRowGroup2(const std::shared_ptr& reader, int i, const std::vector& column_indices); +#if defined(ARROW_R_WITH_PARQUET) +std::shared_ptr parquet___arrow___FileReader__ReadRowGroup2(const std::shared_ptr& reader, int i, const std::vector& column_indices); extern "C" SEXP _arrow_parquet___arrow___FileReader__ReadRowGroup2(SEXP reader_sexp, SEXP i_sexp, SEXP column_indices_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); @@ -5033,15 +5033,15 @@ BEGIN_CPP11 return cpp11::as_sexp(parquet___arrow___FileReader__ReadRowGroup2(reader, i, column_indices)); END_CPP11 } - #else - extern "C" SEXP _arrow_parquet___arrow___FileReader__ReadRowGroup2(SEXP reader_sexp, SEXP i_sexp, SEXP column_indices_sexp){ - Rf_error("Cannot call parquet___arrow___FileReader__ReadRowGroup2(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_parquet___arrow___FileReader__ReadRowGroup2(SEXP reader_sexp, SEXP i_sexp, SEXP column_indices_sexp){ + Rf_error("Cannot call parquet___arrow___FileReader__ReadRowGroup2(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // parquet.cpp - #if defined(ARROW_R_WITH_PARQUET) - std::shared_ptr parquet___arrow___FileReader__ReadRowGroups1(const std::shared_ptr& reader, const std::vector& row_groups); +#if defined(ARROW_R_WITH_PARQUET) +std::shared_ptr parquet___arrow___FileReader__ReadRowGroups1(const std::shared_ptr& reader, const std::vector& row_groups); extern "C" SEXP _arrow_parquet___arrow___FileReader__ReadRowGroups1(SEXP reader_sexp, SEXP row_groups_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); @@ -5049,15 +5049,15 @@ BEGIN_CPP11 return cpp11::as_sexp(parquet___arrow___FileReader__ReadRowGroups1(reader, row_groups)); END_CPP11 } - #else - extern "C" SEXP _arrow_parquet___arrow___FileReader__ReadRowGroups1(SEXP reader_sexp, SEXP row_groups_sexp){ - Rf_error("Cannot call parquet___arrow___FileReader__ReadRowGroups1(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_parquet___arrow___FileReader__ReadRowGroups1(SEXP reader_sexp, SEXP row_groups_sexp){ + Rf_error("Cannot call parquet___arrow___FileReader__ReadRowGroups1(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // parquet.cpp - #if defined(ARROW_R_WITH_PARQUET) - std::shared_ptr parquet___arrow___FileReader__ReadRowGroups2(const std::shared_ptr& reader, const std::vector& row_groups, const std::vector& column_indices); +#if defined(ARROW_R_WITH_PARQUET) +std::shared_ptr parquet___arrow___FileReader__ReadRowGroups2(const std::shared_ptr& reader, const std::vector& row_groups, const std::vector& column_indices); extern "C" SEXP _arrow_parquet___arrow___FileReader__ReadRowGroups2(SEXP reader_sexp, SEXP row_groups_sexp, SEXP column_indices_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); @@ -5066,60 +5066,60 @@ BEGIN_CPP11 return cpp11::as_sexp(parquet___arrow___FileReader__ReadRowGroups2(reader, row_groups, column_indices)); END_CPP11 } - #else - extern "C" SEXP _arrow_parquet___arrow___FileReader__ReadRowGroups2(SEXP reader_sexp, SEXP row_groups_sexp, SEXP column_indices_sexp){ - Rf_error("Cannot call parquet___arrow___FileReader__ReadRowGroups2(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_parquet___arrow___FileReader__ReadRowGroups2(SEXP reader_sexp, SEXP row_groups_sexp, SEXP column_indices_sexp){ + Rf_error("Cannot call parquet___arrow___FileReader__ReadRowGroups2(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // parquet.cpp - #if defined(ARROW_R_WITH_PARQUET) - int64_t parquet___arrow___FileReader__num_rows(const std::shared_ptr& reader); +#if defined(ARROW_R_WITH_PARQUET) +int64_t parquet___arrow___FileReader__num_rows(const std::shared_ptr& reader); extern "C" SEXP _arrow_parquet___arrow___FileReader__num_rows(SEXP reader_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); return cpp11::as_sexp(parquet___arrow___FileReader__num_rows(reader)); END_CPP11 } - #else - extern "C" SEXP _arrow_parquet___arrow___FileReader__num_rows(SEXP reader_sexp){ - Rf_error("Cannot call parquet___arrow___FileReader__num_rows(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_parquet___arrow___FileReader__num_rows(SEXP reader_sexp){ + Rf_error("Cannot call parquet___arrow___FileReader__num_rows(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // parquet.cpp - #if defined(ARROW_R_WITH_PARQUET) - int parquet___arrow___FileReader__num_columns(const std::shared_ptr& reader); +#if defined(ARROW_R_WITH_PARQUET) +int parquet___arrow___FileReader__num_columns(const std::shared_ptr& reader); extern "C" SEXP _arrow_parquet___arrow___FileReader__num_columns(SEXP reader_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); return cpp11::as_sexp(parquet___arrow___FileReader__num_columns(reader)); END_CPP11 } - #else - extern "C" SEXP _arrow_parquet___arrow___FileReader__num_columns(SEXP reader_sexp){ - Rf_error("Cannot call parquet___arrow___FileReader__num_columns(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_parquet___arrow___FileReader__num_columns(SEXP reader_sexp){ + Rf_error("Cannot call parquet___arrow___FileReader__num_columns(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // parquet.cpp - #if defined(ARROW_R_WITH_PARQUET) - int parquet___arrow___FileReader__num_row_groups(const std::shared_ptr& reader); +#if defined(ARROW_R_WITH_PARQUET) +int parquet___arrow___FileReader__num_row_groups(const std::shared_ptr& reader); extern "C" SEXP _arrow_parquet___arrow___FileReader__num_row_groups(SEXP reader_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); return cpp11::as_sexp(parquet___arrow___FileReader__num_row_groups(reader)); END_CPP11 } - #else - extern "C" SEXP _arrow_parquet___arrow___FileReader__num_row_groups(SEXP reader_sexp){ - Rf_error("Cannot call parquet___arrow___FileReader__num_row_groups(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_parquet___arrow___FileReader__num_row_groups(SEXP reader_sexp){ + Rf_error("Cannot call parquet___arrow___FileReader__num_row_groups(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // parquet.cpp - #if defined(ARROW_R_WITH_PARQUET) - std::shared_ptr parquet___arrow___FileReader__ReadColumn(const std::shared_ptr& reader, int i); +#if defined(ARROW_R_WITH_PARQUET) +std::shared_ptr parquet___arrow___FileReader__ReadColumn(const std::shared_ptr& reader, int i); extern "C" SEXP _arrow_parquet___arrow___FileReader__ReadColumn(SEXP reader_sexp, SEXP i_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); @@ -5127,15 +5127,15 @@ BEGIN_CPP11 return cpp11::as_sexp(parquet___arrow___FileReader__ReadColumn(reader, i)); END_CPP11 } - #else - extern "C" SEXP _arrow_parquet___arrow___FileReader__ReadColumn(SEXP reader_sexp, SEXP i_sexp){ - Rf_error("Cannot call parquet___arrow___FileReader__ReadColumn(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_parquet___arrow___FileReader__ReadColumn(SEXP reader_sexp, SEXP i_sexp){ + Rf_error("Cannot call parquet___arrow___FileReader__ReadColumn(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // parquet.cpp - #if defined(ARROW_R_WITH_PARQUET) - std::shared_ptr parquet___ArrowWriterProperties___create(bool allow_truncated_timestamps, bool use_deprecated_int96_timestamps, int timestamp_unit); +#if defined(ARROW_R_WITH_PARQUET) +std::shared_ptr parquet___ArrowWriterProperties___create(bool allow_truncated_timestamps, bool use_deprecated_int96_timestamps, int timestamp_unit); extern "C" SEXP _arrow_parquet___ArrowWriterProperties___create(SEXP allow_truncated_timestamps_sexp, SEXP use_deprecated_int96_timestamps_sexp, SEXP timestamp_unit_sexp){ BEGIN_CPP11 arrow::r::Input::type allow_truncated_timestamps(allow_truncated_timestamps_sexp); @@ -5144,29 +5144,29 @@ BEGIN_CPP11 return cpp11::as_sexp(parquet___ArrowWriterProperties___create(allow_truncated_timestamps, use_deprecated_int96_timestamps, timestamp_unit)); END_CPP11 } - #else - extern "C" SEXP _arrow_parquet___ArrowWriterProperties___create(SEXP allow_truncated_timestamps_sexp, SEXP use_deprecated_int96_timestamps_sexp, SEXP timestamp_unit_sexp){ - Rf_error("Cannot call parquet___ArrowWriterProperties___create(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_parquet___ArrowWriterProperties___create(SEXP allow_truncated_timestamps_sexp, SEXP use_deprecated_int96_timestamps_sexp, SEXP timestamp_unit_sexp){ + Rf_error("Cannot call parquet___ArrowWriterProperties___create(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // parquet.cpp - #if defined(ARROW_R_WITH_PARQUET) - std::shared_ptr parquet___WriterProperties___Builder__create(); +#if defined(ARROW_R_WITH_PARQUET) +std::shared_ptr parquet___WriterProperties___Builder__create(); extern "C" SEXP _arrow_parquet___WriterProperties___Builder__create(){ BEGIN_CPP11 return cpp11::as_sexp(parquet___WriterProperties___Builder__create()); END_CPP11 } - #else - extern "C" SEXP _arrow_parquet___WriterProperties___Builder__create(){ - Rf_error("Cannot call parquet___WriterProperties___Builder__create(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_parquet___WriterProperties___Builder__create(){ + Rf_error("Cannot call parquet___WriterProperties___Builder__create(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // parquet.cpp - #if defined(ARROW_R_WITH_PARQUET) - void parquet___WriterProperties___Builder__version(const std::shared_ptr& builder, const parquet::ParquetVersion::type& version); +#if defined(ARROW_R_WITH_PARQUET) +void parquet___WriterProperties___Builder__version(const std::shared_ptr& builder, const parquet::ParquetVersion::type& version); extern "C" SEXP _arrow_parquet___WriterProperties___Builder__version(SEXP builder_sexp, SEXP version_sexp){ BEGIN_CPP11 arrow::r::Input&>::type builder(builder_sexp); @@ -5175,15 +5175,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_parquet___WriterProperties___Builder__version(SEXP builder_sexp, SEXP version_sexp){ - Rf_error("Cannot call parquet___WriterProperties___Builder__version(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_parquet___WriterProperties___Builder__version(SEXP builder_sexp, SEXP version_sexp){ + Rf_error("Cannot call parquet___WriterProperties___Builder__version(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // parquet.cpp - #if defined(ARROW_R_WITH_PARQUET) - void parquet___ArrowWriterProperties___Builder__set_compressions(const std::shared_ptr& builder, const std::vector& paths, cpp11::integers types); +#if defined(ARROW_R_WITH_PARQUET) +void parquet___ArrowWriterProperties___Builder__set_compressions(const std::shared_ptr& builder, const std::vector& paths, cpp11::integers types); extern "C" SEXP _arrow_parquet___ArrowWriterProperties___Builder__set_compressions(SEXP builder_sexp, SEXP paths_sexp, SEXP types_sexp){ BEGIN_CPP11 arrow::r::Input&>::type builder(builder_sexp); @@ -5193,15 +5193,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_parquet___ArrowWriterProperties___Builder__set_compressions(SEXP builder_sexp, SEXP paths_sexp, SEXP types_sexp){ - Rf_error("Cannot call parquet___ArrowWriterProperties___Builder__set_compressions(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_parquet___ArrowWriterProperties___Builder__set_compressions(SEXP builder_sexp, SEXP paths_sexp, SEXP types_sexp){ + Rf_error("Cannot call parquet___ArrowWriterProperties___Builder__set_compressions(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // parquet.cpp - #if defined(ARROW_R_WITH_PARQUET) - void parquet___ArrowWriterProperties___Builder__set_compression_levels(const std::shared_ptr& builder, const std::vector& paths, cpp11::integers levels); +#if defined(ARROW_R_WITH_PARQUET) +void parquet___ArrowWriterProperties___Builder__set_compression_levels(const std::shared_ptr& builder, const std::vector& paths, cpp11::integers levels); extern "C" SEXP _arrow_parquet___ArrowWriterProperties___Builder__set_compression_levels(SEXP builder_sexp, SEXP paths_sexp, SEXP levels_sexp){ BEGIN_CPP11 arrow::r::Input&>::type builder(builder_sexp); @@ -5211,15 +5211,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_parquet___ArrowWriterProperties___Builder__set_compression_levels(SEXP builder_sexp, SEXP paths_sexp, SEXP levels_sexp){ - Rf_error("Cannot call parquet___ArrowWriterProperties___Builder__set_compression_levels(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_parquet___ArrowWriterProperties___Builder__set_compression_levels(SEXP builder_sexp, SEXP paths_sexp, SEXP levels_sexp){ + Rf_error("Cannot call parquet___ArrowWriterProperties___Builder__set_compression_levels(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // parquet.cpp - #if defined(ARROW_R_WITH_PARQUET) - void parquet___ArrowWriterProperties___Builder__set_use_dictionary(const std::shared_ptr& builder, const std::vector& paths, cpp11::logicals use_dictionary); +#if defined(ARROW_R_WITH_PARQUET) +void parquet___ArrowWriterProperties___Builder__set_use_dictionary(const std::shared_ptr& builder, const std::vector& paths, cpp11::logicals use_dictionary); extern "C" SEXP _arrow_parquet___ArrowWriterProperties___Builder__set_use_dictionary(SEXP builder_sexp, SEXP paths_sexp, SEXP use_dictionary_sexp){ BEGIN_CPP11 arrow::r::Input&>::type builder(builder_sexp); @@ -5229,15 +5229,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_parquet___ArrowWriterProperties___Builder__set_use_dictionary(SEXP builder_sexp, SEXP paths_sexp, SEXP use_dictionary_sexp){ - Rf_error("Cannot call parquet___ArrowWriterProperties___Builder__set_use_dictionary(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_parquet___ArrowWriterProperties___Builder__set_use_dictionary(SEXP builder_sexp, SEXP paths_sexp, SEXP use_dictionary_sexp){ + Rf_error("Cannot call parquet___ArrowWriterProperties___Builder__set_use_dictionary(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // parquet.cpp - #if defined(ARROW_R_WITH_PARQUET) - void parquet___ArrowWriterProperties___Builder__set_write_statistics(const std::shared_ptr& builder, const std::vector& paths, cpp11::logicals write_statistics); +#if defined(ARROW_R_WITH_PARQUET) +void parquet___ArrowWriterProperties___Builder__set_write_statistics(const std::shared_ptr& builder, const std::vector& paths, cpp11::logicals write_statistics); extern "C" SEXP _arrow_parquet___ArrowWriterProperties___Builder__set_write_statistics(SEXP builder_sexp, SEXP paths_sexp, SEXP write_statistics_sexp){ BEGIN_CPP11 arrow::r::Input&>::type builder(builder_sexp); @@ -5247,15 +5247,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_parquet___ArrowWriterProperties___Builder__set_write_statistics(SEXP builder_sexp, SEXP paths_sexp, SEXP write_statistics_sexp){ - Rf_error("Cannot call parquet___ArrowWriterProperties___Builder__set_write_statistics(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_parquet___ArrowWriterProperties___Builder__set_write_statistics(SEXP builder_sexp, SEXP paths_sexp, SEXP write_statistics_sexp){ + Rf_error("Cannot call parquet___ArrowWriterProperties___Builder__set_write_statistics(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // parquet.cpp - #if defined(ARROW_R_WITH_PARQUET) - void parquet___ArrowWriterProperties___Builder__data_page_size(const std::shared_ptr& builder, int64_t data_page_size); +#if defined(ARROW_R_WITH_PARQUET) +void parquet___ArrowWriterProperties___Builder__data_page_size(const std::shared_ptr& builder, int64_t data_page_size); extern "C" SEXP _arrow_parquet___ArrowWriterProperties___Builder__data_page_size(SEXP builder_sexp, SEXP data_page_size_sexp){ BEGIN_CPP11 arrow::r::Input&>::type builder(builder_sexp); @@ -5264,30 +5264,30 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_parquet___ArrowWriterProperties___Builder__data_page_size(SEXP builder_sexp, SEXP data_page_size_sexp){ - Rf_error("Cannot call parquet___ArrowWriterProperties___Builder__data_page_size(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_parquet___ArrowWriterProperties___Builder__data_page_size(SEXP builder_sexp, SEXP data_page_size_sexp){ + Rf_error("Cannot call parquet___ArrowWriterProperties___Builder__data_page_size(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // parquet.cpp - #if defined(ARROW_R_WITH_PARQUET) - std::shared_ptr parquet___WriterProperties___Builder__build(const std::shared_ptr& builder); +#if defined(ARROW_R_WITH_PARQUET) +std::shared_ptr parquet___WriterProperties___Builder__build(const std::shared_ptr& builder); extern "C" SEXP _arrow_parquet___WriterProperties___Builder__build(SEXP builder_sexp){ BEGIN_CPP11 arrow::r::Input&>::type builder(builder_sexp); return cpp11::as_sexp(parquet___WriterProperties___Builder__build(builder)); END_CPP11 } - #else - extern "C" SEXP _arrow_parquet___WriterProperties___Builder__build(SEXP builder_sexp){ - Rf_error("Cannot call parquet___WriterProperties___Builder__build(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_parquet___WriterProperties___Builder__build(SEXP builder_sexp){ + Rf_error("Cannot call parquet___WriterProperties___Builder__build(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // parquet.cpp - #if defined(ARROW_R_WITH_PARQUET) - std::shared_ptr parquet___arrow___ParquetFileWriter__Open(const std::shared_ptr& schema, const std::shared_ptr& sink, const std::shared_ptr& properties, const std::shared_ptr& arrow_properties); +#if defined(ARROW_R_WITH_PARQUET) +std::shared_ptr parquet___arrow___ParquetFileWriter__Open(const std::shared_ptr& schema, const std::shared_ptr& sink, const std::shared_ptr& properties, const std::shared_ptr& arrow_properties); extern "C" SEXP _arrow_parquet___arrow___ParquetFileWriter__Open(SEXP schema_sexp, SEXP sink_sexp, SEXP properties_sexp, SEXP arrow_properties_sexp){ BEGIN_CPP11 arrow::r::Input&>::type schema(schema_sexp); @@ -5297,15 +5297,15 @@ BEGIN_CPP11 return cpp11::as_sexp(parquet___arrow___ParquetFileWriter__Open(schema, sink, properties, arrow_properties)); END_CPP11 } - #else - extern "C" SEXP _arrow_parquet___arrow___ParquetFileWriter__Open(SEXP schema_sexp, SEXP sink_sexp, SEXP properties_sexp, SEXP arrow_properties_sexp){ - Rf_error("Cannot call parquet___arrow___ParquetFileWriter__Open(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_parquet___arrow___ParquetFileWriter__Open(SEXP schema_sexp, SEXP sink_sexp, SEXP properties_sexp, SEXP arrow_properties_sexp){ + Rf_error("Cannot call parquet___arrow___ParquetFileWriter__Open(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // parquet.cpp - #if defined(ARROW_R_WITH_PARQUET) - void parquet___arrow___FileWriter__WriteTable(const std::shared_ptr& writer, const std::shared_ptr& table, int64_t chunk_size); +#if defined(ARROW_R_WITH_PARQUET) +void parquet___arrow___FileWriter__WriteTable(const std::shared_ptr& writer, const std::shared_ptr& table, int64_t chunk_size); extern "C" SEXP _arrow_parquet___arrow___FileWriter__WriteTable(SEXP writer_sexp, SEXP table_sexp, SEXP chunk_size_sexp){ BEGIN_CPP11 arrow::r::Input&>::type writer(writer_sexp); @@ -5315,15 +5315,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_parquet___arrow___FileWriter__WriteTable(SEXP writer_sexp, SEXP table_sexp, SEXP chunk_size_sexp){ - Rf_error("Cannot call parquet___arrow___FileWriter__WriteTable(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_parquet___arrow___FileWriter__WriteTable(SEXP writer_sexp, SEXP table_sexp, SEXP chunk_size_sexp){ + Rf_error("Cannot call parquet___arrow___FileWriter__WriteTable(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // parquet.cpp - #if defined(ARROW_R_WITH_PARQUET) - void parquet___arrow___FileWriter__Close(const std::shared_ptr& writer); +#if defined(ARROW_R_WITH_PARQUET) +void parquet___arrow___FileWriter__Close(const std::shared_ptr& writer); extern "C" SEXP _arrow_parquet___arrow___FileWriter__Close(SEXP writer_sexp){ BEGIN_CPP11 arrow::r::Input&>::type writer(writer_sexp); @@ -5331,15 +5331,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_parquet___arrow___FileWriter__Close(SEXP writer_sexp){ - Rf_error("Cannot call parquet___arrow___FileWriter__Close(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_parquet___arrow___FileWriter__Close(SEXP writer_sexp){ + Rf_error("Cannot call parquet___arrow___FileWriter__Close(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // parquet.cpp - #if defined(ARROW_R_WITH_PARQUET) - void parquet___arrow___WriteTable(const std::shared_ptr& table, const std::shared_ptr& sink, const std::shared_ptr& properties, const std::shared_ptr& arrow_properties); +#if defined(ARROW_R_WITH_PARQUET) +void parquet___arrow___WriteTable(const std::shared_ptr& table, const std::shared_ptr& sink, const std::shared_ptr& properties, const std::shared_ptr& arrow_properties); extern "C" SEXP _arrow_parquet___arrow___WriteTable(SEXP table_sexp, SEXP sink_sexp, SEXP properties_sexp, SEXP arrow_properties_sexp){ BEGIN_CPP11 arrow::r::Input&>::type table(table_sexp); @@ -5350,44 +5350,44 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_parquet___arrow___WriteTable(SEXP table_sexp, SEXP sink_sexp, SEXP properties_sexp, SEXP arrow_properties_sexp){ - Rf_error("Cannot call parquet___arrow___WriteTable(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_parquet___arrow___WriteTable(SEXP table_sexp, SEXP sink_sexp, SEXP properties_sexp, SEXP arrow_properties_sexp){ + Rf_error("Cannot call parquet___arrow___WriteTable(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // parquet.cpp - #if defined(ARROW_R_WITH_PARQUET) - std::shared_ptr parquet___arrow___FileReader__GetSchema(const std::shared_ptr& reader); +#if defined(ARROW_R_WITH_PARQUET) +std::shared_ptr parquet___arrow___FileReader__GetSchema(const std::shared_ptr& reader); extern "C" SEXP _arrow_parquet___arrow___FileReader__GetSchema(SEXP reader_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); return cpp11::as_sexp(parquet___arrow___FileReader__GetSchema(reader)); END_CPP11 } - #else - extern "C" SEXP _arrow_parquet___arrow___FileReader__GetSchema(SEXP reader_sexp){ - Rf_error("Cannot call parquet___arrow___FileReader__GetSchema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_parquet___arrow___FileReader__GetSchema(SEXP reader_sexp){ + Rf_error("Cannot call parquet___arrow___FileReader__GetSchema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // py-to-r.cpp - #if defined(ARROW_R_WITH_ARROW) - arrow::r::Pointer allocate_arrow_schema(); +#if defined(ARROW_R_WITH_ARROW) +arrow::r::Pointer allocate_arrow_schema(); extern "C" SEXP _arrow_allocate_arrow_schema(){ BEGIN_CPP11 return cpp11::as_sexp(allocate_arrow_schema()); END_CPP11 } - #else - extern "C" SEXP _arrow_allocate_arrow_schema(){ - Rf_error("Cannot call allocate_arrow_schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_allocate_arrow_schema(){ + Rf_error("Cannot call allocate_arrow_schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // py-to-r.cpp - #if defined(ARROW_R_WITH_ARROW) - void delete_arrow_schema(arrow::r::Pointer ptr); +#if defined(ARROW_R_WITH_ARROW) +void delete_arrow_schema(arrow::r::Pointer ptr); extern "C" SEXP _arrow_delete_arrow_schema(SEXP ptr_sexp){ BEGIN_CPP11 arrow::r::Input>::type ptr(ptr_sexp); @@ -5395,29 +5395,29 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_delete_arrow_schema(SEXP ptr_sexp){ - Rf_error("Cannot call delete_arrow_schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_delete_arrow_schema(SEXP ptr_sexp){ + Rf_error("Cannot call delete_arrow_schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // py-to-r.cpp - #if defined(ARROW_R_WITH_ARROW) - arrow::r::Pointer allocate_arrow_array(); +#if defined(ARROW_R_WITH_ARROW) +arrow::r::Pointer allocate_arrow_array(); extern "C" SEXP _arrow_allocate_arrow_array(){ BEGIN_CPP11 return cpp11::as_sexp(allocate_arrow_array()); END_CPP11 } - #else - extern "C" SEXP _arrow_allocate_arrow_array(){ - Rf_error("Cannot call allocate_arrow_array(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_allocate_arrow_array(){ + Rf_error("Cannot call allocate_arrow_array(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // py-to-r.cpp - #if defined(ARROW_R_WITH_ARROW) - void delete_arrow_array(arrow::r::Pointer ptr); +#if defined(ARROW_R_WITH_ARROW) +void delete_arrow_array(arrow::r::Pointer ptr); extern "C" SEXP _arrow_delete_arrow_array(SEXP ptr_sexp){ BEGIN_CPP11 arrow::r::Input>::type ptr(ptr_sexp); @@ -5425,29 +5425,29 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_delete_arrow_array(SEXP ptr_sexp){ - Rf_error("Cannot call delete_arrow_array(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_delete_arrow_array(SEXP ptr_sexp){ + Rf_error("Cannot call delete_arrow_array(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // py-to-r.cpp - #if defined(ARROW_R_WITH_ARROW) - arrow::r::Pointer allocate_arrow_array_stream(); +#if defined(ARROW_R_WITH_ARROW) +arrow::r::Pointer allocate_arrow_array_stream(); extern "C" SEXP _arrow_allocate_arrow_array_stream(){ BEGIN_CPP11 return cpp11::as_sexp(allocate_arrow_array_stream()); END_CPP11 } - #else - extern "C" SEXP _arrow_allocate_arrow_array_stream(){ - Rf_error("Cannot call allocate_arrow_array_stream(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_allocate_arrow_array_stream(){ + Rf_error("Cannot call allocate_arrow_array_stream(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // py-to-r.cpp - #if defined(ARROW_R_WITH_ARROW) - void delete_arrow_array_stream(arrow::r::Pointer ptr); +#if defined(ARROW_R_WITH_ARROW) +void delete_arrow_array_stream(arrow::r::Pointer ptr); extern "C" SEXP _arrow_delete_arrow_array_stream(SEXP ptr_sexp){ BEGIN_CPP11 arrow::r::Input>::type ptr(ptr_sexp); @@ -5455,15 +5455,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_delete_arrow_array_stream(SEXP ptr_sexp){ - Rf_error("Cannot call delete_arrow_array_stream(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_delete_arrow_array_stream(SEXP ptr_sexp){ + Rf_error("Cannot call delete_arrow_array_stream(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // py-to-r.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr ImportArray(arrow::r::Pointer array, arrow::r::Pointer schema); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr ImportArray(arrow::r::Pointer array, arrow::r::Pointer schema); extern "C" SEXP _arrow_ImportArray(SEXP array_sexp, SEXP schema_sexp){ BEGIN_CPP11 arrow::r::Input>::type array(array_sexp); @@ -5471,15 +5471,15 @@ BEGIN_CPP11 return cpp11::as_sexp(ImportArray(array, schema)); END_CPP11 } - #else - extern "C" SEXP _arrow_ImportArray(SEXP array_sexp, SEXP schema_sexp){ - Rf_error("Cannot call ImportArray(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ImportArray(SEXP array_sexp, SEXP schema_sexp){ + Rf_error("Cannot call ImportArray(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // py-to-r.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr ImportRecordBatch(arrow::r::Pointer array, arrow::r::Pointer schema); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr ImportRecordBatch(arrow::r::Pointer array, arrow::r::Pointer schema); extern "C" SEXP _arrow_ImportRecordBatch(SEXP array_sexp, SEXP schema_sexp){ BEGIN_CPP11 arrow::r::Input>::type array(array_sexp); @@ -5487,75 +5487,75 @@ BEGIN_CPP11 return cpp11::as_sexp(ImportRecordBatch(array, schema)); END_CPP11 } - #else - extern "C" SEXP _arrow_ImportRecordBatch(SEXP array_sexp, SEXP schema_sexp){ - Rf_error("Cannot call ImportRecordBatch(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ImportRecordBatch(SEXP array_sexp, SEXP schema_sexp){ + Rf_error("Cannot call ImportRecordBatch(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // py-to-r.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr ImportSchema(arrow::r::Pointer schema); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr ImportSchema(arrow::r::Pointer schema); extern "C" SEXP _arrow_ImportSchema(SEXP schema_sexp){ BEGIN_CPP11 arrow::r::Input>::type schema(schema_sexp); return cpp11::as_sexp(ImportSchema(schema)); END_CPP11 } - #else - extern "C" SEXP _arrow_ImportSchema(SEXP schema_sexp){ - Rf_error("Cannot call ImportSchema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ImportSchema(SEXP schema_sexp){ + Rf_error("Cannot call ImportSchema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // py-to-r.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr ImportField(arrow::r::Pointer field); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr ImportField(arrow::r::Pointer field); extern "C" SEXP _arrow_ImportField(SEXP field_sexp){ BEGIN_CPP11 arrow::r::Input>::type field(field_sexp); return cpp11::as_sexp(ImportField(field)); END_CPP11 } - #else - extern "C" SEXP _arrow_ImportField(SEXP field_sexp){ - Rf_error("Cannot call ImportField(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ImportField(SEXP field_sexp){ + Rf_error("Cannot call ImportField(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // py-to-r.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr ImportType(arrow::r::Pointer type); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr ImportType(arrow::r::Pointer type); extern "C" SEXP _arrow_ImportType(SEXP type_sexp){ BEGIN_CPP11 arrow::r::Input>::type type(type_sexp); return cpp11::as_sexp(ImportType(type)); END_CPP11 } - #else - extern "C" SEXP _arrow_ImportType(SEXP type_sexp){ - Rf_error("Cannot call ImportType(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ImportType(SEXP type_sexp){ + Rf_error("Cannot call ImportType(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // py-to-r.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr ImportRecordBatchReader(arrow::r::Pointer stream); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr ImportRecordBatchReader(arrow::r::Pointer stream); extern "C" SEXP _arrow_ImportRecordBatchReader(SEXP stream_sexp){ BEGIN_CPP11 arrow::r::Input>::type stream(stream_sexp); return cpp11::as_sexp(ImportRecordBatchReader(stream)); END_CPP11 } - #else - extern "C" SEXP _arrow_ImportRecordBatchReader(SEXP stream_sexp){ - Rf_error("Cannot call ImportRecordBatchReader(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ImportRecordBatchReader(SEXP stream_sexp){ + Rf_error("Cannot call ImportRecordBatchReader(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // py-to-r.cpp - #if defined(ARROW_R_WITH_ARROW) - void ExportType(const std::shared_ptr& type, arrow::r::Pointer ptr); +#if defined(ARROW_R_WITH_ARROW) +void ExportType(const std::shared_ptr& type, arrow::r::Pointer ptr); extern "C" SEXP _arrow_ExportType(SEXP type_sexp, SEXP ptr_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); @@ -5564,15 +5564,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_ExportType(SEXP type_sexp, SEXP ptr_sexp){ - Rf_error("Cannot call ExportType(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ExportType(SEXP type_sexp, SEXP ptr_sexp){ + Rf_error("Cannot call ExportType(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // py-to-r.cpp - #if defined(ARROW_R_WITH_ARROW) - void ExportField(const std::shared_ptr& field, arrow::r::Pointer ptr); +#if defined(ARROW_R_WITH_ARROW) +void ExportField(const std::shared_ptr& field, arrow::r::Pointer ptr); extern "C" SEXP _arrow_ExportField(SEXP field_sexp, SEXP ptr_sexp){ BEGIN_CPP11 arrow::r::Input&>::type field(field_sexp); @@ -5581,15 +5581,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_ExportField(SEXP field_sexp, SEXP ptr_sexp){ - Rf_error("Cannot call ExportField(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ExportField(SEXP field_sexp, SEXP ptr_sexp){ + Rf_error("Cannot call ExportField(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // py-to-r.cpp - #if defined(ARROW_R_WITH_ARROW) - void ExportSchema(const std::shared_ptr& schema, arrow::r::Pointer ptr); +#if defined(ARROW_R_WITH_ARROW) +void ExportSchema(const std::shared_ptr& schema, arrow::r::Pointer ptr); extern "C" SEXP _arrow_ExportSchema(SEXP schema_sexp, SEXP ptr_sexp){ BEGIN_CPP11 arrow::r::Input&>::type schema(schema_sexp); @@ -5598,15 +5598,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_ExportSchema(SEXP schema_sexp, SEXP ptr_sexp){ - Rf_error("Cannot call ExportSchema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ExportSchema(SEXP schema_sexp, SEXP ptr_sexp){ + Rf_error("Cannot call ExportSchema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // py-to-r.cpp - #if defined(ARROW_R_WITH_ARROW) - void ExportArray(const std::shared_ptr& array, arrow::r::Pointer array_ptr, arrow::r::Pointer schema_ptr); +#if defined(ARROW_R_WITH_ARROW) +void ExportArray(const std::shared_ptr& array, arrow::r::Pointer array_ptr, arrow::r::Pointer schema_ptr); extern "C" SEXP _arrow_ExportArray(SEXP array_sexp, SEXP array_ptr_sexp, SEXP schema_ptr_sexp){ BEGIN_CPP11 arrow::r::Input&>::type array(array_sexp); @@ -5616,15 +5616,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_ExportArray(SEXP array_sexp, SEXP array_ptr_sexp, SEXP schema_ptr_sexp){ - Rf_error("Cannot call ExportArray(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ExportArray(SEXP array_sexp, SEXP array_ptr_sexp, SEXP schema_ptr_sexp){ + Rf_error("Cannot call ExportArray(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // py-to-r.cpp - #if defined(ARROW_R_WITH_ARROW) - void ExportRecordBatch(const std::shared_ptr& batch, arrow::r::Pointer array_ptr, arrow::r::Pointer schema_ptr); +#if defined(ARROW_R_WITH_ARROW) +void ExportRecordBatch(const std::shared_ptr& batch, arrow::r::Pointer array_ptr, arrow::r::Pointer schema_ptr); extern "C" SEXP _arrow_ExportRecordBatch(SEXP batch_sexp, SEXP array_ptr_sexp, SEXP schema_ptr_sexp){ BEGIN_CPP11 arrow::r::Input&>::type batch(batch_sexp); @@ -5634,15 +5634,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_ExportRecordBatch(SEXP batch_sexp, SEXP array_ptr_sexp, SEXP schema_ptr_sexp){ - Rf_error("Cannot call ExportRecordBatch(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ExportRecordBatch(SEXP batch_sexp, SEXP array_ptr_sexp, SEXP schema_ptr_sexp){ + Rf_error("Cannot call ExportRecordBatch(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // py-to-r.cpp - #if defined(ARROW_R_WITH_ARROW) - void ExportRecordBatchReader(const std::shared_ptr& reader, arrow::r::Pointer stream_ptr); +#if defined(ARROW_R_WITH_ARROW) +void ExportRecordBatchReader(const std::shared_ptr& reader, arrow::r::Pointer stream_ptr); extern "C" SEXP _arrow_ExportRecordBatchReader(SEXP reader_sexp, SEXP stream_ptr_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); @@ -5651,15 +5651,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_ExportRecordBatchReader(SEXP reader_sexp, SEXP stream_ptr_sexp){ - Rf_error("Cannot call ExportRecordBatchReader(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ExportRecordBatchReader(SEXP reader_sexp, SEXP stream_ptr_sexp){ + Rf_error("Cannot call ExportRecordBatchReader(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // r_to_arrow.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr Table__from_dots(SEXP lst, SEXP schema_sxp, bool use_threads); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr Table__from_dots(SEXP lst, SEXP schema_sxp, bool use_threads); extern "C" SEXP _arrow_Table__from_dots(SEXP lst_sexp, SEXP schema_sxp_sexp, SEXP use_threads_sexp){ BEGIN_CPP11 arrow::r::Input::type lst(lst_sexp); @@ -5668,15 +5668,15 @@ BEGIN_CPP11 return cpp11::as_sexp(Table__from_dots(lst, schema_sxp, use_threads)); END_CPP11 } - #else - extern "C" SEXP _arrow_Table__from_dots(SEXP lst_sexp, SEXP schema_sxp_sexp, SEXP use_threads_sexp){ - Rf_error("Cannot call Table__from_dots(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Table__from_dots(SEXP lst_sexp, SEXP schema_sxp_sexp, SEXP use_threads_sexp){ + Rf_error("Cannot call Table__from_dots(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // r_to_arrow.cpp - #if defined(ARROW_R_WITH_ARROW) - SEXP vec_to_Array(SEXP x, SEXP s_type); +#if defined(ARROW_R_WITH_ARROW) +SEXP vec_to_Array(SEXP x, SEXP s_type); extern "C" SEXP _arrow_vec_to_Array(SEXP x_sexp, SEXP s_type_sexp){ BEGIN_CPP11 arrow::r::Input::type x(x_sexp); @@ -5684,15 +5684,15 @@ BEGIN_CPP11 return cpp11::as_sexp(vec_to_Array(x, s_type)); END_CPP11 } - #else - extern "C" SEXP _arrow_vec_to_Array(SEXP x_sexp, SEXP s_type_sexp){ - Rf_error("Cannot call vec_to_Array(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_vec_to_Array(SEXP x_sexp, SEXP s_type_sexp){ + Rf_error("Cannot call vec_to_Array(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // r_to_arrow.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr DictionaryArray__FromArrays(const std::shared_ptr& type, const std::shared_ptr& indices, const std::shared_ptr& dict); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr DictionaryArray__FromArrays(const std::shared_ptr& type, const std::shared_ptr& indices, const std::shared_ptr& dict); extern "C" SEXP _arrow_DictionaryArray__FromArrays(SEXP type_sexp, SEXP indices_sexp, SEXP dict_sexp){ BEGIN_CPP11 arrow::r::Input&>::type type(type_sexp); @@ -5701,60 +5701,60 @@ BEGIN_CPP11 return cpp11::as_sexp(DictionaryArray__FromArrays(type, indices, dict)); END_CPP11 } - #else - extern "C" SEXP _arrow_DictionaryArray__FromArrays(SEXP type_sexp, SEXP indices_sexp, SEXP dict_sexp){ - Rf_error("Cannot call DictionaryArray__FromArrays(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_DictionaryArray__FromArrays(SEXP type_sexp, SEXP indices_sexp, SEXP dict_sexp){ + Rf_error("Cannot call DictionaryArray__FromArrays(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // recordbatch.cpp - #if defined(ARROW_R_WITH_ARROW) - int RecordBatch__num_columns(const std::shared_ptr& x); +#if defined(ARROW_R_WITH_ARROW) +int RecordBatch__num_columns(const std::shared_ptr& x); extern "C" SEXP _arrow_RecordBatch__num_columns(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(RecordBatch__num_columns(x)); END_CPP11 } - #else - extern "C" SEXP _arrow_RecordBatch__num_columns(SEXP x_sexp){ - Rf_error("Cannot call RecordBatch__num_columns(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_RecordBatch__num_columns(SEXP x_sexp){ + Rf_error("Cannot call RecordBatch__num_columns(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // recordbatch.cpp - #if defined(ARROW_R_WITH_ARROW) - int RecordBatch__num_rows(const std::shared_ptr& x); +#if defined(ARROW_R_WITH_ARROW) +int RecordBatch__num_rows(const std::shared_ptr& x); extern "C" SEXP _arrow_RecordBatch__num_rows(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(RecordBatch__num_rows(x)); END_CPP11 } - #else - extern "C" SEXP _arrow_RecordBatch__num_rows(SEXP x_sexp){ - Rf_error("Cannot call RecordBatch__num_rows(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_RecordBatch__num_rows(SEXP x_sexp){ + Rf_error("Cannot call RecordBatch__num_rows(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // recordbatch.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr RecordBatch__schema(const std::shared_ptr& x); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr RecordBatch__schema(const std::shared_ptr& x); extern "C" SEXP _arrow_RecordBatch__schema(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(RecordBatch__schema(x)); END_CPP11 } - #else - extern "C" SEXP _arrow_RecordBatch__schema(SEXP x_sexp){ - Rf_error("Cannot call RecordBatch__schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_RecordBatch__schema(SEXP x_sexp){ + Rf_error("Cannot call RecordBatch__schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // recordbatch.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr RecordBatch__RenameColumns(const std::shared_ptr& batch, const std::vector& names); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr RecordBatch__RenameColumns(const std::shared_ptr& batch, const std::vector& names); extern "C" SEXP _arrow_RecordBatch__RenameColumns(SEXP batch_sexp, SEXP names_sexp){ BEGIN_CPP11 arrow::r::Input&>::type batch(batch_sexp); @@ -5762,15 +5762,15 @@ BEGIN_CPP11 return cpp11::as_sexp(RecordBatch__RenameColumns(batch, names)); END_CPP11 } - #else - extern "C" SEXP _arrow_RecordBatch__RenameColumns(SEXP batch_sexp, SEXP names_sexp){ - Rf_error("Cannot call RecordBatch__RenameColumns(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_RecordBatch__RenameColumns(SEXP batch_sexp, SEXP names_sexp){ + Rf_error("Cannot call RecordBatch__RenameColumns(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // recordbatch.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr RecordBatch__ReplaceSchemaMetadata(const std::shared_ptr& x, cpp11::strings metadata); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr RecordBatch__ReplaceSchemaMetadata(const std::shared_ptr& x, cpp11::strings metadata); extern "C" SEXP _arrow_RecordBatch__ReplaceSchemaMetadata(SEXP x_sexp, SEXP metadata_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); @@ -5778,30 +5778,30 @@ BEGIN_CPP11 return cpp11::as_sexp(RecordBatch__ReplaceSchemaMetadata(x, metadata)); END_CPP11 } - #else - extern "C" SEXP _arrow_RecordBatch__ReplaceSchemaMetadata(SEXP x_sexp, SEXP metadata_sexp){ - Rf_error("Cannot call RecordBatch__ReplaceSchemaMetadata(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_RecordBatch__ReplaceSchemaMetadata(SEXP x_sexp, SEXP metadata_sexp){ + Rf_error("Cannot call RecordBatch__ReplaceSchemaMetadata(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // recordbatch.cpp - #if defined(ARROW_R_WITH_ARROW) - cpp11::list RecordBatch__columns(const std::shared_ptr& batch); +#if defined(ARROW_R_WITH_ARROW) +cpp11::list RecordBatch__columns(const std::shared_ptr& batch); extern "C" SEXP _arrow_RecordBatch__columns(SEXP batch_sexp){ BEGIN_CPP11 arrow::r::Input&>::type batch(batch_sexp); return cpp11::as_sexp(RecordBatch__columns(batch)); END_CPP11 } - #else - extern "C" SEXP _arrow_RecordBatch__columns(SEXP batch_sexp){ - Rf_error("Cannot call RecordBatch__columns(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_RecordBatch__columns(SEXP batch_sexp){ + Rf_error("Cannot call RecordBatch__columns(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // recordbatch.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr RecordBatch__column(const std::shared_ptr& batch, R_xlen_t i); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr RecordBatch__column(const std::shared_ptr& batch, R_xlen_t i); extern "C" SEXP _arrow_RecordBatch__column(SEXP batch_sexp, SEXP i_sexp){ BEGIN_CPP11 arrow::r::Input&>::type batch(batch_sexp); @@ -5809,15 +5809,15 @@ BEGIN_CPP11 return cpp11::as_sexp(RecordBatch__column(batch, i)); END_CPP11 } - #else - extern "C" SEXP _arrow_RecordBatch__column(SEXP batch_sexp, SEXP i_sexp){ - Rf_error("Cannot call RecordBatch__column(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_RecordBatch__column(SEXP batch_sexp, SEXP i_sexp){ + Rf_error("Cannot call RecordBatch__column(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // recordbatch.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr RecordBatch__GetColumnByName(const std::shared_ptr& batch, const std::string& name); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr RecordBatch__GetColumnByName(const std::shared_ptr& batch, const std::string& name); extern "C" SEXP _arrow_RecordBatch__GetColumnByName(SEXP batch_sexp, SEXP name_sexp){ BEGIN_CPP11 arrow::r::Input&>::type batch(batch_sexp); @@ -5825,15 +5825,15 @@ BEGIN_CPP11 return cpp11::as_sexp(RecordBatch__GetColumnByName(batch, name)); END_CPP11 } - #else - extern "C" SEXP _arrow_RecordBatch__GetColumnByName(SEXP batch_sexp, SEXP name_sexp){ - Rf_error("Cannot call RecordBatch__GetColumnByName(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_RecordBatch__GetColumnByName(SEXP batch_sexp, SEXP name_sexp){ + Rf_error("Cannot call RecordBatch__GetColumnByName(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // recordbatch.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr RecordBatch__SelectColumns(const std::shared_ptr& batch, const std::vector& indices); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr RecordBatch__SelectColumns(const std::shared_ptr& batch, const std::vector& indices); extern "C" SEXP _arrow_RecordBatch__SelectColumns(SEXP batch_sexp, SEXP indices_sexp){ BEGIN_CPP11 arrow::r::Input&>::type batch(batch_sexp); @@ -5841,15 +5841,15 @@ BEGIN_CPP11 return cpp11::as_sexp(RecordBatch__SelectColumns(batch, indices)); END_CPP11 } - #else - extern "C" SEXP _arrow_RecordBatch__SelectColumns(SEXP batch_sexp, SEXP indices_sexp){ - Rf_error("Cannot call RecordBatch__SelectColumns(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_RecordBatch__SelectColumns(SEXP batch_sexp, SEXP indices_sexp){ + Rf_error("Cannot call RecordBatch__SelectColumns(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // recordbatch.cpp - #if defined(ARROW_R_WITH_ARROW) - bool RecordBatch__Equals(const std::shared_ptr& self, const std::shared_ptr& other, bool check_metadata); +#if defined(ARROW_R_WITH_ARROW) +bool RecordBatch__Equals(const std::shared_ptr& self, const std::shared_ptr& other, bool check_metadata); extern "C" SEXP _arrow_RecordBatch__Equals(SEXP self_sexp, SEXP other_sexp, SEXP check_metadata_sexp){ BEGIN_CPP11 arrow::r::Input&>::type self(self_sexp); @@ -5858,15 +5858,15 @@ BEGIN_CPP11 return cpp11::as_sexp(RecordBatch__Equals(self, other, check_metadata)); END_CPP11 } - #else - extern "C" SEXP _arrow_RecordBatch__Equals(SEXP self_sexp, SEXP other_sexp, SEXP check_metadata_sexp){ - Rf_error("Cannot call RecordBatch__Equals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_RecordBatch__Equals(SEXP self_sexp, SEXP other_sexp, SEXP check_metadata_sexp){ + Rf_error("Cannot call RecordBatch__Equals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // recordbatch.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr RecordBatch__AddColumn(const std::shared_ptr& batch, R_xlen_t i, const std::shared_ptr& field, const std::shared_ptr& column); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr RecordBatch__AddColumn(const std::shared_ptr& batch, R_xlen_t i, const std::shared_ptr& field, const std::shared_ptr& column); extern "C" SEXP _arrow_RecordBatch__AddColumn(SEXP batch_sexp, SEXP i_sexp, SEXP field_sexp, SEXP column_sexp){ BEGIN_CPP11 arrow::r::Input&>::type batch(batch_sexp); @@ -5876,15 +5876,15 @@ BEGIN_CPP11 return cpp11::as_sexp(RecordBatch__AddColumn(batch, i, field, column)); END_CPP11 } - #else - extern "C" SEXP _arrow_RecordBatch__AddColumn(SEXP batch_sexp, SEXP i_sexp, SEXP field_sexp, SEXP column_sexp){ - Rf_error("Cannot call RecordBatch__AddColumn(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_RecordBatch__AddColumn(SEXP batch_sexp, SEXP i_sexp, SEXP field_sexp, SEXP column_sexp){ + Rf_error("Cannot call RecordBatch__AddColumn(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // recordbatch.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr RecordBatch__SetColumn(const std::shared_ptr& batch, R_xlen_t i, const std::shared_ptr& field, const std::shared_ptr& column); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr RecordBatch__SetColumn(const std::shared_ptr& batch, R_xlen_t i, const std::shared_ptr& field, const std::shared_ptr& column); extern "C" SEXP _arrow_RecordBatch__SetColumn(SEXP batch_sexp, SEXP i_sexp, SEXP field_sexp, SEXP column_sexp){ BEGIN_CPP11 arrow::r::Input&>::type batch(batch_sexp); @@ -5894,15 +5894,15 @@ BEGIN_CPP11 return cpp11::as_sexp(RecordBatch__SetColumn(batch, i, field, column)); END_CPP11 } - #else - extern "C" SEXP _arrow_RecordBatch__SetColumn(SEXP batch_sexp, SEXP i_sexp, SEXP field_sexp, SEXP column_sexp){ - Rf_error("Cannot call RecordBatch__SetColumn(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_RecordBatch__SetColumn(SEXP batch_sexp, SEXP i_sexp, SEXP field_sexp, SEXP column_sexp){ + Rf_error("Cannot call RecordBatch__SetColumn(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // recordbatch.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr RecordBatch__RemoveColumn(const std::shared_ptr& batch, R_xlen_t i); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr RecordBatch__RemoveColumn(const std::shared_ptr& batch, R_xlen_t i); extern "C" SEXP _arrow_RecordBatch__RemoveColumn(SEXP batch_sexp, SEXP i_sexp){ BEGIN_CPP11 arrow::r::Input&>::type batch(batch_sexp); @@ -5910,15 +5910,15 @@ BEGIN_CPP11 return cpp11::as_sexp(RecordBatch__RemoveColumn(batch, i)); END_CPP11 } - #else - extern "C" SEXP _arrow_RecordBatch__RemoveColumn(SEXP batch_sexp, SEXP i_sexp){ - Rf_error("Cannot call RecordBatch__RemoveColumn(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_RecordBatch__RemoveColumn(SEXP batch_sexp, SEXP i_sexp){ + Rf_error("Cannot call RecordBatch__RemoveColumn(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // recordbatch.cpp - #if defined(ARROW_R_WITH_ARROW) - std::string RecordBatch__column_name(const std::shared_ptr& batch, R_xlen_t i); +#if defined(ARROW_R_WITH_ARROW) +std::string RecordBatch__column_name(const std::shared_ptr& batch, R_xlen_t i); extern "C" SEXP _arrow_RecordBatch__column_name(SEXP batch_sexp, SEXP i_sexp){ BEGIN_CPP11 arrow::r::Input&>::type batch(batch_sexp); @@ -5926,30 +5926,30 @@ BEGIN_CPP11 return cpp11::as_sexp(RecordBatch__column_name(batch, i)); END_CPP11 } - #else - extern "C" SEXP _arrow_RecordBatch__column_name(SEXP batch_sexp, SEXP i_sexp){ - Rf_error("Cannot call RecordBatch__column_name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_RecordBatch__column_name(SEXP batch_sexp, SEXP i_sexp){ + Rf_error("Cannot call RecordBatch__column_name(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // recordbatch.cpp - #if defined(ARROW_R_WITH_ARROW) - cpp11::writable::strings RecordBatch__names(const std::shared_ptr& batch); +#if defined(ARROW_R_WITH_ARROW) +cpp11::writable::strings RecordBatch__names(const std::shared_ptr& batch); extern "C" SEXP _arrow_RecordBatch__names(SEXP batch_sexp){ BEGIN_CPP11 arrow::r::Input&>::type batch(batch_sexp); return cpp11::as_sexp(RecordBatch__names(batch)); END_CPP11 } - #else - extern "C" SEXP _arrow_RecordBatch__names(SEXP batch_sexp){ - Rf_error("Cannot call RecordBatch__names(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_RecordBatch__names(SEXP batch_sexp){ + Rf_error("Cannot call RecordBatch__names(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // recordbatch.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr RecordBatch__Slice1(const std::shared_ptr& self, R_xlen_t offset); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr RecordBatch__Slice1(const std::shared_ptr& self, R_xlen_t offset); extern "C" SEXP _arrow_RecordBatch__Slice1(SEXP self_sexp, SEXP offset_sexp){ BEGIN_CPP11 arrow::r::Input&>::type self(self_sexp); @@ -5957,15 +5957,15 @@ BEGIN_CPP11 return cpp11::as_sexp(RecordBatch__Slice1(self, offset)); END_CPP11 } - #else - extern "C" SEXP _arrow_RecordBatch__Slice1(SEXP self_sexp, SEXP offset_sexp){ - Rf_error("Cannot call RecordBatch__Slice1(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_RecordBatch__Slice1(SEXP self_sexp, SEXP offset_sexp){ + Rf_error("Cannot call RecordBatch__Slice1(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // recordbatch.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr RecordBatch__Slice2(const std::shared_ptr& self, R_xlen_t offset, R_xlen_t length); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr RecordBatch__Slice2(const std::shared_ptr& self, R_xlen_t offset, R_xlen_t length); extern "C" SEXP _arrow_RecordBatch__Slice2(SEXP self_sexp, SEXP offset_sexp, SEXP length_sexp){ BEGIN_CPP11 arrow::r::Input&>::type self(self_sexp); @@ -5974,30 +5974,30 @@ BEGIN_CPP11 return cpp11::as_sexp(RecordBatch__Slice2(self, offset, length)); END_CPP11 } - #else - extern "C" SEXP _arrow_RecordBatch__Slice2(SEXP self_sexp, SEXP offset_sexp, SEXP length_sexp){ - Rf_error("Cannot call RecordBatch__Slice2(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_RecordBatch__Slice2(SEXP self_sexp, SEXP offset_sexp, SEXP length_sexp){ + Rf_error("Cannot call RecordBatch__Slice2(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // recordbatch.cpp - #if defined(ARROW_R_WITH_ARROW) - cpp11::raws ipc___SerializeRecordBatch__Raw(const std::shared_ptr& batch); +#if defined(ARROW_R_WITH_ARROW) +cpp11::raws ipc___SerializeRecordBatch__Raw(const std::shared_ptr& batch); extern "C" SEXP _arrow_ipc___SerializeRecordBatch__Raw(SEXP batch_sexp){ BEGIN_CPP11 arrow::r::Input&>::type batch(batch_sexp); return cpp11::as_sexp(ipc___SerializeRecordBatch__Raw(batch)); END_CPP11 } - #else - extern "C" SEXP _arrow_ipc___SerializeRecordBatch__Raw(SEXP batch_sexp){ - Rf_error("Cannot call ipc___SerializeRecordBatch__Raw(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ipc___SerializeRecordBatch__Raw(SEXP batch_sexp){ + Rf_error("Cannot call ipc___SerializeRecordBatch__Raw(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // recordbatch.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr ipc___ReadRecordBatch__InputStream__Schema(const std::shared_ptr& stream, const std::shared_ptr& schema); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr ipc___ReadRecordBatch__InputStream__Schema(const std::shared_ptr& stream, const std::shared_ptr& schema); extern "C" SEXP _arrow_ipc___ReadRecordBatch__InputStream__Schema(SEXP stream_sexp, SEXP schema_sexp){ BEGIN_CPP11 arrow::r::Input&>::type stream(stream_sexp); @@ -6005,15 +6005,15 @@ BEGIN_CPP11 return cpp11::as_sexp(ipc___ReadRecordBatch__InputStream__Schema(stream, schema)); END_CPP11 } - #else - extern "C" SEXP _arrow_ipc___ReadRecordBatch__InputStream__Schema(SEXP stream_sexp, SEXP schema_sexp){ - Rf_error("Cannot call ipc___ReadRecordBatch__InputStream__Schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ipc___ReadRecordBatch__InputStream__Schema(SEXP stream_sexp, SEXP schema_sexp){ + Rf_error("Cannot call ipc___ReadRecordBatch__InputStream__Schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // recordbatch.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr RecordBatch__from_arrays(SEXP schema_sxp, SEXP lst); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr RecordBatch__from_arrays(SEXP schema_sxp, SEXP lst); extern "C" SEXP _arrow_RecordBatch__from_arrays(SEXP schema_sxp_sexp, SEXP lst_sexp){ BEGIN_CPP11 arrow::r::Input::type schema_sxp(schema_sxp_sexp); @@ -6021,120 +6021,120 @@ BEGIN_CPP11 return cpp11::as_sexp(RecordBatch__from_arrays(schema_sxp, lst)); END_CPP11 } - #else - extern "C" SEXP _arrow_RecordBatch__from_arrays(SEXP schema_sxp_sexp, SEXP lst_sexp){ - Rf_error("Cannot call RecordBatch__from_arrays(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_RecordBatch__from_arrays(SEXP schema_sxp_sexp, SEXP lst_sexp){ + Rf_error("Cannot call RecordBatch__from_arrays(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // recordbatchreader.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr RecordBatchReader__schema(const std::shared_ptr& reader); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr RecordBatchReader__schema(const std::shared_ptr& reader); extern "C" SEXP _arrow_RecordBatchReader__schema(SEXP reader_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); return cpp11::as_sexp(RecordBatchReader__schema(reader)); END_CPP11 } - #else - extern "C" SEXP _arrow_RecordBatchReader__schema(SEXP reader_sexp){ - Rf_error("Cannot call RecordBatchReader__schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_RecordBatchReader__schema(SEXP reader_sexp){ + Rf_error("Cannot call RecordBatchReader__schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // recordbatchreader.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr RecordBatchReader__ReadNext(const std::shared_ptr& reader); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr RecordBatchReader__ReadNext(const std::shared_ptr& reader); extern "C" SEXP _arrow_RecordBatchReader__ReadNext(SEXP reader_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); return cpp11::as_sexp(RecordBatchReader__ReadNext(reader)); END_CPP11 } - #else - extern "C" SEXP _arrow_RecordBatchReader__ReadNext(SEXP reader_sexp){ - Rf_error("Cannot call RecordBatchReader__ReadNext(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_RecordBatchReader__ReadNext(SEXP reader_sexp){ + Rf_error("Cannot call RecordBatchReader__ReadNext(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // recordbatchreader.cpp - #if defined(ARROW_R_WITH_ARROW) - cpp11::list RecordBatchReader__batches(const std::shared_ptr& reader); +#if defined(ARROW_R_WITH_ARROW) +cpp11::list RecordBatchReader__batches(const std::shared_ptr& reader); extern "C" SEXP _arrow_RecordBatchReader__batches(SEXP reader_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); return cpp11::as_sexp(RecordBatchReader__batches(reader)); END_CPP11 } - #else - extern "C" SEXP _arrow_RecordBatchReader__batches(SEXP reader_sexp){ - Rf_error("Cannot call RecordBatchReader__batches(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_RecordBatchReader__batches(SEXP reader_sexp){ + Rf_error("Cannot call RecordBatchReader__batches(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // recordbatchreader.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr Table__from_RecordBatchReader(const std::shared_ptr& reader); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr Table__from_RecordBatchReader(const std::shared_ptr& reader); extern "C" SEXP _arrow_Table__from_RecordBatchReader(SEXP reader_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); return cpp11::as_sexp(Table__from_RecordBatchReader(reader)); END_CPP11 } - #else - extern "C" SEXP _arrow_Table__from_RecordBatchReader(SEXP reader_sexp){ - Rf_error("Cannot call Table__from_RecordBatchReader(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Table__from_RecordBatchReader(SEXP reader_sexp){ + Rf_error("Cannot call Table__from_RecordBatchReader(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // recordbatchreader.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr ipc___RecordBatchStreamReader__Open(const std::shared_ptr& stream); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr ipc___RecordBatchStreamReader__Open(const std::shared_ptr& stream); extern "C" SEXP _arrow_ipc___RecordBatchStreamReader__Open(SEXP stream_sexp){ BEGIN_CPP11 arrow::r::Input&>::type stream(stream_sexp); return cpp11::as_sexp(ipc___RecordBatchStreamReader__Open(stream)); END_CPP11 } - #else - extern "C" SEXP _arrow_ipc___RecordBatchStreamReader__Open(SEXP stream_sexp){ - Rf_error("Cannot call ipc___RecordBatchStreamReader__Open(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ipc___RecordBatchStreamReader__Open(SEXP stream_sexp){ + Rf_error("Cannot call ipc___RecordBatchStreamReader__Open(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // recordbatchreader.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr ipc___RecordBatchFileReader__schema(const std::shared_ptr& reader); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr ipc___RecordBatchFileReader__schema(const std::shared_ptr& reader); extern "C" SEXP _arrow_ipc___RecordBatchFileReader__schema(SEXP reader_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); return cpp11::as_sexp(ipc___RecordBatchFileReader__schema(reader)); END_CPP11 } - #else - extern "C" SEXP _arrow_ipc___RecordBatchFileReader__schema(SEXP reader_sexp){ - Rf_error("Cannot call ipc___RecordBatchFileReader__schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ipc___RecordBatchFileReader__schema(SEXP reader_sexp){ + Rf_error("Cannot call ipc___RecordBatchFileReader__schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // recordbatchreader.cpp - #if defined(ARROW_R_WITH_ARROW) - int ipc___RecordBatchFileReader__num_record_batches(const std::shared_ptr& reader); +#if defined(ARROW_R_WITH_ARROW) +int ipc___RecordBatchFileReader__num_record_batches(const std::shared_ptr& reader); extern "C" SEXP _arrow_ipc___RecordBatchFileReader__num_record_batches(SEXP reader_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); return cpp11::as_sexp(ipc___RecordBatchFileReader__num_record_batches(reader)); END_CPP11 } - #else - extern "C" SEXP _arrow_ipc___RecordBatchFileReader__num_record_batches(SEXP reader_sexp){ - Rf_error("Cannot call ipc___RecordBatchFileReader__num_record_batches(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ipc___RecordBatchFileReader__num_record_batches(SEXP reader_sexp){ + Rf_error("Cannot call ipc___RecordBatchFileReader__num_record_batches(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // recordbatchreader.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr ipc___RecordBatchFileReader__ReadRecordBatch(const std::shared_ptr& reader, int i); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr ipc___RecordBatchFileReader__ReadRecordBatch(const std::shared_ptr& reader, int i); extern "C" SEXP _arrow_ipc___RecordBatchFileReader__ReadRecordBatch(SEXP reader_sexp, SEXP i_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); @@ -6142,60 +6142,60 @@ BEGIN_CPP11 return cpp11::as_sexp(ipc___RecordBatchFileReader__ReadRecordBatch(reader, i)); END_CPP11 } - #else - extern "C" SEXP _arrow_ipc___RecordBatchFileReader__ReadRecordBatch(SEXP reader_sexp, SEXP i_sexp){ - Rf_error("Cannot call ipc___RecordBatchFileReader__ReadRecordBatch(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ipc___RecordBatchFileReader__ReadRecordBatch(SEXP reader_sexp, SEXP i_sexp){ + Rf_error("Cannot call ipc___RecordBatchFileReader__ReadRecordBatch(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // recordbatchreader.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr ipc___RecordBatchFileReader__Open(const std::shared_ptr& file); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr ipc___RecordBatchFileReader__Open(const std::shared_ptr& file); extern "C" SEXP _arrow_ipc___RecordBatchFileReader__Open(SEXP file_sexp){ BEGIN_CPP11 arrow::r::Input&>::type file(file_sexp); return cpp11::as_sexp(ipc___RecordBatchFileReader__Open(file)); END_CPP11 } - #else - extern "C" SEXP _arrow_ipc___RecordBatchFileReader__Open(SEXP file_sexp){ - Rf_error("Cannot call ipc___RecordBatchFileReader__Open(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ipc___RecordBatchFileReader__Open(SEXP file_sexp){ + Rf_error("Cannot call ipc___RecordBatchFileReader__Open(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // recordbatchreader.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr Table__from_RecordBatchFileReader(const std::shared_ptr& reader); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr Table__from_RecordBatchFileReader(const std::shared_ptr& reader); extern "C" SEXP _arrow_Table__from_RecordBatchFileReader(SEXP reader_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); return cpp11::as_sexp(Table__from_RecordBatchFileReader(reader)); END_CPP11 } - #else - extern "C" SEXP _arrow_Table__from_RecordBatchFileReader(SEXP reader_sexp){ - Rf_error("Cannot call Table__from_RecordBatchFileReader(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Table__from_RecordBatchFileReader(SEXP reader_sexp){ + Rf_error("Cannot call Table__from_RecordBatchFileReader(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // recordbatchreader.cpp - #if defined(ARROW_R_WITH_ARROW) - cpp11::list ipc___RecordBatchFileReader__batches(const std::shared_ptr& reader); +#if defined(ARROW_R_WITH_ARROW) +cpp11::list ipc___RecordBatchFileReader__batches(const std::shared_ptr& reader); extern "C" SEXP _arrow_ipc___RecordBatchFileReader__batches(SEXP reader_sexp){ BEGIN_CPP11 arrow::r::Input&>::type reader(reader_sexp); return cpp11::as_sexp(ipc___RecordBatchFileReader__batches(reader)); END_CPP11 } - #else - extern "C" SEXP _arrow_ipc___RecordBatchFileReader__batches(SEXP reader_sexp){ - Rf_error("Cannot call ipc___RecordBatchFileReader__batches(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ipc___RecordBatchFileReader__batches(SEXP reader_sexp){ + Rf_error("Cannot call ipc___RecordBatchFileReader__batches(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // recordbatchwriter.cpp - #if defined(ARROW_R_WITH_ARROW) - void ipc___RecordBatchWriter__WriteRecordBatch(const std::shared_ptr& batch_writer, const std::shared_ptr& batch); +#if defined(ARROW_R_WITH_ARROW) +void ipc___RecordBatchWriter__WriteRecordBatch(const std::shared_ptr& batch_writer, const std::shared_ptr& batch); extern "C" SEXP _arrow_ipc___RecordBatchWriter__WriteRecordBatch(SEXP batch_writer_sexp, SEXP batch_sexp){ BEGIN_CPP11 arrow::r::Input&>::type batch_writer(batch_writer_sexp); @@ -6204,15 +6204,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_ipc___RecordBatchWriter__WriteRecordBatch(SEXP batch_writer_sexp, SEXP batch_sexp){ - Rf_error("Cannot call ipc___RecordBatchWriter__WriteRecordBatch(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ipc___RecordBatchWriter__WriteRecordBatch(SEXP batch_writer_sexp, SEXP batch_sexp){ + Rf_error("Cannot call ipc___RecordBatchWriter__WriteRecordBatch(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // recordbatchwriter.cpp - #if defined(ARROW_R_WITH_ARROW) - void ipc___RecordBatchWriter__WriteTable(const std::shared_ptr& batch_writer, const std::shared_ptr& table); +#if defined(ARROW_R_WITH_ARROW) +void ipc___RecordBatchWriter__WriteTable(const std::shared_ptr& batch_writer, const std::shared_ptr& table); extern "C" SEXP _arrow_ipc___RecordBatchWriter__WriteTable(SEXP batch_writer_sexp, SEXP table_sexp){ BEGIN_CPP11 arrow::r::Input&>::type batch_writer(batch_writer_sexp); @@ -6221,15 +6221,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_ipc___RecordBatchWriter__WriteTable(SEXP batch_writer_sexp, SEXP table_sexp){ - Rf_error("Cannot call ipc___RecordBatchWriter__WriteTable(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ipc___RecordBatchWriter__WriteTable(SEXP batch_writer_sexp, SEXP table_sexp){ + Rf_error("Cannot call ipc___RecordBatchWriter__WriteTable(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // recordbatchwriter.cpp - #if defined(ARROW_R_WITH_ARROW) - void ipc___RecordBatchWriter__Close(const std::shared_ptr& batch_writer); +#if defined(ARROW_R_WITH_ARROW) +void ipc___RecordBatchWriter__Close(const std::shared_ptr& batch_writer); extern "C" SEXP _arrow_ipc___RecordBatchWriter__Close(SEXP batch_writer_sexp){ BEGIN_CPP11 arrow::r::Input&>::type batch_writer(batch_writer_sexp); @@ -6237,15 +6237,15 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_ipc___RecordBatchWriter__Close(SEXP batch_writer_sexp){ - Rf_error("Cannot call ipc___RecordBatchWriter__Close(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ipc___RecordBatchWriter__Close(SEXP batch_writer_sexp){ + Rf_error("Cannot call ipc___RecordBatchWriter__Close(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // recordbatchwriter.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr ipc___RecordBatchFileWriter__Open(const std::shared_ptr& stream, const std::shared_ptr& schema, bool use_legacy_format, arrow::ipc::MetadataVersion metadata_version); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr ipc___RecordBatchFileWriter__Open(const std::shared_ptr& stream, const std::shared_ptr& schema, bool use_legacy_format, arrow::ipc::MetadataVersion metadata_version); extern "C" SEXP _arrow_ipc___RecordBatchFileWriter__Open(SEXP stream_sexp, SEXP schema_sexp, SEXP use_legacy_format_sexp, SEXP metadata_version_sexp){ BEGIN_CPP11 arrow::r::Input&>::type stream(stream_sexp); @@ -6255,15 +6255,15 @@ BEGIN_CPP11 return cpp11::as_sexp(ipc___RecordBatchFileWriter__Open(stream, schema, use_legacy_format, metadata_version)); END_CPP11 } - #else - extern "C" SEXP _arrow_ipc___RecordBatchFileWriter__Open(SEXP stream_sexp, SEXP schema_sexp, SEXP use_legacy_format_sexp, SEXP metadata_version_sexp){ - Rf_error("Cannot call ipc___RecordBatchFileWriter__Open(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ipc___RecordBatchFileWriter__Open(SEXP stream_sexp, SEXP schema_sexp, SEXP use_legacy_format_sexp, SEXP metadata_version_sexp){ + Rf_error("Cannot call ipc___RecordBatchFileWriter__Open(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // recordbatchwriter.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr ipc___RecordBatchStreamWriter__Open(const std::shared_ptr& stream, const std::shared_ptr& schema, bool use_legacy_format, arrow::ipc::MetadataVersion metadata_version); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr ipc___RecordBatchStreamWriter__Open(const std::shared_ptr& stream, const std::shared_ptr& schema, bool use_legacy_format, arrow::ipc::MetadataVersion metadata_version); extern "C" SEXP _arrow_ipc___RecordBatchStreamWriter__Open(SEXP stream_sexp, SEXP schema_sexp, SEXP use_legacy_format_sexp, SEXP metadata_version_sexp){ BEGIN_CPP11 arrow::r::Input&>::type stream(stream_sexp); @@ -6273,15 +6273,15 @@ BEGIN_CPP11 return cpp11::as_sexp(ipc___RecordBatchStreamWriter__Open(stream, schema, use_legacy_format, metadata_version)); END_CPP11 } - #else - extern "C" SEXP _arrow_ipc___RecordBatchStreamWriter__Open(SEXP stream_sexp, SEXP schema_sexp, SEXP use_legacy_format_sexp, SEXP metadata_version_sexp){ - Rf_error("Cannot call ipc___RecordBatchStreamWriter__Open(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_ipc___RecordBatchStreamWriter__Open(SEXP stream_sexp, SEXP schema_sexp, SEXP use_legacy_format_sexp, SEXP metadata_version_sexp){ + Rf_error("Cannot call ipc___RecordBatchStreamWriter__Open(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // scalar.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr Array__GetScalar(const std::shared_ptr& x, int64_t i); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr Array__GetScalar(const std::shared_ptr& x, int64_t i); extern "C" SEXP _arrow_Array__GetScalar(SEXP x_sexp, SEXP i_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); @@ -6289,30 +6289,30 @@ BEGIN_CPP11 return cpp11::as_sexp(Array__GetScalar(x, i)); END_CPP11 } - #else - extern "C" SEXP _arrow_Array__GetScalar(SEXP x_sexp, SEXP i_sexp){ - Rf_error("Cannot call Array__GetScalar(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Array__GetScalar(SEXP x_sexp, SEXP i_sexp){ + Rf_error("Cannot call Array__GetScalar(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // scalar.cpp - #if defined(ARROW_R_WITH_ARROW) - std::string Scalar__ToString(const std::shared_ptr& s); +#if defined(ARROW_R_WITH_ARROW) +std::string Scalar__ToString(const std::shared_ptr& s); extern "C" SEXP _arrow_Scalar__ToString(SEXP s_sexp){ BEGIN_CPP11 arrow::r::Input&>::type s(s_sexp); return cpp11::as_sexp(Scalar__ToString(s)); END_CPP11 } - #else - extern "C" SEXP _arrow_Scalar__ToString(SEXP s_sexp){ - Rf_error("Cannot call Scalar__ToString(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Scalar__ToString(SEXP s_sexp){ + Rf_error("Cannot call Scalar__ToString(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // scalar.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr StructScalar__field(const std::shared_ptr& s, int i); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr StructScalar__field(const std::shared_ptr& s, int i); extern "C" SEXP _arrow_StructScalar__field(SEXP s_sexp, SEXP i_sexp){ BEGIN_CPP11 arrow::r::Input&>::type s(s_sexp); @@ -6320,15 +6320,15 @@ BEGIN_CPP11 return cpp11::as_sexp(StructScalar__field(s, i)); END_CPP11 } - #else - extern "C" SEXP _arrow_StructScalar__field(SEXP s_sexp, SEXP i_sexp){ - Rf_error("Cannot call StructScalar__field(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_StructScalar__field(SEXP s_sexp, SEXP i_sexp){ + Rf_error("Cannot call StructScalar__field(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // scalar.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr StructScalar__GetFieldByName(const std::shared_ptr& s, const std::string& name); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr StructScalar__GetFieldByName(const std::shared_ptr& s, const std::string& name); extern "C" SEXP _arrow_StructScalar__GetFieldByName(SEXP s_sexp, SEXP name_sexp){ BEGIN_CPP11 arrow::r::Input&>::type s(s_sexp); @@ -6336,30 +6336,30 @@ BEGIN_CPP11 return cpp11::as_sexp(StructScalar__GetFieldByName(s, name)); END_CPP11 } - #else - extern "C" SEXP _arrow_StructScalar__GetFieldByName(SEXP s_sexp, SEXP name_sexp){ - Rf_error("Cannot call StructScalar__GetFieldByName(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_StructScalar__GetFieldByName(SEXP s_sexp, SEXP name_sexp){ + Rf_error("Cannot call StructScalar__GetFieldByName(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // scalar.cpp - #if defined(ARROW_R_WITH_ARROW) - SEXP Scalar__as_vector(const std::shared_ptr& scalar); +#if defined(ARROW_R_WITH_ARROW) +SEXP Scalar__as_vector(const std::shared_ptr& scalar); extern "C" SEXP _arrow_Scalar__as_vector(SEXP scalar_sexp){ BEGIN_CPP11 arrow::r::Input&>::type scalar(scalar_sexp); return cpp11::as_sexp(Scalar__as_vector(scalar)); END_CPP11 } - #else - extern "C" SEXP _arrow_Scalar__as_vector(SEXP scalar_sexp){ - Rf_error("Cannot call Scalar__as_vector(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Scalar__as_vector(SEXP scalar_sexp){ + Rf_error("Cannot call Scalar__as_vector(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // scalar.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr MakeArrayFromScalar(const std::shared_ptr& scalar, int n); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr MakeArrayFromScalar(const std::shared_ptr& scalar, int n); extern "C" SEXP _arrow_MakeArrayFromScalar(SEXP scalar_sexp, SEXP n_sexp){ BEGIN_CPP11 arrow::r::Input&>::type scalar(scalar_sexp); @@ -6367,45 +6367,45 @@ BEGIN_CPP11 return cpp11::as_sexp(MakeArrayFromScalar(scalar, n)); END_CPP11 } - #else - extern "C" SEXP _arrow_MakeArrayFromScalar(SEXP scalar_sexp, SEXP n_sexp){ - Rf_error("Cannot call MakeArrayFromScalar(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_MakeArrayFromScalar(SEXP scalar_sexp, SEXP n_sexp){ + Rf_error("Cannot call MakeArrayFromScalar(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // scalar.cpp - #if defined(ARROW_R_WITH_ARROW) - bool Scalar__is_valid(const std::shared_ptr& s); +#if defined(ARROW_R_WITH_ARROW) +bool Scalar__is_valid(const std::shared_ptr& s); extern "C" SEXP _arrow_Scalar__is_valid(SEXP s_sexp){ BEGIN_CPP11 arrow::r::Input&>::type s(s_sexp); return cpp11::as_sexp(Scalar__is_valid(s)); END_CPP11 } - #else - extern "C" SEXP _arrow_Scalar__is_valid(SEXP s_sexp){ - Rf_error("Cannot call Scalar__is_valid(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Scalar__is_valid(SEXP s_sexp){ + Rf_error("Cannot call Scalar__is_valid(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // scalar.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr Scalar__type(const std::shared_ptr& s); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr Scalar__type(const std::shared_ptr& s); extern "C" SEXP _arrow_Scalar__type(SEXP s_sexp){ BEGIN_CPP11 arrow::r::Input&>::type s(s_sexp); return cpp11::as_sexp(Scalar__type(s)); END_CPP11 } - #else - extern "C" SEXP _arrow_Scalar__type(SEXP s_sexp){ - Rf_error("Cannot call Scalar__type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Scalar__type(SEXP s_sexp){ + Rf_error("Cannot call Scalar__type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // scalar.cpp - #if defined(ARROW_R_WITH_ARROW) - bool Scalar__Equals(const std::shared_ptr& lhs, const std::shared_ptr& rhs); +#if defined(ARROW_R_WITH_ARROW) +bool Scalar__Equals(const std::shared_ptr& lhs, const std::shared_ptr& rhs); extern "C" SEXP _arrow_Scalar__Equals(SEXP lhs_sexp, SEXP rhs_sexp){ BEGIN_CPP11 arrow::r::Input&>::type lhs(lhs_sexp); @@ -6413,15 +6413,15 @@ BEGIN_CPP11 return cpp11::as_sexp(Scalar__Equals(lhs, rhs)); END_CPP11 } - #else - extern "C" SEXP _arrow_Scalar__Equals(SEXP lhs_sexp, SEXP rhs_sexp){ - Rf_error("Cannot call Scalar__Equals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Scalar__Equals(SEXP lhs_sexp, SEXP rhs_sexp){ + Rf_error("Cannot call Scalar__Equals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // scalar.cpp - #if defined(ARROW_R_WITH_ARROW) - bool Scalar__ApproxEquals(const std::shared_ptr& lhs, const std::shared_ptr& rhs); +#if defined(ARROW_R_WITH_ARROW) +bool Scalar__ApproxEquals(const std::shared_ptr& lhs, const std::shared_ptr& rhs); extern "C" SEXP _arrow_Scalar__ApproxEquals(SEXP lhs_sexp, SEXP rhs_sexp){ BEGIN_CPP11 arrow::r::Input&>::type lhs(lhs_sexp); @@ -6429,60 +6429,60 @@ BEGIN_CPP11 return cpp11::as_sexp(Scalar__ApproxEquals(lhs, rhs)); END_CPP11 } - #else - extern "C" SEXP _arrow_Scalar__ApproxEquals(SEXP lhs_sexp, SEXP rhs_sexp){ - Rf_error("Cannot call Scalar__ApproxEquals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Scalar__ApproxEquals(SEXP lhs_sexp, SEXP rhs_sexp){ + Rf_error("Cannot call Scalar__ApproxEquals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // schema.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr schema_(const std::vector>& fields); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr schema_(const std::vector>& fields); extern "C" SEXP _arrow_schema_(SEXP fields_sexp){ BEGIN_CPP11 arrow::r::Input>&>::type fields(fields_sexp); return cpp11::as_sexp(schema_(fields)); END_CPP11 } - #else - extern "C" SEXP _arrow_schema_(SEXP fields_sexp){ - Rf_error("Cannot call schema_(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_schema_(SEXP fields_sexp){ + Rf_error("Cannot call schema_(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // schema.cpp - #if defined(ARROW_R_WITH_ARROW) - std::string Schema__ToString(const std::shared_ptr& s); +#if defined(ARROW_R_WITH_ARROW) +std::string Schema__ToString(const std::shared_ptr& s); extern "C" SEXP _arrow_Schema__ToString(SEXP s_sexp){ BEGIN_CPP11 arrow::r::Input&>::type s(s_sexp); return cpp11::as_sexp(Schema__ToString(s)); END_CPP11 } - #else - extern "C" SEXP _arrow_Schema__ToString(SEXP s_sexp){ - Rf_error("Cannot call Schema__ToString(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Schema__ToString(SEXP s_sexp){ + Rf_error("Cannot call Schema__ToString(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // schema.cpp - #if defined(ARROW_R_WITH_ARROW) - int Schema__num_fields(const std::shared_ptr& s); +#if defined(ARROW_R_WITH_ARROW) +int Schema__num_fields(const std::shared_ptr& s); extern "C" SEXP _arrow_Schema__num_fields(SEXP s_sexp){ BEGIN_CPP11 arrow::r::Input&>::type s(s_sexp); return cpp11::as_sexp(Schema__num_fields(s)); END_CPP11 } - #else - extern "C" SEXP _arrow_Schema__num_fields(SEXP s_sexp){ - Rf_error("Cannot call Schema__num_fields(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Schema__num_fields(SEXP s_sexp){ + Rf_error("Cannot call Schema__num_fields(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // schema.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr Schema__field(const std::shared_ptr& s, int i); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr Schema__field(const std::shared_ptr& s, int i); extern "C" SEXP _arrow_Schema__field(SEXP s_sexp, SEXP i_sexp){ BEGIN_CPP11 arrow::r::Input&>::type s(s_sexp); @@ -6490,15 +6490,15 @@ BEGIN_CPP11 return cpp11::as_sexp(Schema__field(s, i)); END_CPP11 } - #else - extern "C" SEXP _arrow_Schema__field(SEXP s_sexp, SEXP i_sexp){ - Rf_error("Cannot call Schema__field(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Schema__field(SEXP s_sexp, SEXP i_sexp){ + Rf_error("Cannot call Schema__field(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // schema.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr Schema__AddField(const std::shared_ptr& s, int i, const std::shared_ptr& field); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr Schema__AddField(const std::shared_ptr& s, int i, const std::shared_ptr& field); extern "C" SEXP _arrow_Schema__AddField(SEXP s_sexp, SEXP i_sexp, SEXP field_sexp){ BEGIN_CPP11 arrow::r::Input&>::type s(s_sexp); @@ -6507,15 +6507,15 @@ BEGIN_CPP11 return cpp11::as_sexp(Schema__AddField(s, i, field)); END_CPP11 } - #else - extern "C" SEXP _arrow_Schema__AddField(SEXP s_sexp, SEXP i_sexp, SEXP field_sexp){ - Rf_error("Cannot call Schema__AddField(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Schema__AddField(SEXP s_sexp, SEXP i_sexp, SEXP field_sexp){ + Rf_error("Cannot call Schema__AddField(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // schema.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr Schema__SetField(const std::shared_ptr& s, int i, const std::shared_ptr& field); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr Schema__SetField(const std::shared_ptr& s, int i, const std::shared_ptr& field); extern "C" SEXP _arrow_Schema__SetField(SEXP s_sexp, SEXP i_sexp, SEXP field_sexp){ BEGIN_CPP11 arrow::r::Input&>::type s(s_sexp); @@ -6524,15 +6524,15 @@ BEGIN_CPP11 return cpp11::as_sexp(Schema__SetField(s, i, field)); END_CPP11 } - #else - extern "C" SEXP _arrow_Schema__SetField(SEXP s_sexp, SEXP i_sexp, SEXP field_sexp){ - Rf_error("Cannot call Schema__SetField(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Schema__SetField(SEXP s_sexp, SEXP i_sexp, SEXP field_sexp){ + Rf_error("Cannot call Schema__SetField(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // schema.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr Schema__RemoveField(const std::shared_ptr& s, int i); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr Schema__RemoveField(const std::shared_ptr& s, int i); extern "C" SEXP _arrow_Schema__RemoveField(SEXP s_sexp, SEXP i_sexp){ BEGIN_CPP11 arrow::r::Input&>::type s(s_sexp); @@ -6540,15 +6540,15 @@ BEGIN_CPP11 return cpp11::as_sexp(Schema__RemoveField(s, i)); END_CPP11 } - #else - extern "C" SEXP _arrow_Schema__RemoveField(SEXP s_sexp, SEXP i_sexp){ - Rf_error("Cannot call Schema__RemoveField(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Schema__RemoveField(SEXP s_sexp, SEXP i_sexp){ + Rf_error("Cannot call Schema__RemoveField(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // schema.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr Schema__GetFieldByName(const std::shared_ptr& s, std::string x); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr Schema__GetFieldByName(const std::shared_ptr& s, std::string x); extern "C" SEXP _arrow_Schema__GetFieldByName(SEXP s_sexp, SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type s(s_sexp); @@ -6556,75 +6556,75 @@ BEGIN_CPP11 return cpp11::as_sexp(Schema__GetFieldByName(s, x)); END_CPP11 } - #else - extern "C" SEXP _arrow_Schema__GetFieldByName(SEXP s_sexp, SEXP x_sexp){ - Rf_error("Cannot call Schema__GetFieldByName(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Schema__GetFieldByName(SEXP s_sexp, SEXP x_sexp){ + Rf_error("Cannot call Schema__GetFieldByName(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // schema.cpp - #if defined(ARROW_R_WITH_ARROW) - cpp11::list Schema__fields(const std::shared_ptr& schema); +#if defined(ARROW_R_WITH_ARROW) +cpp11::list Schema__fields(const std::shared_ptr& schema); extern "C" SEXP _arrow_Schema__fields(SEXP schema_sexp){ BEGIN_CPP11 arrow::r::Input&>::type schema(schema_sexp); return cpp11::as_sexp(Schema__fields(schema)); END_CPP11 } - #else - extern "C" SEXP _arrow_Schema__fields(SEXP schema_sexp){ - Rf_error("Cannot call Schema__fields(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Schema__fields(SEXP schema_sexp){ + Rf_error("Cannot call Schema__fields(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // schema.cpp - #if defined(ARROW_R_WITH_ARROW) - std::vector Schema__field_names(const std::shared_ptr& schema); +#if defined(ARROW_R_WITH_ARROW) +std::vector Schema__field_names(const std::shared_ptr& schema); extern "C" SEXP _arrow_Schema__field_names(SEXP schema_sexp){ BEGIN_CPP11 arrow::r::Input&>::type schema(schema_sexp); return cpp11::as_sexp(Schema__field_names(schema)); END_CPP11 } - #else - extern "C" SEXP _arrow_Schema__field_names(SEXP schema_sexp){ - Rf_error("Cannot call Schema__field_names(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Schema__field_names(SEXP schema_sexp){ + Rf_error("Cannot call Schema__field_names(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // schema.cpp - #if defined(ARROW_R_WITH_ARROW) - bool Schema__HasMetadata(const std::shared_ptr& schema); +#if defined(ARROW_R_WITH_ARROW) +bool Schema__HasMetadata(const std::shared_ptr& schema); extern "C" SEXP _arrow_Schema__HasMetadata(SEXP schema_sexp){ BEGIN_CPP11 arrow::r::Input&>::type schema(schema_sexp); return cpp11::as_sexp(Schema__HasMetadata(schema)); END_CPP11 } - #else - extern "C" SEXP _arrow_Schema__HasMetadata(SEXP schema_sexp){ - Rf_error("Cannot call Schema__HasMetadata(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Schema__HasMetadata(SEXP schema_sexp){ + Rf_error("Cannot call Schema__HasMetadata(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // schema.cpp - #if defined(ARROW_R_WITH_ARROW) - cpp11::writable::list Schema__metadata(const std::shared_ptr& schema); +#if defined(ARROW_R_WITH_ARROW) +cpp11::writable::list Schema__metadata(const std::shared_ptr& schema); extern "C" SEXP _arrow_Schema__metadata(SEXP schema_sexp){ BEGIN_CPP11 arrow::r::Input&>::type schema(schema_sexp); return cpp11::as_sexp(Schema__metadata(schema)); END_CPP11 } - #else - extern "C" SEXP _arrow_Schema__metadata(SEXP schema_sexp){ - Rf_error("Cannot call Schema__metadata(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Schema__metadata(SEXP schema_sexp){ + Rf_error("Cannot call Schema__metadata(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // schema.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr Schema__WithMetadata(const std::shared_ptr& schema, cpp11::strings metadata); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr Schema__WithMetadata(const std::shared_ptr& schema, cpp11::strings metadata); extern "C" SEXP _arrow_Schema__WithMetadata(SEXP schema_sexp, SEXP metadata_sexp){ BEGIN_CPP11 arrow::r::Input&>::type schema(schema_sexp); @@ -6632,30 +6632,30 @@ BEGIN_CPP11 return cpp11::as_sexp(Schema__WithMetadata(schema, metadata)); END_CPP11 } - #else - extern "C" SEXP _arrow_Schema__WithMetadata(SEXP schema_sexp, SEXP metadata_sexp){ - Rf_error("Cannot call Schema__WithMetadata(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Schema__WithMetadata(SEXP schema_sexp, SEXP metadata_sexp){ + Rf_error("Cannot call Schema__WithMetadata(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // schema.cpp - #if defined(ARROW_R_WITH_ARROW) - cpp11::writable::raws Schema__serialize(const std::shared_ptr& schema); +#if defined(ARROW_R_WITH_ARROW) +cpp11::writable::raws Schema__serialize(const std::shared_ptr& schema); extern "C" SEXP _arrow_Schema__serialize(SEXP schema_sexp){ BEGIN_CPP11 arrow::r::Input&>::type schema(schema_sexp); return cpp11::as_sexp(Schema__serialize(schema)); END_CPP11 } - #else - extern "C" SEXP _arrow_Schema__serialize(SEXP schema_sexp){ - Rf_error("Cannot call Schema__serialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Schema__serialize(SEXP schema_sexp){ + Rf_error("Cannot call Schema__serialize(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // schema.cpp - #if defined(ARROW_R_WITH_ARROW) - bool Schema__Equals(const std::shared_ptr& schema, const std::shared_ptr& other, bool check_metadata); +#if defined(ARROW_R_WITH_ARROW) +bool Schema__Equals(const std::shared_ptr& schema, const std::shared_ptr& other, bool check_metadata); extern "C" SEXP _arrow_Schema__Equals(SEXP schema_sexp, SEXP other_sexp, SEXP check_metadata_sexp){ BEGIN_CPP11 arrow::r::Input&>::type schema(schema_sexp); @@ -6664,75 +6664,75 @@ BEGIN_CPP11 return cpp11::as_sexp(Schema__Equals(schema, other, check_metadata)); END_CPP11 } - #else - extern "C" SEXP _arrow_Schema__Equals(SEXP schema_sexp, SEXP other_sexp, SEXP check_metadata_sexp){ - Rf_error("Cannot call Schema__Equals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Schema__Equals(SEXP schema_sexp, SEXP other_sexp, SEXP check_metadata_sexp){ + Rf_error("Cannot call Schema__Equals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // schema.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr arrow__UnifySchemas(const std::vector>& schemas); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr arrow__UnifySchemas(const std::vector>& schemas); extern "C" SEXP _arrow_arrow__UnifySchemas(SEXP schemas_sexp){ BEGIN_CPP11 arrow::r::Input>&>::type schemas(schemas_sexp); return cpp11::as_sexp(arrow__UnifySchemas(schemas)); END_CPP11 } - #else - extern "C" SEXP _arrow_arrow__UnifySchemas(SEXP schemas_sexp){ - Rf_error("Cannot call arrow__UnifySchemas(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_arrow__UnifySchemas(SEXP schemas_sexp){ + Rf_error("Cannot call arrow__UnifySchemas(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // table.cpp - #if defined(ARROW_R_WITH_ARROW) - int Table__num_columns(const std::shared_ptr& x); +#if defined(ARROW_R_WITH_ARROW) +int Table__num_columns(const std::shared_ptr& x); extern "C" SEXP _arrow_Table__num_columns(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(Table__num_columns(x)); END_CPP11 } - #else - extern "C" SEXP _arrow_Table__num_columns(SEXP x_sexp){ - Rf_error("Cannot call Table__num_columns(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Table__num_columns(SEXP x_sexp){ + Rf_error("Cannot call Table__num_columns(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // table.cpp - #if defined(ARROW_R_WITH_ARROW) - int Table__num_rows(const std::shared_ptr& x); +#if defined(ARROW_R_WITH_ARROW) +int Table__num_rows(const std::shared_ptr& x); extern "C" SEXP _arrow_Table__num_rows(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(Table__num_rows(x)); END_CPP11 } - #else - extern "C" SEXP _arrow_Table__num_rows(SEXP x_sexp){ - Rf_error("Cannot call Table__num_rows(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Table__num_rows(SEXP x_sexp){ + Rf_error("Cannot call Table__num_rows(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // table.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr Table__schema(const std::shared_ptr& x); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr Table__schema(const std::shared_ptr& x); extern "C" SEXP _arrow_Table__schema(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(Table__schema(x)); END_CPP11 } - #else - extern "C" SEXP _arrow_Table__schema(SEXP x_sexp){ - Rf_error("Cannot call Table__schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Table__schema(SEXP x_sexp){ + Rf_error("Cannot call Table__schema(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // table.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr Table__ReplaceSchemaMetadata(const std::shared_ptr& x, cpp11::strings metadata); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr Table__ReplaceSchemaMetadata(const std::shared_ptr& x, cpp11::strings metadata); extern "C" SEXP _arrow_Table__ReplaceSchemaMetadata(SEXP x_sexp, SEXP metadata_sexp){ BEGIN_CPP11 arrow::r::Input&>::type x(x_sexp); @@ -6740,15 +6740,15 @@ BEGIN_CPP11 return cpp11::as_sexp(Table__ReplaceSchemaMetadata(x, metadata)); END_CPP11 } - #else - extern "C" SEXP _arrow_Table__ReplaceSchemaMetadata(SEXP x_sexp, SEXP metadata_sexp){ - Rf_error("Cannot call Table__ReplaceSchemaMetadata(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Table__ReplaceSchemaMetadata(SEXP x_sexp, SEXP metadata_sexp){ + Rf_error("Cannot call Table__ReplaceSchemaMetadata(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // table.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr Table__column(const std::shared_ptr& table, R_xlen_t i); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr Table__column(const std::shared_ptr& table, R_xlen_t i); extern "C" SEXP _arrow_Table__column(SEXP table_sexp, SEXP i_sexp){ BEGIN_CPP11 arrow::r::Input&>::type table(table_sexp); @@ -6756,15 +6756,15 @@ BEGIN_CPP11 return cpp11::as_sexp(Table__column(table, i)); END_CPP11 } - #else - extern "C" SEXP _arrow_Table__column(SEXP table_sexp, SEXP i_sexp){ - Rf_error("Cannot call Table__column(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Table__column(SEXP table_sexp, SEXP i_sexp){ + Rf_error("Cannot call Table__column(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // table.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr Table__field(const std::shared_ptr& table, R_xlen_t i); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr Table__field(const std::shared_ptr& table, R_xlen_t i); extern "C" SEXP _arrow_Table__field(SEXP table_sexp, SEXP i_sexp){ BEGIN_CPP11 arrow::r::Input&>::type table(table_sexp); @@ -6772,45 +6772,45 @@ BEGIN_CPP11 return cpp11::as_sexp(Table__field(table, i)); END_CPP11 } - #else - extern "C" SEXP _arrow_Table__field(SEXP table_sexp, SEXP i_sexp){ - Rf_error("Cannot call Table__field(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Table__field(SEXP table_sexp, SEXP i_sexp){ + Rf_error("Cannot call Table__field(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // table.cpp - #if defined(ARROW_R_WITH_ARROW) - cpp11::list Table__columns(const std::shared_ptr& table); +#if defined(ARROW_R_WITH_ARROW) +cpp11::list Table__columns(const std::shared_ptr& table); extern "C" SEXP _arrow_Table__columns(SEXP table_sexp){ BEGIN_CPP11 arrow::r::Input&>::type table(table_sexp); return cpp11::as_sexp(Table__columns(table)); END_CPP11 } - #else - extern "C" SEXP _arrow_Table__columns(SEXP table_sexp){ - Rf_error("Cannot call Table__columns(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Table__columns(SEXP table_sexp){ + Rf_error("Cannot call Table__columns(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // table.cpp - #if defined(ARROW_R_WITH_ARROW) - std::vector Table__ColumnNames(const std::shared_ptr& table); +#if defined(ARROW_R_WITH_ARROW) +std::vector Table__ColumnNames(const std::shared_ptr& table); extern "C" SEXP _arrow_Table__ColumnNames(SEXP table_sexp){ BEGIN_CPP11 arrow::r::Input&>::type table(table_sexp); return cpp11::as_sexp(Table__ColumnNames(table)); END_CPP11 } - #else - extern "C" SEXP _arrow_Table__ColumnNames(SEXP table_sexp){ - Rf_error("Cannot call Table__ColumnNames(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Table__ColumnNames(SEXP table_sexp){ + Rf_error("Cannot call Table__ColumnNames(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // table.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr Table__RenameColumns(const std::shared_ptr& table, const std::vector& names); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr Table__RenameColumns(const std::shared_ptr& table, const std::vector& names); extern "C" SEXP _arrow_Table__RenameColumns(SEXP table_sexp, SEXP names_sexp){ BEGIN_CPP11 arrow::r::Input&>::type table(table_sexp); @@ -6818,15 +6818,15 @@ BEGIN_CPP11 return cpp11::as_sexp(Table__RenameColumns(table, names)); END_CPP11 } - #else - extern "C" SEXP _arrow_Table__RenameColumns(SEXP table_sexp, SEXP names_sexp){ - Rf_error("Cannot call Table__RenameColumns(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Table__RenameColumns(SEXP table_sexp, SEXP names_sexp){ + Rf_error("Cannot call Table__RenameColumns(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // table.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr Table__Slice1(const std::shared_ptr& table, R_xlen_t offset); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr Table__Slice1(const std::shared_ptr& table, R_xlen_t offset); extern "C" SEXP _arrow_Table__Slice1(SEXP table_sexp, SEXP offset_sexp){ BEGIN_CPP11 arrow::r::Input&>::type table(table_sexp); @@ -6834,15 +6834,15 @@ BEGIN_CPP11 return cpp11::as_sexp(Table__Slice1(table, offset)); END_CPP11 } - #else - extern "C" SEXP _arrow_Table__Slice1(SEXP table_sexp, SEXP offset_sexp){ - Rf_error("Cannot call Table__Slice1(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Table__Slice1(SEXP table_sexp, SEXP offset_sexp){ + Rf_error("Cannot call Table__Slice1(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // table.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr Table__Slice2(const std::shared_ptr& table, R_xlen_t offset, R_xlen_t length); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr Table__Slice2(const std::shared_ptr& table, R_xlen_t offset, R_xlen_t length); extern "C" SEXP _arrow_Table__Slice2(SEXP table_sexp, SEXP offset_sexp, SEXP length_sexp){ BEGIN_CPP11 arrow::r::Input&>::type table(table_sexp); @@ -6851,15 +6851,15 @@ BEGIN_CPP11 return cpp11::as_sexp(Table__Slice2(table, offset, length)); END_CPP11 } - #else - extern "C" SEXP _arrow_Table__Slice2(SEXP table_sexp, SEXP offset_sexp, SEXP length_sexp){ - Rf_error("Cannot call Table__Slice2(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Table__Slice2(SEXP table_sexp, SEXP offset_sexp, SEXP length_sexp){ + Rf_error("Cannot call Table__Slice2(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // table.cpp - #if defined(ARROW_R_WITH_ARROW) - bool Table__Equals(const std::shared_ptr& lhs, const std::shared_ptr& rhs, bool check_metadata); +#if defined(ARROW_R_WITH_ARROW) +bool Table__Equals(const std::shared_ptr& lhs, const std::shared_ptr& rhs, bool check_metadata); extern "C" SEXP _arrow_Table__Equals(SEXP lhs_sexp, SEXP rhs_sexp, SEXP check_metadata_sexp){ BEGIN_CPP11 arrow::r::Input&>::type lhs(lhs_sexp); @@ -6868,45 +6868,45 @@ BEGIN_CPP11 return cpp11::as_sexp(Table__Equals(lhs, rhs, check_metadata)); END_CPP11 } - #else - extern "C" SEXP _arrow_Table__Equals(SEXP lhs_sexp, SEXP rhs_sexp, SEXP check_metadata_sexp){ - Rf_error("Cannot call Table__Equals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Table__Equals(SEXP lhs_sexp, SEXP rhs_sexp, SEXP check_metadata_sexp){ + Rf_error("Cannot call Table__Equals(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // table.cpp - #if defined(ARROW_R_WITH_ARROW) - bool Table__Validate(const std::shared_ptr& table); +#if defined(ARROW_R_WITH_ARROW) +bool Table__Validate(const std::shared_ptr& table); extern "C" SEXP _arrow_Table__Validate(SEXP table_sexp){ BEGIN_CPP11 arrow::r::Input&>::type table(table_sexp); return cpp11::as_sexp(Table__Validate(table)); END_CPP11 } - #else - extern "C" SEXP _arrow_Table__Validate(SEXP table_sexp){ - Rf_error("Cannot call Table__Validate(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Table__Validate(SEXP table_sexp){ + Rf_error("Cannot call Table__Validate(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // table.cpp - #if defined(ARROW_R_WITH_ARROW) - bool Table__ValidateFull(const std::shared_ptr& table); +#if defined(ARROW_R_WITH_ARROW) +bool Table__ValidateFull(const std::shared_ptr& table); extern "C" SEXP _arrow_Table__ValidateFull(SEXP table_sexp){ BEGIN_CPP11 arrow::r::Input&>::type table(table_sexp); return cpp11::as_sexp(Table__ValidateFull(table)); END_CPP11 } - #else - extern "C" SEXP _arrow_Table__ValidateFull(SEXP table_sexp){ - Rf_error("Cannot call Table__ValidateFull(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Table__ValidateFull(SEXP table_sexp){ + Rf_error("Cannot call Table__ValidateFull(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // table.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr Table__GetColumnByName(const std::shared_ptr& table, const std::string& name); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr Table__GetColumnByName(const std::shared_ptr& table, const std::string& name); extern "C" SEXP _arrow_Table__GetColumnByName(SEXP table_sexp, SEXP name_sexp){ BEGIN_CPP11 arrow::r::Input&>::type table(table_sexp); @@ -6914,15 +6914,15 @@ BEGIN_CPP11 return cpp11::as_sexp(Table__GetColumnByName(table, name)); END_CPP11 } - #else - extern "C" SEXP _arrow_Table__GetColumnByName(SEXP table_sexp, SEXP name_sexp){ - Rf_error("Cannot call Table__GetColumnByName(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Table__GetColumnByName(SEXP table_sexp, SEXP name_sexp){ + Rf_error("Cannot call Table__GetColumnByName(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // table.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr Table__RemoveColumn(const std::shared_ptr& table, R_xlen_t i); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr Table__RemoveColumn(const std::shared_ptr& table, R_xlen_t i); extern "C" SEXP _arrow_Table__RemoveColumn(SEXP table_sexp, SEXP i_sexp){ BEGIN_CPP11 arrow::r::Input&>::type table(table_sexp); @@ -6930,15 +6930,15 @@ BEGIN_CPP11 return cpp11::as_sexp(Table__RemoveColumn(table, i)); END_CPP11 } - #else - extern "C" SEXP _arrow_Table__RemoveColumn(SEXP table_sexp, SEXP i_sexp){ - Rf_error("Cannot call Table__RemoveColumn(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Table__RemoveColumn(SEXP table_sexp, SEXP i_sexp){ + Rf_error("Cannot call Table__RemoveColumn(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // table.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr Table__AddColumn(const std::shared_ptr& table, R_xlen_t i, const std::shared_ptr& field, const std::shared_ptr& column); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr Table__AddColumn(const std::shared_ptr& table, R_xlen_t i, const std::shared_ptr& field, const std::shared_ptr& column); extern "C" SEXP _arrow_Table__AddColumn(SEXP table_sexp, SEXP i_sexp, SEXP field_sexp, SEXP column_sexp){ BEGIN_CPP11 arrow::r::Input&>::type table(table_sexp); @@ -6948,15 +6948,15 @@ BEGIN_CPP11 return cpp11::as_sexp(Table__AddColumn(table, i, field, column)); END_CPP11 } - #else - extern "C" SEXP _arrow_Table__AddColumn(SEXP table_sexp, SEXP i_sexp, SEXP field_sexp, SEXP column_sexp){ - Rf_error("Cannot call Table__AddColumn(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Table__AddColumn(SEXP table_sexp, SEXP i_sexp, SEXP field_sexp, SEXP column_sexp){ + Rf_error("Cannot call Table__AddColumn(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // table.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr Table__SetColumn(const std::shared_ptr& table, R_xlen_t i, const std::shared_ptr& field, const std::shared_ptr& column); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr Table__SetColumn(const std::shared_ptr& table, R_xlen_t i, const std::shared_ptr& field, const std::shared_ptr& column); extern "C" SEXP _arrow_Table__SetColumn(SEXP table_sexp, SEXP i_sexp, SEXP field_sexp, SEXP column_sexp){ BEGIN_CPP11 arrow::r::Input&>::type table(table_sexp); @@ -6966,15 +6966,15 @@ BEGIN_CPP11 return cpp11::as_sexp(Table__SetColumn(table, i, field, column)); END_CPP11 } - #else - extern "C" SEXP _arrow_Table__SetColumn(SEXP table_sexp, SEXP i_sexp, SEXP field_sexp, SEXP column_sexp){ - Rf_error("Cannot call Table__SetColumn(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Table__SetColumn(SEXP table_sexp, SEXP i_sexp, SEXP field_sexp, SEXP column_sexp){ + Rf_error("Cannot call Table__SetColumn(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // table.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr Table__SelectColumns(const std::shared_ptr& table, const std::vector& indices); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr Table__SelectColumns(const std::shared_ptr& table, const std::vector& indices); extern "C" SEXP _arrow_Table__SelectColumns(SEXP table_sexp, SEXP indices_sexp){ BEGIN_CPP11 arrow::r::Input&>::type table(table_sexp); @@ -6982,30 +6982,30 @@ BEGIN_CPP11 return cpp11::as_sexp(Table__SelectColumns(table, indices)); END_CPP11 } - #else - extern "C" SEXP _arrow_Table__SelectColumns(SEXP table_sexp, SEXP indices_sexp){ - Rf_error("Cannot call Table__SelectColumns(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Table__SelectColumns(SEXP table_sexp, SEXP indices_sexp){ + Rf_error("Cannot call Table__SelectColumns(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // table.cpp - #if defined(ARROW_R_WITH_ARROW) - bool all_record_batches(SEXP lst); +#if defined(ARROW_R_WITH_ARROW) +bool all_record_batches(SEXP lst); extern "C" SEXP _arrow_all_record_batches(SEXP lst_sexp){ BEGIN_CPP11 arrow::r::Input::type lst(lst_sexp); return cpp11::as_sexp(all_record_batches(lst)); END_CPP11 } - #else - extern "C" SEXP _arrow_all_record_batches(SEXP lst_sexp){ - Rf_error("Cannot call all_record_batches(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_all_record_batches(SEXP lst_sexp){ + Rf_error("Cannot call all_record_batches(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // table.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr Table__from_record_batches(const std::vector>& batches, SEXP schema_sxp); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr Table__from_record_batches(const std::vector>& batches, SEXP schema_sxp); extern "C" SEXP _arrow_Table__from_record_batches(SEXP batches_sexp, SEXP schema_sxp_sexp){ BEGIN_CPP11 arrow::r::Input>&>::type batches(batches_sexp); @@ -7013,29 +7013,29 @@ BEGIN_CPP11 return cpp11::as_sexp(Table__from_record_batches(batches, schema_sxp)); END_CPP11 } - #else - extern "C" SEXP _arrow_Table__from_record_batches(SEXP batches_sexp, SEXP schema_sxp_sexp){ - Rf_error("Cannot call Table__from_record_batches(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_Table__from_record_batches(SEXP batches_sexp, SEXP schema_sxp_sexp){ + Rf_error("Cannot call Table__from_record_batches(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // threadpool.cpp - #if defined(ARROW_R_WITH_ARROW) - int GetCpuThreadPoolCapacity(); +#if defined(ARROW_R_WITH_ARROW) +int GetCpuThreadPoolCapacity(); extern "C" SEXP _arrow_GetCpuThreadPoolCapacity(){ BEGIN_CPP11 return cpp11::as_sexp(GetCpuThreadPoolCapacity()); END_CPP11 } - #else - extern "C" SEXP _arrow_GetCpuThreadPoolCapacity(){ - Rf_error("Cannot call GetCpuThreadPoolCapacity(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_GetCpuThreadPoolCapacity(){ + Rf_error("Cannot call GetCpuThreadPoolCapacity(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // threadpool.cpp - #if defined(ARROW_R_WITH_ARROW) - void SetCpuThreadPoolCapacity(int threads); +#if defined(ARROW_R_WITH_ARROW) +void SetCpuThreadPoolCapacity(int threads); extern "C" SEXP _arrow_SetCpuThreadPoolCapacity(SEXP threads_sexp){ BEGIN_CPP11 arrow::r::Input::type threads(threads_sexp); @@ -7043,29 +7043,29 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_SetCpuThreadPoolCapacity(SEXP threads_sexp){ - Rf_error("Cannot call SetCpuThreadPoolCapacity(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_SetCpuThreadPoolCapacity(SEXP threads_sexp){ + Rf_error("Cannot call SetCpuThreadPoolCapacity(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // threadpool.cpp - #if defined(ARROW_R_WITH_ARROW) - int GetIOThreadPoolCapacity(); +#if defined(ARROW_R_WITH_ARROW) +int GetIOThreadPoolCapacity(); extern "C" SEXP _arrow_GetIOThreadPoolCapacity(){ BEGIN_CPP11 return cpp11::as_sexp(GetIOThreadPoolCapacity()); END_CPP11 } - #else - extern "C" SEXP _arrow_GetIOThreadPoolCapacity(){ - Rf_error("Cannot call GetIOThreadPoolCapacity(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_GetIOThreadPoolCapacity(){ + Rf_error("Cannot call GetIOThreadPoolCapacity(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // threadpool.cpp - #if defined(ARROW_R_WITH_ARROW) - void SetIOThreadPoolCapacity(int threads); +#if defined(ARROW_R_WITH_ARROW) +void SetIOThreadPoolCapacity(int threads); extern "C" SEXP _arrow_SetIOThreadPoolCapacity(SEXP threads_sexp){ BEGIN_CPP11 arrow::r::Input::type threads(threads_sexp); @@ -7073,53 +7073,53 @@ BEGIN_CPP11 return R_NilValue; END_CPP11 } - #else - extern "C" SEXP _arrow_SetIOThreadPoolCapacity(SEXP threads_sexp){ - Rf_error("Cannot call SetIOThreadPoolCapacity(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_SetIOThreadPoolCapacity(SEXP threads_sexp){ + Rf_error("Cannot call SetIOThreadPoolCapacity(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + // type_infer.cpp - #if defined(ARROW_R_WITH_ARROW) - std::shared_ptr Array__infer_type(SEXP x); +#if defined(ARROW_R_WITH_ARROW) +std::shared_ptr Array__infer_type(SEXP x); extern "C" SEXP _arrow_Array__infer_type(SEXP x_sexp){ BEGIN_CPP11 arrow::r::Input::type x(x_sexp); return cpp11::as_sexp(Array__infer_type(x)); END_CPP11 } - #else - extern "C" SEXP _arrow_Array__infer_type(SEXP x_sexp){ - Rf_error("Cannot call Array__infer_type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - - #if defined(ARROW_R_WITH_ARROW) - extern "C" SEXP _arrow_Table__Reset(SEXP r6) { +#else +extern "C" SEXP _arrow_Array__infer_type(SEXP x_sexp){ + Rf_error("Cannot call Array__infer_type(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + +#if defined(ARROW_R_WITH_ARROW) +extern "C" SEXP _arrow_Table__Reset(SEXP r6) { BEGIN_CPP11 arrow::r::r6_reset_pointer(r6); END_CPP11 return R_NilValue; } - #else - extern "C" SEXP _arrow_Table__Reset(SEXP r6){ - Rf_error("Cannot call Table(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - - #if defined(ARROW_R_WITH_ARROW) - extern "C" SEXP _arrow_RecordBatch__Reset(SEXP r6) { +#else +extern "C" SEXP _arrow_Table__Reset(SEXP r6){ + Rf_error("Cannot call Table(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + +#if defined(ARROW_R_WITH_ARROW) +extern "C" SEXP _arrow_RecordBatch__Reset(SEXP r6) { BEGIN_CPP11 arrow::r::r6_reset_pointer(r6); END_CPP11 return R_NilValue; } - #else - extern "C" SEXP _arrow_RecordBatch__Reset(SEXP r6){ - Rf_error("Cannot call RecordBatch(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); - } - #endif - +#else +extern "C" SEXP _arrow_RecordBatch__Reset(SEXP r6){ + Rf_error("Cannot call RecordBatch(). See https://arrow.apache.org/docs/r/articles/install.html for help installing Arrow C++ libraries. "); +} +#endif + extern "C" SEXP _arrow_available() { return Rf_ScalarLogical( #if defined(ARROW_R_WITH_ARROW) From dc581f1af6a37ffc0851c4ec6ac0bdefeec781fd Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Mon, 13 Dec 2021 14:59:30 -0400 Subject: [PATCH 36/49] _translation -> _binding --- r/R/arrow-package.R | 2 +- r/R/dplyr-funcs-conditional.R | 22 ++-- r/R/dplyr-funcs-datetime.R | 26 ++--- r/R/dplyr-funcs-math.R | 16 +-- r/R/dplyr-funcs-string.R | 80 +++++++------- r/R/dplyr-funcs-type.R | 100 +++++++++--------- r/R/dplyr-funcs.R | 28 ++--- r/R/dplyr-summarize.R | 26 ++--- r/R/expression.R | 4 +- ...ter_translation.Rd => register_binding.Rd} | 8 +- .../testthat/test-dplyr-funcs-conditional.R | 2 +- r/tests/testthat/test-dplyr-funcs-datetime.R | 2 +- r/tests/testthat/test-dplyr-funcs-math.R | 4 +- r/tests/testthat/test-dplyr-funcs-string.R | 42 ++++---- r/tests/testthat/test-dplyr-funcs.R | 14 +-- r/tests/testthat/test-dplyr-summarize.R | 24 ++--- 16 files changed, 200 insertions(+), 200 deletions(-) rename r/man/{register_translation.Rd => register_binding.Rd} (89%) diff --git a/r/R/arrow-package.R b/r/R/arrow-package.R index 8f250aabcf07c..386e3dcaa7751 100644 --- a/r/R/arrow-package.R +++ b/r/R/arrow-package.R @@ -59,7 +59,7 @@ # Create the .cache$functions list at package load time. # We can't do this at build time because list_compute_functions() may error # if arrow_available() is FALSE - create_translation_cache() + create_binding_cache() if (tolower(Sys.info()[["sysname"]]) == "windows") { # Disable multithreading on Windows diff --git a/r/R/dplyr-funcs-conditional.R b/r/R/dplyr-funcs-conditional.R index 65968be2066ea..70a57a36ad9d3 100644 --- a/r/R/dplyr-funcs-conditional.R +++ b/r/R/dplyr-funcs-conditional.R @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. -register_conditional_translations <- function() { +register_conditional_bindings <- function() { - register_translation("coalesce", function(...) { + register_binding("coalesce", function(...) { args <- list2(...) if (length(args) < 1) { abort("At least one argument must be supplied to coalesce()") @@ -49,26 +49,26 @@ register_conditional_translations <- function() { Expression$create("coalesce", args = args) }) - if_else_translation <- function(condition, true, false, missing = NULL) { + if_else_binding <- function(condition, true, false, missing = NULL) { if (!is.null(missing)) { - return(if_else_translation( - call_translation("is.na", (condition)), + return(if_else_binding( + call_binding("is.na", (condition)), missing, - if_else_translation(condition, true, false) + if_else_binding(condition, true, false) )) } build_expr("if_else", condition, true, false) } - register_translation("if_else", if_else_translation) + register_binding("if_else", if_else_binding) # Although base R ifelse allows `yes` and `no` to be different classes - register_translation("ifelse", function(test, yes, no) { - if_else_translation(condition = test, true = yes, false = no) + register_binding("ifelse", function(test, yes, no) { + if_else_binding(condition = test, true = yes, false = no) }) - register_translation("case_when", function(...) { + register_binding("case_when", function(...) { formulas <- list2(...) n <- length(formulas) if (n == 0) { @@ -84,7 +84,7 @@ register_conditional_translations <- function() { } query[[i]] <- arrow_eval(f[[2]], mask) value[[i]] <- arrow_eval(f[[3]], mask) - if (!call_translation("is.logical", query[[i]])) { + if (!call_binding("is.logical", query[[i]])) { abort("Left side of each formula in case_when() must be a logical expression") } if (inherits(value[[i]], "try-error")) { diff --git a/r/R/dplyr-funcs-datetime.R b/r/R/dplyr-funcs-datetime.R index cf04bff84fc45..0e3a19e353dde 100644 --- a/r/R/dplyr-funcs-datetime.R +++ b/r/R/dplyr-funcs-datetime.R @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. -register_datetime_translations <- function() { +register_datetime_bindings <- function() { - register_translation("strptime", function(x, format = "%Y-%m-%d %H:%M:%S", tz = NULL, + register_binding("strptime", function(x, format = "%Y-%m-%d %H:%M:%S", tz = NULL, unit = "ms") { # Arrow uses unit for time parsing, strptime() does not. # Arrow has no default option for strptime (format, unit), @@ -35,7 +35,7 @@ register_datetime_translations <- function() { Expression$create("strptime", x, options = list(format = format, unit = unit)) }) - register_translation("strftime", function(x, format = "", tz = "", usetz = FALSE) { + register_binding("strftime", function(x, format = "", tz = "", usetz = FALSE) { if (usetz) { format <- paste(format, "%Z") } @@ -44,7 +44,7 @@ register_datetime_translations <- function() { } # Arrow's strftime prints in timezone of the timestamp. To match R's strftime behavior we first # cast the timestamp to desired timezone. This is a metadata only change. - if (call_translation("is.POSIXct", x)) { + if (call_binding("is.POSIXct", x)) { ts <- Expression$create("cast", x, options = list(to_type = timestamp(x$type()$unit(), tz))) } else { ts <- x @@ -52,7 +52,7 @@ register_datetime_translations <- function() { Expression$create("strftime", ts, options = list(format = format, locale = Sys.getlocale("LC_TIME"))) }) - register_translation("format_ISO8601", function(x, usetz = FALSE, precision = NULL, ...) { + register_binding("format_ISO8601", function(x, usetz = FALSE, precision = NULL, ...) { ISO8601_precision_map <- list( y = "%Y", @@ -83,11 +83,11 @@ register_datetime_translations <- function() { Expression$create("strftime", x, options = list(format = format, locale = "C")) }) - register_translation("second", function(x) { + register_binding("second", function(x) { Expression$create("add", Expression$create("second", x), Expression$create("subsecond", x)) }) - register_translation("wday", function(x, label = FALSE, abbr = TRUE, + register_binding("wday", function(x, label = FALSE, abbr = TRUE, week_start = getOption("lubridate.week.start", 7), locale = Sys.getlocale("LC_TIME")) { if (label) { @@ -102,7 +102,7 @@ register_datetime_translations <- function() { Expression$create("day_of_week", x, options = list(count_from_zero = FALSE, week_start = week_start)) }) - register_translation("month", function(x, label = FALSE, abbr = TRUE, locale = Sys.getlocale("LC_TIME")) { + register_binding("month", function(x, label = FALSE, abbr = TRUE, locale = Sys.getlocale("LC_TIME")) { if (label) { if (abbr) { format <- "%b" @@ -115,19 +115,19 @@ register_datetime_translations <- function() { Expression$create("month", x) }) - register_translation("is.Date", function(x) { + register_binding("is.Date", function(x) { inherits(x, "Date") || (inherits(x, "Expression") && x$type_id() %in% Type[c("DATE32", "DATE64")]) }) - is_instant_translation <- function(x) { + is_instant_binding <- function(x) { inherits(x, c("POSIXt", "POSIXct", "POSIXlt", "Date")) || (inherits(x, "Expression") && x$type_id() %in% Type[c("TIMESTAMP", "DATE32", "DATE64")]) } - register_translation("is.instant", is_instant_translation) - register_translation("is.timepoint", is_instant_translation) + register_binding("is.instant", is_instant_binding) + register_binding("is.timepoint", is_instant_binding) - register_translation("is.POSIXct", function(x) { + register_binding("is.POSIXct", function(x) { inherits(x, "POSIXct") || (inherits(x, "Expression") && x$type_id() %in% Type[c("TIMESTAMP")]) }) diff --git a/r/R/dplyr-funcs-math.R b/r/R/dplyr-funcs-math.R index 086eecb443cf6..4b3f69e03144e 100644 --- a/r/R/dplyr-funcs-math.R +++ b/r/R/dplyr-funcs-math.R @@ -15,9 +15,9 @@ # specific language governing permissions and limitations # under the License. -register_math_translations <- function() { +register_math_bindings <- function() { - log_translation <- function(x, base = exp(1)) { + log_binding <- function(x, base = exp(1)) { # like other binary functions, either `x` or `base` can be Expression or double(1) if (is.numeric(x) && length(x) == 1) { x <- Expression$scalar(x) @@ -50,10 +50,10 @@ register_math_translations <- function() { Expression$create("logb_checked", x, Expression$scalar(base)) } - register_translation("log", log_translation) - register_translation("logb", log_translation) + register_binding("log", log_binding) + register_binding("logb", log_binding) - register_translation("pmin", function(..., na.rm = FALSE) { + register_binding("pmin", function(..., na.rm = FALSE) { build_expr( "min_element_wise", ..., @@ -61,7 +61,7 @@ register_math_translations <- function() { ) }) - register_translation("pmax", function(..., na.rm = FALSE) { + register_binding("pmax", function(..., na.rm = FALSE) { build_expr( "max_element_wise", ..., @@ -69,12 +69,12 @@ register_math_translations <- function() { ) }) - register_translation("trunc", function(x, ...) { + register_binding("trunc", function(x, ...) { # accepts and ignores ... for consistency with base::trunc() build_expr("trunc", x) }) - register_translation("round", function(x, digits = 0) { + register_binding("round", function(x, digits = 0) { build_expr( "round", x, diff --git a/r/R/dplyr-funcs-string.R b/r/R/dplyr-funcs-string.R index e0689ab256f1e..590c28bb8e5ea 100644 --- a/r/R/dplyr-funcs-string.R +++ b/r/R/dplyr-funcs-string.R @@ -126,13 +126,13 @@ stop_if_locale_provided <- function(locale) { # Split up into several register functions by category to satisfy the linter -register_string_translations <- function() { - register_string_join_translations() - register_string_regex_translations() - register_string_other_translations() +register_string_bindings <- function() { + register_string_join_bindings() + register_string_regex_bindings() + register_string_other_bindings() } -register_string_join_translations <- function() { +register_string_join_bindings <- function() { arrow_string_join_function <- function(null_handling, null_replacement = NULL) { # the `binary_join_element_wise` Arrow C++ compute kernel takes the separator @@ -148,7 +148,7 @@ register_string_join_translations <- function() { ) Expression$scalar(as.character(arg)) } else { - call_translation("as.character", arg) + call_binding("as.character", arg) } }) Expression$create( @@ -162,7 +162,7 @@ register_string_join_translations <- function() { } } - register_translation("paste", function(..., sep = " ", collapse = NULL, recycle0 = FALSE) { + register_binding("paste", function(..., sep = " ", collapse = NULL, recycle0 = FALSE) { assert_that( is.null(collapse), msg = "paste() with the collapse argument is not yet supported in Arrow" @@ -173,7 +173,7 @@ register_string_join_translations <- function() { arrow_string_join_function(NullHandlingBehavior$REPLACE, "NA")(..., sep) }) - register_translation("paste0", function(..., collapse = NULL, recycle0 = FALSE) { + register_binding("paste0", function(..., collapse = NULL, recycle0 = FALSE) { assert_that( is.null(collapse), msg = "paste0() with the collapse argument is not yet supported in Arrow" @@ -181,7 +181,7 @@ register_string_join_translations <- function() { arrow_string_join_function(NullHandlingBehavior$REPLACE, "NA")(..., "") }) - register_translation("str_c", function(..., sep = "", collapse = NULL) { + register_binding("str_c", function(..., sep = "", collapse = NULL) { assert_that( is.null(collapse), msg = "str_c() with the collapse argument is not yet supported in Arrow" @@ -190,9 +190,9 @@ register_string_join_translations <- function() { }) } -register_string_regex_translations <- function() { +register_string_regex_bindings <- function() { - register_translation("grepl", function(pattern, x, ignore.case = FALSE, fixed = FALSE) { + register_binding("grepl", function(pattern, x, ignore.case = FALSE, fixed = FALSE) { arrow_fun <- ifelse(fixed, "match_substring", "match_substring_regex") Expression$create( arrow_fun, @@ -201,9 +201,9 @@ register_string_regex_translations <- function() { ) }) - register_translation("str_detect", function(string, pattern, negate = FALSE) { + register_binding("str_detect", function(string, pattern, negate = FALSE) { opts <- get_stringr_pattern_options(enexpr(pattern)) - out <- call_translation("grepl", + out <- call_binding("grepl", pattern = opts$pattern, x = string, ignore.case = opts$ignore_case, @@ -215,7 +215,7 @@ register_string_regex_translations <- function() { out }) - register_translation("str_like", function(string, pattern, ignore_case = TRUE) { + register_binding("str_like", function(string, pattern, ignore_case = TRUE) { Expression$create( "match_like", string, @@ -223,7 +223,7 @@ register_string_regex_translations <- function() { ) }) - register_translation("str_count", function(string, pattern) { + register_binding("str_count", function(string, pattern) { opts <- get_stringr_pattern_options(enexpr(pattern)) if (!is.string(pattern)) { arrow_not_supported("`pattern` must be a length 1 character vector; other values") @@ -236,7 +236,7 @@ register_string_regex_translations <- function() { ) }) - register_translation("startsWith", function(x, prefix) { + register_binding("startsWith", function(x, prefix) { Expression$create( "starts_with", x, @@ -244,7 +244,7 @@ register_string_regex_translations <- function() { ) }) - register_translation("endsWith", function(x, suffix) { + register_binding("endsWith", function(x, suffix) { Expression$create( "ends_with", x, @@ -252,12 +252,12 @@ register_string_regex_translations <- function() { ) }) - register_translation("str_starts", function(string, pattern, negate = FALSE) { + register_binding("str_starts", function(string, pattern, negate = FALSE) { opts <- get_stringr_pattern_options(enexpr(pattern)) if (opts$fixed) { - out <- call_translation("startsWith", x = string, prefix = opts$pattern) + out <- call_binding("startsWith", x = string, prefix = opts$pattern) } else { - out <- call_translation("grepl", pattern = paste0("^", opts$pattern), x = string, fixed = FALSE) + out <- call_binding("grepl", pattern = paste0("^", opts$pattern), x = string, fixed = FALSE) } if (negate) { @@ -266,12 +266,12 @@ register_string_regex_translations <- function() { out }) - register_translation("str_ends", function(string, pattern, negate = FALSE) { + register_binding("str_ends", function(string, pattern, negate = FALSE) { opts <- get_stringr_pattern_options(enexpr(pattern)) if (opts$fixed) { - out <- call_translation("endsWith", x = string, suffix = opts$pattern) + out <- call_binding("endsWith", x = string, suffix = opts$pattern) } else { - out <- call_translation("grepl", pattern = paste0(opts$pattern, "$"), x = string, fixed = FALSE) + out <- call_binding("grepl", pattern = paste0(opts$pattern, "$"), x = string, fixed = FALSE) } if (negate) { @@ -309,12 +309,12 @@ register_string_regex_translations <- function() { } } - register_translation("sub", arrow_r_string_replace_function(1L)) - register_translation("gsub", arrow_r_string_replace_function(-1L)) - register_translation("str_replace", arrow_stringr_string_replace_function(1L)) - register_translation("str_replace_all", arrow_stringr_string_replace_function(-1L)) + register_binding("sub", arrow_r_string_replace_function(1L)) + register_binding("gsub", arrow_r_string_replace_function(-1L)) + register_binding("str_replace", arrow_stringr_string_replace_function(1L)) + register_binding("str_replace_all", arrow_stringr_string_replace_function(-1L)) - register_translation("strsplit", function(x, split, fixed = FALSE, perl = FALSE, + register_binding("strsplit", function(x, split, fixed = FALSE, perl = FALSE, useBytes = FALSE) { assert_that(is.string(split)) @@ -333,7 +333,7 @@ register_string_regex_translations <- function() { ) }) - register_translation("str_split", function(string, pattern, n = Inf, simplify = FALSE) { + register_binding("str_split", function(string, pattern, n = Inf, simplify = FALSE) { opts <- get_stringr_pattern_options(enexpr(pattern)) arrow_fun <- ifelse(opts$fixed, "split_pattern", "split_pattern_regex") if (opts$ignore_case) { @@ -364,9 +364,9 @@ register_string_regex_translations <- function() { }) } -register_string_other_translations <- function() { +register_string_other_bindings <- function() { - register_translation("nchar", function(x, type = "chars", allowNA = FALSE, keepNA = NA) { + register_binding("nchar", function(x, type = "chars", allowNA = FALSE, keepNA = NA) { if (allowNA) { arrow_not_supported("allowNA = TRUE") } @@ -384,22 +384,22 @@ register_string_other_translations <- function() { } }) - register_translation("str_to_lower", function(string, locale = "en") { + register_binding("str_to_lower", function(string, locale = "en") { stop_if_locale_provided(locale) Expression$create("utf8_lower", string) }) - register_translation("str_to_upper", function(string, locale = "en") { + register_binding("str_to_upper", function(string, locale = "en") { stop_if_locale_provided(locale) Expression$create("utf8_upper", string) }) - register_translation("str_to_title", function(string, locale = "en") { + register_binding("str_to_title", function(string, locale = "en") { stop_if_locale_provided(locale) Expression$create("utf8_title", string) }) - register_translation("str_trim", function(string, side = c("both", "left", "right")) { + register_binding("str_trim", function(string, side = c("both", "left", "right")) { side <- match.arg(side) trim_fun <- switch(side, left = "utf8_ltrim_whitespace", @@ -409,7 +409,7 @@ register_string_other_translations <- function() { Expression$create(trim_fun, string) }) - register_translation("substr", function(x, start, stop) { + register_binding("substr", function(x, start, stop) { assert_that( length(start) == 1, msg = "`start` must be length 1 - other lengths are not supported in Arrow" @@ -441,11 +441,11 @@ register_string_other_translations <- function() { ) }) - register_translation("substring", function(text, first, last) { - call_translation("substr", x = text, start = first, stop = last) + register_binding("substring", function(text, first, last) { + call_binding("substr", x = text, start = first, stop = last) }) - register_translation("str_sub", function(string, start = 1L, end = -1L) { + register_binding("str_sub", function(string, start = 1L, end = -1L) { assert_that( length(start) == 1, msg = "`start` must be length 1 - other lengths are not supported in Arrow" @@ -482,7 +482,7 @@ register_string_other_translations <- function() { }) - register_translation("str_pad", function(string, width, side = c("left", "right", "both"), pad = " ") { + register_binding("str_pad", function(string, width, side = c("left", "right", "both"), pad = " ") { assert_that(is_integerish(width)) side <- match.arg(side) assert_that(is.string(pad)) diff --git a/r/R/dplyr-funcs-type.R b/r/R/dplyr-funcs-type.R index bf76935418757..40a6d5da13945 100644 --- a/r/R/dplyr-funcs-type.R +++ b/r/R/dplyr-funcs-type.R @@ -16,21 +16,21 @@ # under the License. # Split up into several register functions by category to satisfy the linter -register_type_translations <- function() { - register_type_cast_translations() - register_type_inspect_translations() - register_type_elementwise_translations() +register_type_bindings <- function() { + register_type_cast_bindings() + register_type_inspect_bindings() + register_type_elementwise_bindings() } -register_type_cast_translations <- function() { +register_type_cast_bindings <- function() { - register_translation("cast", function(x, target_type, safe = TRUE, ...) { + register_binding("cast", function(x, target_type, safe = TRUE, ...) { opts <- cast_options(safe, ...) opts$to_type <- as_type(target_type) Expression$create("cast", x, options = opts) }) - register_translation("dictionary_encode", function(x, + register_binding("dictionary_encode", function(x, null_encoding_behavior = c("mask", "encode")) { behavior <- toupper(match.arg(null_encoding_behavior)) null_encoding_behavior <- NullEncodingBehavior[[behavior]] @@ -43,13 +43,13 @@ register_type_cast_translations <- function() { # as.* type casting functions # as.factor() is mapped in expression.R - register_translation("as.character", function(x) { + register_binding("as.character", function(x) { Expression$create("cast", x, options = cast_options(to_type = string())) }) - register_translation("as.double", function(x) { + register_binding("as.double", function(x) { Expression$create("cast", x, options = cast_options(to_type = float64())) }) - register_translation("as.integer", function(x) { + register_binding("as.integer", function(x) { Expression$create( "cast", x, @@ -60,7 +60,7 @@ register_type_cast_translations <- function() { ) ) }) - register_translation("as.integer64", function(x) { + register_binding("as.integer64", function(x) { Expression$create( "cast", x, @@ -71,24 +71,24 @@ register_type_cast_translations <- function() { ) ) }) - register_translation("as.logical", function(x) { + register_binding("as.logical", function(x) { Expression$create("cast", x, options = cast_options(to_type = boolean())) }) - register_translation("as.numeric", function(x) { + register_binding("as.numeric", function(x) { Expression$create("cast", x, options = cast_options(to_type = float64())) }) - register_translation("is", function(object, class2) { + register_binding("is", function(object, class2) { if (is.string(class2)) { switch(class2, # for R data types, pass off to is.*() functions - character = call_translation("is.character", object), - numeric = call_translation("is.numeric", object), - integer = call_translation("is.integer", object), - integer64 = call_translation("is.integer64", object), - logical = call_translation("is.logical", object), - factor = call_translation("is.factor", object), - list = call_translation("is.list", object), + character = call_binding("is.character", object), + numeric = call_binding("is.numeric", object), + integer = call_binding("is.integer", object), + integer64 = call_binding("is.integer64", object), + logical = call_binding("is.logical", object), + factor = call_binding("is.factor", object), + list = call_binding("is.list", object), # for Arrow data types, compare class2 with object$type()$ToString(), # but first strip off any parameters to only compare the top-level data # type, and canonicalize class2 @@ -103,7 +103,7 @@ register_type_cast_translations <- function() { }) # Create a data frame/tibble/struct column - register_translation("tibble", function(..., .rows = NULL, .name_repair = NULL) { + register_binding("tibble", function(..., .rows = NULL, .name_repair = NULL) { if (!is.null(.rows)) arrow_not_supported(".rows") if (!is.null(.name_repair)) arrow_not_supported(".name_repair") @@ -122,7 +122,7 @@ register_type_cast_translations <- function() { ) }) - register_translation("data.frame", function(..., row.names = NULL, + register_binding("data.frame", function(..., row.names = NULL, check.rows = NULL, check.names = TRUE, fix.empty.names = TRUE, stringsAsFactors = FALSE) { # we need a specific value of stringsAsFactors because the default was @@ -157,73 +157,73 @@ register_type_cast_translations <- function() { }) } -register_type_inspect_translations <- function() { +register_type_inspect_bindings <- function() { # is.* type functions - register_translation("is.character", function(x) { + register_binding("is.character", function(x) { is.character(x) || (inherits(x, "Expression") && x$type_id() %in% Type[c("STRING", "LARGE_STRING")]) }) - register_translation("is.numeric", function(x) { + register_binding("is.numeric", function(x) { is.numeric(x) || (inherits(x, "Expression") && x$type_id() %in% Type[c( "UINT8", "INT8", "UINT16", "INT16", "UINT32", "INT32", "UINT64", "INT64", "HALF_FLOAT", "FLOAT", "DOUBLE", "DECIMAL128", "DECIMAL256" )]) }) - register_translation("is.double", function(x) { + register_binding("is.double", function(x) { is.double(x) || (inherits(x, "Expression") && x$type_id() == Type["DOUBLE"]) }) - register_translation("is.integer", function(x) { + register_binding("is.integer", function(x) { is.integer(x) || (inherits(x, "Expression") && x$type_id() %in% Type[c( "UINT8", "INT8", "UINT16", "INT16", "UINT32", "INT32", "UINT64", "INT64" )]) }) - register_translation("is.integer64", function(x) { + register_binding("is.integer64", function(x) { inherits(x, "integer64") || (inherits(x, "Expression") && x$type_id() == Type["INT64"]) }) - register_translation("is.logical", function(x) { + register_binding("is.logical", function(x) { is.logical(x) || (inherits(x, "Expression") && x$type_id() == Type["BOOL"]) }) - register_translation("is.factor", function(x) { + register_binding("is.factor", function(x) { is.factor(x) || (inherits(x, "Expression") && x$type_id() == Type["DICTIONARY"]) }) - register_translation("is.list", function(x) { + register_binding("is.list", function(x) { is.list(x) || (inherits(x, "Expression") && x$type_id() %in% Type[c( "LIST", "FIXED_SIZE_LIST", "LARGE_LIST" )]) }) # rlang::is_* type functions - register_translation("is_character", function(x, n = NULL) { + register_binding("is_character", function(x, n = NULL) { assert_that(is.null(n)) - call_translation("is.character", x) + call_binding("is.character", x) }) - register_translation("is_double", function(x, n = NULL, finite = NULL) { + register_binding("is_double", function(x, n = NULL, finite = NULL) { assert_that(is.null(n) && is.null(finite)) - call_translation("is.double", x) + call_binding("is.double", x) }) - register_translation("is_integer", function(x, n = NULL) { + register_binding("is_integer", function(x, n = NULL) { assert_that(is.null(n)) - call_translation("is.integer", x) + call_binding("is.integer", x) }) - register_translation("is_list", function(x, n = NULL) { + register_binding("is_list", function(x, n = NULL) { assert_that(is.null(n)) - call_translation("is.list", x) + call_binding("is.list", x) }) - register_translation("is_logical", function(x, n = NULL) { + register_binding("is_logical", function(x, n = NULL) { assert_that(is.null(n)) - call_translation("is.logical", x) + call_binding("is.logical", x) }) } -register_type_elementwise_translations <- function() { +register_type_elementwise_bindings <- function() { - register_translation("is.na", function(x) { + register_binding("is.na", function(x) { build_expr("is_null", x, options = list(nan_is_null = TRUE)) }) - register_translation("is.nan", function(x) { + register_binding("is.nan", function(x) { if (is.double(x) || (inherits(x, "Expression") && x$type_id() %in% TYPES_WITH_NAN)) { # TODO: if an option is added to the is_nan kernel to treat NA as NaN, @@ -234,19 +234,19 @@ register_type_elementwise_translations <- function() { } }) - register_translation("between", function(x, left, right) { + register_binding("between", function(x, left, right) { x >= left & x <= right }) - register_translation("is.finite", function(x) { + register_binding("is.finite", function(x) { is_fin <- Expression$create("is_finite", x) # for compatibility with base::is.finite(), return FALSE for NA_real_ - is_fin & !call_translation("is.na", is_fin) + is_fin & !call_binding("is.na", is_fin) }) - register_translation("is.infinite", function(x) { + register_binding("is.infinite", function(x) { is_inf <- Expression$create("is_inf", x) # for compatibility with base::is.infinite(), return FALSE for NA_real_ - is_inf & !call_translation("is.na", is_inf) + is_inf & !call_binding("is.na", is_inf) }) } diff --git a/r/R/dplyr-funcs.R b/r/R/dplyr-funcs.R index 7f2161b26ba7f..9bbb56029b763 100644 --- a/r/R/dplyr-funcs.R +++ b/r/R/dplyr-funcs.R @@ -22,7 +22,7 @@ NULL #' Register compute translations #' -#' The `register_translation()` and `register_translation_agg()` functions +#' The `register_binding()` and `register_binding_agg()` functions #' are used to populate a list of functions that operate on (and return) #' Expressions. These are the basis for the `.data` mask inside dplyr methods. #' @@ -57,7 +57,7 @@ NULL #' registered function existed. #' @keywords internal #' -register_translation <- function(fun_name, fun, registry = translation_registry()) { +register_binding <- function(fun_name, fun, registry = translation_registry()) { name <- gsub("^.*?::", "", fun_name) namespace <- gsub("::.*$", "", fun_name) @@ -72,8 +72,8 @@ register_translation <- function(fun_name, fun, registry = translation_registry( invisible(previous_fun) } -register_translation_agg <- function(fun_name, agg_fun, registry = translation_registry_agg()) { - register_translation(fun_name, agg_fun, registry = registry) +register_binding_agg <- function(fun_name, agg_fun, registry = translation_registry_agg()) { + register_binding(fun_name, agg_fun, registry = registry) } translation_registry <- function() { @@ -85,16 +85,16 @@ translation_registry_agg <- function() { } # Supports functions and tests that call previously-defined translations. -call_translation <- function(fun_name, ...) { +call_binding <- function(fun_name, ...) { nse_funcs[[fun_name]](...) } -call_translation_agg <- function(fun_name, ...) { +call_binding_agg <- function(fun_name, ...) { agg_funcs[[fun_name]](...) } # Called in .onLoad() -create_translation_cache <- function() { +create_binding_cache <- function() { arrow_funcs <- list() # Register all available Arrow Compute functions, namespaced as arrow_fun. @@ -110,13 +110,13 @@ create_translation_cache <- function() { } # Register translations into nse_funcs and agg_funcs - register_array_function_map_translations() - register_aggregate_translations() - register_conditional_translations() - register_datetime_translations() - register_math_translations() - register_string_translations() - register_type_translations() + register_array_function_map_bindings() + register_aggregate_bindings() + register_conditional_bindings() + register_datetime_bindings() + register_math_bindings() + register_string_bindings() + register_type_bindings() # We only create the cache for nse_funcs and not agg_funcs .cache$functions <- c(as.list(nse_funcs), arrow_funcs) diff --git a/r/R/dplyr-summarize.R b/r/R/dplyr-summarize.R index 7d30602199ed5..5be29a3fd29ee 100644 --- a/r/R/dplyr-summarize.R +++ b/r/R/dplyr-summarize.R @@ -55,51 +55,51 @@ agg_fun_output_type <- function(fun, input_type, hash) { } } -register_aggregate_translations <- function() { +register_aggregate_bindings <- function() { - register_translation_agg("sum", function(..., na.rm = FALSE) { + register_binding_agg("sum", function(..., na.rm = FALSE) { list( fun = "sum", data = ensure_one_arg(list2(...), "sum"), options = list(skip_nulls = na.rm, min_count = 0L) ) }) - register_translation_agg("any", function(..., na.rm = FALSE) { + register_binding_agg("any", function(..., na.rm = FALSE) { list( fun = "any", data = ensure_one_arg(list2(...), "any"), options = list(skip_nulls = na.rm, min_count = 0L) ) }) - register_translation_agg("all", function(..., na.rm = FALSE) { + register_binding_agg("all", function(..., na.rm = FALSE) { list( fun = "all", data = ensure_one_arg(list2(...), "all"), options = list(skip_nulls = na.rm, min_count = 0L) ) }) - register_translation_agg("mean", function(x, na.rm = FALSE) { + register_binding_agg("mean", function(x, na.rm = FALSE) { list( fun = "mean", data = x, options = list(skip_nulls = na.rm, min_count = 0L) ) }) - register_translation_agg("sd", function(x, na.rm = FALSE, ddof = 1) { + register_binding_agg("sd", function(x, na.rm = FALSE, ddof = 1) { list( fun = "stddev", data = x, options = list(skip_nulls = na.rm, min_count = 0L, ddof = ddof) ) }) - register_translation_agg("var", function(x, na.rm = FALSE, ddof = 1) { + register_binding_agg("var", function(x, na.rm = FALSE, ddof = 1) { list( fun = "variance", data = x, options = list(skip_nulls = na.rm, min_count = 0L, ddof = ddof) ) }) - register_translation_agg("quantile", function(x, probs, na.rm = FALSE) { + register_binding_agg("quantile", function(x, probs, na.rm = FALSE) { if (length(probs) != 1) { arrow_not_supported("quantile() with length(probs) != 1") } @@ -116,7 +116,7 @@ register_aggregate_translations <- function() { options = list(skip_nulls = na.rm, q = probs) ) }) - register_translation_agg("median", function(x, na.rm = FALSE) { + register_binding_agg("median", function(x, na.rm = FALSE) { # TODO: Bind to the Arrow function that returns an exact median and remove # this warning (ARROW-14021) warn( @@ -130,28 +130,28 @@ register_aggregate_translations <- function() { options = list(skip_nulls = na.rm) ) }) - register_translation_agg("n_distinct", function(..., na.rm = FALSE) { + register_binding_agg("n_distinct", function(..., na.rm = FALSE) { list( fun = "count_distinct", data = ensure_one_arg(list2(...), "n_distinct"), options = list(na.rm = na.rm) ) }) - register_translation_agg("n", function() { + register_binding_agg("n", function() { list( fun = "sum", data = Expression$scalar(1L), options = list() ) }) - register_translation_agg("min", function(..., na.rm = FALSE) { + register_binding_agg("min", function(..., na.rm = FALSE) { list( fun = "min", data = ensure_one_arg(list2(...), "min"), options = list(skip_nulls = na.rm, min_count = 0L) ) }) - register_translation_agg("max", function(..., na.rm = FALSE) { + register_binding_agg("max", function(..., na.rm = FALSE) { list( fun = "max", data = ensure_one_arg(list2(...), "max"), diff --git a/r/R/expression.R b/r/R/expression.R index 7f0d7f5e9b163..d1b88f5b853e6 100644 --- a/r/R/expression.R +++ b/r/R/expression.R @@ -106,7 +106,7 @@ .array_function_map <- c(.unary_function_map, .binary_function_map) -register_array_function_map_translations <- function() { +register_array_function_map_bindings <- function() { # use a function to generate the binding so that `operator` persists # beyond execution time (another option would be to use quasiquotation # and unquote `operator` directly into the function expression) @@ -116,7 +116,7 @@ register_array_function_map_translations <- function() { } for (name in names(.array_function_map)) { - register_translation(name, array_function_map_factory(name)) + register_binding(name, array_function_map_factory(name)) } } diff --git a/r/man/register_translation.Rd b/r/man/register_binding.Rd similarity index 89% rename from r/man/register_translation.Rd rename to r/man/register_binding.Rd index 3edcf71a214bb..3c261e30bffbe 100644 --- a/r/man/register_translation.Rd +++ b/r/man/register_binding.Rd @@ -1,10 +1,10 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/dplyr-funcs.R -\name{register_translation} -\alias{register_translation} +\name{register_binding} +\alias{register_binding} \title{Register compute translations} \usage{ -register_translation(fun_name, fun, registry = translation_registry()) +register_binding(fun_name, fun, registry = translation_registry()) } \arguments{ \item{fun_name}{A function name in the form \code{"function"} or @@ -32,7 +32,7 @@ The previously registered function or \code{NULL} if no previously registered function existed. } \description{ -The \code{register_translation()} and \code{register_translation_agg()} functions +The \code{register_binding()} and \code{register_binding_agg()} functions are used to populate a list of functions that operate on (and return) Expressions. These are the basis for the \code{.data} mask inside dplyr methods. } diff --git a/r/tests/testthat/test-dplyr-funcs-conditional.R b/r/tests/testthat/test-dplyr-funcs-conditional.R index 7258d20043dc3..80a2357c0cdc9 100644 --- a/r/tests/testthat/test-dplyr-funcs-conditional.R +++ b/r/tests/testthat/test-dplyr-funcs-conditional.R @@ -407,7 +407,7 @@ test_that("coalesce()", { # no arguments expect_error( - call_translation("coalesce"), + call_binding("coalesce"), "At least one argument must be supplied to coalesce()", fixed = TRUE ) diff --git a/r/tests/testthat/test-dplyr-funcs-datetime.R b/r/tests/testthat/test-dplyr-funcs-datetime.R index d21bc31f9701e..577770a5af4b1 100644 --- a/r/tests/testthat/test-dplyr-funcs-datetime.R +++ b/r/tests/testthat/test-dplyr-funcs-datetime.R @@ -114,7 +114,7 @@ test_that("errors in strptime", { # Error when tz is passed x <- Expression$field_ref("x") expect_error( - call_translation("strptime", x, tz = "PDT"), + call_binding("strptime", x, tz = "PDT"), "Time zone argument not supported in Arrow" ) }) diff --git a/r/tests/testthat/test-dplyr-funcs-math.R b/r/tests/testthat/test-dplyr-funcs-math.R index f6831ed0fbdcb..88d39140715da 100644 --- a/r/tests/testthat/test-dplyr-funcs-math.R +++ b/r/tests/testthat/test-dplyr-funcs-math.R @@ -177,14 +177,14 @@ test_that("log functions", { # test log(, base = (length != 1)) expect_error( - call_translation("log", 10, base = 5:6), + call_binding("log", 10, base = 5:6), "base must be a column or a length-1 numeric; other values not supported in Arrow", fixed = TRUE ) # test log(x = (length != 1)) expect_error( - call_translation("log", 10:11), + call_binding("log", 10:11), "x must be a column or a length-1 numeric; other values not supported in Arrow", fixed = TRUE ) diff --git a/r/tests/testthat/test-dplyr-funcs-string.R b/r/tests/testthat/test-dplyr-funcs-string.R index c7656561da3a3..060a2ce8f1c81 100644 --- a/r/tests/testthat/test-dplyr-funcs-string.R +++ b/r/tests/testthat/test-dplyr-funcs-string.R @@ -121,7 +121,7 @@ test_that("paste, paste0, and str_c", { # sep is literal NA # errors in paste() (consistent with base::paste()) expect_error( - call_translation("paste", x, y, sep = NA_character_), + call_binding("paste", x, y, sep = NA_character_), "Invalid separator" ) # emits null in str_c() (consistent with stringr::str_c()) @@ -156,25 +156,25 @@ test_that("paste, paste0, and str_c", { # collapse argument not supported expect_error( - call_translation("paste", x, y, collapse = ""), + call_binding("paste", x, y, collapse = ""), "collapse" ) expect_error( - call_translation("paste0", x, y, collapse = ""), + call_binding("paste0", x, y, collapse = ""), "collapse" ) expect_error( - call_translation("str_c", x, y, collapse = ""), + call_binding("str_c", x, y, collapse = ""), "collapse" ) # literal vectors of length != 1 not supported expect_error( - call_translation("paste", x, character(0), y), + call_binding("paste", x, character(0), y), "Literal vectors of length != 1 not supported in string concatenation" ) expect_error( - call_translation("paste", x, c(",", ";"), y), + call_binding("paste", x, c(",", ";"), y), "Literal vectors of length != 1 not supported in string concatenation" ) }) @@ -501,7 +501,7 @@ test_that("str_to_lower, str_to_upper, and str_to_title", { # Error checking a single function because they all use the same code path. expect_error( - call_translation("str_to_lower", "Apache Arrow", locale = "sp"), + call_binding("str_to_lower", "Apache Arrow", locale = "sp"), "Providing a value for 'locale' other than the default ('en') is not supported in Arrow", fixed = TRUE ) @@ -565,27 +565,27 @@ test_that("errors and warnings in string splitting", { x <- Expression$field_ref("x") expect_error( - call_translation("str_split", x, fixed("and", ignore_case = TRUE)), + call_binding("str_split", x, fixed("and", ignore_case = TRUE)), "Case-insensitive string splitting not supported in Arrow" ) expect_error( - call_translation("str_split", x, coll("and.?")), + call_binding("str_split", x, coll("and.?")), "Pattern modifier `coll()` not supported in Arrow", fixed = TRUE ) expect_error( - call_translation("str_split", x, boundary(type = "word")), + call_binding("str_split", x, boundary(type = "word")), "Pattern modifier `boundary()` not supported in Arrow", fixed = TRUE ) expect_error( - call_translation("str_split", x, "and", n = 0), + call_binding("str_split", x, "and", n = 0), "Splitting strings into zero parts not supported in Arrow" ) # This condition generates a warning expect_warning( - call_translation("str_split", x, fixed("and"), simplify = TRUE), + call_binding("str_split", x, fixed("and"), simplify = TRUE), "Argument 'simplify = TRUE' will be ignored" ) }) @@ -594,19 +594,19 @@ test_that("errors and warnings in string detection and replacement", { x <- Expression$field_ref("x") expect_error( - call_translation("str_detect", x, boundary(type = "character")), + call_binding("str_detect", x, boundary(type = "character")), "Pattern modifier `boundary()` not supported in Arrow", fixed = TRUE ) expect_error( - call_translation("str_replace_all", x, coll("o", locale = "en"), "ó"), + call_binding("str_replace_all", x, coll("o", locale = "en"), "ó"), "Pattern modifier `coll()` not supported in Arrow", fixed = TRUE ) # This condition generates a warning expect_warning( - call_translation("str_replace_all", x, regex("o", multiline = TRUE), "u"), + call_binding("str_replace_all", x, regex("o", multiline = TRUE), "u"), "Ignoring pattern modifier argument not supported in Arrow: \"multiline\"" ) }) @@ -937,18 +937,18 @@ test_that("substr", { ) expect_error( - call_translation("substr", "Apache Arrow", c(1, 2), 3), + call_binding("substr", "Apache Arrow", c(1, 2), 3), "`start` must be length 1 - other lengths are not supported in Arrow" ) expect_error( - call_translation("substr", "Apache Arrow", 1, c(2, 3)), + call_binding("substr", "Apache Arrow", 1, c(2, 3)), "`stop` must be length 1 - other lengths are not supported in Arrow" ) }) test_that("substring", { - # translation for substring just calls call_translation("substr", ...), + # translation for substring just calls call_binding("substr", ...), # tested extensively above df <- tibble(x = "Apache Arrow") @@ -1034,12 +1034,12 @@ test_that("str_sub", { ) expect_error( - call_translation("str_sub", "Apache Arrow", c(1, 2), 3), + call_binding("str_sub", "Apache Arrow", c(1, 2), 3), "`start` must be length 1 - other lengths are not supported in Arrow" ) expect_error( - call_translation("str_sub", "Apache Arrow", 1, c(2, 3)), + call_binding("str_sub", "Apache Arrow", 1, c(2, 3)), "`end` must be length 1 - other lengths are not supported in Arrow" ) }) @@ -1168,7 +1168,7 @@ test_that("str_count", { df ) - # call_translation("str_count", ) is not vectorised over pattern + # call_binding("str_count", ) is not vectorised over pattern compare_dplyr_binding( .input %>% mutate(let_count = str_count(cities, pattern = c("a", "b", "e", "g", "p", "n", "s"))) %>% diff --git a/r/tests/testthat/test-dplyr-funcs.R b/r/tests/testthat/test-dplyr-funcs.R index 233fcb78fbcac..54ee5159748f1 100644 --- a/r/tests/testthat/test-dplyr-funcs.R +++ b/r/tests/testthat/test-dplyr-funcs.R @@ -15,26 +15,26 @@ # specific language governing permissions and limitations # under the License. -test_that("register_translation() works", { +test_that("register_binding() works", { fake_registry <- new.env(parent = emptyenv()) fun1 <- function() NULL - expect_null(register_translation("some_fun", fun1, fake_registry)) + expect_null(register_binding("some_fun", fun1, fake_registry)) expect_identical(fake_registry$some_fun, fun1) - expect_identical(register_translation("some_fun", NULL, fake_registry), fun1) + expect_identical(register_binding("some_fun", NULL, fake_registry), fun1) expect_false("some_fun" %in% names(fake_registry)) - expect_silent(expect_null(register_translation("some_fun", NULL, fake_registry))) + expect_silent(expect_null(register_binding("some_fun", NULL, fake_registry))) - expect_null(register_translation("some_pkg::some_fun", fun1, fake_registry)) + expect_null(register_binding("some_pkg::some_fun", fun1, fake_registry)) expect_identical(fake_registry$some_fun, fun1) }) -test_that("register_translation_agg() works", { +test_that("register_binding_agg() works", { fake_registry <- new.env(parent = emptyenv()) fun1 <- function() NULL - expect_null(register_translation_agg("some_fun", fun1, fake_registry)) + expect_null(register_binding_agg("some_fun", fun1, fake_registry)) expect_identical(fake_registry$some_fun, fun1) }) diff --git a/r/tests/testthat/test-dplyr-summarize.R b/r/tests/testthat/test-dplyr-summarize.R index 289135bc1382b..7b2bdc517bbe9 100644 --- a/r/tests/testthat/test-dplyr-summarize.R +++ b/r/tests/testthat/test-dplyr-summarize.R @@ -276,18 +276,18 @@ test_that("Functions that take ... but we only accept a single arg", { ) # Now that we've demonstrated that the whole machinery works, let's test # the agg_funcs directly - expect_error(call_translation_agg("n_distinct"), "n_distinct() with 0 arguments", fixed = TRUE) - expect_error(call_translation_agg("sum"), "sum() with 0 arguments", fixed = TRUE) - expect_error(call_translation_agg("any"), "any() with 0 arguments", fixed = TRUE) - expect_error(call_translation_agg("all"), "all() with 0 arguments", fixed = TRUE) - expect_error(call_translation_agg("min"), "min() with 0 arguments", fixed = TRUE) - expect_error(call_translation_agg("max"), "max() with 0 arguments", fixed = TRUE) - expect_error(call_translation_agg("n_distinct", 1, 2), "Multiple arguments to n_distinct()") - expect_error(call_translation_agg("sum", 1, 2), "Multiple arguments to sum") - expect_error(call_translation_agg("any", 1, 2), "Multiple arguments to any()") - expect_error(call_translation_agg("all", 1, 2), "Multiple arguments to all()") - expect_error(call_translation_agg("min", 1, 2), "Multiple arguments to min()") - expect_error(call_translation_agg("max", 1, 2), "Multiple arguments to max()") + expect_error(call_binding_agg("n_distinct"), "n_distinct() with 0 arguments", fixed = TRUE) + expect_error(call_binding_agg("sum"), "sum() with 0 arguments", fixed = TRUE) + expect_error(call_binding_agg("any"), "any() with 0 arguments", fixed = TRUE) + expect_error(call_binding_agg("all"), "all() with 0 arguments", fixed = TRUE) + expect_error(call_binding_agg("min"), "min() with 0 arguments", fixed = TRUE) + expect_error(call_binding_agg("max"), "max() with 0 arguments", fixed = TRUE) + expect_error(call_binding_agg("n_distinct", 1, 2), "Multiple arguments to n_distinct()") + expect_error(call_binding_agg("sum", 1, 2), "Multiple arguments to sum") + expect_error(call_binding_agg("any", 1, 2), "Multiple arguments to any()") + expect_error(call_binding_agg("all", 1, 2), "Multiple arguments to all()") + expect_error(call_binding_agg("min", 1, 2), "Multiple arguments to min()") + expect_error(call_binding_agg("max", 1, 2), "Multiple arguments to max()") }) test_that("median()", { From 3d3c56afce99a841b1b7d10ce8b5ab24b05299ba Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Mon, 13 Dec 2021 21:25:37 -0400 Subject: [PATCH 37/49] more translation -> binding --- r/R/dplyr-funcs.R | 20 ++++++++++---------- r/man/register_binding.Rd | 10 +++++----- r/tests/testthat/test-dplyr-funcs-string.R | 2 +- r/tests/testthat/test-dplyr-funcs.R | 6 +++--- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/r/R/dplyr-funcs.R b/r/R/dplyr-funcs.R index 9bbb56029b763..62f291dfe4119 100644 --- a/r/R/dplyr-funcs.R +++ b/r/R/dplyr-funcs.R @@ -20,20 +20,20 @@ NULL -#' Register compute translations +#' Register compute bindings #' #' The `register_binding()` and `register_binding_agg()` functions #' are used to populate a list of functions that operate on (and return) #' Expressions. These are the basis for the `.data` mask inside dplyr methods. #' -#' @section Writing translations: +#' @section Writing bindings: #' When to use `build_expr()` vs. `Expression$create()`? #' #' Use `build_expr()` if you need to #' - map R function names to Arrow C++ functions #' - wrap R inputs (vectors) as Array/Scalar #' -#' `Expression$create()` is lower level. Most of the translations use it +#' `Expression$create()` is lower level. Most of the bindings use it #' because they manage the preparation of the user-provided inputs #' and don't need or don't want to the automatic conversion of R objects #' to [Scalar]. @@ -53,11 +53,11 @@ NULL #' @param registry An `environment()` in which the functions should be #' assigned. #' -#' @return The previously registered function or `NULL` if no previously +#' @return The previously registered binding or `NULL` if no previously #' registered function existed. #' @keywords internal #' -register_binding <- function(fun_name, fun, registry = translation_registry()) { +register_binding <- function(fun_name, fun, registry = binding_registry()) { name <- gsub("^.*?::", "", fun_name) namespace <- gsub("::.*$", "", fun_name) @@ -72,19 +72,19 @@ register_binding <- function(fun_name, fun, registry = translation_registry()) { invisible(previous_fun) } -register_binding_agg <- function(fun_name, agg_fun, registry = translation_registry_agg()) { +register_binding_agg <- function(fun_name, agg_fun, registry = binding_registry_agg()) { register_binding(fun_name, agg_fun, registry = registry) } -translation_registry <- function() { +binding_registry <- function() { nse_funcs } -translation_registry_agg <- function() { +binding_registry_agg <- function() { agg_funcs } -# Supports functions and tests that call previously-defined translations. +# Supports functions and tests that call previously-defined bindings call_binding <- function(fun_name, ...) { nse_funcs[[fun_name]](...) } @@ -109,7 +109,7 @@ create_binding_cache <- function() { ) } - # Register translations into nse_funcs and agg_funcs + # Register bindings into nse_funcs and agg_funcs register_array_function_map_bindings() register_aggregate_bindings() register_conditional_bindings() diff --git a/r/man/register_binding.Rd b/r/man/register_binding.Rd index 3c261e30bffbe..ff01d8d2a6f5a 100644 --- a/r/man/register_binding.Rd +++ b/r/man/register_binding.Rd @@ -2,9 +2,9 @@ % Please edit documentation in R/dplyr-funcs.R \name{register_binding} \alias{register_binding} -\title{Register compute translations} +\title{Register compute bindings} \usage{ -register_binding(fun_name, fun, registry = translation_registry()) +register_binding(fun_name, fun, registry = binding_registry()) } \arguments{ \item{fun_name}{A function name in the form \code{"function"} or @@ -28,7 +28,7 @@ arguments and return a \code{list()} with components: }} } \value{ -The previously registered function or \code{NULL} if no previously +The previously registered binding or \code{NULL} if no previously registered function existed. } \description{ @@ -36,7 +36,7 @@ The \code{register_binding()} and \code{register_binding_agg()} functions are used to populate a list of functions that operate on (and return) Expressions. These are the basis for the \code{.data} mask inside dplyr methods. } -\section{Writing translations}{ +\section{Writing bindings}{ When to use \code{build_expr()} vs. \code{Expression$create()}? @@ -46,7 +46,7 @@ Use \code{build_expr()} if you need to \item wrap R inputs (vectors) as Array/Scalar } -\code{Expression$create()} is lower level. Most of the translations use it +\code{Expression$create()} is lower level. Most of the bindings use it because they manage the preparation of the user-provided inputs and don't need or don't want to the automatic conversion of R objects to \link{Scalar}. diff --git a/r/tests/testthat/test-dplyr-funcs-string.R b/r/tests/testthat/test-dplyr-funcs-string.R index 060a2ce8f1c81..571b26332f840 100644 --- a/r/tests/testthat/test-dplyr-funcs-string.R +++ b/r/tests/testthat/test-dplyr-funcs-string.R @@ -948,7 +948,7 @@ test_that("substr", { }) test_that("substring", { - # translation for substring just calls call_binding("substr", ...), + # binding for substring just calls call_binding("substr", ...), # tested extensively above df <- tibble(x = "Apache Arrow") diff --git a/r/tests/testthat/test-dplyr-funcs.R b/r/tests/testthat/test-dplyr-funcs.R index 54ee5159748f1..11a5dbecdc633 100644 --- a/r/tests/testthat/test-dplyr-funcs.R +++ b/r/tests/testthat/test-dplyr-funcs.R @@ -38,7 +38,7 @@ test_that("register_binding_agg() works", { expect_identical(fake_registry$some_fun, fun1) }) -test_that("translation_registry() works", { - expect_identical(translation_registry(), nse_funcs) - expect_identical(translation_registry_agg(), agg_funcs) +test_that("binding_registry() works", { + expect_identical(binding_registry(), nse_funcs) + expect_identical(binding_registry_agg(), agg_funcs) }) From 5ec8e411438ca0bbe4bc6bb39896ed3667e0c4ef Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Wed, 22 Dec 2021 08:21:36 -0400 Subject: [PATCH 38/49] Update r/R/dplyr-funcs.R Co-authored-by: Ian Cook --- r/R/dplyr-funcs.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r/R/dplyr-funcs.R b/r/R/dplyr-funcs.R index 62f291dfe4119..0ac1618bf75b9 100644 --- a/r/R/dplyr-funcs.R +++ b/r/R/dplyr-funcs.R @@ -38,7 +38,7 @@ NULL #' and don't need or don't want to the automatic conversion of R objects #' to [Scalar]. #' -#' @param fun_name A function name in the form `"function"` or +#' @param fun_name A string containing a function name in the form `"function"` or #' `"package::function"`. The package name is currently not used but #' may be used in the future to allow these types of function calls. #' @param fun A function or `NULL` to un-register a previous function. From 1ddd9e14c83d914e959292097a6578579dc8468d Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Wed, 22 Dec 2021 08:21:45 -0400 Subject: [PATCH 39/49] Update r/R/dplyr-funcs.R Co-authored-by: Ian Cook --- r/R/dplyr-funcs.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r/R/dplyr-funcs.R b/r/R/dplyr-funcs.R index 0ac1618bf75b9..f8aabbfa37777 100644 --- a/r/R/dplyr-funcs.R +++ b/r/R/dplyr-funcs.R @@ -50,7 +50,7 @@ NULL #' - `fun`: string function name #' - `data`: `Expression` (these are all currently a single field) #' - `options`: list of function options, as passed to call_function -#' @param registry An `environment()` in which the functions should be +#' @param registry An environment in which the functions should be #' assigned. #' #' @return The previously registered binding or `NULL` if no previously From bf510e72b96896532519f76e330172d4de466779 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Wed, 22 Dec 2021 08:22:57 -0400 Subject: [PATCH 40/49] redocument --- r/man/register_binding.Rd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/r/man/register_binding.Rd b/r/man/register_binding.Rd index ff01d8d2a6f5a..d4ad67a516cf9 100644 --- a/r/man/register_binding.Rd +++ b/r/man/register_binding.Rd @@ -7,7 +7,7 @@ register_binding(fun_name, fun, registry = binding_registry()) } \arguments{ -\item{fun_name}{A function name in the form \code{"function"} or +\item{fun_name}{A string containing a function name in the form \code{"function"} or \code{"package::function"}. The package name is currently not used but may be used in the future to allow these types of function calls.} @@ -15,7 +15,7 @@ may be used in the future to allow these types of function calls.} This function must accept \code{Expression} objects as arguments and return \code{Expression} objects instead of regular R objects.} -\item{registry}{An \code{environment()} in which the functions should be +\item{registry}{An environment in which the functions should be assigned.} \item{agg_fun}{An aggregate function or \code{NULL} to un-register a previous From 8d1ffa6aaa49b44d346d5da3748fbfffb2794efb Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Wed, 22 Dec 2021 08:35:55 -0400 Subject: [PATCH 41/49] remove translation_registry() functions --- r/R/dplyr-funcs.R | 12 ++---------- r/man/register_binding.Rd | 2 +- r/tests/testthat/test-dplyr-funcs.R | 5 ----- 3 files changed, 3 insertions(+), 16 deletions(-) diff --git a/r/R/dplyr-funcs.R b/r/R/dplyr-funcs.R index f8aabbfa37777..978a21c8a859d 100644 --- a/r/R/dplyr-funcs.R +++ b/r/R/dplyr-funcs.R @@ -57,7 +57,7 @@ NULL #' registered function existed. #' @keywords internal #' -register_binding <- function(fun_name, fun, registry = binding_registry()) { +register_binding <- function(fun_name, fun, registry = nse_funcs) { name <- gsub("^.*?::", "", fun_name) namespace <- gsub("::.*$", "", fun_name) @@ -72,18 +72,10 @@ register_binding <- function(fun_name, fun, registry = binding_registry()) { invisible(previous_fun) } -register_binding_agg <- function(fun_name, agg_fun, registry = binding_registry_agg()) { +register_binding_agg <- function(fun_name, agg_fun, registry = agg_funcs) { register_binding(fun_name, agg_fun, registry = registry) } -binding_registry <- function() { - nse_funcs -} - -binding_registry_agg <- function() { - agg_funcs -} - # Supports functions and tests that call previously-defined bindings call_binding <- function(fun_name, ...) { nse_funcs[[fun_name]](...) diff --git a/r/man/register_binding.Rd b/r/man/register_binding.Rd index d4ad67a516cf9..e776e7b3f5b8c 100644 --- a/r/man/register_binding.Rd +++ b/r/man/register_binding.Rd @@ -4,7 +4,7 @@ \alias{register_binding} \title{Register compute bindings} \usage{ -register_binding(fun_name, fun, registry = binding_registry()) +register_binding(fun_name, fun, registry = nse_funcs) } \arguments{ \item{fun_name}{A string containing a function name in the form \code{"function"} or diff --git a/r/tests/testthat/test-dplyr-funcs.R b/r/tests/testthat/test-dplyr-funcs.R index 11a5dbecdc633..d96b4b2cf878a 100644 --- a/r/tests/testthat/test-dplyr-funcs.R +++ b/r/tests/testthat/test-dplyr-funcs.R @@ -37,8 +37,3 @@ test_that("register_binding_agg() works", { expect_null(register_binding_agg("some_fun", fun1, fake_registry)) expect_identical(fake_registry$some_fun, fun1) }) - -test_that("binding_registry() works", { - expect_identical(binding_registry(), nse_funcs) - expect_identical(binding_registry_agg(), agg_funcs) -}) From 9e24621ff4c13cfa21b4f3c3203e11d768c24e08 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Wed, 22 Dec 2021 09:02:45 -0400 Subject: [PATCH 42/49] register_bindings_X instead of register_X_bindings --- r/R/dplyr-funcs-conditional.R | 2 +- r/R/dplyr-funcs-datetime.R | 2 +- r/R/dplyr-funcs-math.R | 2 +- r/R/dplyr-funcs-string.R | 14 +++++++------- r/R/dplyr-funcs-type.R | 14 +++++++------- r/R/dplyr-funcs.R | 14 +++++++------- r/R/dplyr-summarize.R | 2 +- r/R/expression.R | 2 +- 8 files changed, 26 insertions(+), 26 deletions(-) diff --git a/r/R/dplyr-funcs-conditional.R b/r/R/dplyr-funcs-conditional.R index 70a57a36ad9d3..67281a10a1870 100644 --- a/r/R/dplyr-funcs-conditional.R +++ b/r/R/dplyr-funcs-conditional.R @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. -register_conditional_bindings <- function() { +register_bindings_conditional <- function() { register_binding("coalesce", function(...) { args <- list2(...) diff --git a/r/R/dplyr-funcs-datetime.R b/r/R/dplyr-funcs-datetime.R index 0e3a19e353dde..4ff852187ff68 100644 --- a/r/R/dplyr-funcs-datetime.R +++ b/r/R/dplyr-funcs-datetime.R @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. -register_datetime_bindings <- function() { +register_bindings_datetime <- function() { register_binding("strptime", function(x, format = "%Y-%m-%d %H:%M:%S", tz = NULL, unit = "ms") { diff --git a/r/R/dplyr-funcs-math.R b/r/R/dplyr-funcs-math.R index 4b3f69e03144e..f930fed2a79e8 100644 --- a/r/R/dplyr-funcs-math.R +++ b/r/R/dplyr-funcs-math.R @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. -register_math_bindings <- function() { +register_bindings_math <- function() { log_binding <- function(x, base = exp(1)) { # like other binary functions, either `x` or `base` can be Expression or double(1) diff --git a/r/R/dplyr-funcs-string.R b/r/R/dplyr-funcs-string.R index 590c28bb8e5ea..0d28ec858c0fd 100644 --- a/r/R/dplyr-funcs-string.R +++ b/r/R/dplyr-funcs-string.R @@ -126,13 +126,13 @@ stop_if_locale_provided <- function(locale) { # Split up into several register functions by category to satisfy the linter -register_string_bindings <- function() { - register_string_join_bindings() - register_string_regex_bindings() - register_string_other_bindings() +register_bindings_string <- function() { + register_bindings_string_join() + register_bindings_string_regex() + register_bindings_string_other() } -register_string_join_bindings <- function() { +register_bindings_string_join <- function() { arrow_string_join_function <- function(null_handling, null_replacement = NULL) { # the `binary_join_element_wise` Arrow C++ compute kernel takes the separator @@ -190,7 +190,7 @@ register_string_join_bindings <- function() { }) } -register_string_regex_bindings <- function() { +register_bindings_string_regex <- function() { register_binding("grepl", function(pattern, x, ignore.case = FALSE, fixed = FALSE) { arrow_fun <- ifelse(fixed, "match_substring", "match_substring_regex") @@ -364,7 +364,7 @@ register_string_regex_bindings <- function() { }) } -register_string_other_bindings <- function() { +register_bindings_string_other <- function() { register_binding("nchar", function(x, type = "chars", allowNA = FALSE, keepNA = NA) { if (allowNA) { diff --git a/r/R/dplyr-funcs-type.R b/r/R/dplyr-funcs-type.R index 40a6d5da13945..b8bfb52113ed0 100644 --- a/r/R/dplyr-funcs-type.R +++ b/r/R/dplyr-funcs-type.R @@ -16,13 +16,13 @@ # under the License. # Split up into several register functions by category to satisfy the linter -register_type_bindings <- function() { - register_type_cast_bindings() - register_type_inspect_bindings() - register_type_elementwise_bindings() +register_bindings_type <- function() { + register_bindings_type_cast() + register_bindings_type_inspect() + register_bindings_type_elementwise() } -register_type_cast_bindings <- function() { +register_bindings_type_cast <- function() { register_binding("cast", function(x, target_type, safe = TRUE, ...) { opts <- cast_options(safe, ...) @@ -157,7 +157,7 @@ register_type_cast_bindings <- function() { }) } -register_type_inspect_bindings <- function() { +register_bindings_type_inspect <- function() { # is.* type functions register_binding("is.character", function(x) { is.character(x) || (inherits(x, "Expression") && @@ -217,7 +217,7 @@ register_type_inspect_bindings <- function() { }) } -register_type_elementwise_bindings <- function() { +register_bindings_type_elementwise <- function() { register_binding("is.na", function(x) { build_expr("is_null", x, options = list(nan_is_null = TRUE)) diff --git a/r/R/dplyr-funcs.R b/r/R/dplyr-funcs.R index 978a21c8a859d..4d7cb3bc63d4d 100644 --- a/r/R/dplyr-funcs.R +++ b/r/R/dplyr-funcs.R @@ -102,13 +102,13 @@ create_binding_cache <- function() { } # Register bindings into nse_funcs and agg_funcs - register_array_function_map_bindings() - register_aggregate_bindings() - register_conditional_bindings() - register_datetime_bindings() - register_math_bindings() - register_string_bindings() - register_type_bindings() + register_bindings_array_function_map() + register_bindings_aggregate() + register_bindings_conditional() + register_bindings_datetime() + register_bindings_math() + register_bindings_string() + register_bindings_type() # We only create the cache for nse_funcs and not agg_funcs .cache$functions <- c(as.list(nse_funcs), arrow_funcs) diff --git a/r/R/dplyr-summarize.R b/r/R/dplyr-summarize.R index 5be29a3fd29ee..2a126c72964be 100644 --- a/r/R/dplyr-summarize.R +++ b/r/R/dplyr-summarize.R @@ -55,7 +55,7 @@ agg_fun_output_type <- function(fun, input_type, hash) { } } -register_aggregate_bindings <- function() { +register_bindings_aggregate <- function() { register_binding_agg("sum", function(..., na.rm = FALSE) { list( diff --git a/r/R/expression.R b/r/R/expression.R index d1b88f5b853e6..37fc21c25c4ec 100644 --- a/r/R/expression.R +++ b/r/R/expression.R @@ -106,7 +106,7 @@ .array_function_map <- c(.unary_function_map, .binary_function_map) -register_array_function_map_bindings <- function() { +register_bindings_array_function_map <- function() { # use a function to generate the binding so that `operator` persists # beyond execution time (another option would be to use quasiquotation # and unquote `operator` directly into the function expression) From c01f5d826f4543b9f30643fb1a26398c12e45c6b Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Thu, 30 Dec 2021 17:39:38 -0400 Subject: [PATCH 43/49] Update r/R/dplyr-funcs-datetime.R Co-authored-by: Jonathan Keane --- r/R/dplyr-funcs-datetime.R | 1 - 1 file changed, 1 deletion(-) diff --git a/r/R/dplyr-funcs-datetime.R b/r/R/dplyr-funcs-datetime.R index 4ff852187ff68..2eedc03ad838e 100644 --- a/r/R/dplyr-funcs-datetime.R +++ b/r/R/dplyr-funcs-datetime.R @@ -16,7 +16,6 @@ # under the License. register_bindings_datetime <- function() { - register_binding("strptime", function(x, format = "%Y-%m-%d %H:%M:%S", tz = NULL, unit = "ms") { # Arrow uses unit for time parsing, strptime() does not. From 5b8d6c9b7aa824a9fa7d0fec55e227b2df3545d6 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Thu, 30 Dec 2021 17:39:45 -0400 Subject: [PATCH 44/49] Update r/R/dplyr-funcs-conditional.R Co-authored-by: Jonathan Keane --- r/R/dplyr-funcs-conditional.R | 1 - 1 file changed, 1 deletion(-) diff --git a/r/R/dplyr-funcs-conditional.R b/r/R/dplyr-funcs-conditional.R index 67281a10a1870..493031d2f5783 100644 --- a/r/R/dplyr-funcs-conditional.R +++ b/r/R/dplyr-funcs-conditional.R @@ -16,7 +16,6 @@ # under the License. register_bindings_conditional <- function() { - register_binding("coalesce", function(...) { args <- list2(...) if (length(args) < 1) { From 2637fe798a7a9a394ce2f5e5020dcf26b17e9e15 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Thu, 30 Dec 2021 17:39:54 -0400 Subject: [PATCH 45/49] Update r/R/dplyr-funcs-math.R Co-authored-by: Jonathan Keane --- r/R/dplyr-funcs-math.R | 1 - 1 file changed, 1 deletion(-) diff --git a/r/R/dplyr-funcs-math.R b/r/R/dplyr-funcs-math.R index f930fed2a79e8..b92c202d04804 100644 --- a/r/R/dplyr-funcs-math.R +++ b/r/R/dplyr-funcs-math.R @@ -16,7 +16,6 @@ # under the License. register_bindings_math <- function() { - log_binding <- function(x, base = exp(1)) { # like other binary functions, either `x` or `base` can be Expression or double(1) if (is.numeric(x) && length(x) == 1) { From db7cb6d64631a542a74e734cf3fad68b0110a154 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Thu, 30 Dec 2021 17:40:01 -0400 Subject: [PATCH 46/49] Update r/R/dplyr-funcs-type.R Co-authored-by: Jonathan Keane --- r/R/dplyr-funcs-type.R | 1 - 1 file changed, 1 deletion(-) diff --git a/r/R/dplyr-funcs-type.R b/r/R/dplyr-funcs-type.R index b8bfb52113ed0..bcf2a4ec29305 100644 --- a/r/R/dplyr-funcs-type.R +++ b/r/R/dplyr-funcs-type.R @@ -22,7 +22,6 @@ register_bindings_type <- function() { register_bindings_type_elementwise() } -register_bindings_type_cast <- function() { register_binding("cast", function(x, target_type, safe = TRUE, ...) { opts <- cast_options(safe, ...) From 19d1f74e21c4e5e577e31eeb625645782eabcbdf Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Thu, 30 Dec 2021 17:40:13 -0400 Subject: [PATCH 47/49] Update r/R/dplyr-funcs-type.R Co-authored-by: Jonathan Keane --- r/R/dplyr-funcs-type.R | 1 - 1 file changed, 1 deletion(-) diff --git a/r/R/dplyr-funcs-type.R b/r/R/dplyr-funcs-type.R index bcf2a4ec29305..faec4d8d119b9 100644 --- a/r/R/dplyr-funcs-type.R +++ b/r/R/dplyr-funcs-type.R @@ -217,7 +217,6 @@ register_bindings_type_inspect <- function() { } register_bindings_type_elementwise <- function() { - register_binding("is.na", function(x) { build_expr("is_null", x, options = list(nan_is_null = TRUE)) }) From 12e96d276ebd9989484bf64fb4477869ddaef9c9 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Thu, 30 Dec 2021 17:40:17 -0400 Subject: [PATCH 48/49] Update r/R/dplyr-summarize.R Co-authored-by: Jonathan Keane --- r/R/dplyr-summarize.R | 1 - 1 file changed, 1 deletion(-) diff --git a/r/R/dplyr-summarize.R b/r/R/dplyr-summarize.R index 2a126c72964be..7cb9a3483d567 100644 --- a/r/R/dplyr-summarize.R +++ b/r/R/dplyr-summarize.R @@ -56,7 +56,6 @@ agg_fun_output_type <- function(fun, input_type, hash) { } register_bindings_aggregate <- function() { - register_binding_agg("sum", function(..., na.rm = FALSE) { list( fun = "sum", From 54286eb8e69c4453ec2ff965c0c5adb58eaeb097 Mon Sep 17 00:00:00 2001 From: Jonathan Keane Date: Mon, 3 Jan 2022 15:17:33 -0600 Subject: [PATCH 49/49] Oops, add in missing register_bindings_type_cast() --- r/R/dplyr-funcs-type.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r/R/dplyr-funcs-type.R b/r/R/dplyr-funcs-type.R index faec4d8d119b9..2f1fa96b83517 100644 --- a/r/R/dplyr-funcs-type.R +++ b/r/R/dplyr-funcs-type.R @@ -22,7 +22,7 @@ register_bindings_type <- function() { register_bindings_type_elementwise() } - +register_bindings_type_cast <- function() { register_binding("cast", function(x, target_type, safe = TRUE, ...) { opts <- cast_options(safe, ...) opts$to_type <- as_type(target_type)