From a7ffab536c7e680eaceb3659f3ddc20428e7d8e2 Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Tue, 28 Jul 2020 16:57:08 -0500 Subject: [PATCH 01/62] Squashed commit of the following: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit 306cb2b94b893fffc4a9c862a19dc251ea11dd29 Author: Romain Francois Date: Mon Jul 27 16:55:15 2020 +0200 use cpp11::external_pointer commit 8e20b3280e168af6321b533a6c0d881b5b818bc8 Author: Romain Francois Date: Mon Jul 27 16:49:13 2020 +0200 - IntegerVector_ commit e297475cd8d45d6315306d591b73b33c8f005272 Author: Romain Francois Date: Mon Jul 27 16:46:27 2020 +0200 - Rcpp::RawVector_ commit 8a4ad16ab41eb2f1c992433adbd6538c14086627 Author: Romain Francois Date: Mon Jul 27 16:38:32 2020 +0200 lint commit 59d106f27d6fefd21b348a9897f5362470d88226 Author: Romain Francois Date: Mon Jul 27 16:38:10 2020 +0200 as_sexp(const std::vector>) uses to_r_list commit 837227febd1ef4c9e095d511c70981c527279587 Merge: 0b7a9079d d16793b66 Author: Romain Francois Date: Mon Jul 27 12:37:46 2020 +0200 Merge remote-tracking branch 'upstream/master' into cpp11 commit 0b7a9079d78d56aa359f2434abbfba905ac61d34 Author: Romain François Date: Mon Jul 27 12:34:50 2020 +0200 Update r/src/schema.cpp Co-authored-by: Benjamin Kietzman commit a05e76d108b944e301a35f9704aee1839e6dc68f Author: Romain François Date: Mon Jul 27 12:33:38 2020 +0200 Update r/src/buffer.cpp Co-authored-by: Benjamin Kietzman commit 31f5aafb23a71b8cd4416a9d789139191f20e471 Author: Romain Francois Date: Mon Jul 27 12:32:21 2020 +0200 s/r_vec/RVector/ merge glitch commit 27740b5fbcd1388ca47c7107db875396620fa530 Merge: aa7d43e28 508ddf2e2 Author: Romain Francois Date: Mon Jul 27 12:29:35 2020 +0200 Merge branch 'cpp11' of https://github.com/romainfrancois/arrow into cpp11 commit 508ddf2e23f91b3ee05e2151e7e65c7538346284 Author: Romain François Date: Mon Jul 27 12:29:19 2020 +0200 Update r/src/arrow_rcpp.h Co-authored-by: Benjamin Kietzman commit 621e2ac03f1940324e803810c1b7ef10e60affea Author: Romain François Date: Mon Jul 27 12:29:08 2020 +0200 Update r/src/arrow_rcpp.h Co-authored-by: Benjamin Kietzman commit 9c521cb48a9367820072004147f1f07dd7a404ed Author: Romain François Date: Mon Jul 27 12:28:56 2020 +0200 Update r/src/arrow_rcpp.h Co-authored-by: Benjamin Kietzman commit 5a8c993f47606e4710f5272f5191610f8485aa49 Author: Romain François Date: Mon Jul 27 12:28:31 2020 +0200 Update r/src/arrow_rcpp.h Co-authored-by: Benjamin Kietzman commit 5c9a577a1da672683377f2f2bd3273e4c9e61afb Author: Romain François Date: Mon Jul 27 12:27:26 2020 +0200 Update r/src/array_from_vector.cpp Co-authored-by: Benjamin Kietzman commit aa7d43e2899fddf2d41b961ae0d908f8a8c1b554 Author: Romain Francois Date: Mon Jul 27 12:22:24 2020 +0200 no longer using Rcpp::StringVector_ commit e9cd2d56aac8c73cf7e5f7c484895ab3932a1f1a Author: Romain Francois Date: Mon Jul 27 12:21:35 2020 +0200 no longer using Rcpp::LogicalVector_ commit 245053580c12532c45e3666ecca05a3213e586cb Author: Romain Francois Date: Mon Jul 27 12:20:24 2020 +0200 no longer using NumericVector_ commit cb5b9b6d767ac6a38c7ff682685c34ad05d4e5b2 Author: Romain Francois Date: Mon Jul 27 12:16:14 2020 +0200 nho longer need Rcpp::List_ commit 7b17eb3659f9da1351b9b5a12b4dd980aa5dde0f Author: Romain Francois Date: Mon Jul 27 12:14:52 2020 +0200 csv.cpp -Rcpp commit facbf2198bce8c631acece8daa010fc79751f9fc Author: Romain Francois Date: Mon Jul 27 11:30:43 2020 +0200 compute.cpp -Rcpp commit 84644923d569a916b863ad08a50bc81d7bfd3346 Author: Romain Francois Date: Mon Jul 27 11:25:59 2020 +0200 + utility from_r_list commit 6dee592a79892b5e5acab83de4efc53ef3b381fb Author: Romain Francois Date: Mon Jul 27 09:55:23 2020 +0200 json.cpp -Rcpp commit 1dc52f39577771f17912a89f69494d1b065b071d Author: Romain Francois Date: Mon Jul 27 09:41:48 2020 +0200 - RCPP_EXPOSED_ENUM_NODECL commit 82ea62e0427a15af19dabf49105aaf37466aaed6 Author: Romain Francois Date: Mon Jul 27 09:41:09 2020 +0200 no need for explicit as_sexp() commit f4d46d7811512e336b032494f03608aa767d2f0f Author: Romain Francois Date: Mon Jul 27 09:40:32 2020 +0200 remove unused commit 38c1412ab0fb2bf29a2bdeb2893a1d9cf70df6ff Author: Romain Francois Date: Mon Jul 27 09:40:19 2020 +0200 forward declare as_sexp() implementations, as this is useful for cpp11::writable::list(std::initializer_list) commit 66c18b82486f6aca9894e314667445d5193da3ba Author: Romain Francois Date: Mon Jul 27 09:20:04 2020 +0200 filesystem.cpp -Rcpp commit eee77284c6c13c0e6061f52763bd4c6f0c156d1b Author: Romain Francois Date: Fri Jul 24 19:24:55 2020 +0200 array_to_vector using cpp11::list instead of Rcpp::List commit f1454cad88f8729bad9dd451e0e79f43d79787ce Author: Romain Francois Date: Fri Jul 24 18:23:47 2020 +0200 retire strings function, as we can just use cpp11::writable::strings instead commit 41ab305ed5e8e9e2857b0e5d58b1b6f73ad051ab Author: Romain Francois Date: Fri Jul 24 18:18:12 2020 +0200 cache tbl_df classes commit 2d5681dd3bf13f4cda41618c20393cb84eecc1a2 Author: Romain Francois Date: Fri Jul 24 17:49:16 2020 +0200 feather.cpp -> cpp11 commit 70a3c4594e37be8258e5d1a96b43f51be62089be Author: Romain Francois Date: Fri Jul 24 17:29:36 2020 +0200 schema.cpp -> cpp11 commit 343d8d7424a0be8d75c289fae0d37fc864d6bec4 Author: Romain Francois Date: Fri Jul 24 17:13:17 2020 +0200 retire List_to_shared_ptr_vector<> which is handled by arrow::r::input<> automatically commit e4240524269a17fcdd756df6392b22e3b0757c62 Author: Romain Francois Date: Fri Jul 24 15:23:29 2020 +0200 no lint for now commit 81f0b3f2fddde0c9576b6f96d4176d343a1303a3 Author: Romain Francois Date: Fri Jul 24 15:21:25 2020 +0200 oops added Mask again by error commit ca932470c2d8376fe8776cdf34e9fdd5fc380ab9 Author: Romain Francois Date: Fri Jul 24 15:17:11 2020 +0200 not explicit just yet, as this depends on https://github.com/r-lib/cpp11/pull/58 commit 20b5b0d2cb5f807bb72d53cd9fc7f968101389f7 Merge: f39b0e646 baf20948d Author: Romain François Date: Fri Jul 24 14:51:50 2020 +0200 Merge branch 'master' into cpp11 commit f39b0e6462b477386d068d7a46f6d6f60aaa175c Author: Romain Francois Date: Fri Jul 24 14:50:09 2020 +0200 marking ctor explicit commit 35fdb67c0ccb10078edd67a1c51bd26b7783f69b Author: Romain Francois Date: Fri Jul 24 14:46:37 2020 +0200 enable_if suggestion from @bkietz commit cc5c2ee9ba1527fb8ea6c966d891d160230d9096 Merge: 4c17779a4 4589b73d2 Author: Romain Francois Date: Fri Jul 24 14:43:01 2020 +0200 Merge branch 'cpp11' of https://github.com/romainfrancois/arrow into cpp11 commit 4589b73d2a9a8950a985573925950ba0be01de26 Author: Romain François Date: Fri Jul 24 14:37:05 2020 +0200 Update r/src/arrow_rcpp.h Co-authored-by: Benjamin Kietzman commit 4632a34eaf6db3b86ecc34b7898d189c583440d5 Author: Romain François Date: Fri Jul 24 14:36:50 2020 +0200 Update r/src/arrow_rcpp.h Co-authored-by: Benjamin Kietzman commit bedf7d99ae13c7539c100d1a3bea5e7db853490b Author: Romain François Date: Fri Jul 24 14:36:37 2020 +0200 Update r/src/arrow_rcpp.h Co-authored-by: Benjamin Kietzman commit 839f1527ba79e5f9019597489d32c9920e5dcfee Author: Romain François Date: Fri Jul 24 14:36:28 2020 +0200 Update r/src/arrow_rcpp.h Co-authored-by: Benjamin Kietzman commit d0fcbe8da2d3ee90e2ff4d2c5945dfe23af223fe Author: Romain François Date: Fri Jul 24 14:36:16 2020 +0200 Update r/src/arrow_rcpp.h Co-authored-by: Benjamin Kietzman commit 3223105ff0c855f72dc23d0a246f21e4f3aa6bf8 Author: Romain François Date: Fri Jul 24 14:35:24 2020 +0200 Update r/src/arrow_rcpp.h Co-authored-by: Benjamin Kietzman commit e7aecd964ccb8882bc87e27bdec2dcdcdb65550f Author: Romain François Date: Fri Jul 24 14:34:50 2020 +0200 Update r/src/memorypool.cpp Co-authored-by: Benjamin Kietzman commit 4c17779a4caa5754f265d0ef1f4ff97aba723976 Author: Romain Francois Date: Fri Jul 24 14:34:10 2020 +0200 More uses of arrow::r::Index commit 83b4fc293c1741e7daf1f92fd66b90d80444e038 Author: Romain Francois Date: Fri Jul 24 11:31:13 2020 +0200 Move Index handling to C++ side commit 88308ad4c286a58ec4aa377728138f8e2c22ab03 Merge: 6db322bd7 a06a0f4c6 Author: Neal Richardson Date: Thu Jul 23 08:56:28 2020 -0700 Merge branch 'master' into cpp11 commit 623c9dc4972ab60d6205b07a3dcb23418e98aa18 Author: Romain Francois Date: Thu Jul 23 17:42:17 2020 +0200 Rcpp::warning() -> cpp11::warning() commit 4a4c5f585e9aac6b0231551a49c50a81ce8a472f Author: Romain Francois Date: Thu Jul 23 17:41:05 2020 +0200 Rcpp::stop() -> cpp11::stop() commit 6db322bd7bd473e2ff184a619aa1e3cffed8dbd2 Author: Romain Francois Date: Thu Jul 23 16:23:58 2020 +0200 Retire special Rcpp::traits that powered Rcpp::wrap> Use cpp11::as_sexp() explicitly where appropriate commit d21b892cd769a057bd4562e15e6b3d77beecae21 Author: Romain Francois Date: Thu Jul 23 16:01:01 2020 +0200 Going through `char` confuses as_cpp() commit 69df6c6f681446013c369a5d7f2cffb3baf8068d Author: Romain Francois Date: Thu Jul 23 15:37:13 2020 +0200 No longer expecting Rcpp::not_compatible exceptions commit 29500906a73bf4cf268508439ea6bbd50180c776 Author: Romain Francois Date: Thu Jul 23 14:38:44 2020 +0200 as_index() as a stop gap until cpp11::as_cpp() handles NA_logical_ https://github.com/r-lib/cpp11/pull/53 commit c7f3020f1d562b9bba9001f8077e44e1b802fffa Author: Romain Francois Date: Thu Jul 23 14:37:55 2020 +0200 using BEGIN_CPP11/END_CPP11 commit a06a0f4c6b3268bbbc8da77521f4a229d77a9c94 Author: Sagnik Chakraborty Date: Thu Jul 23 17:57:28 2020 +0530 ARROW-9328: [C++][Gandiva] Add LTRIM, RTRIM, BTRIM functions for string Closes #7641 from sagnikc-dremio/master and squashes the following commits: 4a9985fc5 ARROW-9328: Add LTRIM, RTRIM, BTRIM functions for string Authored-by: Sagnik Chakraborty Signed-off-by: Praveen commit cc875e712bec83046db6dad114e96c9111beb77d Author: Neal Richardson Date: Wed Jul 22 11:36:08 2020 -0700 ARROW-6982: [R] Add bindings for compare and boolean kernels The scope of this has grown to something larger than the description. In addition to adding bindings to boolean kernels, it also changes how the dplyr filter expressions are generated and evaluated for RecordBatch and Table. Previously, any R function could be used to `filter()` because evaluation happened in R by calling `as.vector` on any Arrays referenced. Now, `filter()` translates R function names to Arrow function names, and evaluation passes the function and arguments to `call_function`. The benefit is that filtering a RecordBatch/Table happens all in Arrow, no pulling data into R and then sending back to Arrow to filter it. The cost is that only functions supported in Arrow can be used now. In addition to these improvements, the patch includes some extra validation, testing, and print method upgrades. There are a number of less-than-ideal design choices in here. Some are related to https://issues.apache.org/jira/browse/ARROW-9001 because we have to track/make a guess as to whether the result of `call_function` should be an Array, ChunkedArray, etc. There's also a bit of duplication here between the two Arrow expression classes, this R-specific parse tree of array/compute expressions and the other Dataset filter expressions. I think that's unavoidable at this time but we should and I expect we will rationalize this in the near future. Closes #7668 from nealrichardson/r-kernels Authored-by: Neal Richardson Signed-off-by: Neal Richardson commit 5df1cab6ae5ac771878450661901bec8330bf1f8 Author: Romain Francois Date: Wed Jul 22 17:22:00 2020 +0200 using cpp11::as_sexp() instead of Rcpp::wrap() commit b8e3e3c88cd819ea49da1825a020fdebf8ab5c75 Author: Romain Francois Date: Wed Jul 22 16:18:43 2020 +0200 lint commit 962be82f99d99bae1ef1ee61b4fdf61585882b82 Author: Romain Francois Date: Wed Jul 22 16:18:06 2020 +0200 Support for as_cpp. Related to https://github.com/r-lib/cpp11/issues/52 commit c27f782e8e5b0b2b42f017831830ab98ec52a572 Author: Jorge C. Leitao Date: Wed Jul 22 07:43:41 2020 -0600 ARROW-9534: [Rust] [DataFusion] Added support for lit to all supported rust types. @andygrove fyi Closes #7811 from jorgecarleitao/lit Authored-by: Jorge C. Leitao Signed-off-by: Andy Grove commit 126c0eb054447bc3e8f0762f08253c4652301a62 Author: Romain Francois Date: Wed Jul 22 14:38:43 2020 +0200 More uses of cpp11::as_cpp() commit c52a3e2521bc22ee71ed04af7c0d869bff3ff4aa Author: Romain Francois Date: Wed Jul 22 14:30:53 2020 +0200 remove ConstReferenceSmartPtrInputParameter, and use cpp11::as_cpp> to extract it from an R6 host commit a32c3dbd06b4a4ce645412a240773c800bc5365f Author: Romain Francois Date: Wed Jul 22 10:54:29 2020 +0200 no longer need ConstReferenceVectorSmartPtrInputParameter commit c269d17937aea00ee5228c1cb7efac9df8ea238c Author: Romain Francois Date: Wed Jul 22 10:49:06 2020 +0200 arrow::r::input<> specializations for - const std::shared_ptr& - const std::unique_ptr& - const std::vector>& steering away from Rcpp::traits::input_parameter<> commit 852ad6562c6a3c9ca49473fc88a2e9eb456b13bd Author: Romain Francois Date: Tue Jul 21 14:56:01 2020 +0200 Remove obsolete functions commit 8640f2e75acae6182439816f7e68be50f7abb320 Author: Romain Francois Date: Tue Jul 21 14:46:13 2020 +0200 using arrow::r::input instead of Rcpp::traits::input_parameter to ease transition commit 3f44a467246c9eba89c297f37ad00adefcf8d613 Author: Romain Francois Date: Tue Jul 21 14:45:20 2020 +0200 LinkingTo: cpp11 commit aa51b5a606235b9cf21f5fffb4561ebd4837bc91 Author: Uwe L. Korn Date: Tue Jul 21 13:18:30 2020 +0200 ARROW-9535: [Python] Remove symlink fixes from conda recipe Closes #7810 from xhochy/test-windows-fix Authored-by: Uwe L. Korn Signed-off-by: Krisztián Szűcs commit c09a82a388e79ddf4377f44ecfe515604f147270 Author: Sutou Kouhei Date: Tue Jul 21 06:54:25 2020 +0900 ARROW-9508: [Release][APT][Yum] Enable verification for arm64 binaries Closes #7791 from kou/release-verify-binaries Authored-by: Sutou Kouhei Signed-off-by: Sutou Kouhei --- r/DESCRIPTION | 3 +- r/R/arrowExports.R | 28 +- r/R/json.R | 13 +- r/R/struct.R | 2 +- r/R/table.R | 6 +- r/data-raw/codegen.R | 18 +- r/src/array.cpp | 43 +- r/src/array_from_vector.cpp | 48 +- r/src/array_to_vector.cpp | 119 +- r/src/arraydata.cpp | 7 +- r/src/arrowExports.cpp | 4181 ++++++++++++------------ r/src/arrow_exports.h | 11 - r/src/arrow_rcpp.h | 222 +- r/src/arrow_types.h | 38 +- r/src/buffer.cpp | 3 +- r/src/chunkedarray.cpp | 13 +- r/src/compression.cpp | 6 +- r/src/compute.cpp | 42 +- r/src/csv.cpp | 44 +- r/src/dataset.cpp | 5 +- r/src/datatype.cpp | 55 +- r/src/feather.cpp | 14 +- r/src/filesystem.cpp | 10 +- r/src/io.cpp | 9 +- r/src/json.cpp | 14 +- r/src/memorypool.cpp | 2 +- r/src/message.cpp | 2 - r/src/parquet.cpp | 2 - r/src/recordbatch.cpp | 37 +- r/src/recordbatchreader.cpp | 2 +- r/src/recordbatchwriter.cpp | 2 - r/src/schema.cpp | 39 +- r/src/symbols.cpp | 49 +- r/src/table.cpp | 76 +- r/tests/testthat/test-Array-errors.txt | 14 +- r/tests/testthat/test-Array.R | 18 +- r/tests/testthat/test-RecordBatch.R | 22 +- r/tests/testthat/test-Table.R | 18 +- r/tests/testthat/test-chunked-array.R | 10 +- r/tests/testthat/test-data-type.R | 4 +- 40 files changed, 2621 insertions(+), 2630 deletions(-) diff --git a/r/DESCRIPTION b/r/DESCRIPTION index 5c1b1199f5d..1d1204910b1 100644 --- a/r/DESCRIPTION +++ b/r/DESCRIPTION @@ -24,7 +24,8 @@ LazyData: true SystemRequirements: C++11 Biarch: true LinkingTo: - Rcpp (>= 1.0.1) + Rcpp (>= 1.0.1), + cpp11 Imports: assertthat, bit64, diff --git a/r/R/arrowExports.R b/r/R/arrowExports.R index e11b2d24c63..df627a6a7c8 100644 --- a/r/R/arrowExports.R +++ b/r/R/arrowExports.R @@ -576,8 +576,8 @@ fixed_size_list__ <- function(x, list_size){ .Call(`_arrow_fixed_size_list__` , x, list_size) } -struct_ <- function(fields){ - .Call(`_arrow_struct_` , fields) +struct__ <- function(fields){ + .Call(`_arrow_struct__` , fields) } DataType__ToString <- function(type){ @@ -1012,12 +1012,12 @@ io___BufferOutputStream__Write <- function(stream, bytes){ invisible(.Call(`_arrow_io___BufferOutputStream__Write` , stream, bytes)) } -json___ReadOptions__initialize <- function(options){ - .Call(`_arrow_json___ReadOptions__initialize` , options) +json___ReadOptions__initialize <- function(use_threads, block_size){ + .Call(`_arrow_json___ReadOptions__initialize` , use_threads, block_size) } -json___ParseOptions__initialize <- function(options){ - .Call(`_arrow_json___ParseOptions__initialize` , options) +json___ParseOptions__initialize <- function(newlines_in_values){ + .Call(`_arrow_json___ParseOptions__initialize` , newlines_in_values) } json___TableReader__Make <- function(input, read_options, parse_options){ @@ -1252,10 +1252,6 @@ RecordBatch__select <- function(batch, indices){ .Call(`_arrow_RecordBatch__select` , batch, indices) } -RecordBatch__from_dataframe <- function(tbl){ - .Call(`_arrow_RecordBatch__from_dataframe` , tbl) -} - RecordBatch__Equals <- function(self, other, check_metadata){ .Call(`_arrow_RecordBatch__Equals` , self, other, check_metadata) } @@ -1440,10 +1436,6 @@ arrow__UnifySchemas <- function(schemas){ .Call(`_arrow_arrow__UnifySchemas` , schemas) } -Table__from_dataframe <- function(tbl){ - .Call(`_arrow_Table__from_dataframe` , tbl) -} - Table__num_columns <- function(x){ .Call(`_arrow_Table__num_columns` , x) } @@ -1504,6 +1496,14 @@ Table__select <- function(table, indices){ .Call(`_arrow_Table__select` , table, indices) } +all_record_batches <- function(lst){ + .Call(`_arrow_all_record_batches` , lst) +} + +Table__from_record_batches <- function(batches, schema_sxp){ + .Call(`_arrow_Table__from_record_batches` , batches, schema_sxp) +} + Table__from_dots <- function(lst, schema_sxp){ .Call(`_arrow_Table__from_dots` , lst, schema_sxp) } diff --git a/r/R/json.R b/r/R/json.R index ea340e3e657..1f05f84cfd0 100644 --- a/r/R/json.R +++ b/r/R/json.R @@ -74,12 +74,7 @@ JsonTableReader$create <- function(file, #' @export JsonReadOptions <- R6Class("JsonReadOptions", inherit = ArrowObject) JsonReadOptions$create <- function(use_threads = option_use_threads(), block_size = 1048576L) { - shared_ptr(JsonReadOptions, json___ReadOptions__initialize( - list( - use_threads = use_threads, - block_size = block_size - ) - )) + shared_ptr(JsonReadOptions, json___ReadOptions__initialize(use_threads, block_size)) } #' @rdname CsvReadOptions @@ -89,9 +84,5 @@ JsonReadOptions$create <- function(use_threads = option_use_threads(), block_siz #' @export JsonParseOptions <- R6Class("JsonParseOptions", inherit = ArrowObject) JsonParseOptions$create <- function(newlines_in_values = FALSE) { - shared_ptr(JsonParseOptions, json___ParseOptions__initialize( - list( - newlines_in_values = newlines_in_values - ) - )) + shared_ptr(JsonParseOptions, json___ParseOptions__initialize(newlines_in_values)) } diff --git a/r/R/struct.R b/r/R/struct.R index 219fb28ab2a..feda966f56d 100644 --- a/r/R/struct.R +++ b/r/R/struct.R @@ -24,7 +24,7 @@ StructType <- R6Class("StructType", GetFieldIndex = function(name) StructType__GetFieldIndex(self, name) ) ) -StructType$create <- function(...) shared_ptr(StructType, struct_(.fields(list(...)))) +StructType$create <- function(...) shared_ptr(StructType, struct__(.fields(list(...)))) #' @rdname data-type #' @export diff --git a/r/R/table.R b/r/R/table.R index 1391eee4a7d..20eb9bb0a67 100644 --- a/r/R/table.R +++ b/r/R/table.R @@ -192,7 +192,11 @@ Table$create <- function(..., schema = NULL) { names(dots) <- rep_len("", length(dots)) } stopifnot(length(dots) > 0) - shared_ptr(Table, Table__from_dots(dots, schema)) + if (all_record_batches(dots)) { + shared_ptr(Table, Table__from_record_batches(dots, schema)) + } else { + shared_ptr(Table, Table__from_dots(dots, schema)) + } } #' @export diff --git a/r/data-raw/codegen.R b/r/data-raw/codegen.R index a7f3581aa8d..0b2379ce627 100644 --- a/r/data-raw/codegen.R +++ b/r/data-raw/codegen.R @@ -45,9 +45,6 @@ suppressPackageStartupMessages({ get_exported_functions <- function(decorations, export_tag) { out <- decorations %>% filter(decoration %in% paste0(export_tag, "::export")) %>% - # the three lines below can be expressed with rap() - # more concisely - # rap( ~ decor:::parse_cpp_function(context)) mutate(functions = map(context, decor:::parse_cpp_function)) %>% { vec_cbind(., vec_rbind(!!!pull(., functions))) } %>% select(-functions) %>% @@ -67,7 +64,7 @@ wrap_call <- function(name, return_type, args) { if(return_type == "void") { glue::glue("\t{call};\n\treturn R_NilValue;", .trim = FALSE) } else { - glue::glue("\treturn Rcpp::wrap({call});") + glue::glue("\treturn cpp11::as_sexp({call});") } } @@ -81,10 +78,10 @@ cpp_functions_definitions <- arrow_exports %>% // {basename(file)} #if defined(ARROW_R_WITH_{toupper(decoration)}) {return_type} {name}({real_params}); - RcppExport SEXP _arrow_{name}({sexp_params}){{ - BEGIN_RCPP + extern "C" SEXP _arrow_{name}({sexp_params}){{ + BEGIN_CPP11 {input_params}{return_line}{wrap_call(name, return_type, args)} - END_RCPP + END_CPP11 }} #else RcppExport SEXP _arrow_{name}({sexp_params}){{ @@ -96,7 +93,7 @@ cpp_functions_definitions <- arrow_exports %>% sep = "\n", real_params = glue_collapse_data(args, "{type} {name}"), sexp_params = glue_collapse_data(args, "SEXP {name}_sexp"), - input_params = glue_collapse_data(args, "\tRcpp::traits::input_parameter<{type}>::type {name}({name}_sexp);", sep = "\n"), + input_params = glue_collapse_data(args, "\tarrow::r::input<{type}>::type {name}({name}_sexp);", sep = "\n"), return_line = if(nrow(args)) "\n" else "" ) }) %>% @@ -111,11 +108,12 @@ cpp_functions_registration <- arrow_exports %>% writeLines(con = "src/arrowExports.cpp", glue::glue(' // Generated by using data-raw/codegen.R -> do not edit by hand +#include +#include + #include "./arrow_exports.h" #include -using namespace Rcpp; - {cpp_functions_definitions} extern "C" SEXP _arrow_available() {{ diff --git a/r/src/array.cpp b/r/src/array.cpp index 5879dc91675..ca004da9767 100644 --- a/r/src/array.cpp +++ b/r/src/array.cpp @@ -17,48 +17,46 @@ #include "./arrow_types.h" -using Rcpp::LogicalVector; -using Rcpp::no_init; - #if defined(ARROW_R_WITH_ARROW) #include #include -void arrow::r::validate_slice_offset(int offset, int len) { +void arrow::r::validate_slice_offset(arrow::r::Index offset, int64_t len) { if (offset == NA_INTEGER) { - Rcpp::stop("Slice 'offset' cannot be NA"); + cpp11::stop("Slice 'offset' cannot be NA"); } if (offset < 0) { - Rcpp::stop("Slice 'offset' cannot be negative"); + cpp11::stop("Slice 'offset' cannot be negative"); } if (offset > len) { - Rcpp::stop("Slice 'offset' greater than array length"); + cpp11::stop("Slice 'offset' greater than array length"); } } -void arrow::r::validate_slice_length(int length, int available) { +void arrow::r::validate_slice_length(arrow::r::Index length, int64_t available) { if (length == NA_INTEGER) { - Rcpp::stop("Slice 'length' cannot be NA"); + cpp11::stop("Slice 'length' cannot be NA"); } if (length < 0) { - Rcpp::stop("Slice 'length' cannot be negative"); + cpp11::stop("Slice 'length' cannot be negative"); } if (length > available) { - Rcpp::warning("Slice 'length' greater than available length"); + cpp11::warning("Slice 'length' greater than available length"); } } // [[arrow::export]] std::shared_ptr Array__Slice1(const std::shared_ptr& array, - int offset) { + arrow::r::Index offset) { arrow::r::validate_slice_offset(offset, array->length()); return array->Slice(offset); } // [[arrow::export]] std::shared_ptr Array__Slice2(const std::shared_ptr& array, - int offset, int length) { + arrow::r::Index offset, + arrow::r::Index length) { arrow::r::validate_slice_offset(offset, array->length()); arrow::r::validate_slice_length(length, array->length() - offset); return array->Slice(offset, length); @@ -66,21 +64,21 @@ std::shared_ptr Array__Slice2(const std::shared_ptr& void arrow::r::validate_index(int i, int len) { if (i == NA_INTEGER) { - Rcpp::stop("'i' cannot be NA"); + cpp11::stop("'i' cannot be NA"); } if (i < 0 || i >= len) { - Rcpp::stop("subscript out of bounds"); + cpp11::stop("subscript out of bounds"); } } // [[arrow::export]] -bool Array__IsNull(const std::shared_ptr& x, int i) { +bool Array__IsNull(const std::shared_ptr& x, arrow::r::Index i) { arrow::r::validate_index(i, x->length()); return x->IsNull(i); } // [[arrow::export]] -bool Array__IsValid(const std::shared_ptr& x, int i) { +bool Array__IsValid(const std::shared_ptr& x, arrow::r::Index i) { arrow::r::validate_index(i, x->length()); return x->IsValid(i); } @@ -129,16 +127,17 @@ std::shared_ptr Array__data( // [[arrow::export]] bool Array__RangeEquals(const std::shared_ptr& self, - const std::shared_ptr& other, int start_idx, - int end_idx, int other_start_idx) { + const std::shared_ptr& other, + arrow::r::Index start_idx, arrow::r::Index end_idx, + arrow::r::Index other_start_idx) { if (start_idx == NA_INTEGER) { - Rcpp::stop("'start_idx' cannot be NA"); + cpp11::stop("'start_idx' cannot be NA"); } if (end_idx == NA_INTEGER) { - Rcpp::stop("'end_idx' cannot be NA"); + cpp11::stop("'end_idx' cannot be NA"); } if (other_start_idx == NA_INTEGER) { - Rcpp::stop("'other_start_idx' cannot be NA"); + cpp11::stop("'other_start_idx' cannot be NA"); } return self->RangeEquals(*other, start_idx, end_idx, other_start_idx); } diff --git a/r/src/array_from_vector.cpp b/r/src/array_from_vector.cpp index 4711c4b730a..c3d26a38fff 100644 --- a/r/src/array_from_vector.cpp +++ b/r/src/array_from_vector.cpp @@ -339,7 +339,7 @@ struct VectorToArrayConverter { }; template -std::shared_ptr MakeFactorArrayImpl(Rcpp::IntegerVector_ factor, +std::shared_ptr MakeFactorArrayImpl(cpp11::integers factor, const std::shared_ptr& type) { using value_type = typename arrow::TypeTraits::ArrayType::value_type; auto n = factor.size(); @@ -393,7 +393,7 @@ std::shared_ptr MakeFactorArrayImpl(Rcpp::IntegerVector_ factor, return ValueOrStop(DictionaryArray::FromArrays(type, array_indices, dict)); } -std::shared_ptr MakeFactorArray(Rcpp::IntegerVector_ factor, +std::shared_ptr MakeFactorArray(cpp11::integers factor, const std::shared_ptr& type) { const auto& dict_type = checked_cast(*type); switch (dict_type.index_type()->id()) { @@ -406,9 +406,12 @@ std::shared_ptr MakeFactorArray(Rcpp::IntegerVector_ factor, case Type::INT64: return MakeFactorArrayImpl(factor, type); default: - Rcpp::stop(tfm::format("Cannot convert to dictionary with index_type %s", - dict_type.index_type()->ToString())); + break; } + + cpp11::stop("Cannot convert to dictionary with index_type '%s'", + dict_type.index_type()->ToString().c_str()); + return nullptr; } std::shared_ptr MakeStructArray(SEXP df, const std::shared_ptr& type) { @@ -586,9 +589,8 @@ struct Unbox> { break; } - return Status::Invalid( - tfm::format("Cannot convert R vector of type %s to integer Arrow array", - Rcpp::type2name(obj))); + return Status::Invalid("Cannot convert R vector of type <", Rcpp::type2name(obj), + "> to integer Arrow array"); } template @@ -1191,17 +1193,17 @@ std::shared_ptr InferArrowTypeFromFactor(SEXP factor) { template std::shared_ptr InferArrowTypeFromVector(SEXP x) { - Rcpp::stop("Unknown vector type: ", VectorType); + cpp11::stop("Unknown vector type: ", VectorType); } template <> std::shared_ptr InferArrowTypeFromVector(SEXP x) { if (Rf_inherits(x, "Array")) { - Rcpp::ConstReferenceSmartPtrInputParameter> array(x); - return static_cast>(array)->type(); + return cpp11::as_cpp>(x)->type(); } - Rcpp::stop("Unrecognized vector instance for type ENVSXP"); + cpp11::stop("Unrecognized vector instance for type ENVSXP"); + return nullptr; } template <> @@ -1290,7 +1292,7 @@ std::shared_ptr InferArrowTypeFromVector(SEXP x) { SEXP byte_width = Rf_getAttrib(x, symbols::byte_width); if (Rf_isNull(byte_width) || TYPEOF(byte_width) != INTSXP || XLENGTH(byte_width) != 1) { - Rcpp::stop("malformed arrow_fixed_size_binary object"); + cpp11::stop("malformed arrow_fixed_size_binary object"); } return arrow::fixed_size_binary(INTEGER(byte_width)[0]); } @@ -1306,7 +1308,7 @@ std::shared_ptr InferArrowTypeFromVector(SEXP x) { SEXP ptype = Rf_getAttrib(x, symbols::ptype); if (Rf_isNull(ptype)) { if (XLENGTH(x) == 0) { - Rcpp::stop( + cpp11::stop( "Requires at least one element to infer the values' type of a list vector"); } @@ -1337,7 +1339,8 @@ std::shared_ptr InferArrowType(SEXP x) { break; } - Rcpp::stop("Cannot infer type from vector"); + cpp11::stop("Cannot infer type from vector"); + return nullptr; } // in some situations we can just use the memory of the R object in an RBuffer @@ -1468,7 +1471,7 @@ std::shared_ptr Array__from_vector( SEXP x, const std::shared_ptr& type, bool type_inferred) { // short circuit if `x` is already an Array if (Rf_inherits(x, "Array")) { - return Rcpp::ConstReferenceSmartPtrInputParameter>(x); + return cpp11::as_cpp>(x); } // special case when we can just use the data from the R vector @@ -1487,7 +1490,7 @@ std::shared_ptr Array__from_vector( return arrow::r::MakeFactorArray(x, type); } - Rcpp::stop("Object incompatible with dictionary type"); + cpp11::stop("Object incompatible with dictionary type"); } if (type->id() == Type::LIST || type->id() == Type::LARGE_LIST || @@ -1543,14 +1546,14 @@ std::shared_ptr Array__from_vector(SEXP x, SEXP s_type) { if (type_inferred) { type = arrow::r::InferArrowType(x); } else { - type = arrow::r::extract(s_type); + type = cpp11::as_cpp>(s_type); } return arrow::r::Array__from_vector(x, type, type_inferred); } // [[arrow::export]] -std::shared_ptr ChunkedArray__from_list(Rcpp::List chunks, +std::shared_ptr ChunkedArray__from_list(cpp11::list chunks, SEXP s_type) { std::vector> vec; @@ -1562,11 +1565,11 @@ std::shared_ptr ChunkedArray__from_list(Rcpp::List chunks, std::shared_ptr type; if (type_inferred) { if (n == 0) { - Rcpp::stop("type must be specified for empty list"); + cpp11::stop("type must be specified for empty list"); } type = arrow::r::InferArrowType(VECTOR_ELT(chunks, 0)); } else { - type = arrow::r::extract(s_type); + type = cpp11::as_cpp>(s_type); } if (n == 0) { @@ -1580,11 +1583,10 @@ std::shared_ptr ChunkedArray__from_list(Rcpp::List chunks, // because we might have inferred the type from the first element of the list // // this only really matters for dictionary arrays - vec.push_back( - arrow::r::Array__from_vector(VECTOR_ELT(chunks, 0), type, type_inferred)); + vec.push_back(arrow::r::Array__from_vector(chunks[0], type, type_inferred)); for (R_xlen_t i = 1; i < n; i++) { - vec.push_back(arrow::r::Array__from_vector(VECTOR_ELT(chunks, i), type, false)); + vec.push_back(arrow::r::Array__from_vector(chunks[i], type, false)); } } diff --git a/r/src/array_to_vector.cpp b/r/src/array_to_vector.cpp index 8be2d02384f..5aef11f450f 100644 --- a/r/src/array_to_vector.cpp +++ b/r/src/array_to_vector.cpp @@ -35,13 +35,6 @@ using internal::IntegersCanFit; namespace r { -using Rcpp::default_value; -using Rcpp::IntegerVector; -using Rcpp::LogicalVector_; -using Rcpp::no_init; -using Rcpp::Shield; -using Rcpp::StringVector_; - class Converter { public: explicit Converter(ArrayVector arrays) : arrays_(std::move(arrays)) {} @@ -115,7 +108,7 @@ class Converter { template Status AllNull_Ingest(SEXP data, R_xlen_t start, R_xlen_t n) { auto p_data = Rcpp::internal::r_vector_start(data) + start; - std::fill_n(p_data, n, Rcpp::default_value()); + std::fill_n(p_data, n, arrow::r::default_value()); return Status::OK(); } @@ -135,7 +128,8 @@ Status SomeNull_Ingest(SEXP data, R_xlen_t start, R_xlen_t n, arrow::internal::BitmapReader bitmap_reader(array->null_bitmap()->data(), array->offset(), n); for (R_xlen_t i = 0; i < n; i++, bitmap_reader.Next(), ++p_data, ++p_values) { - *p_data = bitmap_reader.IsSet() ? lambda(*p_values) : default_value(); + *p_data = + bitmap_reader.IsSet() ? lambda(*p_values) : arrow::r::default_value(); } } else { std::transform(p_values, p_values + n, p_data, lambda); @@ -167,7 +161,7 @@ Status IngestSome(const std::shared_ptr& array, R_xlen_t n, Lambda SEXP ArrayVector__as_vector(R_xlen_t n, const std::shared_ptr& type, const ArrayVector& arrays) { auto converter = Converter::Make(type, arrays); - Shield data(converter->Allocate(n)); + Rcpp::Shield data(converter->Allocate(n)); StopIfNotOk(converter->IngestSerial(data)); return data; } @@ -180,7 +174,7 @@ class Converter_SimpleArray : public Converter { public: explicit Converter_SimpleArray(const ArrayVector& arrays) : Converter(arrays) {} - SEXP Allocate(R_xlen_t n) const { return Vector(no_init(n)); } + SEXP Allocate(R_xlen_t n) const { return Vector(Rcpp::no_init(n)); } Status Ingest_all_nulls(SEXP data, R_xlen_t start, R_xlen_t n) const { return AllNull_Ingest(data, start, n); @@ -200,7 +194,7 @@ class Converter_Date32 : public Converter_SimpleArray { : Converter_SimpleArray(arrays) {} SEXP Allocate(R_xlen_t n) const { - Rcpp::NumericVector data(no_init(n)); + Rcpp::NumericVector data(Rcpp::no_init(n)); data.attr("class") = "Date"; return data; } @@ -218,7 +212,7 @@ struct Converter_String : public Converter { public: explicit Converter_String(const ArrayVector& arrays) : Converter(arrays) {} - SEXP Allocate(R_xlen_t n) const { return StringVector_(no_init(n)); } + SEXP Allocate(R_xlen_t n) const { return Rf_allocVector(STRSXP, n); } Status Ingest_all_nulls(SEXP data, R_xlen_t start, R_xlen_t n) const { return AllNull_Ingest(data, start, n); @@ -281,7 +275,7 @@ class Converter_Boolean : public Converter { public: explicit Converter_Boolean(const ArrayVector& arrays) : Converter(arrays) {} - SEXP Allocate(R_xlen_t n) const { return LogicalVector_(no_init(n)); } + SEXP Allocate(R_xlen_t n) const { return Rf_allocVector(LGLSXP, n); } Status Ingest_all_nulls(SEXP data, R_xlen_t start, R_xlen_t n) const { return AllNull_Ingest(data, start, n); @@ -437,8 +431,8 @@ class Converter_Dictionary : public Converter { // TODO: also add int64, uint32, uint64 downcasts, if possible break; default: - Rcpp::stop("Cannot convert Dictionary Array of type `%s` to R", - dict_array.type()->ToString()); + cpp11::stop("Cannot convert Dictionary Array of type `%s` to R", + dict_array.type()->ToString().c_str()); } dictionary_ = dict_array.dictionary(); @@ -446,7 +440,7 @@ class Converter_Dictionary : public Converter { } SEXP Allocate(R_xlen_t n) const { - IntegerVector data(no_init(n)); + Rcpp::IntegerVector data(Rcpp::no_init(n)); data.attr("levels") = GetLevels(); if (GetOrdered()) { Rf_classgets(data, arrow::r::data::classes_ordered); @@ -537,9 +531,9 @@ class Converter_Dictionary : public Converter { // Alternative: preserve the logical type of the dictionary values // (e.g. if dict is timestamp, return a POSIXt R vector, not factor) if (dictionary_->type_id() != Type::STRING) { - Rcpp::warning( + cpp11::warning( "Coercing dictionary values from type %s to R character factor levels", - dictionary_->type()->ToString()); + dictionary_->type()->ToString().c_str()); } SEXP vec = PROTECT(ArrayVector__as_vector(dictionary_->length(), dictionary_->type(), {dictionary_})); @@ -564,21 +558,17 @@ class Converter_Struct : public Converter { // allocate a data frame column to host each array auto first_array = checked_cast(this->arrays_[0].get()); auto type = first_array->struct_type(); - int nf = first_array->num_fields(); - Rcpp::List out(nf); - Rcpp::CharacterVector colnames(nf); - for (int i = 0; i < nf; i++) { - out[i] = converters[i]->Allocate(n); - colnames[i] = Rcpp::String(type->field(i)->name(), CE_UTF8); - } + auto out = + arrow::r::to_r_list(converters, [n](const std::shared_ptr& converter) { + return converter->Allocate(n); + }); + auto colnames = arrow::r::to_r_strings( + type->fields(), + [](const std::shared_ptr& field) { return field->name(); }); + out.attr(symbols::row_names) = arrow::r::short_row_names(n); + out.attr(R_NamesSymbol) = colnames; + out.attr(R_ClassSymbol) = arrow::r::data::classes_tbl_df; - IntegerVector rn(2); - rn[0] = NA_INTEGER; - rn[1] = -n; - Rf_setAttrib(out, symbols::row_names, rn); - Rf_setAttrib(out, R_NamesSymbol, colnames); - Rf_setAttrib(out, R_ClassSymbol, - Rcpp::CharacterVector::create("tbl_df", "tbl", "data.frame")); return out; } @@ -615,7 +605,7 @@ class Converter_Date64 : public Converter { explicit Converter_Date64(const ArrayVector& arrays) : Converter(arrays) {} SEXP Allocate(R_xlen_t n) const { - Rcpp::NumericVector data(no_init(n)); + Rcpp::NumericVector data(Rcpp::no_init(n)); Rf_classgets(data, arrow::r::data::classes_POSIXct); return data; } @@ -641,7 +631,7 @@ class Converter_Promotion : public Converter { explicit Converter_Promotion(const ArrayVector& arrays) : Converter(arrays) {} SEXP Allocate(R_xlen_t n) const { - return Rcpp::Vector(no_init(n)); + return Rcpp::Vector(Rcpp::no_init(n)); } Status Ingest_all_nulls(SEXP data, R_xlen_t start, R_xlen_t n) const { @@ -667,7 +657,7 @@ class Converter_Time : public Converter { explicit Converter_Time(const ArrayVector& arrays) : Converter(arrays) {} SEXP Allocate(R_xlen_t n) const { - Rcpp::NumericVector data(no_init(n)); + Rcpp::NumericVector data(Rcpp::no_init(n)); data.attr("class") = Rcpp::CharacterVector::create("hms", "difftime"); // hms difftime is always stored as "seconds" data.attr("units") = Rcpp::CharacterVector::create("secs"); @@ -713,7 +703,7 @@ class Converter_Timestamp : public Converter_Time { : Converter_Time(arrays) {} SEXP Allocate(R_xlen_t n) const { - Rcpp::NumericVector data(no_init(n)); + Rcpp::NumericVector data(Rcpp::no_init(n)); Rf_classgets(data, arrow::r::data::classes_POSIXct); auto array = checked_cast(this->arrays_[0].get()); auto array_type = checked_cast(array->type().get()); @@ -729,7 +719,7 @@ class Converter_Decimal : public Converter { public: explicit Converter_Decimal(const ArrayVector& arrays) : Converter(arrays) {} - SEXP Allocate(R_xlen_t n) const { return Rcpp::NumericVector_(no_init(n)); } + SEXP Allocate(R_xlen_t n) const { return Rf_allocVector(REALSXP, n); } Status Ingest_all_nulls(SEXP data, R_xlen_t start, R_xlen_t n) const { return AllNull_Ingest(data, start, n); @@ -769,12 +759,10 @@ class Converter_List : public Converter { : Converter(arrays), value_type_(value_type) {} SEXP Allocate(R_xlen_t n) const { - Rcpp::List res(no_init(n)); - if (std::is_same::value) { - Rf_setAttrib(res, R_ClassSymbol, arrow::r::data::classes_arrow_list); - } else { - Rf_setAttrib(res, R_ClassSymbol, arrow::r::data::classes_arrow_large_list); - } + cpp11::writable::list res(n); + res.attr(R_ClassSymbol) = std::is_same::value + ? arrow::r::data::classes_arrow_list + : arrow::r::data::classes_arrow_large_list; // Build an empty array to match value_type std::unique_ptr builder; @@ -784,8 +772,7 @@ class Converter_List : public Converter { StopIfNotOk(builder->Finish(&array)); // convert to an R object to store as the list' ptype - SEXP ptype = Array__as_vector(array); - Rf_setAttrib(res, arrow::r::symbols::ptype, ptype); + res.attr(arrow::r::symbols::ptype) = Array__as_vector(array); return res; } @@ -824,9 +811,9 @@ class Converter_FixedSizeList : public Converter { : Converter(arrays), value_type_(value_type), list_size_(list_size) {} SEXP Allocate(R_xlen_t n) const { - Rcpp::List res(no_init(n)); + cpp11::writable::list res(n); Rf_classgets(res, arrow::r::data::classes_arrow_fixed_size_list); - Rf_setAttrib(res, arrow::r::symbols::list_size, Rf_ScalarInteger(list_size_)); + res.attr(arrow::r::symbols::list_size) = Rf_ScalarInteger(list_size_); // Build an empty array to match value_type std::unique_ptr builder; @@ -836,8 +823,7 @@ class Converter_FixedSizeList : public Converter { StopIfNotOk(builder->Finish(&array)); // convert to an R object to store as the list' ptype - SEXP ptype = Array__as_vector(array); - Rf_setAttrib(res, arrow::r::symbols::ptype, ptype); + res.attr(arrow::r::symbols::ptype) = Array__as_vector(array); return res; } @@ -868,7 +854,7 @@ class Converter_Int64 : public Converter { explicit Converter_Int64(const ArrayVector& arrays) : Converter(arrays) {} SEXP Allocate(R_xlen_t n) const { - Rcpp::NumericVector data(no_init(n)); + Rcpp::NumericVector data(Rcpp::no_init(n)); data.attr("class") = "integer64"; return data; } @@ -1079,29 +1065,28 @@ std::shared_ptr Converter::Make(const std::shared_ptr& type break; } - Rcpp::stop(tfm::format("cannot handle Array of type %s", type->name())); + cpp11::stop("cannot handle Array of type ", type->name().c_str()); return nullptr; } -Rcpp::List to_dataframe_serial( +cpp11::writable::list to_dataframe_serial( int64_t nr, int64_t nc, const Rcpp::CharacterVector& names, const std::vector>& converters) { - Rcpp::List tbl(nc); - + cpp11::writable::list tbl(nc); for (int i = 0; i < nc; i++) { SEXP column = tbl[i] = converters[i]->Allocate(nr); StopIfNotOk(converters[i]->IngestSerial(column)); } - tbl.attr("names") = names; - tbl.attr("class") = Rcpp::CharacterVector::create("tbl_df", "tbl", "data.frame"); - tbl.attr("row.names") = Rcpp::IntegerVector::create(NA_INTEGER, -nr); + tbl.attr(R_NamesSymbol) = names; + tbl.attr(R_ClassSymbol) = arrow::r::data::classes_tbl_df; + tbl.attr(R_RowNamesSymbol) = arrow::r::short_row_names(nr); return tbl; } -Rcpp::List to_dataframe_parallel( +cpp11::writable::list to_dataframe_parallel( int64_t nr, int64_t nc, const Rcpp::CharacterVector& names, const std::vector>& converters) { - Rcpp::List tbl(nc); + cpp11::writable::list tbl(nc); // task group to ingest data in parallel auto tg = arrow::internal::TaskGroup::MakeThreaded(arrow::internal::GetCpuThreadPool()); @@ -1133,9 +1118,9 @@ Rcpp::List to_dataframe_parallel( StopIfNotOk(status); - tbl.attr("names") = names; - tbl.attr("class") = Rcpp::CharacterVector::create("tbl_df", "tbl", "data.frame"); - tbl.attr("row.names") = IntegerVector::create(NA_INTEGER, -nr); + tbl.attr(R_NamesSymbol) = names; + tbl.attr(R_ClassSymbol) = arrow::r::data::classes_tbl_df; + tbl.attr(R_RowNamesSymbol) = arrow::r::short_row_names(nr); return tbl; } @@ -1155,8 +1140,8 @@ SEXP ChunkedArray__as_vector(const std::shared_ptr& chunked } // [[arrow::export]] -Rcpp::List RecordBatch__to_dataframe(const std::shared_ptr& batch, - bool use_threads) { +cpp11::writable::list RecordBatch__to_dataframe( + const std::shared_ptr& batch, bool use_threads) { int64_t nc = batch->num_columns(); int64_t nr = batch->num_rows(); Rcpp::CharacterVector names(nc); @@ -1177,8 +1162,8 @@ Rcpp::List RecordBatch__to_dataframe(const std::shared_ptr& } // [[arrow::export]] -Rcpp::List Table__to_dataframe(const std::shared_ptr& table, - bool use_threads) { +cpp11::writable::list Table__to_dataframe(const std::shared_ptr& table, + bool use_threads) { int64_t nc = table->num_columns(); int64_t nr = table->num_rows(); Rcpp::CharacterVector names(nc); diff --git a/r/src/arraydata.cpp b/r/src/arraydata.cpp index c1194d76eeb..a8ee60f36a0 100644 --- a/r/src/arraydata.cpp +++ b/r/src/arraydata.cpp @@ -17,9 +17,6 @@ #include "./arrow_types.h" -using Rcpp::List; -using Rcpp::wrap; - #if defined(ARROW_R_WITH_ARROW) #include @@ -45,8 +42,8 @@ int ArrayData__get_offset(const std::shared_ptr& x) { } // [[arrow::export]] -List ArrayData__buffers(const std::shared_ptr& x) { - return wrap(x->buffers); +cpp11::list ArrayData__buffers(const std::shared_ptr& x) { + return cpp11::as_sexp(x->buffers); } #endif diff --git a/r/src/arrowExports.cpp b/r/src/arrowExports.cpp index 17f97cb2c96..547e0d11669 100644 --- a/r/src/arrowExports.cpp +++ b/r/src/arrowExports.cpp @@ -1,18 +1,19 @@ // Generated by using data-raw/codegen.R -> do not edit by hand +#include +#include + #include "./arrow_exports.h" #include -using namespace Rcpp; - // array.cpp #if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Array__Slice1(const std::shared_ptr& array, int offset); -RcppExport SEXP _arrow_Array__Slice1(SEXP array_sexp, SEXP offset_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type array(array_sexp); - Rcpp::traits::input_parameter::type offset(offset_sexp); - return Rcpp::wrap(Array__Slice1(array, offset)); -END_RCPP +std::shared_ptr Array__Slice1(const std::shared_ptr& array, arrow::r::Index offset); +extern "C" SEXP _arrow_Array__Slice1(SEXP array_sexp, SEXP offset_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type array(array_sexp); + arrow::r::input::type offset(offset_sexp); + return cpp11::as_sexp(Array__Slice1(array, offset)); +END_CPP11 } #else RcppExport SEXP _arrow_Array__Slice1(SEXP array_sexp, SEXP offset_sexp){ @@ -22,14 +23,14 @@ RcppExport SEXP _arrow_Array__Slice1(SEXP array_sexp, SEXP offset_sexp){ // array.cpp #if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Array__Slice2(const std::shared_ptr& array, int offset, int length); -RcppExport SEXP _arrow_Array__Slice2(SEXP array_sexp, SEXP offset_sexp, SEXP length_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type array(array_sexp); - Rcpp::traits::input_parameter::type offset(offset_sexp); - Rcpp::traits::input_parameter::type length(length_sexp); - return Rcpp::wrap(Array__Slice2(array, offset, length)); -END_RCPP +std::shared_ptr Array__Slice2(const std::shared_ptr& array, arrow::r::Index offset, arrow::r::Index 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); + arrow::r::input::type offset(offset_sexp); + arrow::r::input::type length(length_sexp); + return cpp11::as_sexp(Array__Slice2(array, offset, length)); +END_CPP11 } #else RcppExport SEXP _arrow_Array__Slice2(SEXP array_sexp, SEXP offset_sexp, SEXP length_sexp){ @@ -39,13 +40,13 @@ RcppExport SEXP _arrow_Array__Slice2(SEXP array_sexp, SEXP offset_sexp, SEXP len // array.cpp #if defined(ARROW_R_WITH_ARROW) -bool Array__IsNull(const std::shared_ptr& x, int i); -RcppExport SEXP _arrow_Array__IsNull(SEXP x_sexp, SEXP i_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type x(x_sexp); - Rcpp::traits::input_parameter::type i(i_sexp); - return Rcpp::wrap(Array__IsNull(x, i)); -END_RCPP +bool Array__IsNull(const std::shared_ptr& x, arrow::r::Index i); +extern "C" SEXP _arrow_Array__IsNull(SEXP x_sexp, SEXP i_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type x(x_sexp); + arrow::r::input::type i(i_sexp); + return cpp11::as_sexp(Array__IsNull(x, i)); +END_CPP11 } #else RcppExport SEXP _arrow_Array__IsNull(SEXP x_sexp, SEXP i_sexp){ @@ -55,13 +56,13 @@ RcppExport SEXP _arrow_Array__IsNull(SEXP x_sexp, SEXP i_sexp){ // array.cpp #if defined(ARROW_R_WITH_ARROW) -bool Array__IsValid(const std::shared_ptr& x, int i); -RcppExport SEXP _arrow_Array__IsValid(SEXP x_sexp, SEXP i_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type x(x_sexp); - Rcpp::traits::input_parameter::type i(i_sexp); - return Rcpp::wrap(Array__IsValid(x, i)); -END_RCPP +bool Array__IsValid(const std::shared_ptr& x, arrow::r::Index i); +extern "C" SEXP _arrow_Array__IsValid(SEXP x_sexp, SEXP i_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type x(x_sexp); + arrow::r::input::type i(i_sexp); + return cpp11::as_sexp(Array__IsValid(x, i)); +END_CPP11 } #else RcppExport SEXP _arrow_Array__IsValid(SEXP x_sexp, SEXP i_sexp){ @@ -72,11 +73,11 @@ RcppExport SEXP _arrow_Array__IsValid(SEXP x_sexp, SEXP i_sexp){ // array.cpp #if defined(ARROW_R_WITH_ARROW) int Array__length(const std::shared_ptr& x); -RcppExport SEXP _arrow_Array__length(SEXP x_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type x(x_sexp); - return Rcpp::wrap(Array__length(x)); -END_RCPP +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 RcppExport SEXP _arrow_Array__length(SEXP x_sexp){ @@ -87,11 +88,11 @@ RcppExport SEXP _arrow_Array__length(SEXP x_sexp){ // array.cpp #if defined(ARROW_R_WITH_ARROW) int Array__offset(const std::shared_ptr& x); -RcppExport SEXP _arrow_Array__offset(SEXP x_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type x(x_sexp); - return Rcpp::wrap(Array__offset(x)); -END_RCPP +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 RcppExport SEXP _arrow_Array__offset(SEXP x_sexp){ @@ -102,11 +103,11 @@ RcppExport SEXP _arrow_Array__offset(SEXP x_sexp){ // array.cpp #if defined(ARROW_R_WITH_ARROW) int Array__null_count(const std::shared_ptr& x); -RcppExport SEXP _arrow_Array__null_count(SEXP x_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type x(x_sexp); - return Rcpp::wrap(Array__null_count(x)); -END_RCPP +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 RcppExport SEXP _arrow_Array__null_count(SEXP x_sexp){ @@ -117,11 +118,11 @@ RcppExport SEXP _arrow_Array__null_count(SEXP x_sexp){ // array.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr Array__type(const std::shared_ptr& x); -RcppExport SEXP _arrow_Array__type(SEXP x_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type x(x_sexp); - return Rcpp::wrap(Array__type(x)); -END_RCPP +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 RcppExport SEXP _arrow_Array__type(SEXP x_sexp){ @@ -132,11 +133,11 @@ RcppExport SEXP _arrow_Array__type(SEXP x_sexp){ // array.cpp #if defined(ARROW_R_WITH_ARROW) std::string Array__ToString(const std::shared_ptr& x); -RcppExport SEXP _arrow_Array__ToString(SEXP x_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type x(x_sexp); - return Rcpp::wrap(Array__ToString(x)); -END_RCPP +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 RcppExport SEXP _arrow_Array__ToString(SEXP x_sexp){ @@ -147,11 +148,11 @@ RcppExport SEXP _arrow_Array__ToString(SEXP x_sexp){ // array.cpp #if defined(ARROW_R_WITH_ARROW) arrow::Type::type Array__type_id(const std::shared_ptr& x); -RcppExport SEXP _arrow_Array__type_id(SEXP x_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type x(x_sexp); - return Rcpp::wrap(Array__type_id(x)); -END_RCPP +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 RcppExport SEXP _arrow_Array__type_id(SEXP x_sexp){ @@ -162,12 +163,12 @@ RcppExport SEXP _arrow_Array__type_id(SEXP x_sexp){ // array.cpp #if defined(ARROW_R_WITH_ARROW) bool Array__Equals(const std::shared_ptr& lhs, const std::shared_ptr& rhs); -RcppExport SEXP _arrow_Array__Equals(SEXP lhs_sexp, SEXP rhs_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type lhs(lhs_sexp); - Rcpp::traits::input_parameter&>::type rhs(rhs_sexp); - return Rcpp::wrap(Array__Equals(lhs, rhs)); -END_RCPP +extern "C" SEXP _arrow_Array__Equals(SEXP lhs_sexp, SEXP rhs_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type lhs(lhs_sexp); + arrow::r::input&>::type rhs(rhs_sexp); + return cpp11::as_sexp(Array__Equals(lhs, rhs)); +END_CPP11 } #else RcppExport SEXP _arrow_Array__Equals(SEXP lhs_sexp, SEXP rhs_sexp){ @@ -178,12 +179,12 @@ RcppExport SEXP _arrow_Array__Equals(SEXP lhs_sexp, SEXP rhs_sexp){ // array.cpp #if defined(ARROW_R_WITH_ARROW) bool Array__ApproxEquals(const std::shared_ptr& lhs, const std::shared_ptr& rhs); -RcppExport SEXP _arrow_Array__ApproxEquals(SEXP lhs_sexp, SEXP rhs_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type lhs(lhs_sexp); - Rcpp::traits::input_parameter&>::type rhs(rhs_sexp); - return Rcpp::wrap(Array__ApproxEquals(lhs, rhs)); -END_RCPP +extern "C" SEXP _arrow_Array__ApproxEquals(SEXP lhs_sexp, SEXP rhs_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type lhs(lhs_sexp); + arrow::r::input&>::type rhs(rhs_sexp); + return cpp11::as_sexp(Array__ApproxEquals(lhs, rhs)); +END_CPP11 } #else RcppExport SEXP _arrow_Array__ApproxEquals(SEXP lhs_sexp, SEXP rhs_sexp){ @@ -194,11 +195,11 @@ RcppExport SEXP _arrow_Array__ApproxEquals(SEXP lhs_sexp, SEXP rhs_sexp){ // array.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr Array__data(const std::shared_ptr& array); -RcppExport SEXP _arrow_Array__data(SEXP array_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type array(array_sexp); - return Rcpp::wrap(Array__data(array)); -END_RCPP +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 RcppExport SEXP _arrow_Array__data(SEXP array_sexp){ @@ -208,16 +209,16 @@ RcppExport SEXP _arrow_Array__data(SEXP array_sexp){ // array.cpp #if defined(ARROW_R_WITH_ARROW) -bool Array__RangeEquals(const std::shared_ptr& self, const std::shared_ptr& other, int start_idx, int end_idx, int other_start_idx); -RcppExport SEXP _arrow_Array__RangeEquals(SEXP self_sexp, SEXP other_sexp, SEXP start_idx_sexp, SEXP end_idx_sexp, SEXP other_start_idx_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type self(self_sexp); - Rcpp::traits::input_parameter&>::type other(other_sexp); - Rcpp::traits::input_parameter::type start_idx(start_idx_sexp); - Rcpp::traits::input_parameter::type end_idx(end_idx_sexp); - Rcpp::traits::input_parameter::type other_start_idx(other_start_idx_sexp); - return Rcpp::wrap(Array__RangeEquals(self, other, start_idx, end_idx, other_start_idx)); -END_RCPP +bool Array__RangeEquals(const std::shared_ptr& self, const std::shared_ptr& other, arrow::r::Index start_idx, arrow::r::Index end_idx, arrow::r::Index 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); + arrow::r::input&>::type other(other_sexp); + arrow::r::input::type start_idx(start_idx_sexp); + arrow::r::input::type end_idx(end_idx_sexp); + arrow::r::input::type other_start_idx(other_start_idx_sexp); + return cpp11::as_sexp(Array__RangeEquals(self, other, start_idx, end_idx, other_start_idx)); +END_CPP11 } #else RcppExport SEXP _arrow_Array__RangeEquals(SEXP self_sexp, SEXP other_sexp, SEXP start_idx_sexp, SEXP end_idx_sexp, SEXP other_start_idx_sexp){ @@ -228,12 +229,12 @@ RcppExport SEXP _arrow_Array__RangeEquals(SEXP self_sexp, SEXP other_sexp, SEXP // array.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr Array__View(const std::shared_ptr& array, const std::shared_ptr& type); -RcppExport SEXP _arrow_Array__View(SEXP array_sexp, SEXP type_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type array(array_sexp); - Rcpp::traits::input_parameter&>::type type(type_sexp); - return Rcpp::wrap(Array__View(array, type)); -END_RCPP +extern "C" SEXP _arrow_Array__View(SEXP array_sexp, SEXP type_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type array(array_sexp); + arrow::r::input&>::type type(type_sexp); + return cpp11::as_sexp(Array__View(array, type)); +END_CPP11 } #else RcppExport SEXP _arrow_Array__View(SEXP array_sexp, SEXP type_sexp){ @@ -244,12 +245,12 @@ RcppExport SEXP _arrow_Array__View(SEXP array_sexp, SEXP type_sexp){ // array.cpp #if defined(ARROW_R_WITH_ARROW) void Array__Validate(const std::shared_ptr& array); -RcppExport SEXP _arrow_Array__Validate(SEXP array_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type array(array_sexp); +extern "C" SEXP _arrow_Array__Validate(SEXP array_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type array(array_sexp); Array__Validate(array); return R_NilValue; -END_RCPP +END_CPP11 } #else RcppExport SEXP _arrow_Array__Validate(SEXP array_sexp){ @@ -260,11 +261,11 @@ RcppExport SEXP _arrow_Array__Validate(SEXP array_sexp){ // array.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr DictionaryArray__indices(const std::shared_ptr& array); -RcppExport SEXP _arrow_DictionaryArray__indices(SEXP array_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type array(array_sexp); - return Rcpp::wrap(DictionaryArray__indices(array)); -END_RCPP +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 RcppExport SEXP _arrow_DictionaryArray__indices(SEXP array_sexp){ @@ -275,11 +276,11 @@ RcppExport SEXP _arrow_DictionaryArray__indices(SEXP array_sexp){ // array.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr DictionaryArray__dictionary(const std::shared_ptr& array); -RcppExport SEXP _arrow_DictionaryArray__dictionary(SEXP array_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type array(array_sexp); - return Rcpp::wrap(DictionaryArray__dictionary(array)); -END_RCPP +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 RcppExport SEXP _arrow_DictionaryArray__dictionary(SEXP array_sexp){ @@ -290,12 +291,12 @@ RcppExport SEXP _arrow_DictionaryArray__dictionary(SEXP array_sexp){ // array.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr StructArray__field(const std::shared_ptr& array, int i); -RcppExport SEXP _arrow_StructArray__field(SEXP array_sexp, SEXP i_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type array(array_sexp); - Rcpp::traits::input_parameter::type i(i_sexp); - return Rcpp::wrap(StructArray__field(array, i)); -END_RCPP +extern "C" SEXP _arrow_StructArray__field(SEXP array_sexp, SEXP i_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type array(array_sexp); + arrow::r::input::type i(i_sexp); + return cpp11::as_sexp(StructArray__field(array, i)); +END_CPP11 } #else RcppExport SEXP _arrow_StructArray__field(SEXP array_sexp, SEXP i_sexp){ @@ -306,12 +307,12 @@ RcppExport SEXP _arrow_StructArray__field(SEXP array_sexp, SEXP i_sexp){ // array.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr StructArray__GetFieldByName(const std::shared_ptr& array, const std::string& name); -RcppExport SEXP _arrow_StructArray__GetFieldByName(SEXP array_sexp, SEXP name_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type array(array_sexp); - Rcpp::traits::input_parameter::type name(name_sexp); - return Rcpp::wrap(StructArray__GetFieldByName(array, name)); -END_RCPP +extern "C" SEXP _arrow_StructArray__GetFieldByName(SEXP array_sexp, SEXP name_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type array(array_sexp); + arrow::r::input::type name(name_sexp); + return cpp11::as_sexp(StructArray__GetFieldByName(array, name)); +END_CPP11 } #else RcppExport SEXP _arrow_StructArray__GetFieldByName(SEXP array_sexp, SEXP name_sexp){ @@ -322,11 +323,11 @@ RcppExport SEXP _arrow_StructArray__GetFieldByName(SEXP array_sexp, SEXP name_se // array.cpp #if defined(ARROW_R_WITH_ARROW) arrow::ArrayVector StructArray__Flatten(const std::shared_ptr& array); -RcppExport SEXP _arrow_StructArray__Flatten(SEXP array_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type array(array_sexp); - return Rcpp::wrap(StructArray__Flatten(array)); -END_RCPP +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 RcppExport SEXP _arrow_StructArray__Flatten(SEXP array_sexp){ @@ -337,11 +338,11 @@ RcppExport SEXP _arrow_StructArray__Flatten(SEXP array_sexp){ // array.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr ListArray__value_type(const std::shared_ptr& array); -RcppExport SEXP _arrow_ListArray__value_type(SEXP array_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type array(array_sexp); - return Rcpp::wrap(ListArray__value_type(array)); -END_RCPP +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 RcppExport SEXP _arrow_ListArray__value_type(SEXP array_sexp){ @@ -352,11 +353,11 @@ RcppExport SEXP _arrow_ListArray__value_type(SEXP array_sexp){ // array.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr LargeListArray__value_type(const std::shared_ptr& array); -RcppExport SEXP _arrow_LargeListArray__value_type(SEXP array_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type array(array_sexp); - return Rcpp::wrap(LargeListArray__value_type(array)); -END_RCPP +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 RcppExport SEXP _arrow_LargeListArray__value_type(SEXP array_sexp){ @@ -367,11 +368,11 @@ RcppExport SEXP _arrow_LargeListArray__value_type(SEXP array_sexp){ // array.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr ListArray__values(const std::shared_ptr& array); -RcppExport SEXP _arrow_ListArray__values(SEXP array_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type array(array_sexp); - return Rcpp::wrap(ListArray__values(array)); -END_RCPP +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 RcppExport SEXP _arrow_ListArray__values(SEXP array_sexp){ @@ -382,11 +383,11 @@ RcppExport SEXP _arrow_ListArray__values(SEXP array_sexp){ // array.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr LargeListArray__values(const std::shared_ptr& array); -RcppExport SEXP _arrow_LargeListArray__values(SEXP array_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type array(array_sexp); - return Rcpp::wrap(LargeListArray__values(array)); -END_RCPP +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 RcppExport SEXP _arrow_LargeListArray__values(SEXP array_sexp){ @@ -397,12 +398,12 @@ RcppExport SEXP _arrow_LargeListArray__values(SEXP array_sexp){ // array.cpp #if defined(ARROW_R_WITH_ARROW) int32_t ListArray__value_length(const std::shared_ptr& array, int64_t i); -RcppExport SEXP _arrow_ListArray__value_length(SEXP array_sexp, SEXP i_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type array(array_sexp); - Rcpp::traits::input_parameter::type i(i_sexp); - return Rcpp::wrap(ListArray__value_length(array, i)); -END_RCPP +extern "C" SEXP _arrow_ListArray__value_length(SEXP array_sexp, SEXP i_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type array(array_sexp); + arrow::r::input::type i(i_sexp); + return cpp11::as_sexp(ListArray__value_length(array, i)); +END_CPP11 } #else RcppExport SEXP _arrow_ListArray__value_length(SEXP array_sexp, SEXP i_sexp){ @@ -413,12 +414,12 @@ RcppExport SEXP _arrow_ListArray__value_length(SEXP array_sexp, SEXP i_sexp){ // array.cpp #if defined(ARROW_R_WITH_ARROW) int64_t LargeListArray__value_length(const std::shared_ptr& array, int64_t i); -RcppExport SEXP _arrow_LargeListArray__value_length(SEXP array_sexp, SEXP i_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type array(array_sexp); - Rcpp::traits::input_parameter::type i(i_sexp); - return Rcpp::wrap(LargeListArray__value_length(array, i)); -END_RCPP +extern "C" SEXP _arrow_LargeListArray__value_length(SEXP array_sexp, SEXP i_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type array(array_sexp); + arrow::r::input::type i(i_sexp); + return cpp11::as_sexp(LargeListArray__value_length(array, i)); +END_CPP11 } #else RcppExport SEXP _arrow_LargeListArray__value_length(SEXP array_sexp, SEXP i_sexp){ @@ -429,12 +430,12 @@ RcppExport SEXP _arrow_LargeListArray__value_length(SEXP array_sexp, SEXP i_sexp // array.cpp #if defined(ARROW_R_WITH_ARROW) int64_t FixedSizeListArray__value_length(const std::shared_ptr& array, int64_t i); -RcppExport SEXP _arrow_FixedSizeListArray__value_length(SEXP array_sexp, SEXP i_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type array(array_sexp); - Rcpp::traits::input_parameter::type i(i_sexp); - return Rcpp::wrap(FixedSizeListArray__value_length(array, i)); -END_RCPP +extern "C" SEXP _arrow_FixedSizeListArray__value_length(SEXP array_sexp, SEXP i_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type array(array_sexp); + arrow::r::input::type i(i_sexp); + return cpp11::as_sexp(FixedSizeListArray__value_length(array, i)); +END_CPP11 } #else RcppExport SEXP _arrow_FixedSizeListArray__value_length(SEXP array_sexp, SEXP i_sexp){ @@ -445,12 +446,12 @@ RcppExport SEXP _arrow_FixedSizeListArray__value_length(SEXP array_sexp, SEXP i_ // array.cpp #if defined(ARROW_R_WITH_ARROW) int32_t ListArray__value_offset(const std::shared_ptr& array, int64_t i); -RcppExport SEXP _arrow_ListArray__value_offset(SEXP array_sexp, SEXP i_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type array(array_sexp); - Rcpp::traits::input_parameter::type i(i_sexp); - return Rcpp::wrap(ListArray__value_offset(array, i)); -END_RCPP +extern "C" SEXP _arrow_ListArray__value_offset(SEXP array_sexp, SEXP i_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type array(array_sexp); + arrow::r::input::type i(i_sexp); + return cpp11::as_sexp(ListArray__value_offset(array, i)); +END_CPP11 } #else RcppExport SEXP _arrow_ListArray__value_offset(SEXP array_sexp, SEXP i_sexp){ @@ -461,12 +462,12 @@ RcppExport SEXP _arrow_ListArray__value_offset(SEXP array_sexp, SEXP i_sexp){ // array.cpp #if defined(ARROW_R_WITH_ARROW) int64_t LargeListArray__value_offset(const std::shared_ptr& array, int64_t i); -RcppExport SEXP _arrow_LargeListArray__value_offset(SEXP array_sexp, SEXP i_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type array(array_sexp); - Rcpp::traits::input_parameter::type i(i_sexp); - return Rcpp::wrap(LargeListArray__value_offset(array, i)); -END_RCPP +extern "C" SEXP _arrow_LargeListArray__value_offset(SEXP array_sexp, SEXP i_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type array(array_sexp); + arrow::r::input::type i(i_sexp); + return cpp11::as_sexp(LargeListArray__value_offset(array, i)); +END_CPP11 } #else RcppExport SEXP _arrow_LargeListArray__value_offset(SEXP array_sexp, SEXP i_sexp){ @@ -477,12 +478,12 @@ RcppExport SEXP _arrow_LargeListArray__value_offset(SEXP array_sexp, SEXP i_sexp // array.cpp #if defined(ARROW_R_WITH_ARROW) int64_t FixedSizeListArray__value_offset(const std::shared_ptr& array, int64_t i); -RcppExport SEXP _arrow_FixedSizeListArray__value_offset(SEXP array_sexp, SEXP i_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type array(array_sexp); - Rcpp::traits::input_parameter::type i(i_sexp); - return Rcpp::wrap(FixedSizeListArray__value_offset(array, i)); -END_RCPP +extern "C" SEXP _arrow_FixedSizeListArray__value_offset(SEXP array_sexp, SEXP i_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type array(array_sexp); + arrow::r::input::type i(i_sexp); + return cpp11::as_sexp(FixedSizeListArray__value_offset(array, i)); +END_CPP11 } #else RcppExport SEXP _arrow_FixedSizeListArray__value_offset(SEXP array_sexp, SEXP i_sexp){ @@ -493,11 +494,11 @@ RcppExport SEXP _arrow_FixedSizeListArray__value_offset(SEXP array_sexp, SEXP i_ // array.cpp #if defined(ARROW_R_WITH_ARROW) Rcpp::IntegerVector ListArray__raw_value_offsets(const std::shared_ptr& array); -RcppExport SEXP _arrow_ListArray__raw_value_offsets(SEXP array_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type array(array_sexp); - return Rcpp::wrap(ListArray__raw_value_offsets(array)); -END_RCPP +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 RcppExport SEXP _arrow_ListArray__raw_value_offsets(SEXP array_sexp){ @@ -508,11 +509,11 @@ RcppExport SEXP _arrow_ListArray__raw_value_offsets(SEXP array_sexp){ // array.cpp #if defined(ARROW_R_WITH_ARROW) Rcpp::IntegerVector LargeListArray__raw_value_offsets(const std::shared_ptr& array); -RcppExport SEXP _arrow_LargeListArray__raw_value_offsets(SEXP array_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type array(array_sexp); - return Rcpp::wrap(LargeListArray__raw_value_offsets(array)); -END_RCPP +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 RcppExport SEXP _arrow_LargeListArray__raw_value_offsets(SEXP array_sexp){ @@ -523,11 +524,11 @@ RcppExport SEXP _arrow_LargeListArray__raw_value_offsets(SEXP array_sexp){ // array_from_vector.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr Array__infer_type(SEXP x); -RcppExport SEXP _arrow_Array__infer_type(SEXP x_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter::type x(x_sexp); - return Rcpp::wrap(Array__infer_type(x)); -END_RCPP +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 RcppExport SEXP _arrow_Array__infer_type(SEXP x_sexp){ @@ -538,12 +539,12 @@ RcppExport SEXP _arrow_Array__infer_type(SEXP x_sexp){ // array_from_vector.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr Array__from_vector(SEXP x, SEXP s_type); -RcppExport SEXP _arrow_Array__from_vector(SEXP x_sexp, SEXP s_type_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter::type x(x_sexp); - Rcpp::traits::input_parameter::type s_type(s_type_sexp); - return Rcpp::wrap(Array__from_vector(x, s_type)); -END_RCPP +extern "C" SEXP _arrow_Array__from_vector(SEXP x_sexp, SEXP s_type_sexp){ +BEGIN_CPP11 + arrow::r::input::type x(x_sexp); + arrow::r::input::type s_type(s_type_sexp); + return cpp11::as_sexp(Array__from_vector(x, s_type)); +END_CPP11 } #else RcppExport SEXP _arrow_Array__from_vector(SEXP x_sexp, SEXP s_type_sexp){ @@ -553,13 +554,13 @@ RcppExport SEXP _arrow_Array__from_vector(SEXP x_sexp, SEXP s_type_sexp){ // array_from_vector.cpp #if defined(ARROW_R_WITH_ARROW) -std::shared_ptr ChunkedArray__from_list(Rcpp::List chunks, SEXP s_type); -RcppExport SEXP _arrow_ChunkedArray__from_list(SEXP chunks_sexp, SEXP s_type_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter::type chunks(chunks_sexp); - Rcpp::traits::input_parameter::type s_type(s_type_sexp); - return Rcpp::wrap(ChunkedArray__from_list(chunks, s_type)); -END_RCPP +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); + arrow::r::input::type s_type(s_type_sexp); + return cpp11::as_sexp(ChunkedArray__from_list(chunks, s_type)); +END_CPP11 } #else RcppExport SEXP _arrow_ChunkedArray__from_list(SEXP chunks_sexp, SEXP s_type_sexp){ @@ -570,13 +571,13 @@ RcppExport SEXP _arrow_ChunkedArray__from_list(SEXP chunks_sexp, SEXP s_type_sex // array_from_vector.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); -RcppExport SEXP _arrow_DictionaryArray__FromArrays(SEXP type_sexp, SEXP indices_sexp, SEXP dict_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type type(type_sexp); - Rcpp::traits::input_parameter&>::type indices(indices_sexp); - Rcpp::traits::input_parameter&>::type dict(dict_sexp); - return Rcpp::wrap(DictionaryArray__FromArrays(type, indices, dict)); -END_RCPP +extern "C" SEXP _arrow_DictionaryArray__FromArrays(SEXP type_sexp, SEXP indices_sexp, SEXP dict_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type type(type_sexp); + arrow::r::input&>::type indices(indices_sexp); + arrow::r::input&>::type dict(dict_sexp); + return cpp11::as_sexp(DictionaryArray__FromArrays(type, indices, dict)); +END_CPP11 } #else RcppExport SEXP _arrow_DictionaryArray__FromArrays(SEXP type_sexp, SEXP indices_sexp, SEXP dict_sexp){ @@ -587,11 +588,11 @@ RcppExport SEXP _arrow_DictionaryArray__FromArrays(SEXP type_sexp, SEXP indices_ // array_to_vector.cpp #if defined(ARROW_R_WITH_ARROW) SEXP Array__as_vector(const std::shared_ptr& array); -RcppExport SEXP _arrow_Array__as_vector(SEXP array_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type array(array_sexp); - return Rcpp::wrap(Array__as_vector(array)); -END_RCPP +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 RcppExport SEXP _arrow_Array__as_vector(SEXP array_sexp){ @@ -602,11 +603,11 @@ RcppExport SEXP _arrow_Array__as_vector(SEXP array_sexp){ // array_to_vector.cpp #if defined(ARROW_R_WITH_ARROW) SEXP ChunkedArray__as_vector(const std::shared_ptr& chunked_array); -RcppExport SEXP _arrow_ChunkedArray__as_vector(SEXP chunked_array_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type chunked_array(chunked_array_sexp); - return Rcpp::wrap(ChunkedArray__as_vector(chunked_array)); -END_RCPP +extern "C" SEXP _arrow_ChunkedArray__as_vector(SEXP chunked_array_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type chunked_array(chunked_array_sexp); + return cpp11::as_sexp(ChunkedArray__as_vector(chunked_array)); +END_CPP11 } #else RcppExport SEXP _arrow_ChunkedArray__as_vector(SEXP chunked_array_sexp){ @@ -616,13 +617,13 @@ RcppExport SEXP _arrow_ChunkedArray__as_vector(SEXP chunked_array_sexp){ // array_to_vector.cpp #if defined(ARROW_R_WITH_ARROW) -Rcpp::List RecordBatch__to_dataframe(const std::shared_ptr& batch, bool use_threads); -RcppExport SEXP _arrow_RecordBatch__to_dataframe(SEXP batch_sexp, SEXP use_threads_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type batch(batch_sexp); - Rcpp::traits::input_parameter::type use_threads(use_threads_sexp); - return Rcpp::wrap(RecordBatch__to_dataframe(batch, use_threads)); -END_RCPP +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); + arrow::r::input::type use_threads(use_threads_sexp); + return cpp11::as_sexp(RecordBatch__to_dataframe(batch, use_threads)); +END_CPP11 } #else RcppExport SEXP _arrow_RecordBatch__to_dataframe(SEXP batch_sexp, SEXP use_threads_sexp){ @@ -632,13 +633,13 @@ RcppExport SEXP _arrow_RecordBatch__to_dataframe(SEXP batch_sexp, SEXP use_threa // array_to_vector.cpp #if defined(ARROW_R_WITH_ARROW) -Rcpp::List Table__to_dataframe(const std::shared_ptr& table, bool use_threads); -RcppExport SEXP _arrow_Table__to_dataframe(SEXP table_sexp, SEXP use_threads_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type table(table_sexp); - Rcpp::traits::input_parameter::type use_threads(use_threads_sexp); - return Rcpp::wrap(Table__to_dataframe(table, use_threads)); -END_RCPP +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); + arrow::r::input::type use_threads(use_threads_sexp); + return cpp11::as_sexp(Table__to_dataframe(table, use_threads)); +END_CPP11 } #else RcppExport SEXP _arrow_Table__to_dataframe(SEXP table_sexp, SEXP use_threads_sexp){ @@ -649,11 +650,11 @@ RcppExport SEXP _arrow_Table__to_dataframe(SEXP table_sexp, SEXP use_threads_sex // arraydata.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr ArrayData__get_type(const std::shared_ptr& x); -RcppExport SEXP _arrow_ArrayData__get_type(SEXP x_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type x(x_sexp); - return Rcpp::wrap(ArrayData__get_type(x)); -END_RCPP +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 RcppExport SEXP _arrow_ArrayData__get_type(SEXP x_sexp){ @@ -664,11 +665,11 @@ RcppExport SEXP _arrow_ArrayData__get_type(SEXP x_sexp){ // arraydata.cpp #if defined(ARROW_R_WITH_ARROW) int ArrayData__get_length(const std::shared_ptr& x); -RcppExport SEXP _arrow_ArrayData__get_length(SEXP x_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type x(x_sexp); - return Rcpp::wrap(ArrayData__get_length(x)); -END_RCPP +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 RcppExport SEXP _arrow_ArrayData__get_length(SEXP x_sexp){ @@ -679,11 +680,11 @@ RcppExport SEXP _arrow_ArrayData__get_length(SEXP x_sexp){ // arraydata.cpp #if defined(ARROW_R_WITH_ARROW) int ArrayData__get_null_count(const std::shared_ptr& x); -RcppExport SEXP _arrow_ArrayData__get_null_count(SEXP x_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type x(x_sexp); - return Rcpp::wrap(ArrayData__get_null_count(x)); -END_RCPP +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 RcppExport SEXP _arrow_ArrayData__get_null_count(SEXP x_sexp){ @@ -694,11 +695,11 @@ RcppExport SEXP _arrow_ArrayData__get_null_count(SEXP x_sexp){ // arraydata.cpp #if defined(ARROW_R_WITH_ARROW) int ArrayData__get_offset(const std::shared_ptr& x); -RcppExport SEXP _arrow_ArrayData__get_offset(SEXP x_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type x(x_sexp); - return Rcpp::wrap(ArrayData__get_offset(x)); -END_RCPP +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 RcppExport SEXP _arrow_ArrayData__get_offset(SEXP x_sexp){ @@ -708,12 +709,12 @@ RcppExport SEXP _arrow_ArrayData__get_offset(SEXP x_sexp){ // arraydata.cpp #if defined(ARROW_R_WITH_ARROW) -List ArrayData__buffers(const std::shared_ptr& x); -RcppExport SEXP _arrow_ArrayData__buffers(SEXP x_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type x(x_sexp); - return Rcpp::wrap(ArrayData__buffers(x)); -END_RCPP +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 RcppExport SEXP _arrow_ArrayData__buffers(SEXP x_sexp){ @@ -724,11 +725,11 @@ RcppExport SEXP _arrow_ArrayData__buffers(SEXP x_sexp){ // buffer.cpp #if defined(ARROW_R_WITH_ARROW) bool Buffer__is_mutable(const std::shared_ptr& buffer); -RcppExport SEXP _arrow_Buffer__is_mutable(SEXP buffer_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type buffer(buffer_sexp); - return Rcpp::wrap(Buffer__is_mutable(buffer)); -END_RCPP +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 RcppExport SEXP _arrow_Buffer__is_mutable(SEXP buffer_sexp){ @@ -739,12 +740,12 @@ RcppExport SEXP _arrow_Buffer__is_mutable(SEXP buffer_sexp){ // buffer.cpp #if defined(ARROW_R_WITH_ARROW) void Buffer__ZeroPadding(const std::shared_ptr& buffer); -RcppExport SEXP _arrow_Buffer__ZeroPadding(SEXP buffer_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type buffer(buffer_sexp); +extern "C" SEXP _arrow_Buffer__ZeroPadding(SEXP buffer_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type buffer(buffer_sexp); Buffer__ZeroPadding(buffer); return R_NilValue; -END_RCPP +END_CPP11 } #else RcppExport SEXP _arrow_Buffer__ZeroPadding(SEXP buffer_sexp){ @@ -755,11 +756,11 @@ RcppExport SEXP _arrow_Buffer__ZeroPadding(SEXP buffer_sexp){ // buffer.cpp #if defined(ARROW_R_WITH_ARROW) int64_t Buffer__capacity(const std::shared_ptr& buffer); -RcppExport SEXP _arrow_Buffer__capacity(SEXP buffer_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type buffer(buffer_sexp); - return Rcpp::wrap(Buffer__capacity(buffer)); -END_RCPP +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 RcppExport SEXP _arrow_Buffer__capacity(SEXP buffer_sexp){ @@ -770,11 +771,11 @@ RcppExport SEXP _arrow_Buffer__capacity(SEXP buffer_sexp){ // buffer.cpp #if defined(ARROW_R_WITH_ARROW) int64_t Buffer__size(const std::shared_ptr& buffer); -RcppExport SEXP _arrow_Buffer__size(SEXP buffer_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type buffer(buffer_sexp); - return Rcpp::wrap(Buffer__size(buffer)); -END_RCPP +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 RcppExport SEXP _arrow_Buffer__size(SEXP buffer_sexp){ @@ -785,11 +786,11 @@ RcppExport SEXP _arrow_Buffer__size(SEXP buffer_sexp){ // buffer.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr r___RBuffer__initialize(SEXP x); -RcppExport SEXP _arrow_r___RBuffer__initialize(SEXP x_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter::type x(x_sexp); - return Rcpp::wrap(r___RBuffer__initialize(x)); -END_RCPP +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 RcppExport SEXP _arrow_r___RBuffer__initialize(SEXP x_sexp){ @@ -800,11 +801,11 @@ RcppExport SEXP _arrow_r___RBuffer__initialize(SEXP x_sexp){ // buffer.cpp #if defined(ARROW_R_WITH_ARROW) Rcpp::RawVector Buffer__data(const std::shared_ptr& buffer); -RcppExport SEXP _arrow_Buffer__data(SEXP buffer_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type buffer(buffer_sexp); - return Rcpp::wrap(Buffer__data(buffer)); -END_RCPP +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 RcppExport SEXP _arrow_Buffer__data(SEXP buffer_sexp){ @@ -815,12 +816,12 @@ RcppExport SEXP _arrow_Buffer__data(SEXP buffer_sexp){ // buffer.cpp #if defined(ARROW_R_WITH_ARROW) bool Buffer__Equals(const std::shared_ptr& x, const std::shared_ptr& y); -RcppExport SEXP _arrow_Buffer__Equals(SEXP x_sexp, SEXP y_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type x(x_sexp); - Rcpp::traits::input_parameter&>::type y(y_sexp); - return Rcpp::wrap(Buffer__Equals(x, y)); -END_RCPP +extern "C" SEXP _arrow_Buffer__Equals(SEXP x_sexp, SEXP y_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type x(x_sexp); + arrow::r::input&>::type y(y_sexp); + return cpp11::as_sexp(Buffer__Equals(x, y)); +END_CPP11 } #else RcppExport SEXP _arrow_Buffer__Equals(SEXP x_sexp, SEXP y_sexp){ @@ -831,11 +832,11 @@ RcppExport SEXP _arrow_Buffer__Equals(SEXP x_sexp, SEXP y_sexp){ // chunkedarray.cpp #if defined(ARROW_R_WITH_ARROW) int ChunkedArray__length(const std::shared_ptr& chunked_array); -RcppExport SEXP _arrow_ChunkedArray__length(SEXP chunked_array_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type chunked_array(chunked_array_sexp); - return Rcpp::wrap(ChunkedArray__length(chunked_array)); -END_RCPP +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 RcppExport SEXP _arrow_ChunkedArray__length(SEXP chunked_array_sexp){ @@ -846,11 +847,11 @@ RcppExport SEXP _arrow_ChunkedArray__length(SEXP chunked_array_sexp){ // chunkedarray.cpp #if defined(ARROW_R_WITH_ARROW) int ChunkedArray__null_count(const std::shared_ptr& chunked_array); -RcppExport SEXP _arrow_ChunkedArray__null_count(SEXP chunked_array_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type chunked_array(chunked_array_sexp); - return Rcpp::wrap(ChunkedArray__null_count(chunked_array)); -END_RCPP +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 RcppExport SEXP _arrow_ChunkedArray__null_count(SEXP chunked_array_sexp){ @@ -861,11 +862,11 @@ RcppExport SEXP _arrow_ChunkedArray__null_count(SEXP chunked_array_sexp){ // chunkedarray.cpp #if defined(ARROW_R_WITH_ARROW) int ChunkedArray__num_chunks(const std::shared_ptr& chunked_array); -RcppExport SEXP _arrow_ChunkedArray__num_chunks(SEXP chunked_array_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type chunked_array(chunked_array_sexp); - return Rcpp::wrap(ChunkedArray__num_chunks(chunked_array)); -END_RCPP +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 RcppExport SEXP _arrow_ChunkedArray__num_chunks(SEXP chunked_array_sexp){ @@ -876,12 +877,12 @@ RcppExport SEXP _arrow_ChunkedArray__num_chunks(SEXP chunked_array_sexp){ // chunkedarray.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr ChunkedArray__chunk(const std::shared_ptr& chunked_array, int i); -RcppExport SEXP _arrow_ChunkedArray__chunk(SEXP chunked_array_sexp, SEXP i_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type chunked_array(chunked_array_sexp); - Rcpp::traits::input_parameter::type i(i_sexp); - return Rcpp::wrap(ChunkedArray__chunk(chunked_array, i)); -END_RCPP +extern "C" SEXP _arrow_ChunkedArray__chunk(SEXP chunked_array_sexp, SEXP i_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type chunked_array(chunked_array_sexp); + arrow::r::input::type i(i_sexp); + return cpp11::as_sexp(ChunkedArray__chunk(chunked_array, i)); +END_CPP11 } #else RcppExport SEXP _arrow_ChunkedArray__chunk(SEXP chunked_array_sexp, SEXP i_sexp){ @@ -891,12 +892,12 @@ RcppExport SEXP _arrow_ChunkedArray__chunk(SEXP chunked_array_sexp, SEXP i_sexp) // chunkedarray.cpp #if defined(ARROW_R_WITH_ARROW) -List ChunkedArray__chunks(const std::shared_ptr& chunked_array); -RcppExport SEXP _arrow_ChunkedArray__chunks(SEXP chunked_array_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type chunked_array(chunked_array_sexp); - return Rcpp::wrap(ChunkedArray__chunks(chunked_array)); -END_RCPP +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 RcppExport SEXP _arrow_ChunkedArray__chunks(SEXP chunked_array_sexp){ @@ -907,11 +908,11 @@ RcppExport SEXP _arrow_ChunkedArray__chunks(SEXP chunked_array_sexp){ // chunkedarray.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr ChunkedArray__type(const std::shared_ptr& chunked_array); -RcppExport SEXP _arrow_ChunkedArray__type(SEXP chunked_array_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type chunked_array(chunked_array_sexp); - return Rcpp::wrap(ChunkedArray__type(chunked_array)); -END_RCPP +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 RcppExport SEXP _arrow_ChunkedArray__type(SEXP chunked_array_sexp){ @@ -921,13 +922,13 @@ RcppExport SEXP _arrow_ChunkedArray__type(SEXP chunked_array_sexp){ // chunkedarray.cpp #if defined(ARROW_R_WITH_ARROW) -std::shared_ptr ChunkedArray__Slice1(const std::shared_ptr& chunked_array, int offset); -RcppExport SEXP _arrow_ChunkedArray__Slice1(SEXP chunked_array_sexp, SEXP offset_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type chunked_array(chunked_array_sexp); - Rcpp::traits::input_parameter::type offset(offset_sexp); - return Rcpp::wrap(ChunkedArray__Slice1(chunked_array, offset)); -END_RCPP +std::shared_ptr ChunkedArray__Slice1(const std::shared_ptr& chunked_array, arrow::r::Index 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); + arrow::r::input::type offset(offset_sexp); + return cpp11::as_sexp(ChunkedArray__Slice1(chunked_array, offset)); +END_CPP11 } #else RcppExport SEXP _arrow_ChunkedArray__Slice1(SEXP chunked_array_sexp, SEXP offset_sexp){ @@ -937,14 +938,14 @@ RcppExport SEXP _arrow_ChunkedArray__Slice1(SEXP chunked_array_sexp, SEXP offset // chunkedarray.cpp #if defined(ARROW_R_WITH_ARROW) -std::shared_ptr ChunkedArray__Slice2(const std::shared_ptr& chunked_array, int offset, int length); -RcppExport SEXP _arrow_ChunkedArray__Slice2(SEXP chunked_array_sexp, SEXP offset_sexp, SEXP length_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type chunked_array(chunked_array_sexp); - Rcpp::traits::input_parameter::type offset(offset_sexp); - Rcpp::traits::input_parameter::type length(length_sexp); - return Rcpp::wrap(ChunkedArray__Slice2(chunked_array, offset, length)); -END_RCPP +std::shared_ptr ChunkedArray__Slice2(const std::shared_ptr& chunked_array, arrow::r::Index offset, arrow::r::Index 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); + arrow::r::input::type offset(offset_sexp); + arrow::r::input::type length(length_sexp); + return cpp11::as_sexp(ChunkedArray__Slice2(chunked_array, offset, length)); +END_CPP11 } #else RcppExport SEXP _arrow_ChunkedArray__Slice2(SEXP chunked_array_sexp, SEXP offset_sexp, SEXP length_sexp){ @@ -955,12 +956,12 @@ RcppExport SEXP _arrow_ChunkedArray__Slice2(SEXP chunked_array_sexp, SEXP offset // chunkedarray.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr ChunkedArray__View(const std::shared_ptr& array, const std::shared_ptr& type); -RcppExport SEXP _arrow_ChunkedArray__View(SEXP array_sexp, SEXP type_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type array(array_sexp); - Rcpp::traits::input_parameter&>::type type(type_sexp); - return Rcpp::wrap(ChunkedArray__View(array, type)); -END_RCPP +extern "C" SEXP _arrow_ChunkedArray__View(SEXP array_sexp, SEXP type_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type array(array_sexp); + arrow::r::input&>::type type(type_sexp); + return cpp11::as_sexp(ChunkedArray__View(array, type)); +END_CPP11 } #else RcppExport SEXP _arrow_ChunkedArray__View(SEXP array_sexp, SEXP type_sexp){ @@ -971,12 +972,12 @@ RcppExport SEXP _arrow_ChunkedArray__View(SEXP array_sexp, SEXP type_sexp){ // chunkedarray.cpp #if defined(ARROW_R_WITH_ARROW) void ChunkedArray__Validate(const std::shared_ptr& chunked_array); -RcppExport SEXP _arrow_ChunkedArray__Validate(SEXP chunked_array_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type chunked_array(chunked_array_sexp); +extern "C" SEXP _arrow_ChunkedArray__Validate(SEXP chunked_array_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type chunked_array(chunked_array_sexp); ChunkedArray__Validate(chunked_array); return R_NilValue; -END_RCPP +END_CPP11 } #else RcppExport SEXP _arrow_ChunkedArray__Validate(SEXP chunked_array_sexp){ @@ -987,12 +988,12 @@ RcppExport SEXP _arrow_ChunkedArray__Validate(SEXP chunked_array_sexp){ // chunkedarray.cpp #if defined(ARROW_R_WITH_ARROW) bool ChunkedArray__Equals(const std::shared_ptr& x, const std::shared_ptr& y); -RcppExport SEXP _arrow_ChunkedArray__Equals(SEXP x_sexp, SEXP y_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type x(x_sexp); - Rcpp::traits::input_parameter&>::type y(y_sexp); - return Rcpp::wrap(ChunkedArray__Equals(x, y)); -END_RCPP +extern "C" SEXP _arrow_ChunkedArray__Equals(SEXP x_sexp, SEXP y_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type x(x_sexp); + arrow::r::input&>::type y(y_sexp); + return cpp11::as_sexp(ChunkedArray__Equals(x, y)); +END_CPP11 } #else RcppExport SEXP _arrow_ChunkedArray__Equals(SEXP x_sexp, SEXP y_sexp){ @@ -1003,11 +1004,11 @@ RcppExport SEXP _arrow_ChunkedArray__Equals(SEXP x_sexp, SEXP y_sexp){ // chunkedarray.cpp #if defined(ARROW_R_WITH_ARROW) std::string ChunkedArray__ToString(const std::shared_ptr& x); -RcppExport SEXP _arrow_ChunkedArray__ToString(SEXP x_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type x(x_sexp); - return Rcpp::wrap(ChunkedArray__ToString(x)); -END_RCPP +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 RcppExport SEXP _arrow_ChunkedArray__ToString(SEXP x_sexp){ @@ -1017,13 +1018,13 @@ RcppExport SEXP _arrow_ChunkedArray__ToString(SEXP x_sexp){ // compression.cpp #if defined(ARROW_R_WITH_ARROW) -std::shared_ptr util___Codec__Create(arrow::Compression::type codec, int compression_level); -RcppExport SEXP _arrow_util___Codec__Create(SEXP codec_sexp, SEXP compression_level_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter::type codec(codec_sexp); - Rcpp::traits::input_parameter::type compression_level(compression_level_sexp); - return Rcpp::wrap(util___Codec__Create(codec, compression_level)); -END_RCPP +std::shared_ptr util___Codec__Create(arrow::Compression::type codec, arrow::r::Index 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); + arrow::r::input::type compression_level(compression_level_sexp); + return cpp11::as_sexp(util___Codec__Create(codec, compression_level)); +END_CPP11 } #else RcppExport SEXP _arrow_util___Codec__Create(SEXP codec_sexp, SEXP compression_level_sexp){ @@ -1034,11 +1035,11 @@ RcppExport SEXP _arrow_util___Codec__Create(SEXP codec_sexp, SEXP compression_le // compression.cpp #if defined(ARROW_R_WITH_ARROW) std::string util___Codec__name(const std::shared_ptr& codec); -RcppExport SEXP _arrow_util___Codec__name(SEXP codec_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type codec(codec_sexp); - return Rcpp::wrap(util___Codec__name(codec)); -END_RCPP +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 RcppExport SEXP _arrow_util___Codec__name(SEXP codec_sexp){ @@ -1049,11 +1050,11 @@ RcppExport SEXP _arrow_util___Codec__name(SEXP codec_sexp){ // compression.cpp #if defined(ARROW_R_WITH_ARROW) bool util___Codec__IsAvailable(arrow::Compression::type codec); -RcppExport SEXP _arrow_util___Codec__IsAvailable(SEXP codec_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter::type codec(codec_sexp); - return Rcpp::wrap(util___Codec__IsAvailable(codec)); -END_RCPP +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 RcppExport SEXP _arrow_util___Codec__IsAvailable(SEXP codec_sexp){ @@ -1064,12 +1065,12 @@ RcppExport SEXP _arrow_util___Codec__IsAvailable(SEXP codec_sexp){ // compression.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr io___CompressedOutputStream__Make(const std::shared_ptr& codec, const std::shared_ptr& raw); -RcppExport SEXP _arrow_io___CompressedOutputStream__Make(SEXP codec_sexp, SEXP raw_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type codec(codec_sexp); - Rcpp::traits::input_parameter&>::type raw(raw_sexp); - return Rcpp::wrap(io___CompressedOutputStream__Make(codec, raw)); -END_RCPP +extern "C" SEXP _arrow_io___CompressedOutputStream__Make(SEXP codec_sexp, SEXP raw_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type codec(codec_sexp); + arrow::r::input&>::type raw(raw_sexp); + return cpp11::as_sexp(io___CompressedOutputStream__Make(codec, raw)); +END_CPP11 } #else RcppExport SEXP _arrow_io___CompressedOutputStream__Make(SEXP codec_sexp, SEXP raw_sexp){ @@ -1080,12 +1081,12 @@ RcppExport SEXP _arrow_io___CompressedOutputStream__Make(SEXP codec_sexp, SEXP r // compression.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr io___CompressedInputStream__Make(const std::shared_ptr& codec, const std::shared_ptr& raw); -RcppExport SEXP _arrow_io___CompressedInputStream__Make(SEXP codec_sexp, SEXP raw_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type codec(codec_sexp); - Rcpp::traits::input_parameter&>::type raw(raw_sexp); - return Rcpp::wrap(io___CompressedInputStream__Make(codec, raw)); -END_RCPP +extern "C" SEXP _arrow_io___CompressedInputStream__Make(SEXP codec_sexp, SEXP raw_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type codec(codec_sexp); + arrow::r::input&>::type raw(raw_sexp); + return cpp11::as_sexp(io___CompressedInputStream__Make(codec, raw)); +END_CPP11 } #else RcppExport SEXP _arrow_io___CompressedInputStream__Make(SEXP codec_sexp, SEXP raw_sexp){ @@ -1096,13 +1097,13 @@ RcppExport SEXP _arrow_io___CompressedInputStream__Make(SEXP codec_sexp, SEXP ra // compute.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr compute___CastOptions__initialize(bool allow_int_overflow, bool allow_time_truncate, bool allow_float_truncate); -RcppExport SEXP _arrow_compute___CastOptions__initialize(SEXP allow_int_overflow_sexp, SEXP allow_time_truncate_sexp, SEXP allow_float_truncate_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter::type allow_int_overflow(allow_int_overflow_sexp); - Rcpp::traits::input_parameter::type allow_time_truncate(allow_time_truncate_sexp); - Rcpp::traits::input_parameter::type allow_float_truncate(allow_float_truncate_sexp); - return Rcpp::wrap(compute___CastOptions__initialize(allow_int_overflow, allow_time_truncate, allow_float_truncate)); -END_RCPP +extern "C" SEXP _arrow_compute___CastOptions__initialize(SEXP allow_int_overflow_sexp, SEXP allow_time_truncate_sexp, SEXP allow_float_truncate_sexp){ +BEGIN_CPP11 + arrow::r::input::type allow_int_overflow(allow_int_overflow_sexp); + arrow::r::input::type allow_time_truncate(allow_time_truncate_sexp); + arrow::r::input::type allow_float_truncate(allow_float_truncate_sexp); + return cpp11::as_sexp(compute___CastOptions__initialize(allow_int_overflow, allow_time_truncate, allow_float_truncate)); +END_CPP11 } #else RcppExport SEXP _arrow_compute___CastOptions__initialize(SEXP allow_int_overflow_sexp, SEXP allow_time_truncate_sexp, SEXP allow_float_truncate_sexp){ @@ -1113,13 +1114,13 @@ RcppExport SEXP _arrow_compute___CastOptions__initialize(SEXP allow_int_overflow // compute.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr Array__cast(const std::shared_ptr& array, const std::shared_ptr& target_type, const std::shared_ptr& options); -RcppExport SEXP _arrow_Array__cast(SEXP array_sexp, SEXP target_type_sexp, SEXP options_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type array(array_sexp); - Rcpp::traits::input_parameter&>::type target_type(target_type_sexp); - Rcpp::traits::input_parameter&>::type options(options_sexp); - return Rcpp::wrap(Array__cast(array, target_type, options)); -END_RCPP +extern "C" SEXP _arrow_Array__cast(SEXP array_sexp, SEXP target_type_sexp, SEXP options_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type array(array_sexp); + arrow::r::input&>::type target_type(target_type_sexp); + arrow::r::input&>::type options(options_sexp); + return cpp11::as_sexp(Array__cast(array, target_type, options)); +END_CPP11 } #else RcppExport SEXP _arrow_Array__cast(SEXP array_sexp, SEXP target_type_sexp, SEXP options_sexp){ @@ -1130,13 +1131,13 @@ RcppExport SEXP _arrow_Array__cast(SEXP array_sexp, SEXP target_type_sexp, SEXP // compute.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr ChunkedArray__cast(const std::shared_ptr& chunked_array, const std::shared_ptr& target_type, const std::shared_ptr& options); -RcppExport SEXP _arrow_ChunkedArray__cast(SEXP chunked_array_sexp, SEXP target_type_sexp, SEXP options_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type chunked_array(chunked_array_sexp); - Rcpp::traits::input_parameter&>::type target_type(target_type_sexp); - Rcpp::traits::input_parameter&>::type options(options_sexp); - return Rcpp::wrap(ChunkedArray__cast(chunked_array, target_type, options)); -END_RCPP +extern "C" SEXP _arrow_ChunkedArray__cast(SEXP chunked_array_sexp, SEXP target_type_sexp, SEXP options_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type chunked_array(chunked_array_sexp); + arrow::r::input&>::type target_type(target_type_sexp); + arrow::r::input&>::type options(options_sexp); + return cpp11::as_sexp(ChunkedArray__cast(chunked_array, target_type, options)); +END_CPP11 } #else RcppExport SEXP _arrow_ChunkedArray__cast(SEXP chunked_array_sexp, SEXP target_type_sexp, SEXP options_sexp){ @@ -1147,13 +1148,13 @@ RcppExport SEXP _arrow_ChunkedArray__cast(SEXP chunked_array_sexp, SEXP target_t // compute.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr RecordBatch__cast(const std::shared_ptr& batch, const std::shared_ptr& schema, const std::shared_ptr& options); -RcppExport SEXP _arrow_RecordBatch__cast(SEXP batch_sexp, SEXP schema_sexp, SEXP options_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type batch(batch_sexp); - Rcpp::traits::input_parameter&>::type schema(schema_sexp); - Rcpp::traits::input_parameter&>::type options(options_sexp); - return Rcpp::wrap(RecordBatch__cast(batch, schema, options)); -END_RCPP +extern "C" SEXP _arrow_RecordBatch__cast(SEXP batch_sexp, SEXP schema_sexp, SEXP options_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type batch(batch_sexp); + arrow::r::input&>::type schema(schema_sexp); + arrow::r::input&>::type options(options_sexp); + return cpp11::as_sexp(RecordBatch__cast(batch, schema, options)); +END_CPP11 } #else RcppExport SEXP _arrow_RecordBatch__cast(SEXP batch_sexp, SEXP schema_sexp, SEXP options_sexp){ @@ -1164,13 +1165,13 @@ RcppExport SEXP _arrow_RecordBatch__cast(SEXP batch_sexp, SEXP schema_sexp, SEXP // compute.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr Table__cast(const std::shared_ptr& table, const std::shared_ptr& schema, const std::shared_ptr& options); -RcppExport SEXP _arrow_Table__cast(SEXP table_sexp, SEXP schema_sexp, SEXP options_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type table(table_sexp); - Rcpp::traits::input_parameter&>::type schema(schema_sexp); - Rcpp::traits::input_parameter&>::type options(options_sexp); - return Rcpp::wrap(Table__cast(table, schema, options)); -END_RCPP +extern "C" SEXP _arrow_Table__cast(SEXP table_sexp, SEXP schema_sexp, SEXP options_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type table(table_sexp); + arrow::r::input&>::type schema(schema_sexp); + arrow::r::input&>::type options(options_sexp); + return cpp11::as_sexp(Table__cast(table, schema, options)); +END_CPP11 } #else RcppExport SEXP _arrow_Table__cast(SEXP table_sexp, SEXP schema_sexp, SEXP options_sexp){ @@ -1180,14 +1181,14 @@ RcppExport SEXP _arrow_Table__cast(SEXP table_sexp, SEXP schema_sexp, SEXP optio // compute.cpp #if defined(ARROW_R_WITH_ARROW) -SEXP compute__CallFunction(std::string func_name, List_ args, List_ options); -RcppExport SEXP _arrow_compute__CallFunction(SEXP func_name_sexp, SEXP args_sexp, SEXP options_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter::type func_name(func_name_sexp); - Rcpp::traits::input_parameter::type args(args_sexp); - Rcpp::traits::input_parameter::type options(options_sexp); - return Rcpp::wrap(compute__CallFunction(func_name, args, options)); -END_RCPP +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); + arrow::r::input::type args(args_sexp); + arrow::r::input::type options(options_sexp); + return cpp11::as_sexp(compute__CallFunction(func_name, args, options)); +END_CPP11 } #else RcppExport SEXP _arrow_compute__CallFunction(SEXP func_name_sexp, SEXP args_sexp, SEXP options_sexp){ @@ -1197,12 +1198,12 @@ RcppExport SEXP _arrow_compute__CallFunction(SEXP func_name_sexp, SEXP args_sexp // csv.cpp #if defined(ARROW_R_WITH_ARROW) -std::shared_ptr csv___ReadOptions__initialize(List_ options); -RcppExport SEXP _arrow_csv___ReadOptions__initialize(SEXP options_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter::type options(options_sexp); - return Rcpp::wrap(csv___ReadOptions__initialize(options)); -END_RCPP +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 RcppExport SEXP _arrow_csv___ReadOptions__initialize(SEXP options_sexp){ @@ -1212,12 +1213,12 @@ RcppExport SEXP _arrow_csv___ReadOptions__initialize(SEXP options_sexp){ // csv.cpp #if defined(ARROW_R_WITH_ARROW) -std::shared_ptr csv___ParseOptions__initialize(List_ options); -RcppExport SEXP _arrow_csv___ParseOptions__initialize(SEXP options_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter::type options(options_sexp); - return Rcpp::wrap(csv___ParseOptions__initialize(options)); -END_RCPP +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 RcppExport SEXP _arrow_csv___ParseOptions__initialize(SEXP options_sexp){ @@ -1227,12 +1228,12 @@ RcppExport SEXP _arrow_csv___ParseOptions__initialize(SEXP options_sexp){ // csv.cpp #if defined(ARROW_R_WITH_ARROW) -std::shared_ptr csv___ConvertOptions__initialize(List_ options); -RcppExport SEXP _arrow_csv___ConvertOptions__initialize(SEXP options_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter::type options(options_sexp); - return Rcpp::wrap(csv___ConvertOptions__initialize(options)); -END_RCPP +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 RcppExport SEXP _arrow_csv___ConvertOptions__initialize(SEXP options_sexp){ @@ -1243,14 +1244,14 @@ RcppExport SEXP _arrow_csv___ConvertOptions__initialize(SEXP options_sexp){ // 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); -RcppExport SEXP _arrow_csv___TableReader__Make(SEXP input_sexp, SEXP read_options_sexp, SEXP parse_options_sexp, SEXP convert_options_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type input(input_sexp); - Rcpp::traits::input_parameter&>::type read_options(read_options_sexp); - Rcpp::traits::input_parameter&>::type parse_options(parse_options_sexp); - Rcpp::traits::input_parameter&>::type convert_options(convert_options_sexp); - return Rcpp::wrap(csv___TableReader__Make(input, read_options, parse_options, convert_options)); -END_RCPP +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); + arrow::r::input&>::type read_options(read_options_sexp); + arrow::r::input&>::type parse_options(parse_options_sexp); + arrow::r::input&>::type convert_options(convert_options_sexp); + return cpp11::as_sexp(csv___TableReader__Make(input, read_options, parse_options, convert_options)); +END_CPP11 } #else RcppExport SEXP _arrow_csv___TableReader__Make(SEXP input_sexp, SEXP read_options_sexp, SEXP parse_options_sexp, SEXP convert_options_sexp){ @@ -1261,11 +1262,11 @@ RcppExport SEXP _arrow_csv___TableReader__Make(SEXP input_sexp, SEXP read_option // csv.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr csv___TableReader__Read(const std::shared_ptr& table_reader); -RcppExport SEXP _arrow_csv___TableReader__Read(SEXP table_reader_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type table_reader(table_reader_sexp); - return Rcpp::wrap(csv___TableReader__Read(table_reader)); -END_RCPP +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 RcppExport SEXP _arrow_csv___TableReader__Read(SEXP table_reader_sexp){ @@ -1276,11 +1277,11 @@ RcppExport SEXP _arrow_csv___TableReader__Read(SEXP table_reader_sexp){ // dataset.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr dataset___Dataset__NewScan(const std::shared_ptr& ds); -RcppExport SEXP _arrow_dataset___Dataset__NewScan(SEXP ds_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type ds(ds_sexp); - return Rcpp::wrap(dataset___Dataset__NewScan(ds)); -END_RCPP +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 RcppExport SEXP _arrow_dataset___Dataset__NewScan(SEXP ds_sexp){ @@ -1291,11 +1292,11 @@ RcppExport SEXP _arrow_dataset___Dataset__NewScan(SEXP ds_sexp){ // dataset.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr dataset___Dataset__schema(const std::shared_ptr& dataset); -RcppExport SEXP _arrow_dataset___Dataset__schema(SEXP dataset_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type dataset(dataset_sexp); - return Rcpp::wrap(dataset___Dataset__schema(dataset)); -END_RCPP +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 RcppExport SEXP _arrow_dataset___Dataset__schema(SEXP dataset_sexp){ @@ -1306,13 +1307,13 @@ RcppExport SEXP _arrow_dataset___Dataset__schema(SEXP dataset_sexp){ // dataset.cpp #if defined(ARROW_R_WITH_ARROW) std::string dataset___Dataset__type_name(const std::shared_ptr& dataset); -RcppExport SEXP _arrow_dataset___Dataset__type_name(SEXP dataset_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type dataset(dataset_sexp); - return Rcpp::wrap(dataset___Dataset__type_name(dataset)); -END_RCPP -} -#else +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 RcppExport SEXP _arrow_dataset___Dataset__type_name(SEXP dataset_sexp){ Rf_error("Cannot call dataset___Dataset__type_name(). Please use arrow::install_arrow() to install required runtime libraries. "); } @@ -1321,12 +1322,12 @@ RcppExport SEXP _arrow_dataset___Dataset__type_name(SEXP dataset_sexp){ // dataset.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr dataset___Dataset__ReplaceSchema(const std::shared_ptr& dataset, const std::shared_ptr& schm); -RcppExport SEXP _arrow_dataset___Dataset__ReplaceSchema(SEXP dataset_sexp, SEXP schm_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type dataset(dataset_sexp); - Rcpp::traits::input_parameter&>::type schm(schm_sexp); - return Rcpp::wrap(dataset___Dataset__ReplaceSchema(dataset, schm)); -END_RCPP +extern "C" SEXP _arrow_dataset___Dataset__ReplaceSchema(SEXP dataset_sexp, SEXP schm_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type dataset(dataset_sexp); + arrow::r::input&>::type schm(schm_sexp); + return cpp11::as_sexp(dataset___Dataset__ReplaceSchema(dataset, schm)); +END_CPP11 } #else RcppExport SEXP _arrow_dataset___Dataset__ReplaceSchema(SEXP dataset_sexp, SEXP schm_sexp){ @@ -1337,12 +1338,12 @@ RcppExport SEXP _arrow_dataset___Dataset__ReplaceSchema(SEXP dataset_sexp, SEXP // dataset.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr dataset___UnionDataset__create(const ds::DatasetVector& datasets, const std::shared_ptr& schm); -RcppExport SEXP _arrow_dataset___UnionDataset__create(SEXP datasets_sexp, SEXP schm_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter::type datasets(datasets_sexp); - Rcpp::traits::input_parameter&>::type schm(schm_sexp); - return Rcpp::wrap(dataset___UnionDataset__create(datasets, schm)); -END_RCPP +extern "C" SEXP _arrow_dataset___UnionDataset__create(SEXP datasets_sexp, SEXP schm_sexp){ +BEGIN_CPP11 + arrow::r::input::type datasets(datasets_sexp); + arrow::r::input&>::type schm(schm_sexp); + return cpp11::as_sexp(dataset___UnionDataset__create(datasets, schm)); +END_CPP11 } #else RcppExport SEXP _arrow_dataset___UnionDataset__create(SEXP datasets_sexp, SEXP schm_sexp){ @@ -1353,11 +1354,11 @@ RcppExport SEXP _arrow_dataset___UnionDataset__create(SEXP datasets_sexp, SEXP s // dataset.cpp #if defined(ARROW_R_WITH_ARROW) ds::DatasetVector dataset___UnionDataset__children(const std::shared_ptr& ds); -RcppExport SEXP _arrow_dataset___UnionDataset__children(SEXP ds_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type ds(ds_sexp); - return Rcpp::wrap(dataset___UnionDataset__children(ds)); -END_RCPP +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 RcppExport SEXP _arrow_dataset___UnionDataset__children(SEXP ds_sexp){ @@ -1368,11 +1369,11 @@ RcppExport SEXP _arrow_dataset___UnionDataset__children(SEXP ds_sexp){ // dataset.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr dataset___FileSystemDataset__format(const std::shared_ptr& dataset); -RcppExport SEXP _arrow_dataset___FileSystemDataset__format(SEXP dataset_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type dataset(dataset_sexp); - return Rcpp::wrap(dataset___FileSystemDataset__format(dataset)); -END_RCPP +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 RcppExport SEXP _arrow_dataset___FileSystemDataset__format(SEXP dataset_sexp){ @@ -1383,11 +1384,11 @@ RcppExport SEXP _arrow_dataset___FileSystemDataset__format(SEXP dataset_sexp){ // dataset.cpp #if defined(ARROW_R_WITH_ARROW) std::vector dataset___FileSystemDataset__files(const std::shared_ptr& dataset); -RcppExport SEXP _arrow_dataset___FileSystemDataset__files(SEXP dataset_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type dataset(dataset_sexp); - return Rcpp::wrap(dataset___FileSystemDataset__files(dataset)); -END_RCPP +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 RcppExport SEXP _arrow_dataset___FileSystemDataset__files(SEXP dataset_sexp){ @@ -1398,12 +1399,12 @@ RcppExport SEXP _arrow_dataset___FileSystemDataset__files(SEXP dataset_sexp){ // dataset.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr dataset___DatasetFactory__Finish1(const std::shared_ptr& factory, bool unify_schemas); -RcppExport SEXP _arrow_dataset___DatasetFactory__Finish1(SEXP factory_sexp, SEXP unify_schemas_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type factory(factory_sexp); - Rcpp::traits::input_parameter::type unify_schemas(unify_schemas_sexp); - return Rcpp::wrap(dataset___DatasetFactory__Finish1(factory, unify_schemas)); -END_RCPP +extern "C" SEXP _arrow_dataset___DatasetFactory__Finish1(SEXP factory_sexp, SEXP unify_schemas_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type factory(factory_sexp); + arrow::r::input::type unify_schemas(unify_schemas_sexp); + return cpp11::as_sexp(dataset___DatasetFactory__Finish1(factory, unify_schemas)); +END_CPP11 } #else RcppExport SEXP _arrow_dataset___DatasetFactory__Finish1(SEXP factory_sexp, SEXP unify_schemas_sexp){ @@ -1414,12 +1415,12 @@ RcppExport SEXP _arrow_dataset___DatasetFactory__Finish1(SEXP factory_sexp, SEXP // dataset.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr dataset___DatasetFactory__Finish2(const std::shared_ptr& factory, const std::shared_ptr& schema); -RcppExport SEXP _arrow_dataset___DatasetFactory__Finish2(SEXP factory_sexp, SEXP schema_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type factory(factory_sexp); - Rcpp::traits::input_parameter&>::type schema(schema_sexp); - return Rcpp::wrap(dataset___DatasetFactory__Finish2(factory, schema)); -END_RCPP +extern "C" SEXP _arrow_dataset___DatasetFactory__Finish2(SEXP factory_sexp, SEXP schema_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type factory(factory_sexp); + arrow::r::input&>::type schema(schema_sexp); + return cpp11::as_sexp(dataset___DatasetFactory__Finish2(factory, schema)); +END_CPP11 } #else RcppExport SEXP _arrow_dataset___DatasetFactory__Finish2(SEXP factory_sexp, SEXP schema_sexp){ @@ -1430,12 +1431,12 @@ RcppExport SEXP _arrow_dataset___DatasetFactory__Finish2(SEXP factory_sexp, SEXP // dataset.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr dataset___DatasetFactory__Inspect(const std::shared_ptr& factory, bool unify_schemas); -RcppExport SEXP _arrow_dataset___DatasetFactory__Inspect(SEXP factory_sexp, SEXP unify_schemas_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type factory(factory_sexp); - Rcpp::traits::input_parameter::type unify_schemas(unify_schemas_sexp); - return Rcpp::wrap(dataset___DatasetFactory__Inspect(factory, unify_schemas)); -END_RCPP +extern "C" SEXP _arrow_dataset___DatasetFactory__Inspect(SEXP factory_sexp, SEXP unify_schemas_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type factory(factory_sexp); + arrow::r::input::type unify_schemas(unify_schemas_sexp); + return cpp11::as_sexp(dataset___DatasetFactory__Inspect(factory, unify_schemas)); +END_CPP11 } #else RcppExport SEXP _arrow_dataset___DatasetFactory__Inspect(SEXP factory_sexp, SEXP unify_schemas_sexp){ @@ -1446,11 +1447,11 @@ RcppExport SEXP _arrow_dataset___DatasetFactory__Inspect(SEXP factory_sexp, SEXP // dataset.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr dataset___UnionDatasetFactory__Make(const std::vector>& children); -RcppExport SEXP _arrow_dataset___UnionDatasetFactory__Make(SEXP children_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter>&>::type children(children_sexp); - return Rcpp::wrap(dataset___UnionDatasetFactory__Make(children)); -END_RCPP +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 RcppExport SEXP _arrow_dataset___UnionDatasetFactory__Make(SEXP children_sexp){ @@ -1461,14 +1462,14 @@ RcppExport SEXP _arrow_dataset___UnionDatasetFactory__Make(SEXP children_sexp){ // dataset.cpp #if defined(ARROW_R_WITH_ARROW) 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); -RcppExport SEXP _arrow_dataset___FileSystemDatasetFactory__Make2(SEXP fs_sexp, SEXP selector_sexp, SEXP format_sexp, SEXP partitioning_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type fs(fs_sexp); - Rcpp::traits::input_parameter&>::type selector(selector_sexp); - Rcpp::traits::input_parameter&>::type format(format_sexp); - Rcpp::traits::input_parameter&>::type partitioning(partitioning_sexp); - return Rcpp::wrap(dataset___FileSystemDatasetFactory__Make2(fs, selector, format, partitioning)); -END_RCPP +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); + arrow::r::input&>::type selector(selector_sexp); + arrow::r::input&>::type format(format_sexp); + arrow::r::input&>::type partitioning(partitioning_sexp); + return cpp11::as_sexp(dataset___FileSystemDatasetFactory__Make2(fs, selector, format, partitioning)); +END_CPP11 } #else RcppExport SEXP _arrow_dataset___FileSystemDatasetFactory__Make2(SEXP fs_sexp, SEXP selector_sexp, SEXP format_sexp, SEXP partitioning_sexp){ @@ -1479,13 +1480,13 @@ RcppExport SEXP _arrow_dataset___FileSystemDatasetFactory__Make2(SEXP fs_sexp, S // dataset.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr dataset___FileSystemDatasetFactory__Make1(const std::shared_ptr& fs, const std::shared_ptr& selector, const std::shared_ptr& format); -RcppExport SEXP _arrow_dataset___FileSystemDatasetFactory__Make1(SEXP fs_sexp, SEXP selector_sexp, SEXP format_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type fs(fs_sexp); - Rcpp::traits::input_parameter&>::type selector(selector_sexp); - Rcpp::traits::input_parameter&>::type format(format_sexp); - return Rcpp::wrap(dataset___FileSystemDatasetFactory__Make1(fs, selector, format)); -END_RCPP +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); + arrow::r::input&>::type selector(selector_sexp); + arrow::r::input&>::type format(format_sexp); + return cpp11::as_sexp(dataset___FileSystemDatasetFactory__Make1(fs, selector, format)); +END_CPP11 } #else RcppExport SEXP _arrow_dataset___FileSystemDatasetFactory__Make1(SEXP fs_sexp, SEXP selector_sexp, SEXP format_sexp){ @@ -1496,14 +1497,14 @@ RcppExport SEXP _arrow_dataset___FileSystemDatasetFactory__Make1(SEXP fs_sexp, S // dataset.cpp #if defined(ARROW_R_WITH_ARROW) 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); -RcppExport SEXP _arrow_dataset___FileSystemDatasetFactory__Make3(SEXP fs_sexp, SEXP selector_sexp, SEXP format_sexp, SEXP factory_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type fs(fs_sexp); - Rcpp::traits::input_parameter&>::type selector(selector_sexp); - Rcpp::traits::input_parameter&>::type format(format_sexp); - Rcpp::traits::input_parameter&>::type factory(factory_sexp); - return Rcpp::wrap(dataset___FileSystemDatasetFactory__Make3(fs, selector, format, factory)); -END_RCPP +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); + arrow::r::input&>::type selector(selector_sexp); + arrow::r::input&>::type format(format_sexp); + arrow::r::input&>::type factory(factory_sexp); + return cpp11::as_sexp(dataset___FileSystemDatasetFactory__Make3(fs, selector, format, factory)); +END_CPP11 } #else RcppExport SEXP _arrow_dataset___FileSystemDatasetFactory__Make3(SEXP fs_sexp, SEXP selector_sexp, SEXP format_sexp, SEXP factory_sexp){ @@ -1514,11 +1515,11 @@ RcppExport SEXP _arrow_dataset___FileSystemDatasetFactory__Make3(SEXP fs_sexp, S // dataset.cpp #if defined(ARROW_R_WITH_ARROW) std::string dataset___FileFormat__type_name(const std::shared_ptr& format); -RcppExport SEXP _arrow_dataset___FileFormat__type_name(SEXP format_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type format(format_sexp); - return Rcpp::wrap(dataset___FileFormat__type_name(format)); -END_RCPP +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 RcppExport SEXP _arrow_dataset___FileFormat__type_name(SEXP format_sexp){ @@ -1528,14 +1529,14 @@ RcppExport SEXP _arrow_dataset___FileFormat__type_name(SEXP format_sexp){ // dataset.cpp #if defined(ARROW_R_WITH_ARROW) -std::shared_ptr dataset___ParquetFileFormat__Make(bool use_buffered_stream, int64_t buffer_size, CharacterVector dict_columns); -RcppExport SEXP _arrow_dataset___ParquetFileFormat__Make(SEXP use_buffered_stream_sexp, SEXP buffer_size_sexp, SEXP dict_columns_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter::type use_buffered_stream(use_buffered_stream_sexp); - Rcpp::traits::input_parameter::type buffer_size(buffer_size_sexp); - Rcpp::traits::input_parameter::type dict_columns(dict_columns_sexp); - return Rcpp::wrap(dataset___ParquetFileFormat__Make(use_buffered_stream, buffer_size, dict_columns)); -END_RCPP +std::shared_ptr dataset___ParquetFileFormat__Make(bool use_buffered_stream, int64_t buffer_size, Rcpp::CharacterVector dict_columns); +extern "C" SEXP _arrow_dataset___ParquetFileFormat__Make(SEXP use_buffered_stream_sexp, SEXP buffer_size_sexp, SEXP dict_columns_sexp){ +BEGIN_CPP11 + arrow::r::input::type use_buffered_stream(use_buffered_stream_sexp); + arrow::r::input::type buffer_size(buffer_size_sexp); + arrow::r::input::type dict_columns(dict_columns_sexp); + return cpp11::as_sexp(dataset___ParquetFileFormat__Make(use_buffered_stream, buffer_size, dict_columns)); +END_CPP11 } #else RcppExport SEXP _arrow_dataset___ParquetFileFormat__Make(SEXP use_buffered_stream_sexp, SEXP buffer_size_sexp, SEXP dict_columns_sexp){ @@ -1546,10 +1547,10 @@ RcppExport SEXP _arrow_dataset___ParquetFileFormat__Make(SEXP use_buffered_strea // dataset.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr dataset___IpcFileFormat__Make(); -RcppExport SEXP _arrow_dataset___IpcFileFormat__Make(){ -BEGIN_RCPP - return Rcpp::wrap(dataset___IpcFileFormat__Make()); -END_RCPP +extern "C" SEXP _arrow_dataset___IpcFileFormat__Make(){ +BEGIN_CPP11 + return cpp11::as_sexp(dataset___IpcFileFormat__Make()); +END_CPP11 } #else RcppExport SEXP _arrow_dataset___IpcFileFormat__Make(){ @@ -1560,11 +1561,11 @@ RcppExport SEXP _arrow_dataset___IpcFileFormat__Make(){ // dataset.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr dataset___CsvFileFormat__Make(const std::shared_ptr& parse_options); -RcppExport SEXP _arrow_dataset___CsvFileFormat__Make(SEXP parse_options_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type parse_options(parse_options_sexp); - return Rcpp::wrap(dataset___CsvFileFormat__Make(parse_options)); -END_RCPP +extern "C" SEXP _arrow_dataset___CsvFileFormat__Make(SEXP parse_options_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type parse_options(parse_options_sexp); + return cpp11::as_sexp(dataset___CsvFileFormat__Make(parse_options)); +END_CPP11 } #else RcppExport SEXP _arrow_dataset___CsvFileFormat__Make(SEXP parse_options_sexp){ @@ -1575,11 +1576,11 @@ RcppExport SEXP _arrow_dataset___CsvFileFormat__Make(SEXP parse_options_sexp){ // dataset.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr dataset___DirectoryPartitioning(const std::shared_ptr& schm); -RcppExport SEXP _arrow_dataset___DirectoryPartitioning(SEXP schm_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type schm(schm_sexp); - return Rcpp::wrap(dataset___DirectoryPartitioning(schm)); -END_RCPP +extern "C" SEXP _arrow_dataset___DirectoryPartitioning(SEXP schm_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type schm(schm_sexp); + return cpp11::as_sexp(dataset___DirectoryPartitioning(schm)); +END_CPP11 } #else RcppExport SEXP _arrow_dataset___DirectoryPartitioning(SEXP schm_sexp){ @@ -1590,11 +1591,11 @@ RcppExport SEXP _arrow_dataset___DirectoryPartitioning(SEXP schm_sexp){ // dataset.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr dataset___DirectoryPartitioning__MakeFactory(const std::vector& field_names); -RcppExport SEXP _arrow_dataset___DirectoryPartitioning__MakeFactory(SEXP field_names_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type field_names(field_names_sexp); - return Rcpp::wrap(dataset___DirectoryPartitioning__MakeFactory(field_names)); -END_RCPP +extern "C" SEXP _arrow_dataset___DirectoryPartitioning__MakeFactory(SEXP field_names_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type field_names(field_names_sexp); + return cpp11::as_sexp(dataset___DirectoryPartitioning__MakeFactory(field_names)); +END_CPP11 } #else RcppExport SEXP _arrow_dataset___DirectoryPartitioning__MakeFactory(SEXP field_names_sexp){ @@ -1605,11 +1606,11 @@ RcppExport SEXP _arrow_dataset___DirectoryPartitioning__MakeFactory(SEXP field_n // dataset.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr dataset___HivePartitioning(const std::shared_ptr& schm); -RcppExport SEXP _arrow_dataset___HivePartitioning(SEXP schm_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type schm(schm_sexp); - return Rcpp::wrap(dataset___HivePartitioning(schm)); -END_RCPP +extern "C" SEXP _arrow_dataset___HivePartitioning(SEXP schm_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type schm(schm_sexp); + return cpp11::as_sexp(dataset___HivePartitioning(schm)); +END_CPP11 } #else RcppExport SEXP _arrow_dataset___HivePartitioning(SEXP schm_sexp){ @@ -1620,10 +1621,10 @@ RcppExport SEXP _arrow_dataset___HivePartitioning(SEXP schm_sexp){ // dataset.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr dataset___HivePartitioning__MakeFactory(); -RcppExport SEXP _arrow_dataset___HivePartitioning__MakeFactory(){ -BEGIN_RCPP - return Rcpp::wrap(dataset___HivePartitioning__MakeFactory()); -END_RCPP +extern "C" SEXP _arrow_dataset___HivePartitioning__MakeFactory(){ +BEGIN_CPP11 + return cpp11::as_sexp(dataset___HivePartitioning__MakeFactory()); +END_CPP11 } #else RcppExport SEXP _arrow_dataset___HivePartitioning__MakeFactory(){ @@ -1634,13 +1635,13 @@ RcppExport SEXP _arrow_dataset___HivePartitioning__MakeFactory(){ // dataset.cpp #if defined(ARROW_R_WITH_ARROW) void dataset___ScannerBuilder__Project(const std::shared_ptr& sb, const std::vector& cols); -RcppExport SEXP _arrow_dataset___ScannerBuilder__Project(SEXP sb_sexp, SEXP cols_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type sb(sb_sexp); - Rcpp::traits::input_parameter&>::type cols(cols_sexp); +extern "C" SEXP _arrow_dataset___ScannerBuilder__Project(SEXP sb_sexp, SEXP cols_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type sb(sb_sexp); + arrow::r::input&>::type cols(cols_sexp); dataset___ScannerBuilder__Project(sb, cols); return R_NilValue; -END_RCPP +END_CPP11 } #else RcppExport SEXP _arrow_dataset___ScannerBuilder__Project(SEXP sb_sexp, SEXP cols_sexp){ @@ -1651,13 +1652,13 @@ RcppExport SEXP _arrow_dataset___ScannerBuilder__Project(SEXP sb_sexp, SEXP cols // dataset.cpp #if defined(ARROW_R_WITH_ARROW) void dataset___ScannerBuilder__Filter(const std::shared_ptr& sb, const std::shared_ptr& expr); -RcppExport SEXP _arrow_dataset___ScannerBuilder__Filter(SEXP sb_sexp, SEXP expr_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type sb(sb_sexp); - Rcpp::traits::input_parameter&>::type expr(expr_sexp); +extern "C" SEXP _arrow_dataset___ScannerBuilder__Filter(SEXP sb_sexp, SEXP expr_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type sb(sb_sexp); + arrow::r::input&>::type expr(expr_sexp); dataset___ScannerBuilder__Filter(sb, expr); return R_NilValue; -END_RCPP +END_CPP11 } #else RcppExport SEXP _arrow_dataset___ScannerBuilder__Filter(SEXP sb_sexp, SEXP expr_sexp){ @@ -1668,13 +1669,13 @@ RcppExport SEXP _arrow_dataset___ScannerBuilder__Filter(SEXP sb_sexp, SEXP expr_ // dataset.cpp #if defined(ARROW_R_WITH_ARROW) void dataset___ScannerBuilder__UseThreads(const std::shared_ptr& sb, bool threads); -RcppExport SEXP _arrow_dataset___ScannerBuilder__UseThreads(SEXP sb_sexp, SEXP threads_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type sb(sb_sexp); - Rcpp::traits::input_parameter::type threads(threads_sexp); +extern "C" SEXP _arrow_dataset___ScannerBuilder__UseThreads(SEXP sb_sexp, SEXP threads_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type sb(sb_sexp); + arrow::r::input::type threads(threads_sexp); dataset___ScannerBuilder__UseThreads(sb, threads); return R_NilValue; -END_RCPP +END_CPP11 } #else RcppExport SEXP _arrow_dataset___ScannerBuilder__UseThreads(SEXP sb_sexp, SEXP threads_sexp){ @@ -1685,13 +1686,13 @@ RcppExport SEXP _arrow_dataset___ScannerBuilder__UseThreads(SEXP sb_sexp, SEXP t // dataset.cpp #if defined(ARROW_R_WITH_ARROW) void dataset___ScannerBuilder__BatchSize(const std::shared_ptr& sb, int64_t batch_size); -RcppExport SEXP _arrow_dataset___ScannerBuilder__BatchSize(SEXP sb_sexp, SEXP batch_size_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type sb(sb_sexp); - Rcpp::traits::input_parameter::type batch_size(batch_size_sexp); +extern "C" SEXP _arrow_dataset___ScannerBuilder__BatchSize(SEXP sb_sexp, SEXP batch_size_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type sb(sb_sexp); + arrow::r::input::type batch_size(batch_size_sexp); dataset___ScannerBuilder__BatchSize(sb, batch_size); return R_NilValue; -END_RCPP +END_CPP11 } #else RcppExport SEXP _arrow_dataset___ScannerBuilder__BatchSize(SEXP sb_sexp, SEXP batch_size_sexp){ @@ -1702,11 +1703,11 @@ RcppExport SEXP _arrow_dataset___ScannerBuilder__BatchSize(SEXP sb_sexp, SEXP ba // dataset.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr dataset___ScannerBuilder__schema(const std::shared_ptr& sb); -RcppExport SEXP _arrow_dataset___ScannerBuilder__schema(SEXP sb_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type sb(sb_sexp); - return Rcpp::wrap(dataset___ScannerBuilder__schema(sb)); -END_RCPP +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 RcppExport SEXP _arrow_dataset___ScannerBuilder__schema(SEXP sb_sexp){ @@ -1717,11 +1718,11 @@ RcppExport SEXP _arrow_dataset___ScannerBuilder__schema(SEXP sb_sexp){ // dataset.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr dataset___ScannerBuilder__Finish(const std::shared_ptr& sb); -RcppExport SEXP _arrow_dataset___ScannerBuilder__Finish(SEXP sb_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type sb(sb_sexp); - return Rcpp::wrap(dataset___ScannerBuilder__Finish(sb)); -END_RCPP +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 RcppExport SEXP _arrow_dataset___ScannerBuilder__Finish(SEXP sb_sexp){ @@ -1732,11 +1733,11 @@ RcppExport SEXP _arrow_dataset___ScannerBuilder__Finish(SEXP sb_sexp){ // dataset.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr dataset___Scanner__ToTable(const std::shared_ptr& scanner); -RcppExport SEXP _arrow_dataset___Scanner__ToTable(SEXP scanner_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type scanner(scanner_sexp); - return Rcpp::wrap(dataset___Scanner__ToTable(scanner)); -END_RCPP +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 RcppExport SEXP _arrow_dataset___Scanner__ToTable(SEXP scanner_sexp){ @@ -1763,11 +1764,11 @@ RcppExport SEXP _arrow_dataset___Scanner__head(SEXP scanner_sexp, SEXP n_sexp){ // dataset.cpp #if defined(ARROW_R_WITH_ARROW) std::vector> dataset___Scanner__Scan(const std::shared_ptr& scanner); -RcppExport SEXP _arrow_dataset___Scanner__Scan(SEXP scanner_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type scanner(scanner_sexp); - return Rcpp::wrap(dataset___Scanner__Scan(scanner)); -END_RCPP +extern "C" SEXP _arrow_dataset___Scanner__Scan(SEXP scanner_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type scanner(scanner_sexp); + return cpp11::as_sexp(dataset___Scanner__Scan(scanner)); +END_CPP11 } #else RcppExport SEXP _arrow_dataset___Scanner__Scan(SEXP scanner_sexp){ @@ -1778,11 +1779,11 @@ RcppExport SEXP _arrow_dataset___Scanner__Scan(SEXP scanner_sexp){ // dataset.cpp #if defined(ARROW_R_WITH_ARROW) std::vector> dataset___ScanTask__get_batches(const std::shared_ptr& scan_task); -RcppExport SEXP _arrow_dataset___ScanTask__get_batches(SEXP scan_task_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type scan_task(scan_task_sexp); - return Rcpp::wrap(dataset___ScanTask__get_batches(scan_task)); -END_RCPP +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 RcppExport SEXP _arrow_dataset___ScanTask__get_batches(SEXP scan_task_sexp){ @@ -1814,11 +1815,11 @@ RcppExport SEXP _arrow_dataset___Dataset__Write(SEXP ds_sexp, SEXP schema_sexp, // datatype.cpp #if defined(ARROW_R_WITH_ARROW) bool shared_ptr_is_null(SEXP xp); -RcppExport SEXP _arrow_shared_ptr_is_null(SEXP xp_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter::type xp(xp_sexp); - return Rcpp::wrap(shared_ptr_is_null(xp)); -END_RCPP +extern "C" SEXP _arrow_shared_ptr_is_null(SEXP xp_sexp){ +BEGIN_CPP11 + arrow::r::input::type xp(xp_sexp); + return cpp11::as_sexp(shared_ptr_is_null(xp)); +END_CPP11 } #else RcppExport SEXP _arrow_shared_ptr_is_null(SEXP xp_sexp){ @@ -1829,11 +1830,11 @@ RcppExport SEXP _arrow_shared_ptr_is_null(SEXP xp_sexp){ // datatype.cpp #if defined(ARROW_R_WITH_ARROW) bool unique_ptr_is_null(SEXP xp); -RcppExport SEXP _arrow_unique_ptr_is_null(SEXP xp_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter::type xp(xp_sexp); - return Rcpp::wrap(unique_ptr_is_null(xp)); -END_RCPP +extern "C" SEXP _arrow_unique_ptr_is_null(SEXP xp_sexp){ +BEGIN_CPP11 + arrow::r::input::type xp(xp_sexp); + return cpp11::as_sexp(unique_ptr_is_null(xp)); +END_CPP11 } #else RcppExport SEXP _arrow_unique_ptr_is_null(SEXP xp_sexp){ @@ -1844,10 +1845,10 @@ RcppExport SEXP _arrow_unique_ptr_is_null(SEXP xp_sexp){ // datatype.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr Int8__initialize(); -RcppExport SEXP _arrow_Int8__initialize(){ -BEGIN_RCPP - return Rcpp::wrap(Int8__initialize()); -END_RCPP +extern "C" SEXP _arrow_Int8__initialize(){ +BEGIN_CPP11 + return cpp11::as_sexp(Int8__initialize()); +END_CPP11 } #else RcppExport SEXP _arrow_Int8__initialize(){ @@ -1858,10 +1859,10 @@ RcppExport SEXP _arrow_Int8__initialize(){ // datatype.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr Int16__initialize(); -RcppExport SEXP _arrow_Int16__initialize(){ -BEGIN_RCPP - return Rcpp::wrap(Int16__initialize()); -END_RCPP +extern "C" SEXP _arrow_Int16__initialize(){ +BEGIN_CPP11 + return cpp11::as_sexp(Int16__initialize()); +END_CPP11 } #else RcppExport SEXP _arrow_Int16__initialize(){ @@ -1872,10 +1873,10 @@ RcppExport SEXP _arrow_Int16__initialize(){ // datatype.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr Int32__initialize(); -RcppExport SEXP _arrow_Int32__initialize(){ -BEGIN_RCPP - return Rcpp::wrap(Int32__initialize()); -END_RCPP +extern "C" SEXP _arrow_Int32__initialize(){ +BEGIN_CPP11 + return cpp11::as_sexp(Int32__initialize()); +END_CPP11 } #else RcppExport SEXP _arrow_Int32__initialize(){ @@ -1886,10 +1887,10 @@ RcppExport SEXP _arrow_Int32__initialize(){ // datatype.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr Int64__initialize(); -RcppExport SEXP _arrow_Int64__initialize(){ -BEGIN_RCPP - return Rcpp::wrap(Int64__initialize()); -END_RCPP +extern "C" SEXP _arrow_Int64__initialize(){ +BEGIN_CPP11 + return cpp11::as_sexp(Int64__initialize()); +END_CPP11 } #else RcppExport SEXP _arrow_Int64__initialize(){ @@ -1900,10 +1901,10 @@ RcppExport SEXP _arrow_Int64__initialize(){ // datatype.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr UInt8__initialize(); -RcppExport SEXP _arrow_UInt8__initialize(){ -BEGIN_RCPP - return Rcpp::wrap(UInt8__initialize()); -END_RCPP +extern "C" SEXP _arrow_UInt8__initialize(){ +BEGIN_CPP11 + return cpp11::as_sexp(UInt8__initialize()); +END_CPP11 } #else RcppExport SEXP _arrow_UInt8__initialize(){ @@ -1914,10 +1915,10 @@ RcppExport SEXP _arrow_UInt8__initialize(){ // datatype.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr UInt16__initialize(); -RcppExport SEXP _arrow_UInt16__initialize(){ -BEGIN_RCPP - return Rcpp::wrap(UInt16__initialize()); -END_RCPP +extern "C" SEXP _arrow_UInt16__initialize(){ +BEGIN_CPP11 + return cpp11::as_sexp(UInt16__initialize()); +END_CPP11 } #else RcppExport SEXP _arrow_UInt16__initialize(){ @@ -1928,10 +1929,10 @@ RcppExport SEXP _arrow_UInt16__initialize(){ // datatype.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr UInt32__initialize(); -RcppExport SEXP _arrow_UInt32__initialize(){ -BEGIN_RCPP - return Rcpp::wrap(UInt32__initialize()); -END_RCPP +extern "C" SEXP _arrow_UInt32__initialize(){ +BEGIN_CPP11 + return cpp11::as_sexp(UInt32__initialize()); +END_CPP11 } #else RcppExport SEXP _arrow_UInt32__initialize(){ @@ -1942,10 +1943,10 @@ RcppExport SEXP _arrow_UInt32__initialize(){ // datatype.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr UInt64__initialize(); -RcppExport SEXP _arrow_UInt64__initialize(){ -BEGIN_RCPP - return Rcpp::wrap(UInt64__initialize()); -END_RCPP +extern "C" SEXP _arrow_UInt64__initialize(){ +BEGIN_CPP11 + return cpp11::as_sexp(UInt64__initialize()); +END_CPP11 } #else RcppExport SEXP _arrow_UInt64__initialize(){ @@ -1956,10 +1957,10 @@ RcppExport SEXP _arrow_UInt64__initialize(){ // datatype.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr Float16__initialize(); -RcppExport SEXP _arrow_Float16__initialize(){ -BEGIN_RCPP - return Rcpp::wrap(Float16__initialize()); -END_RCPP +extern "C" SEXP _arrow_Float16__initialize(){ +BEGIN_CPP11 + return cpp11::as_sexp(Float16__initialize()); +END_CPP11 } #else RcppExport SEXP _arrow_Float16__initialize(){ @@ -1970,10 +1971,10 @@ RcppExport SEXP _arrow_Float16__initialize(){ // datatype.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr Float32__initialize(); -RcppExport SEXP _arrow_Float32__initialize(){ -BEGIN_RCPP - return Rcpp::wrap(Float32__initialize()); -END_RCPP +extern "C" SEXP _arrow_Float32__initialize(){ +BEGIN_CPP11 + return cpp11::as_sexp(Float32__initialize()); +END_CPP11 } #else RcppExport SEXP _arrow_Float32__initialize(){ @@ -1984,10 +1985,10 @@ RcppExport SEXP _arrow_Float32__initialize(){ // datatype.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr Float64__initialize(); -RcppExport SEXP _arrow_Float64__initialize(){ -BEGIN_RCPP - return Rcpp::wrap(Float64__initialize()); -END_RCPP +extern "C" SEXP _arrow_Float64__initialize(){ +BEGIN_CPP11 + return cpp11::as_sexp(Float64__initialize()); +END_CPP11 } #else RcppExport SEXP _arrow_Float64__initialize(){ @@ -1998,10 +1999,10 @@ RcppExport SEXP _arrow_Float64__initialize(){ // datatype.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr Boolean__initialize(); -RcppExport SEXP _arrow_Boolean__initialize(){ -BEGIN_RCPP - return Rcpp::wrap(Boolean__initialize()); -END_RCPP +extern "C" SEXP _arrow_Boolean__initialize(){ +BEGIN_CPP11 + return cpp11::as_sexp(Boolean__initialize()); +END_CPP11 } #else RcppExport SEXP _arrow_Boolean__initialize(){ @@ -2012,10 +2013,10 @@ RcppExport SEXP _arrow_Boolean__initialize(){ // datatype.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr Utf8__initialize(); -RcppExport SEXP _arrow_Utf8__initialize(){ -BEGIN_RCPP - return Rcpp::wrap(Utf8__initialize()); -END_RCPP +extern "C" SEXP _arrow_Utf8__initialize(){ +BEGIN_CPP11 + return cpp11::as_sexp(Utf8__initialize()); +END_CPP11 } #else RcppExport SEXP _arrow_Utf8__initialize(){ @@ -2026,10 +2027,10 @@ RcppExport SEXP _arrow_Utf8__initialize(){ // datatype.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr LargeUtf8__initialize(); -RcppExport SEXP _arrow_LargeUtf8__initialize(){ -BEGIN_RCPP - return Rcpp::wrap(LargeUtf8__initialize()); -END_RCPP +extern "C" SEXP _arrow_LargeUtf8__initialize(){ +BEGIN_CPP11 + return cpp11::as_sexp(LargeUtf8__initialize()); +END_CPP11 } #else RcppExport SEXP _arrow_LargeUtf8__initialize(){ @@ -2040,10 +2041,10 @@ RcppExport SEXP _arrow_LargeUtf8__initialize(){ // datatype.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr Binary__initialize(); -RcppExport SEXP _arrow_Binary__initialize(){ -BEGIN_RCPP - return Rcpp::wrap(Binary__initialize()); -END_RCPP +extern "C" SEXP _arrow_Binary__initialize(){ +BEGIN_CPP11 + return cpp11::as_sexp(Binary__initialize()); +END_CPP11 } #else RcppExport SEXP _arrow_Binary__initialize(){ @@ -2054,10 +2055,10 @@ RcppExport SEXP _arrow_Binary__initialize(){ // datatype.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr LargeBinary__initialize(); -RcppExport SEXP _arrow_LargeBinary__initialize(){ -BEGIN_RCPP - return Rcpp::wrap(LargeBinary__initialize()); -END_RCPP +extern "C" SEXP _arrow_LargeBinary__initialize(){ +BEGIN_CPP11 + return cpp11::as_sexp(LargeBinary__initialize()); +END_CPP11 } #else RcppExport SEXP _arrow_LargeBinary__initialize(){ @@ -2068,10 +2069,10 @@ RcppExport SEXP _arrow_LargeBinary__initialize(){ // datatype.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr Date32__initialize(); -RcppExport SEXP _arrow_Date32__initialize(){ -BEGIN_RCPP - return Rcpp::wrap(Date32__initialize()); -END_RCPP +extern "C" SEXP _arrow_Date32__initialize(){ +BEGIN_CPP11 + return cpp11::as_sexp(Date32__initialize()); +END_CPP11 } #else RcppExport SEXP _arrow_Date32__initialize(){ @@ -2082,10 +2083,10 @@ RcppExport SEXP _arrow_Date32__initialize(){ // datatype.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr Date64__initialize(); -RcppExport SEXP _arrow_Date64__initialize(){ -BEGIN_RCPP - return Rcpp::wrap(Date64__initialize()); -END_RCPP +extern "C" SEXP _arrow_Date64__initialize(){ +BEGIN_CPP11 + return cpp11::as_sexp(Date64__initialize()); +END_CPP11 } #else RcppExport SEXP _arrow_Date64__initialize(){ @@ -2096,10 +2097,10 @@ RcppExport SEXP _arrow_Date64__initialize(){ // datatype.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr Null__initialize(); -RcppExport SEXP _arrow_Null__initialize(){ -BEGIN_RCPP - return Rcpp::wrap(Null__initialize()); -END_RCPP +extern "C" SEXP _arrow_Null__initialize(){ +BEGIN_CPP11 + return cpp11::as_sexp(Null__initialize()); +END_CPP11 } #else RcppExport SEXP _arrow_Null__initialize(){ @@ -2110,12 +2111,12 @@ RcppExport SEXP _arrow_Null__initialize(){ // datatype.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr Decimal128Type__initialize(int32_t precision, int32_t scale); -RcppExport SEXP _arrow_Decimal128Type__initialize(SEXP precision_sexp, SEXP scale_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter::type precision(precision_sexp); - Rcpp::traits::input_parameter::type scale(scale_sexp); - return Rcpp::wrap(Decimal128Type__initialize(precision, scale)); -END_RCPP +extern "C" SEXP _arrow_Decimal128Type__initialize(SEXP precision_sexp, SEXP scale_sexp){ +BEGIN_CPP11 + arrow::r::input::type precision(precision_sexp); + arrow::r::input::type scale(scale_sexp); + return cpp11::as_sexp(Decimal128Type__initialize(precision, scale)); +END_CPP11 } #else RcppExport SEXP _arrow_Decimal128Type__initialize(SEXP precision_sexp, SEXP scale_sexp){ @@ -2125,12 +2126,12 @@ RcppExport SEXP _arrow_Decimal128Type__initialize(SEXP precision_sexp, SEXP scal // datatype.cpp #if defined(ARROW_R_WITH_ARROW) -std::shared_ptr FixedSizeBinary__initialize(int32_t byte_width); -RcppExport SEXP _arrow_FixedSizeBinary__initialize(SEXP byte_width_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter::type byte_width(byte_width_sexp); - return Rcpp::wrap(FixedSizeBinary__initialize(byte_width)); -END_RCPP +std::shared_ptr FixedSizeBinary__initialize(arrow::r::Index 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 RcppExport SEXP _arrow_FixedSizeBinary__initialize(SEXP byte_width_sexp){ @@ -2141,12 +2142,12 @@ RcppExport SEXP _arrow_FixedSizeBinary__initialize(SEXP byte_width_sexp){ // datatype.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr Timestamp__initialize(arrow::TimeUnit::type unit, const std::string& timezone); -RcppExport SEXP _arrow_Timestamp__initialize(SEXP unit_sexp, SEXP timezone_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter::type unit(unit_sexp); - Rcpp::traits::input_parameter::type timezone(timezone_sexp); - return Rcpp::wrap(Timestamp__initialize(unit, timezone)); -END_RCPP +extern "C" SEXP _arrow_Timestamp__initialize(SEXP unit_sexp, SEXP timezone_sexp){ +BEGIN_CPP11 + arrow::r::input::type unit(unit_sexp); + arrow::r::input::type timezone(timezone_sexp); + return cpp11::as_sexp(Timestamp__initialize(unit, timezone)); +END_CPP11 } #else RcppExport SEXP _arrow_Timestamp__initialize(SEXP unit_sexp, SEXP timezone_sexp){ @@ -2157,11 +2158,11 @@ RcppExport SEXP _arrow_Timestamp__initialize(SEXP unit_sexp, SEXP timezone_sexp) // datatype.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr Time32__initialize(arrow::TimeUnit::type unit); -RcppExport SEXP _arrow_Time32__initialize(SEXP unit_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter::type unit(unit_sexp); - return Rcpp::wrap(Time32__initialize(unit)); -END_RCPP +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 RcppExport SEXP _arrow_Time32__initialize(SEXP unit_sexp){ @@ -2172,11 +2173,11 @@ RcppExport SEXP _arrow_Time32__initialize(SEXP unit_sexp){ // datatype.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr Time64__initialize(arrow::TimeUnit::type unit); -RcppExport SEXP _arrow_Time64__initialize(SEXP unit_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter::type unit(unit_sexp); - return Rcpp::wrap(Time64__initialize(unit)); -END_RCPP +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 RcppExport SEXP _arrow_Time64__initialize(SEXP unit_sexp){ @@ -2187,11 +2188,11 @@ RcppExport SEXP _arrow_Time64__initialize(SEXP unit_sexp){ // datatype.cpp #if defined(ARROW_R_WITH_ARROW) SEXP list__(SEXP x); -RcppExport SEXP _arrow_list__(SEXP x_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter::type x(x_sexp); - return Rcpp::wrap(list__(x)); -END_RCPP +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 RcppExport SEXP _arrow_list__(SEXP x_sexp){ @@ -2202,11 +2203,11 @@ RcppExport SEXP _arrow_list__(SEXP x_sexp){ // datatype.cpp #if defined(ARROW_R_WITH_ARROW) SEXP large_list__(SEXP x); -RcppExport SEXP _arrow_large_list__(SEXP x_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter::type x(x_sexp); - return Rcpp::wrap(large_list__(x)); -END_RCPP +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 RcppExport SEXP _arrow_large_list__(SEXP x_sexp){ @@ -2217,12 +2218,12 @@ RcppExport SEXP _arrow_large_list__(SEXP x_sexp){ // datatype.cpp #if defined(ARROW_R_WITH_ARROW) SEXP fixed_size_list__(SEXP x, int list_size); -RcppExport SEXP _arrow_fixed_size_list__(SEXP x_sexp, SEXP list_size_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter::type x(x_sexp); - Rcpp::traits::input_parameter::type list_size(list_size_sexp); - return Rcpp::wrap(fixed_size_list__(x, list_size)); -END_RCPP +extern "C" SEXP _arrow_fixed_size_list__(SEXP x_sexp, SEXP list_size_sexp){ +BEGIN_CPP11 + arrow::r::input::type x(x_sexp); + arrow::r::input::type list_size(list_size_sexp); + return cpp11::as_sexp(fixed_size_list__(x, list_size)); +END_CPP11 } #else RcppExport SEXP _arrow_fixed_size_list__(SEXP x_sexp, SEXP list_size_sexp){ @@ -2232,27 +2233,27 @@ RcppExport SEXP _arrow_fixed_size_list__(SEXP x_sexp, SEXP list_size_sexp){ // datatype.cpp #if defined(ARROW_R_WITH_ARROW) -std::shared_ptr struct_(List fields); -RcppExport SEXP _arrow_struct_(SEXP fields_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter::type fields(fields_sexp); - return Rcpp::wrap(struct_(fields)); -END_RCPP +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 -RcppExport SEXP _arrow_struct_(SEXP fields_sexp){ - Rf_error("Cannot call struct_(). Please use arrow::install_arrow() to install required runtime libraries. "); +RcppExport SEXP _arrow_struct__(SEXP fields_sexp){ + Rf_error("Cannot call struct__(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif // datatype.cpp #if defined(ARROW_R_WITH_ARROW) std::string DataType__ToString(const std::shared_ptr& type); -RcppExport SEXP _arrow_DataType__ToString(SEXP type_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type type(type_sexp); - return Rcpp::wrap(DataType__ToString(type)); -END_RCPP +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 RcppExport SEXP _arrow_DataType__ToString(SEXP type_sexp){ @@ -2263,11 +2264,11 @@ RcppExport SEXP _arrow_DataType__ToString(SEXP type_sexp){ // datatype.cpp #if defined(ARROW_R_WITH_ARROW) std::string DataType__name(const std::shared_ptr& type); -RcppExport SEXP _arrow_DataType__name(SEXP type_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type type(type_sexp); - return Rcpp::wrap(DataType__name(type)); -END_RCPP +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 RcppExport SEXP _arrow_DataType__name(SEXP type_sexp){ @@ -2278,12 +2279,12 @@ RcppExport SEXP _arrow_DataType__name(SEXP type_sexp){ // datatype.cpp #if defined(ARROW_R_WITH_ARROW) bool DataType__Equals(const std::shared_ptr& lhs, const std::shared_ptr& rhs); -RcppExport SEXP _arrow_DataType__Equals(SEXP lhs_sexp, SEXP rhs_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type lhs(lhs_sexp); - Rcpp::traits::input_parameter&>::type rhs(rhs_sexp); - return Rcpp::wrap(DataType__Equals(lhs, rhs)); -END_RCPP +extern "C" SEXP _arrow_DataType__Equals(SEXP lhs_sexp, SEXP rhs_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type lhs(lhs_sexp); + arrow::r::input&>::type rhs(rhs_sexp); + return cpp11::as_sexp(DataType__Equals(lhs, rhs)); +END_CPP11 } #else RcppExport SEXP _arrow_DataType__Equals(SEXP lhs_sexp, SEXP rhs_sexp){ @@ -2294,11 +2295,11 @@ RcppExport SEXP _arrow_DataType__Equals(SEXP lhs_sexp, SEXP rhs_sexp){ // datatype.cpp #if defined(ARROW_R_WITH_ARROW) int DataType__num_children(const std::shared_ptr& type); -RcppExport SEXP _arrow_DataType__num_children(SEXP type_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type type(type_sexp); - return Rcpp::wrap(DataType__num_children(type)); -END_RCPP +extern "C" SEXP _arrow_DataType__num_children(SEXP type_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type type(type_sexp); + return cpp11::as_sexp(DataType__num_children(type)); +END_CPP11 } #else RcppExport SEXP _arrow_DataType__num_children(SEXP type_sexp){ @@ -2308,12 +2309,12 @@ RcppExport SEXP _arrow_DataType__num_children(SEXP type_sexp){ // datatype.cpp #if defined(ARROW_R_WITH_ARROW) -List DataType__children_pointer(const std::shared_ptr& type); -RcppExport SEXP _arrow_DataType__children_pointer(SEXP type_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type type(type_sexp); - return Rcpp::wrap(DataType__children_pointer(type)); -END_RCPP +cpp11::writable::list DataType__children_pointer(const std::shared_ptr& type); +extern "C" SEXP _arrow_DataType__children_pointer(SEXP type_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type type(type_sexp); + return cpp11::as_sexp(DataType__children_pointer(type)); +END_CPP11 } #else RcppExport SEXP _arrow_DataType__children_pointer(SEXP type_sexp){ @@ -2324,11 +2325,11 @@ RcppExport SEXP _arrow_DataType__children_pointer(SEXP type_sexp){ // datatype.cpp #if defined(ARROW_R_WITH_ARROW) arrow::Type::type DataType__id(const std::shared_ptr& type); -RcppExport SEXP _arrow_DataType__id(SEXP type_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type type(type_sexp); - return Rcpp::wrap(DataType__id(type)); -END_RCPP +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 RcppExport SEXP _arrow_DataType__id(SEXP type_sexp){ @@ -2339,11 +2340,11 @@ RcppExport SEXP _arrow_DataType__id(SEXP type_sexp){ // datatype.cpp #if defined(ARROW_R_WITH_ARROW) std::string ListType__ToString(const std::shared_ptr& type); -RcppExport SEXP _arrow_ListType__ToString(SEXP type_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type type(type_sexp); - return Rcpp::wrap(ListType__ToString(type)); -END_RCPP +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 RcppExport SEXP _arrow_ListType__ToString(SEXP type_sexp){ @@ -2354,11 +2355,11 @@ RcppExport SEXP _arrow_ListType__ToString(SEXP type_sexp){ // datatype.cpp #if defined(ARROW_R_WITH_ARROW) int FixedWidthType__bit_width(const std::shared_ptr& type); -RcppExport SEXP _arrow_FixedWidthType__bit_width(SEXP type_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type type(type_sexp); - return Rcpp::wrap(FixedWidthType__bit_width(type)); -END_RCPP +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 RcppExport SEXP _arrow_FixedWidthType__bit_width(SEXP type_sexp){ @@ -2369,11 +2370,11 @@ RcppExport SEXP _arrow_FixedWidthType__bit_width(SEXP type_sexp){ // datatype.cpp #if defined(ARROW_R_WITH_ARROW) arrow::DateUnit DateType__unit(const std::shared_ptr& type); -RcppExport SEXP _arrow_DateType__unit(SEXP type_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type type(type_sexp); - return Rcpp::wrap(DateType__unit(type)); -END_RCPP +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 RcppExport SEXP _arrow_DateType__unit(SEXP type_sexp){ @@ -2384,11 +2385,11 @@ RcppExport SEXP _arrow_DateType__unit(SEXP type_sexp){ // datatype.cpp #if defined(ARROW_R_WITH_ARROW) arrow::TimeUnit::type TimeType__unit(const std::shared_ptr& type); -RcppExport SEXP _arrow_TimeType__unit(SEXP type_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type type(type_sexp); - return Rcpp::wrap(TimeType__unit(type)); -END_RCPP +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 RcppExport SEXP _arrow_TimeType__unit(SEXP type_sexp){ @@ -2399,11 +2400,11 @@ RcppExport SEXP _arrow_TimeType__unit(SEXP type_sexp){ // datatype.cpp #if defined(ARROW_R_WITH_ARROW) int32_t DecimalType__precision(const std::shared_ptr& type); -RcppExport SEXP _arrow_DecimalType__precision(SEXP type_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type type(type_sexp); - return Rcpp::wrap(DecimalType__precision(type)); -END_RCPP +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 RcppExport SEXP _arrow_DecimalType__precision(SEXP type_sexp){ @@ -2414,11 +2415,11 @@ RcppExport SEXP _arrow_DecimalType__precision(SEXP type_sexp){ // datatype.cpp #if defined(ARROW_R_WITH_ARROW) int32_t DecimalType__scale(const std::shared_ptr& type); -RcppExport SEXP _arrow_DecimalType__scale(SEXP type_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type type(type_sexp); - return Rcpp::wrap(DecimalType__scale(type)); -END_RCPP +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 RcppExport SEXP _arrow_DecimalType__scale(SEXP type_sexp){ @@ -2429,11 +2430,11 @@ RcppExport SEXP _arrow_DecimalType__scale(SEXP type_sexp){ // datatype.cpp #if defined(ARROW_R_WITH_ARROW) std::string TimestampType__timezone(const std::shared_ptr& type); -RcppExport SEXP _arrow_TimestampType__timezone(SEXP type_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type type(type_sexp); - return Rcpp::wrap(TimestampType__timezone(type)); -END_RCPP +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 RcppExport SEXP _arrow_TimestampType__timezone(SEXP type_sexp){ @@ -2444,11 +2445,11 @@ RcppExport SEXP _arrow_TimestampType__timezone(SEXP type_sexp){ // datatype.cpp #if defined(ARROW_R_WITH_ARROW) arrow::TimeUnit::type TimestampType__unit(const std::shared_ptr& type); -RcppExport SEXP _arrow_TimestampType__unit(SEXP type_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type type(type_sexp); - return Rcpp::wrap(TimestampType__unit(type)); -END_RCPP +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 RcppExport SEXP _arrow_TimestampType__unit(SEXP type_sexp){ @@ -2459,13 +2460,13 @@ RcppExport SEXP _arrow_TimestampType__unit(SEXP type_sexp){ // 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); -RcppExport SEXP _arrow_DictionaryType__initialize(SEXP index_type_sexp, SEXP value_type_sexp, SEXP ordered_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type index_type(index_type_sexp); - Rcpp::traits::input_parameter&>::type value_type(value_type_sexp); - Rcpp::traits::input_parameter::type ordered(ordered_sexp); - return Rcpp::wrap(DictionaryType__initialize(index_type, value_type, ordered)); -END_RCPP +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); + arrow::r::input&>::type value_type(value_type_sexp); + arrow::r::input::type ordered(ordered_sexp); + return cpp11::as_sexp(DictionaryType__initialize(index_type, value_type, ordered)); +END_CPP11 } #else RcppExport SEXP _arrow_DictionaryType__initialize(SEXP index_type_sexp, SEXP value_type_sexp, SEXP ordered_sexp){ @@ -2476,11 +2477,11 @@ RcppExport SEXP _arrow_DictionaryType__initialize(SEXP index_type_sexp, SEXP val // datatype.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr DictionaryType__index_type(const std::shared_ptr& type); -RcppExport SEXP _arrow_DictionaryType__index_type(SEXP type_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type type(type_sexp); - return Rcpp::wrap(DictionaryType__index_type(type)); -END_RCPP +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 RcppExport SEXP _arrow_DictionaryType__index_type(SEXP type_sexp){ @@ -2491,11 +2492,11 @@ RcppExport SEXP _arrow_DictionaryType__index_type(SEXP type_sexp){ // datatype.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr DictionaryType__value_type(const std::shared_ptr& type); -RcppExport SEXP _arrow_DictionaryType__value_type(SEXP type_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type type(type_sexp); - return Rcpp::wrap(DictionaryType__value_type(type)); -END_RCPP +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 RcppExport SEXP _arrow_DictionaryType__value_type(SEXP type_sexp){ @@ -2506,11 +2507,11 @@ RcppExport SEXP _arrow_DictionaryType__value_type(SEXP type_sexp){ // datatype.cpp #if defined(ARROW_R_WITH_ARROW) std::string DictionaryType__name(const std::shared_ptr& type); -RcppExport SEXP _arrow_DictionaryType__name(SEXP type_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type type(type_sexp); - return Rcpp::wrap(DictionaryType__name(type)); -END_RCPP +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 RcppExport SEXP _arrow_DictionaryType__name(SEXP type_sexp){ @@ -2521,11 +2522,11 @@ RcppExport SEXP _arrow_DictionaryType__name(SEXP type_sexp){ // datatype.cpp #if defined(ARROW_R_WITH_ARROW) bool DictionaryType__ordered(const std::shared_ptr& type); -RcppExport SEXP _arrow_DictionaryType__ordered(SEXP type_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type type(type_sexp); - return Rcpp::wrap(DictionaryType__ordered(type)); -END_RCPP +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 RcppExport SEXP _arrow_DictionaryType__ordered(SEXP type_sexp){ @@ -2536,12 +2537,12 @@ RcppExport SEXP _arrow_DictionaryType__ordered(SEXP type_sexp){ // datatype.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr StructType__GetFieldByName(const std::shared_ptr& type, const std::string& name); -RcppExport SEXP _arrow_StructType__GetFieldByName(SEXP type_sexp, SEXP name_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type type(type_sexp); - Rcpp::traits::input_parameter::type name(name_sexp); - return Rcpp::wrap(StructType__GetFieldByName(type, name)); -END_RCPP +extern "C" SEXP _arrow_StructType__GetFieldByName(SEXP type_sexp, SEXP name_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type type(type_sexp); + arrow::r::input::type name(name_sexp); + return cpp11::as_sexp(StructType__GetFieldByName(type, name)); +END_CPP11 } #else RcppExport SEXP _arrow_StructType__GetFieldByName(SEXP type_sexp, SEXP name_sexp){ @@ -2552,12 +2553,12 @@ RcppExport SEXP _arrow_StructType__GetFieldByName(SEXP type_sexp, SEXP name_sexp // datatype.cpp #if defined(ARROW_R_WITH_ARROW) int StructType__GetFieldIndex(const std::shared_ptr& type, const std::string& name); -RcppExport SEXP _arrow_StructType__GetFieldIndex(SEXP type_sexp, SEXP name_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type type(type_sexp); - Rcpp::traits::input_parameter::type name(name_sexp); - return Rcpp::wrap(StructType__GetFieldIndex(type, name)); -END_RCPP +extern "C" SEXP _arrow_StructType__GetFieldIndex(SEXP type_sexp, SEXP name_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type type(type_sexp); + arrow::r::input::type name(name_sexp); + return cpp11::as_sexp(StructType__GetFieldIndex(type, name)); +END_CPP11 } #else RcppExport SEXP _arrow_StructType__GetFieldIndex(SEXP type_sexp, SEXP name_sexp){ @@ -2568,11 +2569,11 @@ RcppExport SEXP _arrow_StructType__GetFieldIndex(SEXP type_sexp, SEXP name_sexp) // datatype.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr ListType__value_field(const std::shared_ptr& type); -RcppExport SEXP _arrow_ListType__value_field(SEXP type_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type type(type_sexp); - return Rcpp::wrap(ListType__value_field(type)); -END_RCPP +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 RcppExport SEXP _arrow_ListType__value_field(SEXP type_sexp){ @@ -2583,11 +2584,11 @@ RcppExport SEXP _arrow_ListType__value_field(SEXP type_sexp){ // datatype.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr ListType__value_type(const std::shared_ptr& type); -RcppExport SEXP _arrow_ListType__value_type(SEXP type_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type type(type_sexp); - return Rcpp::wrap(ListType__value_type(type)); -END_RCPP +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 RcppExport SEXP _arrow_ListType__value_type(SEXP type_sexp){ @@ -2598,11 +2599,11 @@ RcppExport SEXP _arrow_ListType__value_type(SEXP type_sexp){ // datatype.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr LargeListType__value_field(const std::shared_ptr& type); -RcppExport SEXP _arrow_LargeListType__value_field(SEXP type_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type type(type_sexp); - return Rcpp::wrap(LargeListType__value_field(type)); -END_RCPP +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 RcppExport SEXP _arrow_LargeListType__value_field(SEXP type_sexp){ @@ -2613,11 +2614,11 @@ RcppExport SEXP _arrow_LargeListType__value_field(SEXP type_sexp){ // datatype.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr LargeListType__value_type(const std::shared_ptr& type); -RcppExport SEXP _arrow_LargeListType__value_type(SEXP type_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type type(type_sexp); - return Rcpp::wrap(LargeListType__value_type(type)); -END_RCPP +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 RcppExport SEXP _arrow_LargeListType__value_type(SEXP type_sexp){ @@ -2628,11 +2629,11 @@ RcppExport SEXP _arrow_LargeListType__value_type(SEXP type_sexp){ // datatype.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr FixedSizeListType__value_field(const std::shared_ptr& type); -RcppExport SEXP _arrow_FixedSizeListType__value_field(SEXP type_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type type(type_sexp); - return Rcpp::wrap(FixedSizeListType__value_field(type)); -END_RCPP +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 RcppExport SEXP _arrow_FixedSizeListType__value_field(SEXP type_sexp){ @@ -2643,11 +2644,11 @@ RcppExport SEXP _arrow_FixedSizeListType__value_field(SEXP type_sexp){ // datatype.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr FixedSizeListType__value_type(const std::shared_ptr& type); -RcppExport SEXP _arrow_FixedSizeListType__value_type(SEXP type_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type type(type_sexp); - return Rcpp::wrap(FixedSizeListType__value_type(type)); -END_RCPP +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 RcppExport SEXP _arrow_FixedSizeListType__value_type(SEXP type_sexp){ @@ -2658,11 +2659,11 @@ RcppExport SEXP _arrow_FixedSizeListType__value_type(SEXP type_sexp){ // datatype.cpp #if defined(ARROW_R_WITH_ARROW) int FixedSizeListType__list_size(const std::shared_ptr& type); -RcppExport SEXP _arrow_FixedSizeListType__list_size(SEXP type_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type type(type_sexp); - return Rcpp::wrap(FixedSizeListType__list_size(type)); -END_RCPP +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 RcppExport SEXP _arrow_FixedSizeListType__list_size(SEXP type_sexp){ @@ -2673,11 +2674,11 @@ RcppExport SEXP _arrow_FixedSizeListType__list_size(SEXP type_sexp){ // expression.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr dataset___expr__field_ref(std::string name); -RcppExport SEXP _arrow_dataset___expr__field_ref(SEXP name_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter::type name(name_sexp); - return Rcpp::wrap(dataset___expr__field_ref(name)); -END_RCPP +extern "C" SEXP _arrow_dataset___expr__field_ref(SEXP name_sexp){ +BEGIN_CPP11 + arrow::r::input::type name(name_sexp); + return cpp11::as_sexp(dataset___expr__field_ref(name)); +END_CPP11 } #else RcppExport SEXP _arrow_dataset___expr__field_ref(SEXP name_sexp){ @@ -2688,12 +2689,12 @@ RcppExport SEXP _arrow_dataset___expr__field_ref(SEXP name_sexp){ // expression.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr dataset___expr__equal(const std::shared_ptr& lhs, const std::shared_ptr& rhs); -RcppExport SEXP _arrow_dataset___expr__equal(SEXP lhs_sexp, SEXP rhs_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type lhs(lhs_sexp); - Rcpp::traits::input_parameter&>::type rhs(rhs_sexp); - return Rcpp::wrap(dataset___expr__equal(lhs, rhs)); -END_RCPP +extern "C" SEXP _arrow_dataset___expr__equal(SEXP lhs_sexp, SEXP rhs_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type lhs(lhs_sexp); + arrow::r::input&>::type rhs(rhs_sexp); + return cpp11::as_sexp(dataset___expr__equal(lhs, rhs)); +END_CPP11 } #else RcppExport SEXP _arrow_dataset___expr__equal(SEXP lhs_sexp, SEXP rhs_sexp){ @@ -2704,12 +2705,12 @@ RcppExport SEXP _arrow_dataset___expr__equal(SEXP lhs_sexp, SEXP rhs_sexp){ // expression.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr dataset___expr__not_equal(const std::shared_ptr& lhs, const std::shared_ptr& rhs); -RcppExport SEXP _arrow_dataset___expr__not_equal(SEXP lhs_sexp, SEXP rhs_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type lhs(lhs_sexp); - Rcpp::traits::input_parameter&>::type rhs(rhs_sexp); - return Rcpp::wrap(dataset___expr__not_equal(lhs, rhs)); -END_RCPP +extern "C" SEXP _arrow_dataset___expr__not_equal(SEXP lhs_sexp, SEXP rhs_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type lhs(lhs_sexp); + arrow::r::input&>::type rhs(rhs_sexp); + return cpp11::as_sexp(dataset___expr__not_equal(lhs, rhs)); +END_CPP11 } #else RcppExport SEXP _arrow_dataset___expr__not_equal(SEXP lhs_sexp, SEXP rhs_sexp){ @@ -2720,12 +2721,12 @@ RcppExport SEXP _arrow_dataset___expr__not_equal(SEXP lhs_sexp, SEXP rhs_sexp){ // expression.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr dataset___expr__greater(const std::shared_ptr& lhs, const std::shared_ptr& rhs); -RcppExport SEXP _arrow_dataset___expr__greater(SEXP lhs_sexp, SEXP rhs_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type lhs(lhs_sexp); - Rcpp::traits::input_parameter&>::type rhs(rhs_sexp); - return Rcpp::wrap(dataset___expr__greater(lhs, rhs)); -END_RCPP +extern "C" SEXP _arrow_dataset___expr__greater(SEXP lhs_sexp, SEXP rhs_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type lhs(lhs_sexp); + arrow::r::input&>::type rhs(rhs_sexp); + return cpp11::as_sexp(dataset___expr__greater(lhs, rhs)); +END_CPP11 } #else RcppExport SEXP _arrow_dataset___expr__greater(SEXP lhs_sexp, SEXP rhs_sexp){ @@ -2736,12 +2737,12 @@ RcppExport SEXP _arrow_dataset___expr__greater(SEXP lhs_sexp, SEXP rhs_sexp){ // expression.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr dataset___expr__greater_equal(const std::shared_ptr& lhs, const std::shared_ptr& rhs); -RcppExport SEXP _arrow_dataset___expr__greater_equal(SEXP lhs_sexp, SEXP rhs_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type lhs(lhs_sexp); - Rcpp::traits::input_parameter&>::type rhs(rhs_sexp); - return Rcpp::wrap(dataset___expr__greater_equal(lhs, rhs)); -END_RCPP +extern "C" SEXP _arrow_dataset___expr__greater_equal(SEXP lhs_sexp, SEXP rhs_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type lhs(lhs_sexp); + arrow::r::input&>::type rhs(rhs_sexp); + return cpp11::as_sexp(dataset___expr__greater_equal(lhs, rhs)); +END_CPP11 } #else RcppExport SEXP _arrow_dataset___expr__greater_equal(SEXP lhs_sexp, SEXP rhs_sexp){ @@ -2752,12 +2753,12 @@ RcppExport SEXP _arrow_dataset___expr__greater_equal(SEXP lhs_sexp, SEXP rhs_sex // expression.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr dataset___expr__less(const std::shared_ptr& lhs, const std::shared_ptr& rhs); -RcppExport SEXP _arrow_dataset___expr__less(SEXP lhs_sexp, SEXP rhs_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type lhs(lhs_sexp); - Rcpp::traits::input_parameter&>::type rhs(rhs_sexp); - return Rcpp::wrap(dataset___expr__less(lhs, rhs)); -END_RCPP +extern "C" SEXP _arrow_dataset___expr__less(SEXP lhs_sexp, SEXP rhs_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type lhs(lhs_sexp); + arrow::r::input&>::type rhs(rhs_sexp); + return cpp11::as_sexp(dataset___expr__less(lhs, rhs)); +END_CPP11 } #else RcppExport SEXP _arrow_dataset___expr__less(SEXP lhs_sexp, SEXP rhs_sexp){ @@ -2768,12 +2769,12 @@ RcppExport SEXP _arrow_dataset___expr__less(SEXP lhs_sexp, SEXP rhs_sexp){ // expression.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr dataset___expr__less_equal(const std::shared_ptr& lhs, const std::shared_ptr& rhs); -RcppExport SEXP _arrow_dataset___expr__less_equal(SEXP lhs_sexp, SEXP rhs_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type lhs(lhs_sexp); - Rcpp::traits::input_parameter&>::type rhs(rhs_sexp); - return Rcpp::wrap(dataset___expr__less_equal(lhs, rhs)); -END_RCPP +extern "C" SEXP _arrow_dataset___expr__less_equal(SEXP lhs_sexp, SEXP rhs_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type lhs(lhs_sexp); + arrow::r::input&>::type rhs(rhs_sexp); + return cpp11::as_sexp(dataset___expr__less_equal(lhs, rhs)); +END_CPP11 } #else RcppExport SEXP _arrow_dataset___expr__less_equal(SEXP lhs_sexp, SEXP rhs_sexp){ @@ -2784,12 +2785,12 @@ RcppExport SEXP _arrow_dataset___expr__less_equal(SEXP lhs_sexp, SEXP rhs_sexp){ // expression.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr dataset___expr__in(const std::shared_ptr& lhs, const std::shared_ptr& rhs); -RcppExport SEXP _arrow_dataset___expr__in(SEXP lhs_sexp, SEXP rhs_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type lhs(lhs_sexp); - Rcpp::traits::input_parameter&>::type rhs(rhs_sexp); - return Rcpp::wrap(dataset___expr__in(lhs, rhs)); -END_RCPP +extern "C" SEXP _arrow_dataset___expr__in(SEXP lhs_sexp, SEXP rhs_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type lhs(lhs_sexp); + arrow::r::input&>::type rhs(rhs_sexp); + return cpp11::as_sexp(dataset___expr__in(lhs, rhs)); +END_CPP11 } #else RcppExport SEXP _arrow_dataset___expr__in(SEXP lhs_sexp, SEXP rhs_sexp){ @@ -2800,12 +2801,12 @@ RcppExport SEXP _arrow_dataset___expr__in(SEXP lhs_sexp, SEXP rhs_sexp){ // expression.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr dataset___expr__and(const std::shared_ptr& lhs, const std::shared_ptr& rhs); -RcppExport SEXP _arrow_dataset___expr__and(SEXP lhs_sexp, SEXP rhs_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type lhs(lhs_sexp); - Rcpp::traits::input_parameter&>::type rhs(rhs_sexp); - return Rcpp::wrap(dataset___expr__and(lhs, rhs)); -END_RCPP +extern "C" SEXP _arrow_dataset___expr__and(SEXP lhs_sexp, SEXP rhs_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type lhs(lhs_sexp); + arrow::r::input&>::type rhs(rhs_sexp); + return cpp11::as_sexp(dataset___expr__and(lhs, rhs)); +END_CPP11 } #else RcppExport SEXP _arrow_dataset___expr__and(SEXP lhs_sexp, SEXP rhs_sexp){ @@ -2816,12 +2817,12 @@ RcppExport SEXP _arrow_dataset___expr__and(SEXP lhs_sexp, SEXP rhs_sexp){ // expression.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr dataset___expr__or(const std::shared_ptr& lhs, const std::shared_ptr& rhs); -RcppExport SEXP _arrow_dataset___expr__or(SEXP lhs_sexp, SEXP rhs_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type lhs(lhs_sexp); - Rcpp::traits::input_parameter&>::type rhs(rhs_sexp); - return Rcpp::wrap(dataset___expr__or(lhs, rhs)); -END_RCPP +extern "C" SEXP _arrow_dataset___expr__or(SEXP lhs_sexp, SEXP rhs_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type lhs(lhs_sexp); + arrow::r::input&>::type rhs(rhs_sexp); + return cpp11::as_sexp(dataset___expr__or(lhs, rhs)); +END_CPP11 } #else RcppExport SEXP _arrow_dataset___expr__or(SEXP lhs_sexp, SEXP rhs_sexp){ @@ -2832,11 +2833,11 @@ RcppExport SEXP _arrow_dataset___expr__or(SEXP lhs_sexp, SEXP rhs_sexp){ // expression.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr dataset___expr__not(const std::shared_ptr& lhs); -RcppExport SEXP _arrow_dataset___expr__not(SEXP lhs_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type lhs(lhs_sexp); - return Rcpp::wrap(dataset___expr__not(lhs)); -END_RCPP +extern "C" SEXP _arrow_dataset___expr__not(SEXP lhs_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type lhs(lhs_sexp); + return cpp11::as_sexp(dataset___expr__not(lhs)); +END_CPP11 } #else RcppExport SEXP _arrow_dataset___expr__not(SEXP lhs_sexp){ @@ -2847,11 +2848,11 @@ RcppExport SEXP _arrow_dataset___expr__not(SEXP lhs_sexp){ // expression.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr dataset___expr__is_valid(const std::shared_ptr& lhs); -RcppExport SEXP _arrow_dataset___expr__is_valid(SEXP lhs_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type lhs(lhs_sexp); - return Rcpp::wrap(dataset___expr__is_valid(lhs)); -END_RCPP +extern "C" SEXP _arrow_dataset___expr__is_valid(SEXP lhs_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type lhs(lhs_sexp); + return cpp11::as_sexp(dataset___expr__is_valid(lhs)); +END_CPP11 } #else RcppExport SEXP _arrow_dataset___expr__is_valid(SEXP lhs_sexp){ @@ -2862,11 +2863,11 @@ RcppExport SEXP _arrow_dataset___expr__is_valid(SEXP lhs_sexp){ // expression.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr dataset___expr__scalar(const std::shared_ptr& x); -RcppExport SEXP _arrow_dataset___expr__scalar(SEXP x_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type x(x_sexp); - return Rcpp::wrap(dataset___expr__scalar(x)); -END_RCPP +extern "C" SEXP _arrow_dataset___expr__scalar(SEXP x_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type x(x_sexp); + return cpp11::as_sexp(dataset___expr__scalar(x)); +END_CPP11 } #else RcppExport SEXP _arrow_dataset___expr__scalar(SEXP x_sexp){ @@ -2877,11 +2878,11 @@ RcppExport SEXP _arrow_dataset___expr__scalar(SEXP x_sexp){ // expression.cpp #if defined(ARROW_R_WITH_ARROW) std::string dataset___expr__ToString(const std::shared_ptr& x); -RcppExport SEXP _arrow_dataset___expr__ToString(SEXP x_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type x(x_sexp); - return Rcpp::wrap(dataset___expr__ToString(x)); -END_RCPP +extern "C" SEXP _arrow_dataset___expr__ToString(SEXP x_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type x(x_sexp); + return cpp11::as_sexp(dataset___expr__ToString(x)); +END_CPP11 } #else RcppExport SEXP _arrow_dataset___expr__ToString(SEXP x_sexp){ @@ -2892,17 +2893,17 @@ RcppExport SEXP _arrow_dataset___expr__ToString(SEXP x_sexp){ // 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); -RcppExport 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_RCPP - Rcpp::traits::input_parameter&>::type stream(stream_sexp); - Rcpp::traits::input_parameter&>::type table(table_sexp); - Rcpp::traits::input_parameter::type version(version_sexp); - Rcpp::traits::input_parameter::type chunk_size(chunk_size_sexp); - Rcpp::traits::input_parameter::type compression(compression_sexp); - Rcpp::traits::input_parameter::type compression_level(compression_level_sexp); +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); + arrow::r::input&>::type table(table_sexp); + arrow::r::input::type version(version_sexp); + arrow::r::input::type chunk_size(chunk_size_sexp); + arrow::r::input::type compression(compression_sexp); + arrow::r::input::type compression_level(compression_level_sexp); ipc___WriteFeather__Table(stream, table, version, chunk_size, compression, compression_level); return R_NilValue; -END_RCPP +END_CPP11 } #else RcppExport 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){ @@ -2913,11 +2914,11 @@ RcppExport SEXP _arrow_ipc___WriteFeather__Table(SEXP stream_sexp, SEXP table_se // feather.cpp #if defined(ARROW_R_WITH_ARROW) int ipc___feather___Reader__version(const std::shared_ptr& reader); -RcppExport SEXP _arrow_ipc___feather___Reader__version(SEXP reader_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type reader(reader_sexp); - return Rcpp::wrap(ipc___feather___Reader__version(reader)); -END_RCPP +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 RcppExport SEXP _arrow_ipc___feather___Reader__version(SEXP reader_sexp){ @@ -2928,12 +2929,12 @@ RcppExport SEXP _arrow_ipc___feather___Reader__version(SEXP reader_sexp){ // feather.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr ipc___feather___Reader__Read(const std::shared_ptr& reader, SEXP columns); -RcppExport SEXP _arrow_ipc___feather___Reader__Read(SEXP reader_sexp, SEXP columns_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type reader(reader_sexp); - Rcpp::traits::input_parameter::type columns(columns_sexp); - return Rcpp::wrap(ipc___feather___Reader__Read(reader, columns)); -END_RCPP +extern "C" SEXP _arrow_ipc___feather___Reader__Read(SEXP reader_sexp, SEXP columns_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type reader(reader_sexp); + arrow::r::input::type columns(columns_sexp); + return cpp11::as_sexp(ipc___feather___Reader__Read(reader, columns)); +END_CPP11 } #else RcppExport SEXP _arrow_ipc___feather___Reader__Read(SEXP reader_sexp, SEXP columns_sexp){ @@ -2944,11 +2945,11 @@ RcppExport SEXP _arrow_ipc___feather___Reader__Read(SEXP reader_sexp, SEXP colum // feather.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr ipc___feather___Reader__Open(const std::shared_ptr& stream); -RcppExport SEXP _arrow_ipc___feather___Reader__Open(SEXP stream_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type stream(stream_sexp); - return Rcpp::wrap(ipc___feather___Reader__Open(stream)); -END_RCPP +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 RcppExport SEXP _arrow_ipc___feather___Reader__Open(SEXP stream_sexp){ @@ -2958,12 +2959,12 @@ RcppExport SEXP _arrow_ipc___feather___Reader__Open(SEXP stream_sexp){ // feather.cpp #if defined(ARROW_R_WITH_ARROW) -Rcpp::CharacterVector ipc___feather___Reader__column_names(const std::shared_ptr& reader); -RcppExport SEXP _arrow_ipc___feather___Reader__column_names(SEXP reader_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type reader(reader_sexp); - return Rcpp::wrap(ipc___feather___Reader__column_names(reader)); -END_RCPP +cpp11::writable::strings ipc___feather___Reader__column_names(const std::shared_ptr& reader); +extern "C" SEXP _arrow_ipc___feather___Reader__column_names(SEXP reader_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type reader(reader_sexp); + return cpp11::as_sexp(ipc___feather___Reader__column_names(reader)); +END_CPP11 } #else RcppExport SEXP _arrow_ipc___feather___Reader__column_names(SEXP reader_sexp){ @@ -2974,13 +2975,13 @@ RcppExport SEXP _arrow_ipc___feather___Reader__column_names(SEXP reader_sexp){ // field.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr Field__initialize(const std::string& name, const std::shared_ptr& field, bool nullable); -RcppExport SEXP _arrow_Field__initialize(SEXP name_sexp, SEXP field_sexp, SEXP nullable_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter::type name(name_sexp); - Rcpp::traits::input_parameter&>::type field(field_sexp); - Rcpp::traits::input_parameter::type nullable(nullable_sexp); - return Rcpp::wrap(Field__initialize(name, field, nullable)); -END_RCPP +extern "C" SEXP _arrow_Field__initialize(SEXP name_sexp, SEXP field_sexp, SEXP nullable_sexp){ +BEGIN_CPP11 + arrow::r::input::type name(name_sexp); + arrow::r::input&>::type field(field_sexp); + arrow::r::input::type nullable(nullable_sexp); + return cpp11::as_sexp(Field__initialize(name, field, nullable)); +END_CPP11 } #else RcppExport SEXP _arrow_Field__initialize(SEXP name_sexp, SEXP field_sexp, SEXP nullable_sexp){ @@ -2991,11 +2992,11 @@ RcppExport SEXP _arrow_Field__initialize(SEXP name_sexp, SEXP field_sexp, SEXP n // field.cpp #if defined(ARROW_R_WITH_ARROW) std::string Field__ToString(const std::shared_ptr& field); -RcppExport SEXP _arrow_Field__ToString(SEXP field_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type field(field_sexp); - return Rcpp::wrap(Field__ToString(field)); -END_RCPP +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 RcppExport SEXP _arrow_Field__ToString(SEXP field_sexp){ @@ -3006,11 +3007,11 @@ RcppExport SEXP _arrow_Field__ToString(SEXP field_sexp){ // field.cpp #if defined(ARROW_R_WITH_ARROW) std::string Field__name(const std::shared_ptr& field); -RcppExport SEXP _arrow_Field__name(SEXP field_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type field(field_sexp); - return Rcpp::wrap(Field__name(field)); -END_RCPP +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 RcppExport SEXP _arrow_Field__name(SEXP field_sexp){ @@ -3021,12 +3022,12 @@ RcppExport SEXP _arrow_Field__name(SEXP field_sexp){ // field.cpp #if defined(ARROW_R_WITH_ARROW) bool Field__Equals(const std::shared_ptr& field, const std::shared_ptr& other); -RcppExport SEXP _arrow_Field__Equals(SEXP field_sexp, SEXP other_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type field(field_sexp); - Rcpp::traits::input_parameter&>::type other(other_sexp); - return Rcpp::wrap(Field__Equals(field, other)); -END_RCPP +extern "C" SEXP _arrow_Field__Equals(SEXP field_sexp, SEXP other_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type field(field_sexp); + arrow::r::input&>::type other(other_sexp); + return cpp11::as_sexp(Field__Equals(field, other)); +END_CPP11 } #else RcppExport SEXP _arrow_Field__Equals(SEXP field_sexp, SEXP other_sexp){ @@ -3037,11 +3038,11 @@ RcppExport SEXP _arrow_Field__Equals(SEXP field_sexp, SEXP other_sexp){ // field.cpp #if defined(ARROW_R_WITH_ARROW) bool Field__nullable(const std::shared_ptr& field); -RcppExport SEXP _arrow_Field__nullable(SEXP field_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type field(field_sexp); - return Rcpp::wrap(Field__nullable(field)); -END_RCPP +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 RcppExport SEXP _arrow_Field__nullable(SEXP field_sexp){ @@ -3052,11 +3053,11 @@ RcppExport SEXP _arrow_Field__nullable(SEXP field_sexp){ // field.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr Field__type(const std::shared_ptr& field); -RcppExport SEXP _arrow_Field__type(SEXP field_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type field(field_sexp); - return Rcpp::wrap(Field__type(field)); -END_RCPP +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 RcppExport SEXP _arrow_Field__type(SEXP field_sexp){ @@ -3067,11 +3068,11 @@ RcppExport SEXP _arrow_Field__type(SEXP field_sexp){ // filesystem.cpp #if defined(ARROW_R_WITH_ARROW) fs::FileType fs___FileInfo__type(const std::shared_ptr& x); -RcppExport SEXP _arrow_fs___FileInfo__type(SEXP x_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type x(x_sexp); - return Rcpp::wrap(fs___FileInfo__type(x)); -END_RCPP +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 RcppExport SEXP _arrow_fs___FileInfo__type(SEXP x_sexp){ @@ -3082,13 +3083,13 @@ RcppExport SEXP _arrow_fs___FileInfo__type(SEXP x_sexp){ // filesystem.cpp #if defined(ARROW_R_WITH_ARROW) void fs___FileInfo__set_type(const std::shared_ptr& x, fs::FileType type); -RcppExport SEXP _arrow_fs___FileInfo__set_type(SEXP x_sexp, SEXP type_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type x(x_sexp); - Rcpp::traits::input_parameter::type type(type_sexp); +extern "C" SEXP _arrow_fs___FileInfo__set_type(SEXP x_sexp, SEXP type_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type x(x_sexp); + arrow::r::input::type type(type_sexp); fs___FileInfo__set_type(x, type); return R_NilValue; -END_RCPP +END_CPP11 } #else RcppExport SEXP _arrow_fs___FileInfo__set_type(SEXP x_sexp, SEXP type_sexp){ @@ -3099,11 +3100,11 @@ RcppExport SEXP _arrow_fs___FileInfo__set_type(SEXP x_sexp, SEXP type_sexp){ // filesystem.cpp #if defined(ARROW_R_WITH_ARROW) std::string fs___FileInfo__path(const std::shared_ptr& x); -RcppExport SEXP _arrow_fs___FileInfo__path(SEXP x_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type x(x_sexp); - return Rcpp::wrap(fs___FileInfo__path(x)); -END_RCPP +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 RcppExport SEXP _arrow_fs___FileInfo__path(SEXP x_sexp){ @@ -3114,13 +3115,13 @@ RcppExport SEXP _arrow_fs___FileInfo__path(SEXP x_sexp){ // filesystem.cpp #if defined(ARROW_R_WITH_ARROW) void fs___FileInfo__set_path(const std::shared_ptr& x, const std::string& path); -RcppExport SEXP _arrow_fs___FileInfo__set_path(SEXP x_sexp, SEXP path_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type x(x_sexp); - Rcpp::traits::input_parameter::type path(path_sexp); +extern "C" SEXP _arrow_fs___FileInfo__set_path(SEXP x_sexp, SEXP path_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type x(x_sexp); + arrow::r::input::type path(path_sexp); fs___FileInfo__set_path(x, path); return R_NilValue; -END_RCPP +END_CPP11 } #else RcppExport SEXP _arrow_fs___FileInfo__set_path(SEXP x_sexp, SEXP path_sexp){ @@ -3131,11 +3132,11 @@ RcppExport SEXP _arrow_fs___FileInfo__set_path(SEXP x_sexp, SEXP path_sexp){ // filesystem.cpp #if defined(ARROW_R_WITH_ARROW) int64_t fs___FileInfo__size(const std::shared_ptr& x); -RcppExport SEXP _arrow_fs___FileInfo__size(SEXP x_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type x(x_sexp); - return Rcpp::wrap(fs___FileInfo__size(x)); -END_RCPP +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 RcppExport SEXP _arrow_fs___FileInfo__size(SEXP x_sexp){ @@ -3146,13 +3147,13 @@ RcppExport SEXP _arrow_fs___FileInfo__size(SEXP x_sexp){ // filesystem.cpp #if defined(ARROW_R_WITH_ARROW) void fs___FileInfo__set_size(const std::shared_ptr& x, int64_t size); -RcppExport SEXP _arrow_fs___FileInfo__set_size(SEXP x_sexp, SEXP size_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type x(x_sexp); - Rcpp::traits::input_parameter::type size(size_sexp); +extern "C" SEXP _arrow_fs___FileInfo__set_size(SEXP x_sexp, SEXP size_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type x(x_sexp); + arrow::r::input::type size(size_sexp); fs___FileInfo__set_size(x, size); return R_NilValue; -END_RCPP +END_CPP11 } #else RcppExport SEXP _arrow_fs___FileInfo__set_size(SEXP x_sexp, SEXP size_sexp){ @@ -3163,11 +3164,11 @@ RcppExport SEXP _arrow_fs___FileInfo__set_size(SEXP x_sexp, SEXP size_sexp){ // filesystem.cpp #if defined(ARROW_R_WITH_ARROW) std::string fs___FileInfo__base_name(const std::shared_ptr& x); -RcppExport SEXP _arrow_fs___FileInfo__base_name(SEXP x_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type x(x_sexp); - return Rcpp::wrap(fs___FileInfo__base_name(x)); -END_RCPP +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 RcppExport SEXP _arrow_fs___FileInfo__base_name(SEXP x_sexp){ @@ -3178,11 +3179,11 @@ RcppExport SEXP _arrow_fs___FileInfo__base_name(SEXP x_sexp){ // filesystem.cpp #if defined(ARROW_R_WITH_ARROW) std::string fs___FileInfo__extension(const std::shared_ptr& x); -RcppExport SEXP _arrow_fs___FileInfo__extension(SEXP x_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type x(x_sexp); - return Rcpp::wrap(fs___FileInfo__extension(x)); -END_RCPP +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 RcppExport SEXP _arrow_fs___FileInfo__extension(SEXP x_sexp){ @@ -3193,11 +3194,11 @@ RcppExport SEXP _arrow_fs___FileInfo__extension(SEXP x_sexp){ // filesystem.cpp #if defined(ARROW_R_WITH_ARROW) SEXP fs___FileInfo__mtime(const std::shared_ptr& x); -RcppExport SEXP _arrow_fs___FileInfo__mtime(SEXP x_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type x(x_sexp); - return Rcpp::wrap(fs___FileInfo__mtime(x)); -END_RCPP +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 RcppExport SEXP _arrow_fs___FileInfo__mtime(SEXP x_sexp){ @@ -3208,13 +3209,13 @@ RcppExport SEXP _arrow_fs___FileInfo__mtime(SEXP x_sexp){ // filesystem.cpp #if defined(ARROW_R_WITH_ARROW) void fs___FileInfo__set_mtime(const std::shared_ptr& x, SEXP time); -RcppExport SEXP _arrow_fs___FileInfo__set_mtime(SEXP x_sexp, SEXP time_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type x(x_sexp); - Rcpp::traits::input_parameter::type time(time_sexp); +extern "C" SEXP _arrow_fs___FileInfo__set_mtime(SEXP x_sexp, SEXP time_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type x(x_sexp); + arrow::r::input::type time(time_sexp); fs___FileInfo__set_mtime(x, time); return R_NilValue; -END_RCPP +END_CPP11 } #else RcppExport SEXP _arrow_fs___FileInfo__set_mtime(SEXP x_sexp, SEXP time_sexp){ @@ -3225,11 +3226,11 @@ RcppExport SEXP _arrow_fs___FileInfo__set_mtime(SEXP x_sexp, SEXP time_sexp){ // filesystem.cpp #if defined(ARROW_R_WITH_ARROW) std::string fs___FileSelector__base_dir(const std::shared_ptr& selector); -RcppExport SEXP _arrow_fs___FileSelector__base_dir(SEXP selector_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type selector(selector_sexp); - return Rcpp::wrap(fs___FileSelector__base_dir(selector)); -END_RCPP +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 RcppExport SEXP _arrow_fs___FileSelector__base_dir(SEXP selector_sexp){ @@ -3240,11 +3241,11 @@ RcppExport SEXP _arrow_fs___FileSelector__base_dir(SEXP selector_sexp){ // filesystem.cpp #if defined(ARROW_R_WITH_ARROW) bool fs___FileSelector__allow_not_found(const std::shared_ptr& selector); -RcppExport SEXP _arrow_fs___FileSelector__allow_not_found(SEXP selector_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type selector(selector_sexp); - return Rcpp::wrap(fs___FileSelector__allow_not_found(selector)); -END_RCPP +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 RcppExport SEXP _arrow_fs___FileSelector__allow_not_found(SEXP selector_sexp){ @@ -3255,11 +3256,11 @@ RcppExport SEXP _arrow_fs___FileSelector__allow_not_found(SEXP selector_sexp){ // filesystem.cpp #if defined(ARROW_R_WITH_ARROW) bool fs___FileSelector__recursive(const std::shared_ptr& selector); -RcppExport SEXP _arrow_fs___FileSelector__recursive(SEXP selector_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type selector(selector_sexp); - return Rcpp::wrap(fs___FileSelector__recursive(selector)); -END_RCPP +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 RcppExport SEXP _arrow_fs___FileSelector__recursive(SEXP selector_sexp){ @@ -3270,13 +3271,13 @@ RcppExport SEXP _arrow_fs___FileSelector__recursive(SEXP selector_sexp){ // 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); -RcppExport SEXP _arrow_fs___FileSelector__create(SEXP base_dir_sexp, SEXP allow_not_found_sexp, SEXP recursive_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter::type base_dir(base_dir_sexp); - Rcpp::traits::input_parameter::type allow_not_found(allow_not_found_sexp); - Rcpp::traits::input_parameter::type recursive(recursive_sexp); - return Rcpp::wrap(fs___FileSelector__create(base_dir, allow_not_found, recursive)); -END_RCPP +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); + arrow::r::input::type allow_not_found(allow_not_found_sexp); + arrow::r::input::type recursive(recursive_sexp); + return cpp11::as_sexp(fs___FileSelector__create(base_dir, allow_not_found, recursive)); +END_CPP11 } #else RcppExport SEXP _arrow_fs___FileSelector__create(SEXP base_dir_sexp, SEXP allow_not_found_sexp, SEXP recursive_sexp){ @@ -3287,12 +3288,12 @@ RcppExport SEXP _arrow_fs___FileSelector__create(SEXP base_dir_sexp, SEXP allow_ // filesystem.cpp #if defined(ARROW_R_WITH_ARROW) std::vector> fs___FileSystem__GetTargetInfos_Paths(const std::shared_ptr& file_system, const std::vector& paths); -RcppExport SEXP _arrow_fs___FileSystem__GetTargetInfos_Paths(SEXP file_system_sexp, SEXP paths_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type file_system(file_system_sexp); - Rcpp::traits::input_parameter&>::type paths(paths_sexp); - return Rcpp::wrap(fs___FileSystem__GetTargetInfos_Paths(file_system, paths)); -END_RCPP +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); + arrow::r::input&>::type paths(paths_sexp); + return cpp11::as_sexp(fs___FileSystem__GetTargetInfos_Paths(file_system, paths)); +END_CPP11 } #else RcppExport SEXP _arrow_fs___FileSystem__GetTargetInfos_Paths(SEXP file_system_sexp, SEXP paths_sexp){ @@ -3303,12 +3304,12 @@ RcppExport SEXP _arrow_fs___FileSystem__GetTargetInfos_Paths(SEXP file_system_se // filesystem.cpp #if defined(ARROW_R_WITH_ARROW) std::vector> fs___FileSystem__GetTargetInfos_FileSelector(const std::shared_ptr& file_system, const std::shared_ptr& selector); -RcppExport SEXP _arrow_fs___FileSystem__GetTargetInfos_FileSelector(SEXP file_system_sexp, SEXP selector_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type file_system(file_system_sexp); - Rcpp::traits::input_parameter&>::type selector(selector_sexp); - return Rcpp::wrap(fs___FileSystem__GetTargetInfos_FileSelector(file_system, selector)); -END_RCPP +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); + arrow::r::input&>::type selector(selector_sexp); + return cpp11::as_sexp(fs___FileSystem__GetTargetInfos_FileSelector(file_system, selector)); +END_CPP11 } #else RcppExport SEXP _arrow_fs___FileSystem__GetTargetInfos_FileSelector(SEXP file_system_sexp, SEXP selector_sexp){ @@ -3319,14 +3320,14 @@ RcppExport SEXP _arrow_fs___FileSystem__GetTargetInfos_FileSelector(SEXP file_sy // filesystem.cpp #if defined(ARROW_R_WITH_ARROW) void fs___FileSystem__CreateDir(const std::shared_ptr& file_system, const std::string& path, bool recursive); -RcppExport SEXP _arrow_fs___FileSystem__CreateDir(SEXP file_system_sexp, SEXP path_sexp, SEXP recursive_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type file_system(file_system_sexp); - Rcpp::traits::input_parameter::type path(path_sexp); - Rcpp::traits::input_parameter::type recursive(recursive_sexp); +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); + arrow::r::input::type path(path_sexp); + arrow::r::input::type recursive(recursive_sexp); fs___FileSystem__CreateDir(file_system, path, recursive); return R_NilValue; -END_RCPP +END_CPP11 } #else RcppExport SEXP _arrow_fs___FileSystem__CreateDir(SEXP file_system_sexp, SEXP path_sexp, SEXP recursive_sexp){ @@ -3337,13 +3338,13 @@ RcppExport SEXP _arrow_fs___FileSystem__CreateDir(SEXP file_system_sexp, SEXP pa // filesystem.cpp #if defined(ARROW_R_WITH_ARROW) void fs___FileSystem__DeleteDir(const std::shared_ptr& file_system, const std::string& path); -RcppExport SEXP _arrow_fs___FileSystem__DeleteDir(SEXP file_system_sexp, SEXP path_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type file_system(file_system_sexp); - Rcpp::traits::input_parameter::type path(path_sexp); +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); + arrow::r::input::type path(path_sexp); fs___FileSystem__DeleteDir(file_system, path); return R_NilValue; -END_RCPP +END_CPP11 } #else RcppExport SEXP _arrow_fs___FileSystem__DeleteDir(SEXP file_system_sexp, SEXP path_sexp){ @@ -3354,13 +3355,13 @@ RcppExport SEXP _arrow_fs___FileSystem__DeleteDir(SEXP file_system_sexp, SEXP pa // filesystem.cpp #if defined(ARROW_R_WITH_ARROW) void fs___FileSystem__DeleteDirContents(const std::shared_ptr& file_system, const std::string& path); -RcppExport SEXP _arrow_fs___FileSystem__DeleteDirContents(SEXP file_system_sexp, SEXP path_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type file_system(file_system_sexp); - Rcpp::traits::input_parameter::type path(path_sexp); +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); + arrow::r::input::type path(path_sexp); fs___FileSystem__DeleteDirContents(file_system, path); return R_NilValue; -END_RCPP +END_CPP11 } #else RcppExport SEXP _arrow_fs___FileSystem__DeleteDirContents(SEXP file_system_sexp, SEXP path_sexp){ @@ -3371,13 +3372,13 @@ RcppExport SEXP _arrow_fs___FileSystem__DeleteDirContents(SEXP file_system_sexp, // filesystem.cpp #if defined(ARROW_R_WITH_ARROW) void fs___FileSystem__DeleteFile(const std::shared_ptr& file_system, const std::string& path); -RcppExport SEXP _arrow_fs___FileSystem__DeleteFile(SEXP file_system_sexp, SEXP path_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type file_system(file_system_sexp); - Rcpp::traits::input_parameter::type path(path_sexp); +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); + arrow::r::input::type path(path_sexp); fs___FileSystem__DeleteFile(file_system, path); return R_NilValue; -END_RCPP +END_CPP11 } #else RcppExport SEXP _arrow_fs___FileSystem__DeleteFile(SEXP file_system_sexp, SEXP path_sexp){ @@ -3388,13 +3389,13 @@ RcppExport SEXP _arrow_fs___FileSystem__DeleteFile(SEXP file_system_sexp, SEXP p // filesystem.cpp #if defined(ARROW_R_WITH_ARROW) void fs___FileSystem__DeleteFiles(const std::shared_ptr& file_system, const std::vector& paths); -RcppExport SEXP _arrow_fs___FileSystem__DeleteFiles(SEXP file_system_sexp, SEXP paths_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type file_system(file_system_sexp); - Rcpp::traits::input_parameter&>::type paths(paths_sexp); +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); + arrow::r::input&>::type paths(paths_sexp); fs___FileSystem__DeleteFiles(file_system, paths); return R_NilValue; -END_RCPP +END_CPP11 } #else RcppExport SEXP _arrow_fs___FileSystem__DeleteFiles(SEXP file_system_sexp, SEXP paths_sexp){ @@ -3405,14 +3406,14 @@ RcppExport SEXP _arrow_fs___FileSystem__DeleteFiles(SEXP file_system_sexp, SEXP // 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); -RcppExport SEXP _arrow_fs___FileSystem__Move(SEXP file_system_sexp, SEXP src_sexp, SEXP dest_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type file_system(file_system_sexp); - Rcpp::traits::input_parameter::type src(src_sexp); - Rcpp::traits::input_parameter::type dest(dest_sexp); +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); + arrow::r::input::type src(src_sexp); + arrow::r::input::type dest(dest_sexp); fs___FileSystem__Move(file_system, src, dest); return R_NilValue; -END_RCPP +END_CPP11 } #else RcppExport SEXP _arrow_fs___FileSystem__Move(SEXP file_system_sexp, SEXP src_sexp, SEXP dest_sexp){ @@ -3423,14 +3424,14 @@ RcppExport SEXP _arrow_fs___FileSystem__Move(SEXP file_system_sexp, SEXP src_sex // 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); -RcppExport SEXP _arrow_fs___FileSystem__CopyFile(SEXP file_system_sexp, SEXP src_sexp, SEXP dest_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type file_system(file_system_sexp); - Rcpp::traits::input_parameter::type src(src_sexp); - Rcpp::traits::input_parameter::type dest(dest_sexp); +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); + arrow::r::input::type src(src_sexp); + arrow::r::input::type dest(dest_sexp); fs___FileSystem__CopyFile(file_system, src, dest); return R_NilValue; -END_RCPP +END_CPP11 } #else RcppExport SEXP _arrow_fs___FileSystem__CopyFile(SEXP file_system_sexp, SEXP src_sexp, SEXP dest_sexp){ @@ -3441,12 +3442,12 @@ RcppExport SEXP _arrow_fs___FileSystem__CopyFile(SEXP file_system_sexp, SEXP src // filesystem.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr fs___FileSystem__OpenInputStream(const std::shared_ptr& file_system, const std::string& path); -RcppExport SEXP _arrow_fs___FileSystem__OpenInputStream(SEXP file_system_sexp, SEXP path_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type file_system(file_system_sexp); - Rcpp::traits::input_parameter::type path(path_sexp); - return Rcpp::wrap(fs___FileSystem__OpenInputStream(file_system, path)); -END_RCPP +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); + arrow::r::input::type path(path_sexp); + return cpp11::as_sexp(fs___FileSystem__OpenInputStream(file_system, path)); +END_CPP11 } #else RcppExport SEXP _arrow_fs___FileSystem__OpenInputStream(SEXP file_system_sexp, SEXP path_sexp){ @@ -3457,12 +3458,12 @@ RcppExport SEXP _arrow_fs___FileSystem__OpenInputStream(SEXP file_system_sexp, S // filesystem.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr fs___FileSystem__OpenInputFile(const std::shared_ptr& file_system, const std::string& path); -RcppExport SEXP _arrow_fs___FileSystem__OpenInputFile(SEXP file_system_sexp, SEXP path_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type file_system(file_system_sexp); - Rcpp::traits::input_parameter::type path(path_sexp); - return Rcpp::wrap(fs___FileSystem__OpenInputFile(file_system, path)); -END_RCPP +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); + arrow::r::input::type path(path_sexp); + return cpp11::as_sexp(fs___FileSystem__OpenInputFile(file_system, path)); +END_CPP11 } #else RcppExport SEXP _arrow_fs___FileSystem__OpenInputFile(SEXP file_system_sexp, SEXP path_sexp){ @@ -3473,12 +3474,12 @@ RcppExport SEXP _arrow_fs___FileSystem__OpenInputFile(SEXP file_system_sexp, SEX // filesystem.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr fs___FileSystem__OpenOutputStream(const std::shared_ptr& file_system, const std::string& path); -RcppExport SEXP _arrow_fs___FileSystem__OpenOutputStream(SEXP file_system_sexp, SEXP path_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type file_system(file_system_sexp); - Rcpp::traits::input_parameter::type path(path_sexp); - return Rcpp::wrap(fs___FileSystem__OpenOutputStream(file_system, path)); -END_RCPP +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); + arrow::r::input::type path(path_sexp); + return cpp11::as_sexp(fs___FileSystem__OpenOutputStream(file_system, path)); +END_CPP11 } #else RcppExport SEXP _arrow_fs___FileSystem__OpenOutputStream(SEXP file_system_sexp, SEXP path_sexp){ @@ -3489,12 +3490,12 @@ RcppExport SEXP _arrow_fs___FileSystem__OpenOutputStream(SEXP file_system_sexp, // filesystem.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr fs___FileSystem__OpenAppendStream(const std::shared_ptr& file_system, const std::string& path); -RcppExport SEXP _arrow_fs___FileSystem__OpenAppendStream(SEXP file_system_sexp, SEXP path_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type file_system(file_system_sexp); - Rcpp::traits::input_parameter::type path(path_sexp); - return Rcpp::wrap(fs___FileSystem__OpenAppendStream(file_system, path)); -END_RCPP +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); + arrow::r::input::type path(path_sexp); + return cpp11::as_sexp(fs___FileSystem__OpenAppendStream(file_system, path)); +END_CPP11 } #else RcppExport SEXP _arrow_fs___FileSystem__OpenAppendStream(SEXP file_system_sexp, SEXP path_sexp){ @@ -3505,11 +3506,11 @@ RcppExport SEXP _arrow_fs___FileSystem__OpenAppendStream(SEXP file_system_sexp, // filesystem.cpp #if defined(ARROW_R_WITH_ARROW) std::string fs___FileSystem__type_name(const std::shared_ptr& file_system); -RcppExport SEXP _arrow_fs___FileSystem__type_name(SEXP file_system_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type file_system(file_system_sexp); - return Rcpp::wrap(fs___FileSystem__type_name(file_system)); -END_RCPP +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 RcppExport SEXP _arrow_fs___FileSystem__type_name(SEXP file_system_sexp){ @@ -3520,10 +3521,10 @@ RcppExport SEXP _arrow_fs___FileSystem__type_name(SEXP file_system_sexp){ // filesystem.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr fs___LocalFileSystem__create(); -RcppExport SEXP _arrow_fs___LocalFileSystem__create(){ -BEGIN_RCPP - return Rcpp::wrap(fs___LocalFileSystem__create()); -END_RCPP +extern "C" SEXP _arrow_fs___LocalFileSystem__create(){ +BEGIN_CPP11 + return cpp11::as_sexp(fs___LocalFileSystem__create()); +END_CPP11 } #else RcppExport SEXP _arrow_fs___LocalFileSystem__create(){ @@ -3534,12 +3535,12 @@ RcppExport SEXP _arrow_fs___LocalFileSystem__create(){ // 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); -RcppExport SEXP _arrow_fs___SubTreeFileSystem__create(SEXP base_path_sexp, SEXP base_fs_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter::type base_path(base_path_sexp); - Rcpp::traits::input_parameter&>::type base_fs(base_fs_sexp); - return Rcpp::wrap(fs___SubTreeFileSystem__create(base_path, base_fs)); -END_RCPP +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); + arrow::r::input&>::type base_fs(base_fs_sexp); + return cpp11::as_sexp(fs___SubTreeFileSystem__create(base_path, base_fs)); +END_CPP11 } #else RcppExport SEXP _arrow_fs___SubTreeFileSystem__create(SEXP base_path_sexp, SEXP base_fs_sexp){ @@ -3549,12 +3550,12 @@ RcppExport SEXP _arrow_fs___SubTreeFileSystem__create(SEXP base_path_sexp, SEXP // filesystem.cpp #if defined(ARROW_R_WITH_ARROW) -Rcpp::List fs___FileSystemFromUri(const std::string& path); -RcppExport SEXP _arrow_fs___FileSystemFromUri(SEXP path_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter::type path(path_sexp); - return Rcpp::wrap(fs___FileSystemFromUri(path)); -END_RCPP +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 RcppExport SEXP _arrow_fs___FileSystemFromUri(SEXP path_sexp){ @@ -3565,11 +3566,11 @@ RcppExport SEXP _arrow_fs___FileSystemFromUri(SEXP path_sexp){ // filesystem.cpp #if defined(ARROW_R_WITH_S3) void fs___EnsureS3Initialized(); -RcppExport SEXP _arrow_fs___EnsureS3Initialized(){ -BEGIN_RCPP +extern "C" SEXP _arrow_fs___EnsureS3Initialized(){ +BEGIN_CPP11 fs___EnsureS3Initialized(); return R_NilValue; -END_RCPP +END_CPP11 } #else RcppExport SEXP _arrow_fs___EnsureS3Initialized(){ @@ -3580,10 +3581,10 @@ RcppExport SEXP _arrow_fs___EnsureS3Initialized(){ // filesystem.cpp #if defined(ARROW_R_WITH_S3) std::shared_ptr fs___S3FileSystem__create(); -RcppExport SEXP _arrow_fs___S3FileSystem__create(){ -BEGIN_RCPP - return Rcpp::wrap(fs___S3FileSystem__create()); -END_RCPP +extern "C" SEXP _arrow_fs___S3FileSystem__create(){ +BEGIN_CPP11 + return cpp11::as_sexp(fs___S3FileSystem__create()); +END_CPP11 } #else RcppExport SEXP _arrow_fs___S3FileSystem__create(){ @@ -3594,12 +3595,12 @@ RcppExport SEXP _arrow_fs___S3FileSystem__create(){ // io.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr io___Readable__Read(const std::shared_ptr& x, int64_t nbytes); -RcppExport SEXP _arrow_io___Readable__Read(SEXP x_sexp, SEXP nbytes_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type x(x_sexp); - Rcpp::traits::input_parameter::type nbytes(nbytes_sexp); - return Rcpp::wrap(io___Readable__Read(x, nbytes)); -END_RCPP +extern "C" SEXP _arrow_io___Readable__Read(SEXP x_sexp, SEXP nbytes_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type x(x_sexp); + arrow::r::input::type nbytes(nbytes_sexp); + return cpp11::as_sexp(io___Readable__Read(x, nbytes)); +END_CPP11 } #else RcppExport SEXP _arrow_io___Readable__Read(SEXP x_sexp, SEXP nbytes_sexp){ @@ -3610,12 +3611,12 @@ RcppExport SEXP _arrow_io___Readable__Read(SEXP x_sexp, SEXP nbytes_sexp){ // io.cpp #if defined(ARROW_R_WITH_ARROW) void io___InputStream__Close(const std::shared_ptr& x); -RcppExport SEXP _arrow_io___InputStream__Close(SEXP x_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type x(x_sexp); +extern "C" SEXP _arrow_io___InputStream__Close(SEXP x_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type x(x_sexp); io___InputStream__Close(x); return R_NilValue; -END_RCPP +END_CPP11 } #else RcppExport SEXP _arrow_io___InputStream__Close(SEXP x_sexp){ @@ -3626,12 +3627,12 @@ RcppExport SEXP _arrow_io___InputStream__Close(SEXP x_sexp){ // io.cpp #if defined(ARROW_R_WITH_ARROW) void io___OutputStream__Close(const std::shared_ptr& x); -RcppExport SEXP _arrow_io___OutputStream__Close(SEXP x_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type x(x_sexp); +extern "C" SEXP _arrow_io___OutputStream__Close(SEXP x_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type x(x_sexp); io___OutputStream__Close(x); return R_NilValue; -END_RCPP +END_CPP11 } #else RcppExport SEXP _arrow_io___OutputStream__Close(SEXP x_sexp){ @@ -3642,11 +3643,11 @@ RcppExport SEXP _arrow_io___OutputStream__Close(SEXP x_sexp){ // io.cpp #if defined(ARROW_R_WITH_ARROW) int64_t io___RandomAccessFile__GetSize(const std::shared_ptr& x); -RcppExport SEXP _arrow_io___RandomAccessFile__GetSize(SEXP x_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type x(x_sexp); - return Rcpp::wrap(io___RandomAccessFile__GetSize(x)); -END_RCPP +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 RcppExport SEXP _arrow_io___RandomAccessFile__GetSize(SEXP x_sexp){ @@ -3657,11 +3658,11 @@ RcppExport SEXP _arrow_io___RandomAccessFile__GetSize(SEXP x_sexp){ // io.cpp #if defined(ARROW_R_WITH_ARROW) bool io___RandomAccessFile__supports_zero_copy(const std::shared_ptr& x); -RcppExport SEXP _arrow_io___RandomAccessFile__supports_zero_copy(SEXP x_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type x(x_sexp); - return Rcpp::wrap(io___RandomAccessFile__supports_zero_copy(x)); -END_RCPP +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 RcppExport SEXP _arrow_io___RandomAccessFile__supports_zero_copy(SEXP x_sexp){ @@ -3672,13 +3673,13 @@ RcppExport SEXP _arrow_io___RandomAccessFile__supports_zero_copy(SEXP x_sexp){ // io.cpp #if defined(ARROW_R_WITH_ARROW) void io___RandomAccessFile__Seek(const std::shared_ptr& x, int64_t position); -RcppExport SEXP _arrow_io___RandomAccessFile__Seek(SEXP x_sexp, SEXP position_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type x(x_sexp); - Rcpp::traits::input_parameter::type position(position_sexp); +extern "C" SEXP _arrow_io___RandomAccessFile__Seek(SEXP x_sexp, SEXP position_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type x(x_sexp); + arrow::r::input::type position(position_sexp); io___RandomAccessFile__Seek(x, position); return R_NilValue; -END_RCPP +END_CPP11 } #else RcppExport SEXP _arrow_io___RandomAccessFile__Seek(SEXP x_sexp, SEXP position_sexp){ @@ -3689,11 +3690,11 @@ RcppExport SEXP _arrow_io___RandomAccessFile__Seek(SEXP x_sexp, SEXP position_se // io.cpp #if defined(ARROW_R_WITH_ARROW) int64_t io___RandomAccessFile__Tell(const std::shared_ptr& x); -RcppExport SEXP _arrow_io___RandomAccessFile__Tell(SEXP x_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type x(x_sexp); - return Rcpp::wrap(io___RandomAccessFile__Tell(x)); -END_RCPP +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 RcppExport SEXP _arrow_io___RandomAccessFile__Tell(SEXP x_sexp){ @@ -3704,11 +3705,11 @@ RcppExport SEXP _arrow_io___RandomAccessFile__Tell(SEXP x_sexp){ // io.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr io___RandomAccessFile__Read0(const std::shared_ptr& x); -RcppExport SEXP _arrow_io___RandomAccessFile__Read0(SEXP x_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type x(x_sexp); - return Rcpp::wrap(io___RandomAccessFile__Read0(x)); -END_RCPP +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 RcppExport SEXP _arrow_io___RandomAccessFile__Read0(SEXP x_sexp){ @@ -3719,13 +3720,13 @@ RcppExport SEXP _arrow_io___RandomAccessFile__Read0(SEXP x_sexp){ // 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); -RcppExport SEXP _arrow_io___RandomAccessFile__ReadAt(SEXP x_sexp, SEXP position_sexp, SEXP nbytes_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type x(x_sexp); - Rcpp::traits::input_parameter::type position(position_sexp); - Rcpp::traits::input_parameter::type nbytes(nbytes_sexp); - return Rcpp::wrap(io___RandomAccessFile__ReadAt(x, position, nbytes)); -END_RCPP +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); + arrow::r::input::type position(position_sexp); + arrow::r::input::type nbytes(nbytes_sexp); + return cpp11::as_sexp(io___RandomAccessFile__ReadAt(x, position, nbytes)); +END_CPP11 } #else RcppExport SEXP _arrow_io___RandomAccessFile__ReadAt(SEXP x_sexp, SEXP position_sexp, SEXP nbytes_sexp){ @@ -3736,12 +3737,12 @@ RcppExport SEXP _arrow_io___RandomAccessFile__ReadAt(SEXP x_sexp, SEXP position_ // io.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr io___MemoryMappedFile__Create(const std::string& path, int64_t size); -RcppExport SEXP _arrow_io___MemoryMappedFile__Create(SEXP path_sexp, SEXP size_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter::type path(path_sexp); - Rcpp::traits::input_parameter::type size(size_sexp); - return Rcpp::wrap(io___MemoryMappedFile__Create(path, size)); -END_RCPP +extern "C" SEXP _arrow_io___MemoryMappedFile__Create(SEXP path_sexp, SEXP size_sexp){ +BEGIN_CPP11 + arrow::r::input::type path(path_sexp); + arrow::r::input::type size(size_sexp); + return cpp11::as_sexp(io___MemoryMappedFile__Create(path, size)); +END_CPP11 } #else RcppExport SEXP _arrow_io___MemoryMappedFile__Create(SEXP path_sexp, SEXP size_sexp){ @@ -3752,12 +3753,12 @@ RcppExport SEXP _arrow_io___MemoryMappedFile__Create(SEXP path_sexp, SEXP size_s // io.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr io___MemoryMappedFile__Open(const std::string& path, arrow::io::FileMode::type mode); -RcppExport SEXP _arrow_io___MemoryMappedFile__Open(SEXP path_sexp, SEXP mode_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter::type path(path_sexp); - Rcpp::traits::input_parameter::type mode(mode_sexp); - return Rcpp::wrap(io___MemoryMappedFile__Open(path, mode)); -END_RCPP +extern "C" SEXP _arrow_io___MemoryMappedFile__Open(SEXP path_sexp, SEXP mode_sexp){ +BEGIN_CPP11 + arrow::r::input::type path(path_sexp); + arrow::r::input::type mode(mode_sexp); + return cpp11::as_sexp(io___MemoryMappedFile__Open(path, mode)); +END_CPP11 } #else RcppExport SEXP _arrow_io___MemoryMappedFile__Open(SEXP path_sexp, SEXP mode_sexp){ @@ -3768,13 +3769,13 @@ RcppExport SEXP _arrow_io___MemoryMappedFile__Open(SEXP path_sexp, SEXP mode_sex // io.cpp #if defined(ARROW_R_WITH_ARROW) void io___MemoryMappedFile__Resize(const std::shared_ptr& x, int64_t size); -RcppExport SEXP _arrow_io___MemoryMappedFile__Resize(SEXP x_sexp, SEXP size_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type x(x_sexp); - Rcpp::traits::input_parameter::type size(size_sexp); +extern "C" SEXP _arrow_io___MemoryMappedFile__Resize(SEXP x_sexp, SEXP size_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type x(x_sexp); + arrow::r::input::type size(size_sexp); io___MemoryMappedFile__Resize(x, size); return R_NilValue; -END_RCPP +END_CPP11 } #else RcppExport SEXP _arrow_io___MemoryMappedFile__Resize(SEXP x_sexp, SEXP size_sexp){ @@ -3785,11 +3786,11 @@ RcppExport SEXP _arrow_io___MemoryMappedFile__Resize(SEXP x_sexp, SEXP size_sexp // io.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr io___ReadableFile__Open(const std::string& path); -RcppExport SEXP _arrow_io___ReadableFile__Open(SEXP path_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter::type path(path_sexp); - return Rcpp::wrap(io___ReadableFile__Open(path)); -END_RCPP +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 RcppExport SEXP _arrow_io___ReadableFile__Open(SEXP path_sexp){ @@ -3800,11 +3801,11 @@ RcppExport SEXP _arrow_io___ReadableFile__Open(SEXP path_sexp){ // io.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr io___BufferReader__initialize(const std::shared_ptr& buffer); -RcppExport SEXP _arrow_io___BufferReader__initialize(SEXP buffer_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type buffer(buffer_sexp); - return Rcpp::wrap(io___BufferReader__initialize(buffer)); -END_RCPP +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 RcppExport SEXP _arrow_io___BufferReader__initialize(SEXP buffer_sexp){ @@ -3815,13 +3816,13 @@ RcppExport SEXP _arrow_io___BufferReader__initialize(SEXP buffer_sexp){ // io.cpp #if defined(ARROW_R_WITH_ARROW) void io___Writable__write(const std::shared_ptr& stream, const std::shared_ptr& buf); -RcppExport SEXP _arrow_io___Writable__write(SEXP stream_sexp, SEXP buf_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type stream(stream_sexp); - Rcpp::traits::input_parameter&>::type buf(buf_sexp); +extern "C" SEXP _arrow_io___Writable__write(SEXP stream_sexp, SEXP buf_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type stream(stream_sexp); + arrow::r::input&>::type buf(buf_sexp); io___Writable__write(stream, buf); return R_NilValue; -END_RCPP +END_CPP11 } #else RcppExport SEXP _arrow_io___Writable__write(SEXP stream_sexp, SEXP buf_sexp){ @@ -3832,11 +3833,11 @@ RcppExport SEXP _arrow_io___Writable__write(SEXP stream_sexp, SEXP buf_sexp){ // io.cpp #if defined(ARROW_R_WITH_ARROW) int64_t io___OutputStream__Tell(const std::shared_ptr& stream); -RcppExport SEXP _arrow_io___OutputStream__Tell(SEXP stream_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type stream(stream_sexp); - return Rcpp::wrap(io___OutputStream__Tell(stream)); -END_RCPP +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 RcppExport SEXP _arrow_io___OutputStream__Tell(SEXP stream_sexp){ @@ -3847,11 +3848,11 @@ RcppExport SEXP _arrow_io___OutputStream__Tell(SEXP stream_sexp){ // io.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr io___FileOutputStream__Open(const std::string& path); -RcppExport SEXP _arrow_io___FileOutputStream__Open(SEXP path_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter::type path(path_sexp); - return Rcpp::wrap(io___FileOutputStream__Open(path)); -END_RCPP +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 RcppExport SEXP _arrow_io___FileOutputStream__Open(SEXP path_sexp){ @@ -3862,11 +3863,11 @@ RcppExport SEXP _arrow_io___FileOutputStream__Open(SEXP path_sexp){ // io.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr io___BufferOutputStream__Create(int64_t initial_capacity); -RcppExport SEXP _arrow_io___BufferOutputStream__Create(SEXP initial_capacity_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter::type initial_capacity(initial_capacity_sexp); - return Rcpp::wrap(io___BufferOutputStream__Create(initial_capacity)); -END_RCPP +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 RcppExport SEXP _arrow_io___BufferOutputStream__Create(SEXP initial_capacity_sexp){ @@ -3877,11 +3878,11 @@ RcppExport SEXP _arrow_io___BufferOutputStream__Create(SEXP initial_capacity_sex // io.cpp #if defined(ARROW_R_WITH_ARROW) int64_t io___BufferOutputStream__capacity(const std::shared_ptr& stream); -RcppExport SEXP _arrow_io___BufferOutputStream__capacity(SEXP stream_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type stream(stream_sexp); - return Rcpp::wrap(io___BufferOutputStream__capacity(stream)); -END_RCPP +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 RcppExport SEXP _arrow_io___BufferOutputStream__capacity(SEXP stream_sexp){ @@ -3892,11 +3893,11 @@ RcppExport SEXP _arrow_io___BufferOutputStream__capacity(SEXP stream_sexp){ // io.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr io___BufferOutputStream__Finish(const std::shared_ptr& stream); -RcppExport SEXP _arrow_io___BufferOutputStream__Finish(SEXP stream_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type stream(stream_sexp); - return Rcpp::wrap(io___BufferOutputStream__Finish(stream)); -END_RCPP +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 RcppExport SEXP _arrow_io___BufferOutputStream__Finish(SEXP stream_sexp){ @@ -3907,11 +3908,11 @@ RcppExport SEXP _arrow_io___BufferOutputStream__Finish(SEXP stream_sexp){ // io.cpp #if defined(ARROW_R_WITH_ARROW) int64_t io___BufferOutputStream__Tell(const std::shared_ptr& stream); -RcppExport SEXP _arrow_io___BufferOutputStream__Tell(SEXP stream_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type stream(stream_sexp); - return Rcpp::wrap(io___BufferOutputStream__Tell(stream)); -END_RCPP +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 RcppExport SEXP _arrow_io___BufferOutputStream__Tell(SEXP stream_sexp){ @@ -3921,14 +3922,14 @@ RcppExport SEXP _arrow_io___BufferOutputStream__Tell(SEXP stream_sexp){ // io.cpp #if defined(ARROW_R_WITH_ARROW) -void io___BufferOutputStream__Write(const std::shared_ptr& stream, RawVector_ bytes); -RcppExport SEXP _arrow_io___BufferOutputStream__Write(SEXP stream_sexp, SEXP bytes_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type stream(stream_sexp); - Rcpp::traits::input_parameter::type bytes(bytes_sexp); +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); + arrow::r::input::type bytes(bytes_sexp); io___BufferOutputStream__Write(stream, bytes); return R_NilValue; -END_RCPP +END_CPP11 } #else RcppExport SEXP _arrow_io___BufferOutputStream__Write(SEXP stream_sexp, SEXP bytes_sexp){ @@ -3938,30 +3939,31 @@ RcppExport SEXP _arrow_io___BufferOutputStream__Write(SEXP stream_sexp, SEXP byt // json.cpp #if defined(ARROW_R_WITH_ARROW) -std::shared_ptr json___ReadOptions__initialize(List_ options); -RcppExport SEXP _arrow_json___ReadOptions__initialize(SEXP options_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter::type options(options_sexp); - return Rcpp::wrap(json___ReadOptions__initialize(options)); -END_RCPP +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); + arrow::r::input::type block_size(block_size_sexp); + return cpp11::as_sexp(json___ReadOptions__initialize(use_threads, block_size)); +END_CPP11 } #else -RcppExport SEXP _arrow_json___ReadOptions__initialize(SEXP options_sexp){ +RcppExport SEXP _arrow_json___ReadOptions__initialize(SEXP use_threads_sexp, SEXP block_size_sexp){ Rf_error("Cannot call json___ReadOptions__initialize(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif // json.cpp #if defined(ARROW_R_WITH_ARROW) -std::shared_ptr json___ParseOptions__initialize(List_ options); -RcppExport SEXP _arrow_json___ParseOptions__initialize(SEXP options_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter::type options(options_sexp); - return Rcpp::wrap(json___ParseOptions__initialize(options)); -END_RCPP +std::shared_ptr json___ParseOptions__initialize(bool newlines_in_values); +extern "C" SEXP _arrow_json___ParseOptions__initialize(SEXP newlines_in_values_sexp){ +BEGIN_CPP11 + arrow::r::input::type newlines_in_values(newlines_in_values_sexp); + return cpp11::as_sexp(json___ParseOptions__initialize(newlines_in_values)); +END_CPP11 } #else -RcppExport SEXP _arrow_json___ParseOptions__initialize(SEXP options_sexp){ +RcppExport SEXP _arrow_json___ParseOptions__initialize(SEXP newlines_in_values_sexp){ Rf_error("Cannot call json___ParseOptions__initialize(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3969,13 +3971,13 @@ RcppExport SEXP _arrow_json___ParseOptions__initialize(SEXP options_sexp){ // json.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr json___TableReader__Make(const std::shared_ptr& input, const std::shared_ptr& read_options, const std::shared_ptr& parse_options); -RcppExport SEXP _arrow_json___TableReader__Make(SEXP input_sexp, SEXP read_options_sexp, SEXP parse_options_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type input(input_sexp); - Rcpp::traits::input_parameter&>::type read_options(read_options_sexp); - Rcpp::traits::input_parameter&>::type parse_options(parse_options_sexp); - return Rcpp::wrap(json___TableReader__Make(input, read_options, parse_options)); -END_RCPP +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); + arrow::r::input&>::type read_options(read_options_sexp); + arrow::r::input&>::type parse_options(parse_options_sexp); + return cpp11::as_sexp(json___TableReader__Make(input, read_options, parse_options)); +END_CPP11 } #else RcppExport SEXP _arrow_json___TableReader__Make(SEXP input_sexp, SEXP read_options_sexp, SEXP parse_options_sexp){ @@ -3986,11 +3988,11 @@ RcppExport SEXP _arrow_json___TableReader__Make(SEXP input_sexp, SEXP read_optio // json.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr json___TableReader__Read(const std::shared_ptr& table_reader); -RcppExport SEXP _arrow_json___TableReader__Read(SEXP table_reader_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type table_reader(table_reader_sexp); - return Rcpp::wrap(json___TableReader__Read(table_reader)); -END_RCPP +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 RcppExport SEXP _arrow_json___TableReader__Read(SEXP table_reader_sexp){ @@ -4001,10 +4003,10 @@ RcppExport SEXP _arrow_json___TableReader__Read(SEXP table_reader_sexp){ // memorypool.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr MemoryPool__default(); -RcppExport SEXP _arrow_MemoryPool__default(){ -BEGIN_RCPP - return Rcpp::wrap(MemoryPool__default()); -END_RCPP +extern "C" SEXP _arrow_MemoryPool__default(){ +BEGIN_CPP11 + return cpp11::as_sexp(MemoryPool__default()); +END_CPP11 } #else RcppExport SEXP _arrow_MemoryPool__default(){ @@ -4015,11 +4017,11 @@ RcppExport SEXP _arrow_MemoryPool__default(){ // memorypool.cpp #if defined(ARROW_R_WITH_ARROW) int MemoryPool__bytes_allocated(const std::shared_ptr& pool); -RcppExport SEXP _arrow_MemoryPool__bytes_allocated(SEXP pool_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type pool(pool_sexp); - return Rcpp::wrap(MemoryPool__bytes_allocated(pool)); -END_RCPP +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 RcppExport SEXP _arrow_MemoryPool__bytes_allocated(SEXP pool_sexp){ @@ -4030,11 +4032,11 @@ RcppExport SEXP _arrow_MemoryPool__bytes_allocated(SEXP pool_sexp){ // memorypool.cpp #if defined(ARROW_R_WITH_ARROW) int MemoryPool__max_memory(const std::shared_ptr& pool); -RcppExport SEXP _arrow_MemoryPool__max_memory(SEXP pool_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type pool(pool_sexp); - return Rcpp::wrap(MemoryPool__max_memory(pool)); -END_RCPP +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 RcppExport SEXP _arrow_MemoryPool__max_memory(SEXP pool_sexp){ @@ -4045,11 +4047,11 @@ RcppExport SEXP _arrow_MemoryPool__max_memory(SEXP pool_sexp){ // message.cpp #if defined(ARROW_R_WITH_ARROW) int64_t ipc___Message__body_length(const std::unique_ptr& message); -RcppExport SEXP _arrow_ipc___Message__body_length(SEXP message_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type message(message_sexp); - return Rcpp::wrap(ipc___Message__body_length(message)); -END_RCPP +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 RcppExport SEXP _arrow_ipc___Message__body_length(SEXP message_sexp){ @@ -4060,11 +4062,11 @@ RcppExport SEXP _arrow_ipc___Message__body_length(SEXP message_sexp){ // message.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr ipc___Message__metadata(const std::unique_ptr& message); -RcppExport SEXP _arrow_ipc___Message__metadata(SEXP message_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type message(message_sexp); - return Rcpp::wrap(ipc___Message__metadata(message)); -END_RCPP +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 RcppExport SEXP _arrow_ipc___Message__metadata(SEXP message_sexp){ @@ -4075,11 +4077,11 @@ RcppExport SEXP _arrow_ipc___Message__metadata(SEXP message_sexp){ // message.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr ipc___Message__body(const std::unique_ptr& message); -RcppExport SEXP _arrow_ipc___Message__body(SEXP message_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type message(message_sexp); - return Rcpp::wrap(ipc___Message__body(message)); -END_RCPP +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 RcppExport SEXP _arrow_ipc___Message__body(SEXP message_sexp){ @@ -4090,11 +4092,11 @@ RcppExport SEXP _arrow_ipc___Message__body(SEXP message_sexp){ // message.cpp #if defined(ARROW_R_WITH_ARROW) int64_t ipc___Message__Verify(const std::unique_ptr& message); -RcppExport SEXP _arrow_ipc___Message__Verify(SEXP message_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type message(message_sexp); - return Rcpp::wrap(ipc___Message__Verify(message)); -END_RCPP +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 RcppExport SEXP _arrow_ipc___Message__Verify(SEXP message_sexp){ @@ -4105,11 +4107,11 @@ RcppExport SEXP _arrow_ipc___Message__Verify(SEXP message_sexp){ // message.cpp #if defined(ARROW_R_WITH_ARROW) arrow::ipc::MessageType ipc___Message__type(const std::unique_ptr& message); -RcppExport SEXP _arrow_ipc___Message__type(SEXP message_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type message(message_sexp); - return Rcpp::wrap(ipc___Message__type(message)); -END_RCPP +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 RcppExport SEXP _arrow_ipc___Message__type(SEXP message_sexp){ @@ -4120,12 +4122,12 @@ RcppExport SEXP _arrow_ipc___Message__type(SEXP message_sexp){ // message.cpp #if defined(ARROW_R_WITH_ARROW) bool ipc___Message__Equals(const std::unique_ptr& x, const std::unique_ptr& y); -RcppExport SEXP _arrow_ipc___Message__Equals(SEXP x_sexp, SEXP y_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type x(x_sexp); - Rcpp::traits::input_parameter&>::type y(y_sexp); - return Rcpp::wrap(ipc___Message__Equals(x, y)); -END_RCPP +extern "C" SEXP _arrow_ipc___Message__Equals(SEXP x_sexp, SEXP y_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type x(x_sexp); + arrow::r::input&>::type y(y_sexp); + return cpp11::as_sexp(ipc___Message__Equals(x, y)); +END_CPP11 } #else RcppExport SEXP _arrow_ipc___Message__Equals(SEXP x_sexp, SEXP y_sexp){ @@ -4136,12 +4138,12 @@ RcppExport SEXP _arrow_ipc___Message__Equals(SEXP x_sexp, SEXP y_sexp){ // 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); -RcppExport SEXP _arrow_ipc___ReadRecordBatch__Message__Schema(SEXP message_sexp, SEXP schema_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type message(message_sexp); - Rcpp::traits::input_parameter&>::type schema(schema_sexp); - return Rcpp::wrap(ipc___ReadRecordBatch__Message__Schema(message, schema)); -END_RCPP +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 RcppExport SEXP _arrow_ipc___ReadRecordBatch__Message__Schema(SEXP message_sexp, SEXP schema_sexp){ @@ -4152,11 +4154,11 @@ RcppExport SEXP _arrow_ipc___ReadRecordBatch__Message__Schema(SEXP message_sexp, // message.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr ipc___ReadSchema_InputStream(const std::shared_ptr& stream); -RcppExport SEXP _arrow_ipc___ReadSchema_InputStream(SEXP stream_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type stream(stream_sexp); - return Rcpp::wrap(ipc___ReadSchema_InputStream(stream)); -END_RCPP +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 RcppExport SEXP _arrow_ipc___ReadSchema_InputStream(SEXP stream_sexp){ @@ -4167,11 +4169,11 @@ RcppExport SEXP _arrow_ipc___ReadSchema_InputStream(SEXP stream_sexp){ // message.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr ipc___ReadSchema_Message(const std::unique_ptr& message); -RcppExport SEXP _arrow_ipc___ReadSchema_Message(SEXP message_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type message(message_sexp); - return Rcpp::wrap(ipc___ReadSchema_Message(message)); -END_RCPP +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 RcppExport SEXP _arrow_ipc___ReadSchema_Message(SEXP message_sexp){ @@ -4182,11 +4184,11 @@ RcppExport SEXP _arrow_ipc___ReadSchema_Message(SEXP message_sexp){ // message.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr ipc___MessageReader__Open(const std::shared_ptr& stream); -RcppExport SEXP _arrow_ipc___MessageReader__Open(SEXP stream_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type stream(stream_sexp); - return Rcpp::wrap(ipc___MessageReader__Open(stream)); -END_RCPP +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 RcppExport SEXP _arrow_ipc___MessageReader__Open(SEXP stream_sexp){ @@ -4197,11 +4199,11 @@ RcppExport SEXP _arrow_ipc___MessageReader__Open(SEXP stream_sexp){ // message.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr ipc___MessageReader__ReadNextMessage(const std::unique_ptr& reader); -RcppExport SEXP _arrow_ipc___MessageReader__ReadNextMessage(SEXP reader_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type reader(reader_sexp); - return Rcpp::wrap(ipc___MessageReader__ReadNextMessage(reader)); -END_RCPP +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 RcppExport SEXP _arrow_ipc___MessageReader__ReadNextMessage(SEXP reader_sexp){ @@ -4212,11 +4214,11 @@ RcppExport SEXP _arrow_ipc___MessageReader__ReadNextMessage(SEXP reader_sexp){ // message.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr ipc___ReadMessage(const std::shared_ptr& stream); -RcppExport SEXP _arrow_ipc___ReadMessage(SEXP stream_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type stream(stream_sexp); - return Rcpp::wrap(ipc___ReadMessage(stream)); -END_RCPP +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 RcppExport SEXP _arrow_ipc___ReadMessage(SEXP stream_sexp){ @@ -4227,11 +4229,11 @@ RcppExport SEXP _arrow_ipc___ReadMessage(SEXP stream_sexp){ // parquet.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr parquet___arrow___ArrowReaderProperties__Make(bool use_threads); -RcppExport SEXP _arrow_parquet___arrow___ArrowReaderProperties__Make(SEXP use_threads_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter::type use_threads(use_threads_sexp); - return Rcpp::wrap(parquet___arrow___ArrowReaderProperties__Make(use_threads)); -END_RCPP +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 RcppExport SEXP _arrow_parquet___arrow___ArrowReaderProperties__Make(SEXP use_threads_sexp){ @@ -4242,13 +4244,13 @@ RcppExport SEXP _arrow_parquet___arrow___ArrowReaderProperties__Make(SEXP use_th // parquet.cpp #if defined(ARROW_R_WITH_ARROW) void parquet___arrow___ArrowReaderProperties__set_use_threads(const std::shared_ptr& properties, bool use_threads); -RcppExport SEXP _arrow_parquet___arrow___ArrowReaderProperties__set_use_threads(SEXP properties_sexp, SEXP use_threads_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type properties(properties_sexp); - Rcpp::traits::input_parameter::type use_threads(use_threads_sexp); +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); + arrow::r::input::type use_threads(use_threads_sexp); parquet___arrow___ArrowReaderProperties__set_use_threads(properties, use_threads); return R_NilValue; -END_RCPP +END_CPP11 } #else RcppExport SEXP _arrow_parquet___arrow___ArrowReaderProperties__set_use_threads(SEXP properties_sexp, SEXP use_threads_sexp){ @@ -4259,12 +4261,12 @@ RcppExport SEXP _arrow_parquet___arrow___ArrowReaderProperties__set_use_threads( // parquet.cpp #if defined(ARROW_R_WITH_ARROW) bool parquet___arrow___ArrowReaderProperties__get_use_threads(const std::shared_ptr& properties, bool use_threads); -RcppExport SEXP _arrow_parquet___arrow___ArrowReaderProperties__get_use_threads(SEXP properties_sexp, SEXP use_threads_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type properties(properties_sexp); - Rcpp::traits::input_parameter::type use_threads(use_threads_sexp); - return Rcpp::wrap(parquet___arrow___ArrowReaderProperties__get_use_threads(properties, use_threads)); -END_RCPP +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); + arrow::r::input::type use_threads(use_threads_sexp); + return cpp11::as_sexp(parquet___arrow___ArrowReaderProperties__get_use_threads(properties, use_threads)); +END_CPP11 } #else RcppExport SEXP _arrow_parquet___arrow___ArrowReaderProperties__get_use_threads(SEXP properties_sexp, SEXP use_threads_sexp){ @@ -4275,12 +4277,12 @@ RcppExport SEXP _arrow_parquet___arrow___ArrowReaderProperties__get_use_threads( // parquet.cpp #if defined(ARROW_R_WITH_ARROW) bool parquet___arrow___ArrowReaderProperties__get_read_dictionary(const std::shared_ptr& properties, int column_index); -RcppExport SEXP _arrow_parquet___arrow___ArrowReaderProperties__get_read_dictionary(SEXP properties_sexp, SEXP column_index_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type properties(properties_sexp); - Rcpp::traits::input_parameter::type column_index(column_index_sexp); - return Rcpp::wrap(parquet___arrow___ArrowReaderProperties__get_read_dictionary(properties, column_index)); -END_RCPP +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); + arrow::r::input::type column_index(column_index_sexp); + return cpp11::as_sexp(parquet___arrow___ArrowReaderProperties__get_read_dictionary(properties, column_index)); +END_CPP11 } #else RcppExport SEXP _arrow_parquet___arrow___ArrowReaderProperties__get_read_dictionary(SEXP properties_sexp, SEXP column_index_sexp){ @@ -4291,14 +4293,14 @@ RcppExport SEXP _arrow_parquet___arrow___ArrowReaderProperties__get_read_diction // parquet.cpp #if defined(ARROW_R_WITH_ARROW) void parquet___arrow___ArrowReaderProperties__set_read_dictionary(const std::shared_ptr& properties, int column_index, bool read_dict); -RcppExport SEXP _arrow_parquet___arrow___ArrowReaderProperties__set_read_dictionary(SEXP properties_sexp, SEXP column_index_sexp, SEXP read_dict_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type properties(properties_sexp); - Rcpp::traits::input_parameter::type column_index(column_index_sexp); - Rcpp::traits::input_parameter::type read_dict(read_dict_sexp); +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); + arrow::r::input::type column_index(column_index_sexp); + arrow::r::input::type read_dict(read_dict_sexp); parquet___arrow___ArrowReaderProperties__set_read_dictionary(properties, column_index, read_dict); return R_NilValue; -END_RCPP +END_CPP11 } #else RcppExport SEXP _arrow_parquet___arrow___ArrowReaderProperties__set_read_dictionary(SEXP properties_sexp, SEXP column_index_sexp, SEXP read_dict_sexp){ @@ -4309,12 +4311,12 @@ RcppExport SEXP _arrow_parquet___arrow___ArrowReaderProperties__set_read_diction // parquet.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr parquet___arrow___FileReader__OpenFile(const std::shared_ptr& file, const std::shared_ptr& props); -RcppExport SEXP _arrow_parquet___arrow___FileReader__OpenFile(SEXP file_sexp, SEXP props_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type file(file_sexp); - Rcpp::traits::input_parameter&>::type props(props_sexp); - return Rcpp::wrap(parquet___arrow___FileReader__OpenFile(file, props)); -END_RCPP +extern "C" SEXP _arrow_parquet___arrow___FileReader__OpenFile(SEXP file_sexp, SEXP props_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type file(file_sexp); + arrow::r::input&>::type props(props_sexp); + return cpp11::as_sexp(parquet___arrow___FileReader__OpenFile(file, props)); +END_CPP11 } #else RcppExport SEXP _arrow_parquet___arrow___FileReader__OpenFile(SEXP file_sexp, SEXP props_sexp){ @@ -4325,11 +4327,11 @@ RcppExport SEXP _arrow_parquet___arrow___FileReader__OpenFile(SEXP file_sexp, SE // parquet.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr parquet___arrow___FileReader__ReadTable1(const std::shared_ptr& reader); -RcppExport SEXP _arrow_parquet___arrow___FileReader__ReadTable1(SEXP reader_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type reader(reader_sexp); - return Rcpp::wrap(parquet___arrow___FileReader__ReadTable1(reader)); -END_RCPP +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 RcppExport SEXP _arrow_parquet___arrow___FileReader__ReadTable1(SEXP reader_sexp){ @@ -4340,12 +4342,12 @@ RcppExport SEXP _arrow_parquet___arrow___FileReader__ReadTable1(SEXP reader_sexp // parquet.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr parquet___arrow___FileReader__ReadTable2(const std::shared_ptr& reader, const std::vector& column_indices); -RcppExport SEXP _arrow_parquet___arrow___FileReader__ReadTable2(SEXP reader_sexp, SEXP column_indices_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type reader(reader_sexp); - Rcpp::traits::input_parameter&>::type column_indices(column_indices_sexp); - return Rcpp::wrap(parquet___arrow___FileReader__ReadTable2(reader, column_indices)); -END_RCPP +extern "C" SEXP _arrow_parquet___arrow___FileReader__ReadTable2(SEXP reader_sexp, SEXP column_indices_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type reader(reader_sexp); + arrow::r::input&>::type column_indices(column_indices_sexp); + return cpp11::as_sexp(parquet___arrow___FileReader__ReadTable2(reader, column_indices)); +END_CPP11 } #else RcppExport SEXP _arrow_parquet___arrow___FileReader__ReadTable2(SEXP reader_sexp, SEXP column_indices_sexp){ @@ -4356,11 +4358,11 @@ RcppExport SEXP _arrow_parquet___arrow___FileReader__ReadTable2(SEXP reader_sexp // parquet.cpp #if defined(ARROW_R_WITH_ARROW) int64_t parquet___arrow___FileReader__num_rows(const std::shared_ptr& reader); -RcppExport SEXP _arrow_parquet___arrow___FileReader__num_rows(SEXP reader_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type reader(reader_sexp); - return Rcpp::wrap(parquet___arrow___FileReader__num_rows(reader)); -END_RCPP +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 RcppExport SEXP _arrow_parquet___arrow___FileReader__num_rows(SEXP reader_sexp){ @@ -4371,13 +4373,13 @@ RcppExport SEXP _arrow_parquet___arrow___FileReader__num_rows(SEXP reader_sexp){ // parquet.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr parquet___ArrowWriterProperties___create(bool allow_truncated_timestamps, bool use_deprecated_int96_timestamps, int timestamp_unit); -RcppExport SEXP _arrow_parquet___ArrowWriterProperties___create(SEXP allow_truncated_timestamps_sexp, SEXP use_deprecated_int96_timestamps_sexp, SEXP timestamp_unit_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter::type allow_truncated_timestamps(allow_truncated_timestamps_sexp); - Rcpp::traits::input_parameter::type use_deprecated_int96_timestamps(use_deprecated_int96_timestamps_sexp); - Rcpp::traits::input_parameter::type timestamp_unit(timestamp_unit_sexp); - return Rcpp::wrap(parquet___ArrowWriterProperties___create(allow_truncated_timestamps, use_deprecated_int96_timestamps, timestamp_unit)); -END_RCPP +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); + arrow::r::input::type use_deprecated_int96_timestamps(use_deprecated_int96_timestamps_sexp); + arrow::r::input::type timestamp_unit(timestamp_unit_sexp); + return cpp11::as_sexp(parquet___ArrowWriterProperties___create(allow_truncated_timestamps, use_deprecated_int96_timestamps, timestamp_unit)); +END_CPP11 } #else RcppExport SEXP _arrow_parquet___ArrowWriterProperties___create(SEXP allow_truncated_timestamps_sexp, SEXP use_deprecated_int96_timestamps_sexp, SEXP timestamp_unit_sexp){ @@ -4388,10 +4390,10 @@ RcppExport SEXP _arrow_parquet___ArrowWriterProperties___create(SEXP allow_trunc // parquet.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr parquet___WriterProperties___Builder__create(); -RcppExport SEXP _arrow_parquet___WriterProperties___Builder__create(){ -BEGIN_RCPP - return Rcpp::wrap(parquet___WriterProperties___Builder__create()); -END_RCPP +extern "C" SEXP _arrow_parquet___WriterProperties___Builder__create(){ +BEGIN_CPP11 + return cpp11::as_sexp(parquet___WriterProperties___Builder__create()); +END_CPP11 } #else RcppExport SEXP _arrow_parquet___WriterProperties___Builder__create(){ @@ -4402,13 +4404,13 @@ RcppExport SEXP _arrow_parquet___WriterProperties___Builder__create(){ // parquet.cpp #if defined(ARROW_R_WITH_ARROW) void parquet___WriterProperties___Builder__version(const std::shared_ptr& builder, const parquet::ParquetVersion::type& version); -RcppExport SEXP _arrow_parquet___WriterProperties___Builder__version(SEXP builder_sexp, SEXP version_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type builder(builder_sexp); - Rcpp::traits::input_parameter::type version(version_sexp); +extern "C" SEXP _arrow_parquet___WriterProperties___Builder__version(SEXP builder_sexp, SEXP version_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type builder(builder_sexp); + arrow::r::input::type version(version_sexp); parquet___WriterProperties___Builder__version(builder, version); return R_NilValue; -END_RCPP +END_CPP11 } #else RcppExport SEXP _arrow_parquet___WriterProperties___Builder__version(SEXP builder_sexp, SEXP version_sexp){ @@ -4419,14 +4421,14 @@ RcppExport SEXP _arrow_parquet___WriterProperties___Builder__version(SEXP builde // parquet.cpp #if defined(ARROW_R_WITH_ARROW) void parquet___ArrowWriterProperties___Builder__set_compressions(const std::shared_ptr& builder, const std::vector& paths, const Rcpp::IntegerVector& types); -RcppExport SEXP _arrow_parquet___ArrowWriterProperties___Builder__set_compressions(SEXP builder_sexp, SEXP paths_sexp, SEXP types_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type builder(builder_sexp); - Rcpp::traits::input_parameter&>::type paths(paths_sexp); - Rcpp::traits::input_parameter::type types(types_sexp); +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); + arrow::r::input&>::type paths(paths_sexp); + arrow::r::input::type types(types_sexp); parquet___ArrowWriterProperties___Builder__set_compressions(builder, paths, types); return R_NilValue; -END_RCPP +END_CPP11 } #else RcppExport SEXP _arrow_parquet___ArrowWriterProperties___Builder__set_compressions(SEXP builder_sexp, SEXP paths_sexp, SEXP types_sexp){ @@ -4437,14 +4439,14 @@ RcppExport SEXP _arrow_parquet___ArrowWriterProperties___Builder__set_compressio // parquet.cpp #if defined(ARROW_R_WITH_ARROW) void parquet___ArrowWriterProperties___Builder__set_compression_levels(const std::shared_ptr& builder, const std::vector& paths, const Rcpp::IntegerVector& levels); -RcppExport SEXP _arrow_parquet___ArrowWriterProperties___Builder__set_compression_levels(SEXP builder_sexp, SEXP paths_sexp, SEXP levels_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type builder(builder_sexp); - Rcpp::traits::input_parameter&>::type paths(paths_sexp); - Rcpp::traits::input_parameter::type levels(levels_sexp); +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); + arrow::r::input&>::type paths(paths_sexp); + arrow::r::input::type levels(levels_sexp); parquet___ArrowWriterProperties___Builder__set_compression_levels(builder, paths, levels); return R_NilValue; -END_RCPP +END_CPP11 } #else RcppExport SEXP _arrow_parquet___ArrowWriterProperties___Builder__set_compression_levels(SEXP builder_sexp, SEXP paths_sexp, SEXP levels_sexp){ @@ -4455,14 +4457,14 @@ RcppExport SEXP _arrow_parquet___ArrowWriterProperties___Builder__set_compressio // parquet.cpp #if defined(ARROW_R_WITH_ARROW) void parquet___ArrowWriterProperties___Builder__set_use_dictionary(const std::shared_ptr& builder, const std::vector& paths, const Rcpp::LogicalVector& use_dictionary); -RcppExport SEXP _arrow_parquet___ArrowWriterProperties___Builder__set_use_dictionary(SEXP builder_sexp, SEXP paths_sexp, SEXP use_dictionary_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type builder(builder_sexp); - Rcpp::traits::input_parameter&>::type paths(paths_sexp); - Rcpp::traits::input_parameter::type use_dictionary(use_dictionary_sexp); +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); + arrow::r::input&>::type paths(paths_sexp); + arrow::r::input::type use_dictionary(use_dictionary_sexp); parquet___ArrowWriterProperties___Builder__set_use_dictionary(builder, paths, use_dictionary); return R_NilValue; -END_RCPP +END_CPP11 } #else RcppExport SEXP _arrow_parquet___ArrowWriterProperties___Builder__set_use_dictionary(SEXP builder_sexp, SEXP paths_sexp, SEXP use_dictionary_sexp){ @@ -4473,14 +4475,14 @@ RcppExport SEXP _arrow_parquet___ArrowWriterProperties___Builder__set_use_dictio // parquet.cpp #if defined(ARROW_R_WITH_ARROW) void parquet___ArrowWriterProperties___Builder__set_write_statistics(const std::shared_ptr& builder, const std::vector& paths, const Rcpp::LogicalVector& write_statistics); -RcppExport SEXP _arrow_parquet___ArrowWriterProperties___Builder__set_write_statistics(SEXP builder_sexp, SEXP paths_sexp, SEXP write_statistics_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type builder(builder_sexp); - Rcpp::traits::input_parameter&>::type paths(paths_sexp); - Rcpp::traits::input_parameter::type write_statistics(write_statistics_sexp); +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); + arrow::r::input&>::type paths(paths_sexp); + arrow::r::input::type write_statistics(write_statistics_sexp); parquet___ArrowWriterProperties___Builder__set_write_statistics(builder, paths, write_statistics); return R_NilValue; -END_RCPP +END_CPP11 } #else RcppExport SEXP _arrow_parquet___ArrowWriterProperties___Builder__set_write_statistics(SEXP builder_sexp, SEXP paths_sexp, SEXP write_statistics_sexp){ @@ -4491,13 +4493,13 @@ RcppExport SEXP _arrow_parquet___ArrowWriterProperties___Builder__set_write_stat // parquet.cpp #if defined(ARROW_R_WITH_ARROW) void parquet___ArrowWriterProperties___Builder__data_page_size(const std::shared_ptr& builder, int64_t data_page_size); -RcppExport SEXP _arrow_parquet___ArrowWriterProperties___Builder__data_page_size(SEXP builder_sexp, SEXP data_page_size_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type builder(builder_sexp); - Rcpp::traits::input_parameter::type data_page_size(data_page_size_sexp); +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); + arrow::r::input::type data_page_size(data_page_size_sexp); parquet___ArrowWriterProperties___Builder__data_page_size(builder, data_page_size); return R_NilValue; -END_RCPP +END_CPP11 } #else RcppExport SEXP _arrow_parquet___ArrowWriterProperties___Builder__data_page_size(SEXP builder_sexp, SEXP data_page_size_sexp){ @@ -4508,11 +4510,11 @@ RcppExport SEXP _arrow_parquet___ArrowWriterProperties___Builder__data_page_size // parquet.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr parquet___WriterProperties___Builder__build(const std::shared_ptr& builder); -RcppExport SEXP _arrow_parquet___WriterProperties___Builder__build(SEXP builder_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type builder(builder_sexp); - return Rcpp::wrap(parquet___WriterProperties___Builder__build(builder)); -END_RCPP +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 RcppExport SEXP _arrow_parquet___WriterProperties___Builder__build(SEXP builder_sexp){ @@ -4523,14 +4525,14 @@ RcppExport SEXP _arrow_parquet___WriterProperties___Builder__build(SEXP builder_ // parquet.cpp #if defined(ARROW_R_WITH_ARROW) 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); -RcppExport SEXP _arrow_parquet___arrow___ParquetFileWriter__Open(SEXP schema_sexp, SEXP sink_sexp, SEXP properties_sexp, SEXP arrow_properties_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type schema(schema_sexp); - Rcpp::traits::input_parameter&>::type sink(sink_sexp); - Rcpp::traits::input_parameter&>::type properties(properties_sexp); - Rcpp::traits::input_parameter&>::type arrow_properties(arrow_properties_sexp); - return Rcpp::wrap(parquet___arrow___ParquetFileWriter__Open(schema, sink, properties, arrow_properties)); -END_RCPP +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); + arrow::r::input&>::type sink(sink_sexp); + arrow::r::input&>::type properties(properties_sexp); + arrow::r::input&>::type arrow_properties(arrow_properties_sexp); + return cpp11::as_sexp(parquet___arrow___ParquetFileWriter__Open(schema, sink, properties, arrow_properties)); +END_CPP11 } #else RcppExport SEXP _arrow_parquet___arrow___ParquetFileWriter__Open(SEXP schema_sexp, SEXP sink_sexp, SEXP properties_sexp, SEXP arrow_properties_sexp){ @@ -4541,14 +4543,14 @@ RcppExport SEXP _arrow_parquet___arrow___ParquetFileWriter__Open(SEXP schema_sex // parquet.cpp #if defined(ARROW_R_WITH_ARROW) void parquet___arrow___FileWriter__WriteTable(const std::shared_ptr& writer, const std::shared_ptr& table, int64_t chunk_size); -RcppExport SEXP _arrow_parquet___arrow___FileWriter__WriteTable(SEXP writer_sexp, SEXP table_sexp, SEXP chunk_size_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type writer(writer_sexp); - Rcpp::traits::input_parameter&>::type table(table_sexp); - Rcpp::traits::input_parameter::type chunk_size(chunk_size_sexp); +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); + arrow::r::input&>::type table(table_sexp); + arrow::r::input::type chunk_size(chunk_size_sexp); parquet___arrow___FileWriter__WriteTable(writer, table, chunk_size); return R_NilValue; -END_RCPP +END_CPP11 } #else RcppExport SEXP _arrow_parquet___arrow___FileWriter__WriteTable(SEXP writer_sexp, SEXP table_sexp, SEXP chunk_size_sexp){ @@ -4559,12 +4561,12 @@ RcppExport SEXP _arrow_parquet___arrow___FileWriter__WriteTable(SEXP writer_sexp // parquet.cpp #if defined(ARROW_R_WITH_ARROW) void parquet___arrow___FileWriter__Close(const std::shared_ptr& writer); -RcppExport SEXP _arrow_parquet___arrow___FileWriter__Close(SEXP writer_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type writer(writer_sexp); +extern "C" SEXP _arrow_parquet___arrow___FileWriter__Close(SEXP writer_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type writer(writer_sexp); parquet___arrow___FileWriter__Close(writer); return R_NilValue; -END_RCPP +END_CPP11 } #else RcppExport SEXP _arrow_parquet___arrow___FileWriter__Close(SEXP writer_sexp){ @@ -4575,15 +4577,15 @@ RcppExport SEXP _arrow_parquet___arrow___FileWriter__Close(SEXP writer_sexp){ // parquet.cpp #if defined(ARROW_R_WITH_ARROW) 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); -RcppExport SEXP _arrow_parquet___arrow___WriteTable(SEXP table_sexp, SEXP sink_sexp, SEXP properties_sexp, SEXP arrow_properties_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type table(table_sexp); - Rcpp::traits::input_parameter&>::type sink(sink_sexp); - Rcpp::traits::input_parameter&>::type properties(properties_sexp); - Rcpp::traits::input_parameter&>::type arrow_properties(arrow_properties_sexp); +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); + arrow::r::input&>::type sink(sink_sexp); + arrow::r::input&>::type properties(properties_sexp); + arrow::r::input&>::type arrow_properties(arrow_properties_sexp); parquet___arrow___WriteTable(table, sink, properties, arrow_properties); return R_NilValue; -END_RCPP +END_CPP11 } #else RcppExport SEXP _arrow_parquet___arrow___WriteTable(SEXP table_sexp, SEXP sink_sexp, SEXP properties_sexp, SEXP arrow_properties_sexp){ @@ -4594,11 +4596,11 @@ RcppExport SEXP _arrow_parquet___arrow___WriteTable(SEXP table_sexp, SEXP sink_s // parquet.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr parquet___arrow___FileReader__GetSchema(const std::shared_ptr& reader); -RcppExport SEXP _arrow_parquet___arrow___FileReader__GetSchema(SEXP reader_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type reader(reader_sexp); - return Rcpp::wrap(parquet___arrow___FileReader__GetSchema(reader)); -END_RCPP +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 RcppExport SEXP _arrow_parquet___arrow___FileReader__GetSchema(SEXP reader_sexp){ @@ -4609,12 +4611,12 @@ RcppExport SEXP _arrow_parquet___arrow___FileReader__GetSchema(SEXP reader_sexp) // py-to-r.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr ImportArray(uintptr_t array, uintptr_t schema); -RcppExport SEXP _arrow_ImportArray(SEXP array_sexp, SEXP schema_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter::type array(array_sexp); - Rcpp::traits::input_parameter::type schema(schema_sexp); - return Rcpp::wrap(ImportArray(array, schema)); -END_RCPP +extern "C" SEXP _arrow_ImportArray(SEXP array_sexp, SEXP schema_sexp){ +BEGIN_CPP11 + arrow::r::input::type array(array_sexp); + arrow::r::input::type schema(schema_sexp); + return cpp11::as_sexp(ImportArray(array, schema)); +END_CPP11 } #else RcppExport SEXP _arrow_ImportArray(SEXP array_sexp, SEXP schema_sexp){ @@ -4625,12 +4627,12 @@ RcppExport SEXP _arrow_ImportArray(SEXP array_sexp, SEXP schema_sexp){ // py-to-r.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr ImportRecordBatch(uintptr_t array, uintptr_t schema); -RcppExport SEXP _arrow_ImportRecordBatch(SEXP array_sexp, SEXP schema_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter::type array(array_sexp); - Rcpp::traits::input_parameter::type schema(schema_sexp); - return Rcpp::wrap(ImportRecordBatch(array, schema)); -END_RCPP +extern "C" SEXP _arrow_ImportRecordBatch(SEXP array_sexp, SEXP schema_sexp){ +BEGIN_CPP11 + arrow::r::input::type array(array_sexp); + arrow::r::input::type schema(schema_sexp); + return cpp11::as_sexp(ImportRecordBatch(array, schema)); +END_CPP11 } #else RcppExport SEXP _arrow_ImportRecordBatch(SEXP array_sexp, SEXP schema_sexp){ @@ -4641,10 +4643,10 @@ RcppExport SEXP _arrow_ImportRecordBatch(SEXP array_sexp, SEXP schema_sexp){ // py-to-r.cpp #if defined(ARROW_R_WITH_ARROW) uintptr_t allocate_arrow_schema(); -RcppExport SEXP _arrow_allocate_arrow_schema(){ -BEGIN_RCPP - return Rcpp::wrap(allocate_arrow_schema()); -END_RCPP +extern "C" SEXP _arrow_allocate_arrow_schema(){ +BEGIN_CPP11 + return cpp11::as_sexp(allocate_arrow_schema()); +END_CPP11 } #else RcppExport SEXP _arrow_allocate_arrow_schema(){ @@ -4655,12 +4657,12 @@ RcppExport SEXP _arrow_allocate_arrow_schema(){ // py-to-r.cpp #if defined(ARROW_R_WITH_ARROW) void delete_arrow_schema(uintptr_t ptr); -RcppExport SEXP _arrow_delete_arrow_schema(SEXP ptr_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter::type ptr(ptr_sexp); +extern "C" SEXP _arrow_delete_arrow_schema(SEXP ptr_sexp){ +BEGIN_CPP11 + arrow::r::input::type ptr(ptr_sexp); delete_arrow_schema(ptr); return R_NilValue; -END_RCPP +END_CPP11 } #else RcppExport SEXP _arrow_delete_arrow_schema(SEXP ptr_sexp){ @@ -4671,10 +4673,10 @@ RcppExport SEXP _arrow_delete_arrow_schema(SEXP ptr_sexp){ // py-to-r.cpp #if defined(ARROW_R_WITH_ARROW) uintptr_t allocate_arrow_array(); -RcppExport SEXP _arrow_allocate_arrow_array(){ -BEGIN_RCPP - return Rcpp::wrap(allocate_arrow_array()); -END_RCPP +extern "C" SEXP _arrow_allocate_arrow_array(){ +BEGIN_CPP11 + return cpp11::as_sexp(allocate_arrow_array()); +END_CPP11 } #else RcppExport SEXP _arrow_allocate_arrow_array(){ @@ -4685,12 +4687,12 @@ RcppExport SEXP _arrow_allocate_arrow_array(){ // py-to-r.cpp #if defined(ARROW_R_WITH_ARROW) void delete_arrow_array(uintptr_t ptr); -RcppExport SEXP _arrow_delete_arrow_array(SEXP ptr_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter::type ptr(ptr_sexp); +extern "C" SEXP _arrow_delete_arrow_array(SEXP ptr_sexp){ +BEGIN_CPP11 + arrow::r::input::type ptr(ptr_sexp); delete_arrow_array(ptr); return R_NilValue; -END_RCPP +END_CPP11 } #else RcppExport SEXP _arrow_delete_arrow_array(SEXP ptr_sexp){ @@ -4701,13 +4703,13 @@ RcppExport SEXP _arrow_delete_arrow_array(SEXP ptr_sexp){ // py-to-r.cpp #if defined(ARROW_R_WITH_ARROW) void ExportType(const std::shared_ptr& type, uintptr_t ptr); -RcppExport SEXP _arrow_ExportType(SEXP type_sexp, SEXP ptr_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type type(type_sexp); - Rcpp::traits::input_parameter::type ptr(ptr_sexp); +extern "C" SEXP _arrow_ExportType(SEXP type_sexp, SEXP ptr_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type type(type_sexp); + arrow::r::input::type ptr(ptr_sexp); ExportType(type, ptr); return R_NilValue; -END_RCPP +END_CPP11 } #else RcppExport SEXP _arrow_ExportType(SEXP type_sexp, SEXP ptr_sexp){ @@ -4718,13 +4720,13 @@ RcppExport SEXP _arrow_ExportType(SEXP type_sexp, SEXP ptr_sexp){ // py-to-r.cpp #if defined(ARROW_R_WITH_ARROW) void ExportSchema(const std::shared_ptr& schema, uintptr_t ptr); -RcppExport SEXP _arrow_ExportSchema(SEXP schema_sexp, SEXP ptr_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type schema(schema_sexp); - Rcpp::traits::input_parameter::type ptr(ptr_sexp); +extern "C" SEXP _arrow_ExportSchema(SEXP schema_sexp, SEXP ptr_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type schema(schema_sexp); + arrow::r::input::type ptr(ptr_sexp); ExportSchema(schema, ptr); return R_NilValue; -END_RCPP +END_CPP11 } #else RcppExport SEXP _arrow_ExportSchema(SEXP schema_sexp, SEXP ptr_sexp){ @@ -4735,14 +4737,14 @@ RcppExport SEXP _arrow_ExportSchema(SEXP schema_sexp, SEXP ptr_sexp){ // py-to-r.cpp #if defined(ARROW_R_WITH_ARROW) void ExportArray(const std::shared_ptr& array, uintptr_t ptr, uintptr_t schema_ptr); -RcppExport SEXP _arrow_ExportArray(SEXP array_sexp, SEXP ptr_sexp, SEXP schema_ptr_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type array(array_sexp); - Rcpp::traits::input_parameter::type ptr(ptr_sexp); - Rcpp::traits::input_parameter::type schema_ptr(schema_ptr_sexp); +extern "C" SEXP _arrow_ExportArray(SEXP array_sexp, SEXP ptr_sexp, SEXP schema_ptr_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type array(array_sexp); + arrow::r::input::type ptr(ptr_sexp); + arrow::r::input::type schema_ptr(schema_ptr_sexp); ExportArray(array, ptr, schema_ptr); return R_NilValue; -END_RCPP +END_CPP11 } #else RcppExport SEXP _arrow_ExportArray(SEXP array_sexp, SEXP ptr_sexp, SEXP schema_ptr_sexp){ @@ -4753,14 +4755,14 @@ RcppExport SEXP _arrow_ExportArray(SEXP array_sexp, SEXP ptr_sexp, SEXP schema_p // py-to-r.cpp #if defined(ARROW_R_WITH_ARROW) void ExportRecordBatch(const std::shared_ptr& batch, uintptr_t ptr, uintptr_t schema_ptr); -RcppExport SEXP _arrow_ExportRecordBatch(SEXP batch_sexp, SEXP ptr_sexp, SEXP schema_ptr_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type batch(batch_sexp); - Rcpp::traits::input_parameter::type ptr(ptr_sexp); - Rcpp::traits::input_parameter::type schema_ptr(schema_ptr_sexp); +extern "C" SEXP _arrow_ExportRecordBatch(SEXP batch_sexp, SEXP ptr_sexp, SEXP schema_ptr_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type batch(batch_sexp); + arrow::r::input::type ptr(ptr_sexp); + arrow::r::input::type schema_ptr(schema_ptr_sexp); ExportRecordBatch(batch, ptr, schema_ptr); return R_NilValue; -END_RCPP +END_CPP11 } #else RcppExport SEXP _arrow_ExportRecordBatch(SEXP batch_sexp, SEXP ptr_sexp, SEXP schema_ptr_sexp){ @@ -4771,11 +4773,11 @@ RcppExport SEXP _arrow_ExportRecordBatch(SEXP batch_sexp, SEXP ptr_sexp, SEXP sc // recordbatch.cpp #if defined(ARROW_R_WITH_ARROW) int RecordBatch__num_columns(const std::shared_ptr& x); -RcppExport SEXP _arrow_RecordBatch__num_columns(SEXP x_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type x(x_sexp); - return Rcpp::wrap(RecordBatch__num_columns(x)); -END_RCPP +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 RcppExport SEXP _arrow_RecordBatch__num_columns(SEXP x_sexp){ @@ -4786,11 +4788,11 @@ RcppExport SEXP _arrow_RecordBatch__num_columns(SEXP x_sexp){ // recordbatch.cpp #if defined(ARROW_R_WITH_ARROW) int RecordBatch__num_rows(const std::shared_ptr& x); -RcppExport SEXP _arrow_RecordBatch__num_rows(SEXP x_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type x(x_sexp); - return Rcpp::wrap(RecordBatch__num_rows(x)); -END_RCPP +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 RcppExport SEXP _arrow_RecordBatch__num_rows(SEXP x_sexp){ @@ -4801,11 +4803,11 @@ RcppExport SEXP _arrow_RecordBatch__num_rows(SEXP x_sexp){ // recordbatch.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr RecordBatch__schema(const std::shared_ptr& x); -RcppExport SEXP _arrow_RecordBatch__schema(SEXP x_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type x(x_sexp); - return Rcpp::wrap(RecordBatch__schema(x)); -END_RCPP +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 RcppExport SEXP _arrow_RecordBatch__schema(SEXP x_sexp){ @@ -4816,12 +4818,12 @@ RcppExport SEXP _arrow_RecordBatch__schema(SEXP x_sexp){ // recordbatch.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr RecordBatch__ReplaceSchemaMetadata(const std::shared_ptr& x, Rcpp::CharacterVector metadata); -RcppExport SEXP _arrow_RecordBatch__ReplaceSchemaMetadata(SEXP x_sexp, SEXP metadata_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type x(x_sexp); - Rcpp::traits::input_parameter::type metadata(metadata_sexp); - return Rcpp::wrap(RecordBatch__ReplaceSchemaMetadata(x, metadata)); -END_RCPP +extern "C" SEXP _arrow_RecordBatch__ReplaceSchemaMetadata(SEXP x_sexp, SEXP metadata_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type x(x_sexp); + arrow::r::input::type metadata(metadata_sexp); + return cpp11::as_sexp(RecordBatch__ReplaceSchemaMetadata(x, metadata)); +END_CPP11 } #else RcppExport SEXP _arrow_RecordBatch__ReplaceSchemaMetadata(SEXP x_sexp, SEXP metadata_sexp){ @@ -4832,11 +4834,11 @@ RcppExport SEXP _arrow_RecordBatch__ReplaceSchemaMetadata(SEXP x_sexp, SEXP meta // recordbatch.cpp #if defined(ARROW_R_WITH_ARROW) arrow::ArrayVector RecordBatch__columns(const std::shared_ptr& batch); -RcppExport SEXP _arrow_RecordBatch__columns(SEXP batch_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type batch(batch_sexp); - return Rcpp::wrap(RecordBatch__columns(batch)); -END_RCPP +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 RcppExport SEXP _arrow_RecordBatch__columns(SEXP batch_sexp){ @@ -4846,13 +4848,13 @@ RcppExport SEXP _arrow_RecordBatch__columns(SEXP batch_sexp){ // recordbatch.cpp #if defined(ARROW_R_WITH_ARROW) -std::shared_ptr RecordBatch__column(const std::shared_ptr& batch, int i); -RcppExport SEXP _arrow_RecordBatch__column(SEXP batch_sexp, SEXP i_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type batch(batch_sexp); - Rcpp::traits::input_parameter::type i(i_sexp); - return Rcpp::wrap(RecordBatch__column(batch, i)); -END_RCPP +std::shared_ptr RecordBatch__column(const std::shared_ptr& batch, arrow::r::Index i); +extern "C" SEXP _arrow_RecordBatch__column(SEXP batch_sexp, SEXP i_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type batch(batch_sexp); + arrow::r::input::type i(i_sexp); + return cpp11::as_sexp(RecordBatch__column(batch, i)); +END_CPP11 } #else RcppExport SEXP _arrow_RecordBatch__column(SEXP batch_sexp, SEXP i_sexp){ @@ -4863,12 +4865,12 @@ RcppExport SEXP _arrow_RecordBatch__column(SEXP batch_sexp, SEXP i_sexp){ // recordbatch.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr RecordBatch__GetColumnByName(const std::shared_ptr& batch, const std::string& name); -RcppExport SEXP _arrow_RecordBatch__GetColumnByName(SEXP batch_sexp, SEXP name_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type batch(batch_sexp); - Rcpp::traits::input_parameter::type name(name_sexp); - return Rcpp::wrap(RecordBatch__GetColumnByName(batch, name)); -END_RCPP +extern "C" SEXP _arrow_RecordBatch__GetColumnByName(SEXP batch_sexp, SEXP name_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type batch(batch_sexp); + arrow::r::input::type name(name_sexp); + return cpp11::as_sexp(RecordBatch__GetColumnByName(batch, name)); +END_CPP11 } #else RcppExport SEXP _arrow_RecordBatch__GetColumnByName(SEXP batch_sexp, SEXP name_sexp){ @@ -4879,12 +4881,12 @@ RcppExport SEXP _arrow_RecordBatch__GetColumnByName(SEXP batch_sexp, SEXP name_s // recordbatch.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr RecordBatch__select(const std::shared_ptr& batch, const Rcpp::IntegerVector& indices); -RcppExport SEXP _arrow_RecordBatch__select(SEXP batch_sexp, SEXP indices_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type batch(batch_sexp); - Rcpp::traits::input_parameter::type indices(indices_sexp); - return Rcpp::wrap(RecordBatch__select(batch, indices)); -END_RCPP +extern "C" SEXP _arrow_RecordBatch__select(SEXP batch_sexp, SEXP indices_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type batch(batch_sexp); + arrow::r::input::type indices(indices_sexp); + return cpp11::as_sexp(RecordBatch__select(batch, indices)); +END_CPP11 } #else RcppExport SEXP _arrow_RecordBatch__select(SEXP batch_sexp, SEXP indices_sexp){ @@ -4892,31 +4894,16 @@ RcppExport SEXP _arrow_RecordBatch__select(SEXP batch_sexp, SEXP indices_sexp){ } #endif -// recordbatch.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr RecordBatch__from_dataframe(Rcpp::DataFrame tbl); -RcppExport SEXP _arrow_RecordBatch__from_dataframe(SEXP tbl_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter::type tbl(tbl_sexp); - return Rcpp::wrap(RecordBatch__from_dataframe(tbl)); -END_RCPP -} -#else -RcppExport SEXP _arrow_RecordBatch__from_dataframe(SEXP tbl_sexp){ - Rf_error("Cannot call RecordBatch__from_dataframe(). Please use arrow::install_arrow() to install required runtime 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); -RcppExport SEXP _arrow_RecordBatch__Equals(SEXP self_sexp, SEXP other_sexp, SEXP check_metadata_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type self(self_sexp); - Rcpp::traits::input_parameter&>::type other(other_sexp); - Rcpp::traits::input_parameter::type check_metadata(check_metadata_sexp); - return Rcpp::wrap(RecordBatch__Equals(self, other, check_metadata)); -END_RCPP +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); + arrow::r::input&>::type other(other_sexp); + arrow::r::input::type check_metadata(check_metadata_sexp); + return cpp11::as_sexp(RecordBatch__Equals(self, other, check_metadata)); +END_CPP11 } #else RcppExport SEXP _arrow_RecordBatch__Equals(SEXP self_sexp, SEXP other_sexp, SEXP check_metadata_sexp){ @@ -4926,13 +4913,13 @@ RcppExport SEXP _arrow_RecordBatch__Equals(SEXP self_sexp, SEXP other_sexp, SEXP // recordbatch.cpp #if defined(ARROW_R_WITH_ARROW) -std::shared_ptr RecordBatch__RemoveColumn(const std::shared_ptr& batch, int i); -RcppExport SEXP _arrow_RecordBatch__RemoveColumn(SEXP batch_sexp, SEXP i_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type batch(batch_sexp); - Rcpp::traits::input_parameter::type i(i_sexp); - return Rcpp::wrap(RecordBatch__RemoveColumn(batch, i)); -END_RCPP +std::shared_ptr RecordBatch__RemoveColumn(const std::shared_ptr& batch, arrow::r::Index i); +extern "C" SEXP _arrow_RecordBatch__RemoveColumn(SEXP batch_sexp, SEXP i_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type batch(batch_sexp); + arrow::r::input::type i(i_sexp); + return cpp11::as_sexp(RecordBatch__RemoveColumn(batch, i)); +END_CPP11 } #else RcppExport SEXP _arrow_RecordBatch__RemoveColumn(SEXP batch_sexp, SEXP i_sexp){ @@ -4942,13 +4929,13 @@ RcppExport SEXP _arrow_RecordBatch__RemoveColumn(SEXP batch_sexp, SEXP i_sexp){ // recordbatch.cpp #if defined(ARROW_R_WITH_ARROW) -std::string RecordBatch__column_name(const std::shared_ptr& batch, int i); -RcppExport SEXP _arrow_RecordBatch__column_name(SEXP batch_sexp, SEXP i_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type batch(batch_sexp); - Rcpp::traits::input_parameter::type i(i_sexp); - return Rcpp::wrap(RecordBatch__column_name(batch, i)); -END_RCPP +std::string RecordBatch__column_name(const std::shared_ptr& batch, arrow::r::Index i); +extern "C" SEXP _arrow_RecordBatch__column_name(SEXP batch_sexp, SEXP i_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type batch(batch_sexp); + arrow::r::input::type i(i_sexp); + return cpp11::as_sexp(RecordBatch__column_name(batch, i)); +END_CPP11 } #else RcppExport SEXP _arrow_RecordBatch__column_name(SEXP batch_sexp, SEXP i_sexp){ @@ -4959,11 +4946,11 @@ RcppExport SEXP _arrow_RecordBatch__column_name(SEXP batch_sexp, SEXP i_sexp){ // recordbatch.cpp #if defined(ARROW_R_WITH_ARROW) Rcpp::CharacterVector RecordBatch__names(const std::shared_ptr& batch); -RcppExport SEXP _arrow_RecordBatch__names(SEXP batch_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type batch(batch_sexp); - return Rcpp::wrap(RecordBatch__names(batch)); -END_RCPP +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 RcppExport SEXP _arrow_RecordBatch__names(SEXP batch_sexp){ @@ -4973,13 +4960,13 @@ RcppExport SEXP _arrow_RecordBatch__names(SEXP batch_sexp){ // recordbatch.cpp #if defined(ARROW_R_WITH_ARROW) -std::shared_ptr RecordBatch__Slice1(const std::shared_ptr& self, int offset); -RcppExport SEXP _arrow_RecordBatch__Slice1(SEXP self_sexp, SEXP offset_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type self(self_sexp); - Rcpp::traits::input_parameter::type offset(offset_sexp); - return Rcpp::wrap(RecordBatch__Slice1(self, offset)); -END_RCPP +std::shared_ptr RecordBatch__Slice1(const std::shared_ptr& self, arrow::r::Index offset); +extern "C" SEXP _arrow_RecordBatch__Slice1(SEXP self_sexp, SEXP offset_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type self(self_sexp); + arrow::r::input::type offset(offset_sexp); + return cpp11::as_sexp(RecordBatch__Slice1(self, offset)); +END_CPP11 } #else RcppExport SEXP _arrow_RecordBatch__Slice1(SEXP self_sexp, SEXP offset_sexp){ @@ -4989,14 +4976,14 @@ RcppExport SEXP _arrow_RecordBatch__Slice1(SEXP self_sexp, SEXP offset_sexp){ // recordbatch.cpp #if defined(ARROW_R_WITH_ARROW) -std::shared_ptr RecordBatch__Slice2(const std::shared_ptr& self, int offset, int length); -RcppExport SEXP _arrow_RecordBatch__Slice2(SEXP self_sexp, SEXP offset_sexp, SEXP length_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type self(self_sexp); - Rcpp::traits::input_parameter::type offset(offset_sexp); - Rcpp::traits::input_parameter::type length(length_sexp); - return Rcpp::wrap(RecordBatch__Slice2(self, offset, length)); -END_RCPP +std::shared_ptr RecordBatch__Slice2(const std::shared_ptr& self, arrow::r::Index offset, arrow::r::Index 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); + arrow::r::input::type offset(offset_sexp); + arrow::r::input::type length(length_sexp); + return cpp11::as_sexp(RecordBatch__Slice2(self, offset, length)); +END_CPP11 } #else RcppExport SEXP _arrow_RecordBatch__Slice2(SEXP self_sexp, SEXP offset_sexp, SEXP length_sexp){ @@ -5007,11 +4994,11 @@ RcppExport SEXP _arrow_RecordBatch__Slice2(SEXP self_sexp, SEXP offset_sexp, SEX // recordbatch.cpp #if defined(ARROW_R_WITH_ARROW) Rcpp::RawVector ipc___SerializeRecordBatch__Raw(const std::shared_ptr& batch); -RcppExport SEXP _arrow_ipc___SerializeRecordBatch__Raw(SEXP batch_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type batch(batch_sexp); - return Rcpp::wrap(ipc___SerializeRecordBatch__Raw(batch)); -END_RCPP +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 RcppExport SEXP _arrow_ipc___SerializeRecordBatch__Raw(SEXP batch_sexp){ @@ -5022,12 +5009,12 @@ RcppExport SEXP _arrow_ipc___SerializeRecordBatch__Raw(SEXP batch_sexp){ // 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); -RcppExport SEXP _arrow_ipc___ReadRecordBatch__InputStream__Schema(SEXP stream_sexp, SEXP schema_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type stream(stream_sexp); - Rcpp::traits::input_parameter&>::type schema(schema_sexp); - return Rcpp::wrap(ipc___ReadRecordBatch__InputStream__Schema(stream, schema)); -END_RCPP +extern "C" SEXP _arrow_ipc___ReadRecordBatch__InputStream__Schema(SEXP stream_sexp, SEXP schema_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type stream(stream_sexp); + arrow::r::input&>::type schema(schema_sexp); + return cpp11::as_sexp(ipc___ReadRecordBatch__InputStream__Schema(stream, schema)); +END_CPP11 } #else RcppExport SEXP _arrow_ipc___ReadRecordBatch__InputStream__Schema(SEXP stream_sexp, SEXP schema_sexp){ @@ -5038,12 +5025,12 @@ RcppExport SEXP _arrow_ipc___ReadRecordBatch__InputStream__Schema(SEXP stream_se // recordbatch.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr RecordBatch__from_arrays(SEXP schema_sxp, SEXP lst); -RcppExport SEXP _arrow_RecordBatch__from_arrays(SEXP schema_sxp_sexp, SEXP lst_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter::type schema_sxp(schema_sxp_sexp); - Rcpp::traits::input_parameter::type lst(lst_sexp); - return Rcpp::wrap(RecordBatch__from_arrays(schema_sxp, lst)); -END_RCPP +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); + arrow::r::input::type lst(lst_sexp); + return cpp11::as_sexp(RecordBatch__from_arrays(schema_sxp, lst)); +END_CPP11 } #else RcppExport SEXP _arrow_RecordBatch__from_arrays(SEXP schema_sxp_sexp, SEXP lst_sexp){ @@ -5054,11 +5041,11 @@ RcppExport SEXP _arrow_RecordBatch__from_arrays(SEXP schema_sxp_sexp, SEXP lst_s // recordbatchreader.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr RecordBatchReader__schema(const std::shared_ptr& reader); -RcppExport SEXP _arrow_RecordBatchReader__schema(SEXP reader_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type reader(reader_sexp); - return Rcpp::wrap(RecordBatchReader__schema(reader)); -END_RCPP +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 RcppExport SEXP _arrow_RecordBatchReader__schema(SEXP reader_sexp){ @@ -5069,11 +5056,11 @@ RcppExport SEXP _arrow_RecordBatchReader__schema(SEXP reader_sexp){ // recordbatchreader.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr RecordBatchReader__ReadNext(const std::shared_ptr& reader); -RcppExport SEXP _arrow_RecordBatchReader__ReadNext(SEXP reader_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type reader(reader_sexp); - return Rcpp::wrap(RecordBatchReader__ReadNext(reader)); -END_RCPP +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 RcppExport SEXP _arrow_RecordBatchReader__ReadNext(SEXP reader_sexp){ @@ -5084,11 +5071,11 @@ RcppExport SEXP _arrow_RecordBatchReader__ReadNext(SEXP reader_sexp){ // recordbatchreader.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr ipc___RecordBatchStreamReader__Open(const std::shared_ptr& stream); -RcppExport SEXP _arrow_ipc___RecordBatchStreamReader__Open(SEXP stream_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type stream(stream_sexp); - return Rcpp::wrap(ipc___RecordBatchStreamReader__Open(stream)); -END_RCPP +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 RcppExport SEXP _arrow_ipc___RecordBatchStreamReader__Open(SEXP stream_sexp){ @@ -5099,11 +5086,11 @@ RcppExport SEXP _arrow_ipc___RecordBatchStreamReader__Open(SEXP stream_sexp){ // recordbatchreader.cpp #if defined(ARROW_R_WITH_ARROW) std::vector> ipc___RecordBatchStreamReader__batches(const std::shared_ptr& reader); -RcppExport SEXP _arrow_ipc___RecordBatchStreamReader__batches(SEXP reader_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type reader(reader_sexp); - return Rcpp::wrap(ipc___RecordBatchStreamReader__batches(reader)); -END_RCPP +extern "C" SEXP _arrow_ipc___RecordBatchStreamReader__batches(SEXP reader_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type reader(reader_sexp); + return cpp11::as_sexp(ipc___RecordBatchStreamReader__batches(reader)); +END_CPP11 } #else RcppExport SEXP _arrow_ipc___RecordBatchStreamReader__batches(SEXP reader_sexp){ @@ -5114,11 +5101,11 @@ RcppExport SEXP _arrow_ipc___RecordBatchStreamReader__batches(SEXP reader_sexp){ // recordbatchreader.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr ipc___RecordBatchFileReader__schema(const std::shared_ptr& reader); -RcppExport SEXP _arrow_ipc___RecordBatchFileReader__schema(SEXP reader_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type reader(reader_sexp); - return Rcpp::wrap(ipc___RecordBatchFileReader__schema(reader)); -END_RCPP +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 RcppExport SEXP _arrow_ipc___RecordBatchFileReader__schema(SEXP reader_sexp){ @@ -5129,11 +5116,11 @@ RcppExport SEXP _arrow_ipc___RecordBatchFileReader__schema(SEXP reader_sexp){ // recordbatchreader.cpp #if defined(ARROW_R_WITH_ARROW) int ipc___RecordBatchFileReader__num_record_batches(const std::shared_ptr& reader); -RcppExport SEXP _arrow_ipc___RecordBatchFileReader__num_record_batches(SEXP reader_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type reader(reader_sexp); - return Rcpp::wrap(ipc___RecordBatchFileReader__num_record_batches(reader)); -END_RCPP +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 RcppExport SEXP _arrow_ipc___RecordBatchFileReader__num_record_batches(SEXP reader_sexp){ @@ -5144,12 +5131,12 @@ RcppExport SEXP _arrow_ipc___RecordBatchFileReader__num_record_batches(SEXP read // recordbatchreader.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr ipc___RecordBatchFileReader__ReadRecordBatch(const std::shared_ptr& reader, int i); -RcppExport SEXP _arrow_ipc___RecordBatchFileReader__ReadRecordBatch(SEXP reader_sexp, SEXP i_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type reader(reader_sexp); - Rcpp::traits::input_parameter::type i(i_sexp); - return Rcpp::wrap(ipc___RecordBatchFileReader__ReadRecordBatch(reader, i)); -END_RCPP +extern "C" SEXP _arrow_ipc___RecordBatchFileReader__ReadRecordBatch(SEXP reader_sexp, SEXP i_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type reader(reader_sexp); + arrow::r::input::type i(i_sexp); + return cpp11::as_sexp(ipc___RecordBatchFileReader__ReadRecordBatch(reader, i)); +END_CPP11 } #else RcppExport SEXP _arrow_ipc___RecordBatchFileReader__ReadRecordBatch(SEXP reader_sexp, SEXP i_sexp){ @@ -5160,11 +5147,11 @@ RcppExport SEXP _arrow_ipc___RecordBatchFileReader__ReadRecordBatch(SEXP reader_ // recordbatchreader.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr ipc___RecordBatchFileReader__Open(const std::shared_ptr& file); -RcppExport SEXP _arrow_ipc___RecordBatchFileReader__Open(SEXP file_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type file(file_sexp); - return Rcpp::wrap(ipc___RecordBatchFileReader__Open(file)); -END_RCPP +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 RcppExport SEXP _arrow_ipc___RecordBatchFileReader__Open(SEXP file_sexp){ @@ -5175,11 +5162,11 @@ RcppExport SEXP _arrow_ipc___RecordBatchFileReader__Open(SEXP file_sexp){ // recordbatchreader.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr Table__from_RecordBatchFileReader(const std::shared_ptr& reader); -RcppExport SEXP _arrow_Table__from_RecordBatchFileReader(SEXP reader_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type reader(reader_sexp); - return Rcpp::wrap(Table__from_RecordBatchFileReader(reader)); -END_RCPP +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 RcppExport SEXP _arrow_Table__from_RecordBatchFileReader(SEXP reader_sexp){ @@ -5190,11 +5177,11 @@ RcppExport SEXP _arrow_Table__from_RecordBatchFileReader(SEXP reader_sexp){ // recordbatchreader.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr Table__from_RecordBatchStreamReader(const std::shared_ptr& reader); -RcppExport SEXP _arrow_Table__from_RecordBatchStreamReader(SEXP reader_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type reader(reader_sexp); - return Rcpp::wrap(Table__from_RecordBatchStreamReader(reader)); -END_RCPP +extern "C" SEXP _arrow_Table__from_RecordBatchStreamReader(SEXP reader_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type reader(reader_sexp); + return cpp11::as_sexp(Table__from_RecordBatchStreamReader(reader)); +END_CPP11 } #else RcppExport SEXP _arrow_Table__from_RecordBatchStreamReader(SEXP reader_sexp){ @@ -5205,11 +5192,11 @@ RcppExport SEXP _arrow_Table__from_RecordBatchStreamReader(SEXP reader_sexp){ // recordbatchreader.cpp #if defined(ARROW_R_WITH_ARROW) std::vector> ipc___RecordBatchFileReader__batches(const std::shared_ptr& reader); -RcppExport SEXP _arrow_ipc___RecordBatchFileReader__batches(SEXP reader_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type reader(reader_sexp); - return Rcpp::wrap(ipc___RecordBatchFileReader__batches(reader)); -END_RCPP +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 RcppExport SEXP _arrow_ipc___RecordBatchFileReader__batches(SEXP reader_sexp){ @@ -5220,13 +5207,13 @@ RcppExport SEXP _arrow_ipc___RecordBatchFileReader__batches(SEXP reader_sexp){ // recordbatchwriter.cpp #if defined(ARROW_R_WITH_ARROW) void ipc___RecordBatchWriter__WriteRecordBatch(const std::shared_ptr& batch_writer, const std::shared_ptr& batch); -RcppExport SEXP _arrow_ipc___RecordBatchWriter__WriteRecordBatch(SEXP batch_writer_sexp, SEXP batch_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type batch_writer(batch_writer_sexp); - Rcpp::traits::input_parameter&>::type batch(batch_sexp); +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); + arrow::r::input&>::type batch(batch_sexp); ipc___RecordBatchWriter__WriteRecordBatch(batch_writer, batch); return R_NilValue; -END_RCPP +END_CPP11 } #else RcppExport SEXP _arrow_ipc___RecordBatchWriter__WriteRecordBatch(SEXP batch_writer_sexp, SEXP batch_sexp){ @@ -5237,13 +5224,13 @@ RcppExport SEXP _arrow_ipc___RecordBatchWriter__WriteRecordBatch(SEXP batch_writ // recordbatchwriter.cpp #if defined(ARROW_R_WITH_ARROW) void ipc___RecordBatchWriter__WriteTable(const std::shared_ptr& batch_writer, const std::shared_ptr& table); -RcppExport SEXP _arrow_ipc___RecordBatchWriter__WriteTable(SEXP batch_writer_sexp, SEXP table_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type batch_writer(batch_writer_sexp); - Rcpp::traits::input_parameter&>::type table(table_sexp); +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); + arrow::r::input&>::type table(table_sexp); ipc___RecordBatchWriter__WriteTable(batch_writer, table); return R_NilValue; -END_RCPP +END_CPP11 } #else RcppExport SEXP _arrow_ipc___RecordBatchWriter__WriteTable(SEXP batch_writer_sexp, SEXP table_sexp){ @@ -5254,12 +5241,12 @@ RcppExport SEXP _arrow_ipc___RecordBatchWriter__WriteTable(SEXP batch_writer_sex // recordbatchwriter.cpp #if defined(ARROW_R_WITH_ARROW) void ipc___RecordBatchWriter__Close(const std::shared_ptr& batch_writer); -RcppExport SEXP _arrow_ipc___RecordBatchWriter__Close(SEXP batch_writer_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type batch_writer(batch_writer_sexp); +extern "C" SEXP _arrow_ipc___RecordBatchWriter__Close(SEXP batch_writer_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type batch_writer(batch_writer_sexp); ipc___RecordBatchWriter__Close(batch_writer); return R_NilValue; -END_RCPP +END_CPP11 } #else RcppExport SEXP _arrow_ipc___RecordBatchWriter__Close(SEXP batch_writer_sexp){ @@ -5270,14 +5257,14 @@ RcppExport SEXP _arrow_ipc___RecordBatchWriter__Close(SEXP batch_writer_sexp){ // 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); -RcppExport SEXP _arrow_ipc___RecordBatchFileWriter__Open(SEXP stream_sexp, SEXP schema_sexp, SEXP use_legacy_format_sexp, SEXP metadata_version_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type stream(stream_sexp); - Rcpp::traits::input_parameter&>::type schema(schema_sexp); - Rcpp::traits::input_parameter::type use_legacy_format(use_legacy_format_sexp); - Rcpp::traits::input_parameter::type metadata_version(metadata_version_sexp); - return Rcpp::wrap(ipc___RecordBatchFileWriter__Open(stream, schema, use_legacy_format, metadata_version)); -END_RCPP +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); + arrow::r::input&>::type schema(schema_sexp); + arrow::r::input::type use_legacy_format(use_legacy_format_sexp); + arrow::r::input::type metadata_version(metadata_version_sexp); + return cpp11::as_sexp(ipc___RecordBatchFileWriter__Open(stream, schema, use_legacy_format, metadata_version)); +END_CPP11 } #else RcppExport SEXP _arrow_ipc___RecordBatchFileWriter__Open(SEXP stream_sexp, SEXP schema_sexp, SEXP use_legacy_format_sexp, SEXP metadata_version_sexp){ @@ -5288,14 +5275,14 @@ RcppExport SEXP _arrow_ipc___RecordBatchFileWriter__Open(SEXP stream_sexp, SEXP // 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); -RcppExport SEXP _arrow_ipc___RecordBatchStreamWriter__Open(SEXP stream_sexp, SEXP schema_sexp, SEXP use_legacy_format_sexp, SEXP metadata_version_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type stream(stream_sexp); - Rcpp::traits::input_parameter&>::type schema(schema_sexp); - Rcpp::traits::input_parameter::type use_legacy_format(use_legacy_format_sexp); - Rcpp::traits::input_parameter::type metadata_version(metadata_version_sexp); - return Rcpp::wrap(ipc___RecordBatchStreamWriter__Open(stream, schema, use_legacy_format, metadata_version)); -END_RCPP +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); + arrow::r::input&>::type schema(schema_sexp); + arrow::r::input::type use_legacy_format(use_legacy_format_sexp); + arrow::r::input::type metadata_version(metadata_version_sexp); + return cpp11::as_sexp(ipc___RecordBatchStreamWriter__Open(stream, schema, use_legacy_format, metadata_version)); +END_CPP11 } #else RcppExport SEXP _arrow_ipc___RecordBatchStreamWriter__Open(SEXP stream_sexp, SEXP schema_sexp, SEXP use_legacy_format_sexp, SEXP metadata_version_sexp){ @@ -5306,12 +5293,12 @@ RcppExport SEXP _arrow_ipc___RecordBatchStreamWriter__Open(SEXP stream_sexp, SEX // scalar.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr Array__GetScalar(const std::shared_ptr& x, int64_t i); -RcppExport SEXP _arrow_Array__GetScalar(SEXP x_sexp, SEXP i_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type x(x_sexp); - Rcpp::traits::input_parameter::type i(i_sexp); - return Rcpp::wrap(Array__GetScalar(x, i)); -END_RCPP +extern "C" SEXP _arrow_Array__GetScalar(SEXP x_sexp, SEXP i_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type x(x_sexp); + arrow::r::input::type i(i_sexp); + return cpp11::as_sexp(Array__GetScalar(x, i)); +END_CPP11 } #else RcppExport SEXP _arrow_Array__GetScalar(SEXP x_sexp, SEXP i_sexp){ @@ -5322,11 +5309,11 @@ RcppExport SEXP _arrow_Array__GetScalar(SEXP x_sexp, SEXP i_sexp){ // scalar.cpp #if defined(ARROW_R_WITH_ARROW) std::string Scalar__ToString(const std::shared_ptr& s); -RcppExport SEXP _arrow_Scalar__ToString(SEXP s_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type s(s_sexp); - return Rcpp::wrap(Scalar__ToString(s)); -END_RCPP +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 RcppExport SEXP _arrow_Scalar__ToString(SEXP s_sexp){ @@ -5337,12 +5324,12 @@ RcppExport SEXP _arrow_Scalar__ToString(SEXP s_sexp){ // scalar.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr Scalar__CastTo(const std::shared_ptr& s, const std::shared_ptr& t); -RcppExport SEXP _arrow_Scalar__CastTo(SEXP s_sexp, SEXP t_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type s(s_sexp); - Rcpp::traits::input_parameter&>::type t(t_sexp); - return Rcpp::wrap(Scalar__CastTo(s, t)); -END_RCPP +extern "C" SEXP _arrow_Scalar__CastTo(SEXP s_sexp, SEXP t_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type s(s_sexp); + arrow::r::input&>::type t(t_sexp); + return cpp11::as_sexp(Scalar__CastTo(s, t)); +END_CPP11 } #else RcppExport SEXP _arrow_Scalar__CastTo(SEXP s_sexp, SEXP t_sexp){ @@ -5353,12 +5340,12 @@ RcppExport SEXP _arrow_Scalar__CastTo(SEXP s_sexp, SEXP t_sexp){ // scalar.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr StructScalar__field(const std::shared_ptr& s, int i); -RcppExport SEXP _arrow_StructScalar__field(SEXP s_sexp, SEXP i_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type s(s_sexp); - Rcpp::traits::input_parameter::type i(i_sexp); - return Rcpp::wrap(StructScalar__field(s, i)); -END_RCPP +extern "C" SEXP _arrow_StructScalar__field(SEXP s_sexp, SEXP i_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type s(s_sexp); + arrow::r::input::type i(i_sexp); + return cpp11::as_sexp(StructScalar__field(s, i)); +END_CPP11 } #else RcppExport SEXP _arrow_StructScalar__field(SEXP s_sexp, SEXP i_sexp){ @@ -5369,12 +5356,12 @@ RcppExport SEXP _arrow_StructScalar__field(SEXP s_sexp, SEXP i_sexp){ // scalar.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr StructScalar__GetFieldByName(const std::shared_ptr& s, const std::string& name); -RcppExport SEXP _arrow_StructScalar__GetFieldByName(SEXP s_sexp, SEXP name_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type s(s_sexp); - Rcpp::traits::input_parameter::type name(name_sexp); - return Rcpp::wrap(StructScalar__GetFieldByName(s, name)); -END_RCPP +extern "C" SEXP _arrow_StructScalar__GetFieldByName(SEXP s_sexp, SEXP name_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type s(s_sexp); + arrow::r::input::type name(name_sexp); + return cpp11::as_sexp(StructScalar__GetFieldByName(s, name)); +END_CPP11 } #else RcppExport SEXP _arrow_StructScalar__GetFieldByName(SEXP s_sexp, SEXP name_sexp){ @@ -5385,11 +5372,11 @@ RcppExport SEXP _arrow_StructScalar__GetFieldByName(SEXP s_sexp, SEXP name_sexp) // scalar.cpp #if defined(ARROW_R_WITH_ARROW) SEXP Scalar__as_vector(const std::shared_ptr& scalar); -RcppExport SEXP _arrow_Scalar__as_vector(SEXP scalar_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type scalar(scalar_sexp); - return Rcpp::wrap(Scalar__as_vector(scalar)); -END_RCPP +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 RcppExport SEXP _arrow_Scalar__as_vector(SEXP scalar_sexp){ @@ -5400,11 +5387,11 @@ RcppExport SEXP _arrow_Scalar__as_vector(SEXP scalar_sexp){ // scalar.cpp #if defined(ARROW_R_WITH_ARROW) bool Scalar__is_valid(const std::shared_ptr& s); -RcppExport SEXP _arrow_Scalar__is_valid(SEXP s_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type s(s_sexp); - return Rcpp::wrap(Scalar__is_valid(s)); -END_RCPP +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 RcppExport SEXP _arrow_Scalar__is_valid(SEXP s_sexp){ @@ -5415,11 +5402,11 @@ RcppExport SEXP _arrow_Scalar__is_valid(SEXP s_sexp){ // scalar.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr Scalar__type(const std::shared_ptr& s); -RcppExport SEXP _arrow_Scalar__type(SEXP s_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type s(s_sexp); - return Rcpp::wrap(Scalar__type(s)); -END_RCPP +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 RcppExport SEXP _arrow_Scalar__type(SEXP s_sexp){ @@ -5429,12 +5416,12 @@ RcppExport SEXP _arrow_Scalar__type(SEXP s_sexp){ // schema.cpp #if defined(ARROW_R_WITH_ARROW) -std::shared_ptr schema_(Rcpp::List fields); -RcppExport SEXP _arrow_schema_(SEXP fields_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter::type fields(fields_sexp); - return Rcpp::wrap(schema_(fields)); -END_RCPP +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 RcppExport SEXP _arrow_schema_(SEXP fields_sexp){ @@ -5445,11 +5432,11 @@ RcppExport SEXP _arrow_schema_(SEXP fields_sexp){ // schema.cpp #if defined(ARROW_R_WITH_ARROW) std::string Schema__ToString(const std::shared_ptr& s); -RcppExport SEXP _arrow_Schema__ToString(SEXP s_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type s(s_sexp); - return Rcpp::wrap(Schema__ToString(s)); -END_RCPP +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 RcppExport SEXP _arrow_Schema__ToString(SEXP s_sexp){ @@ -5460,11 +5447,11 @@ RcppExport SEXP _arrow_Schema__ToString(SEXP s_sexp){ // schema.cpp #if defined(ARROW_R_WITH_ARROW) int Schema__num_fields(const std::shared_ptr& s); -RcppExport SEXP _arrow_Schema__num_fields(SEXP s_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type s(s_sexp); - return Rcpp::wrap(Schema__num_fields(s)); -END_RCPP +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 RcppExport SEXP _arrow_Schema__num_fields(SEXP s_sexp){ @@ -5475,12 +5462,12 @@ RcppExport SEXP _arrow_Schema__num_fields(SEXP s_sexp){ // schema.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr Schema__field(const std::shared_ptr& s, int i); -RcppExport SEXP _arrow_Schema__field(SEXP s_sexp, SEXP i_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type s(s_sexp); - Rcpp::traits::input_parameter::type i(i_sexp); - return Rcpp::wrap(Schema__field(s, i)); -END_RCPP +extern "C" SEXP _arrow_Schema__field(SEXP s_sexp, SEXP i_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type s(s_sexp); + arrow::r::input::type i(i_sexp); + return cpp11::as_sexp(Schema__field(s, i)); +END_CPP11 } #else RcppExport SEXP _arrow_Schema__field(SEXP s_sexp, SEXP i_sexp){ @@ -5491,12 +5478,12 @@ RcppExport SEXP _arrow_Schema__field(SEXP s_sexp, SEXP i_sexp){ // schema.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr Schema__GetFieldByName(const std::shared_ptr& s, std::string x); -RcppExport SEXP _arrow_Schema__GetFieldByName(SEXP s_sexp, SEXP x_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type s(s_sexp); - Rcpp::traits::input_parameter::type x(x_sexp); - return Rcpp::wrap(Schema__GetFieldByName(s, x)); -END_RCPP +extern "C" SEXP _arrow_Schema__GetFieldByName(SEXP s_sexp, SEXP x_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type s(s_sexp); + arrow::r::input::type x(x_sexp); + return cpp11::as_sexp(Schema__GetFieldByName(s, x)); +END_CPP11 } #else RcppExport SEXP _arrow_Schema__GetFieldByName(SEXP s_sexp, SEXP x_sexp){ @@ -5507,11 +5494,11 @@ RcppExport SEXP _arrow_Schema__GetFieldByName(SEXP s_sexp, SEXP x_sexp){ // schema.cpp #if defined(ARROW_R_WITH_ARROW) std::vector> Schema__fields(const std::shared_ptr& schema); -RcppExport SEXP _arrow_Schema__fields(SEXP schema_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type schema(schema_sexp); - return Rcpp::wrap(Schema__fields(schema)); -END_RCPP +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 RcppExport SEXP _arrow_Schema__fields(SEXP schema_sexp){ @@ -5522,11 +5509,11 @@ RcppExport SEXP _arrow_Schema__fields(SEXP schema_sexp){ // schema.cpp #if defined(ARROW_R_WITH_ARROW) std::vector Schema__field_names(const std::shared_ptr& schema); -RcppExport SEXP _arrow_Schema__field_names(SEXP schema_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type schema(schema_sexp); - return Rcpp::wrap(Schema__field_names(schema)); -END_RCPP +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 RcppExport SEXP _arrow_Schema__field_names(SEXP schema_sexp){ @@ -5537,11 +5524,11 @@ RcppExport SEXP _arrow_Schema__field_names(SEXP schema_sexp){ // schema.cpp #if defined(ARROW_R_WITH_ARROW) bool Schema__HasMetadata(const std::shared_ptr& schema); -RcppExport SEXP _arrow_Schema__HasMetadata(SEXP schema_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type schema(schema_sexp); - return Rcpp::wrap(Schema__HasMetadata(schema)); -END_RCPP +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 RcppExport SEXP _arrow_Schema__HasMetadata(SEXP schema_sexp){ @@ -5551,12 +5538,12 @@ RcppExport SEXP _arrow_Schema__HasMetadata(SEXP schema_sexp){ // schema.cpp #if defined(ARROW_R_WITH_ARROW) -Rcpp::List Schema__metadata(const std::shared_ptr& schema); -RcppExport SEXP _arrow_Schema__metadata(SEXP schema_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type schema(schema_sexp); - return Rcpp::wrap(Schema__metadata(schema)); -END_RCPP +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 RcppExport SEXP _arrow_Schema__metadata(SEXP schema_sexp){ @@ -5566,13 +5553,13 @@ RcppExport SEXP _arrow_Schema__metadata(SEXP schema_sexp){ // schema.cpp #if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Schema__WithMetadata(const std::shared_ptr& schema, Rcpp::CharacterVector metadata); -RcppExport SEXP _arrow_Schema__WithMetadata(SEXP schema_sexp, SEXP metadata_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type schema(schema_sexp); - Rcpp::traits::input_parameter::type metadata(metadata_sexp); - return Rcpp::wrap(Schema__WithMetadata(schema, metadata)); -END_RCPP +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); + arrow::r::input::type metadata(metadata_sexp); + return cpp11::as_sexp(Schema__WithMetadata(schema, metadata)); +END_CPP11 } #else RcppExport SEXP _arrow_Schema__WithMetadata(SEXP schema_sexp, SEXP metadata_sexp){ @@ -5582,12 +5569,12 @@ RcppExport SEXP _arrow_Schema__WithMetadata(SEXP schema_sexp, SEXP metadata_sexp // schema.cpp #if defined(ARROW_R_WITH_ARROW) -Rcpp::RawVector Schema__serialize(const std::shared_ptr& schema); -RcppExport SEXP _arrow_Schema__serialize(SEXP schema_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type schema(schema_sexp); - return Rcpp::wrap(Schema__serialize(schema)); -END_RCPP +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 RcppExport SEXP _arrow_Schema__serialize(SEXP schema_sexp){ @@ -5598,13 +5585,13 @@ RcppExport SEXP _arrow_Schema__serialize(SEXP schema_sexp){ // schema.cpp #if defined(ARROW_R_WITH_ARROW) bool Schema__Equals(const std::shared_ptr& schema, const std::shared_ptr& other, bool check_metadata); -RcppExport SEXP _arrow_Schema__Equals(SEXP schema_sexp, SEXP other_sexp, SEXP check_metadata_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type schema(schema_sexp); - Rcpp::traits::input_parameter&>::type other(other_sexp); - Rcpp::traits::input_parameter::type check_metadata(check_metadata_sexp); - return Rcpp::wrap(Schema__Equals(schema, other, check_metadata)); -END_RCPP +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); + arrow::r::input&>::type other(other_sexp); + arrow::r::input::type check_metadata(check_metadata_sexp); + return cpp11::as_sexp(Schema__Equals(schema, other, check_metadata)); +END_CPP11 } #else RcppExport SEXP _arrow_Schema__Equals(SEXP schema_sexp, SEXP other_sexp, SEXP check_metadata_sexp){ @@ -5615,11 +5602,11 @@ RcppExport SEXP _arrow_Schema__Equals(SEXP schema_sexp, SEXP other_sexp, SEXP ch // schema.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr arrow__UnifySchemas(const std::vector>& schemas); -RcppExport SEXP _arrow_arrow__UnifySchemas(SEXP schemas_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter>&>::type schemas(schemas_sexp); - return Rcpp::wrap(arrow__UnifySchemas(schemas)); -END_RCPP +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 RcppExport SEXP _arrow_arrow__UnifySchemas(SEXP schemas_sexp){ @@ -5627,29 +5614,14 @@ RcppExport SEXP _arrow_arrow__UnifySchemas(SEXP schemas_sexp){ } #endif -// table.cpp -#if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Table__from_dataframe(DataFrame tbl); -RcppExport SEXP _arrow_Table__from_dataframe(SEXP tbl_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter::type tbl(tbl_sexp); - return Rcpp::wrap(Table__from_dataframe(tbl)); -END_RCPP -} -#else -RcppExport SEXP _arrow_Table__from_dataframe(SEXP tbl_sexp){ - Rf_error("Cannot call Table__from_dataframe(). Please use arrow::install_arrow() to install required runtime libraries. "); -} -#endif - // table.cpp #if defined(ARROW_R_WITH_ARROW) int Table__num_columns(const std::shared_ptr& x); -RcppExport SEXP _arrow_Table__num_columns(SEXP x_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type x(x_sexp); - return Rcpp::wrap(Table__num_columns(x)); -END_RCPP +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 RcppExport SEXP _arrow_Table__num_columns(SEXP x_sexp){ @@ -5660,11 +5632,11 @@ RcppExport SEXP _arrow_Table__num_columns(SEXP x_sexp){ // table.cpp #if defined(ARROW_R_WITH_ARROW) int Table__num_rows(const std::shared_ptr& x); -RcppExport SEXP _arrow_Table__num_rows(SEXP x_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type x(x_sexp); - return Rcpp::wrap(Table__num_rows(x)); -END_RCPP +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 RcppExport SEXP _arrow_Table__num_rows(SEXP x_sexp){ @@ -5675,11 +5647,11 @@ RcppExport SEXP _arrow_Table__num_rows(SEXP x_sexp){ // table.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr Table__schema(const std::shared_ptr& x); -RcppExport SEXP _arrow_Table__schema(SEXP x_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type x(x_sexp); - return Rcpp::wrap(Table__schema(x)); -END_RCPP +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 RcppExport SEXP _arrow_Table__schema(SEXP x_sexp){ @@ -5690,12 +5662,12 @@ RcppExport SEXP _arrow_Table__schema(SEXP x_sexp){ // table.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr Table__ReplaceSchemaMetadata(const std::shared_ptr& x, Rcpp::CharacterVector metadata); -RcppExport SEXP _arrow_Table__ReplaceSchemaMetadata(SEXP x_sexp, SEXP metadata_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type x(x_sexp); - Rcpp::traits::input_parameter::type metadata(metadata_sexp); - return Rcpp::wrap(Table__ReplaceSchemaMetadata(x, metadata)); -END_RCPP +extern "C" SEXP _arrow_Table__ReplaceSchemaMetadata(SEXP x_sexp, SEXP metadata_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type x(x_sexp); + arrow::r::input::type metadata(metadata_sexp); + return cpp11::as_sexp(Table__ReplaceSchemaMetadata(x, metadata)); +END_CPP11 } #else RcppExport SEXP _arrow_Table__ReplaceSchemaMetadata(SEXP x_sexp, SEXP metadata_sexp){ @@ -5705,13 +5677,13 @@ RcppExport SEXP _arrow_Table__ReplaceSchemaMetadata(SEXP x_sexp, SEXP metadata_s // table.cpp #if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Table__column(const std::shared_ptr& table, int i); -RcppExport SEXP _arrow_Table__column(SEXP table_sexp, SEXP i_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type table(table_sexp); - Rcpp::traits::input_parameter::type i(i_sexp); - return Rcpp::wrap(Table__column(table, i)); -END_RCPP +std::shared_ptr Table__column(const std::shared_ptr& table, arrow::r::Index i); +extern "C" SEXP _arrow_Table__column(SEXP table_sexp, SEXP i_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type table(table_sexp); + arrow::r::input::type i(i_sexp); + return cpp11::as_sexp(Table__column(table, i)); +END_CPP11 } #else RcppExport SEXP _arrow_Table__column(SEXP table_sexp, SEXP i_sexp){ @@ -5721,13 +5693,13 @@ RcppExport SEXP _arrow_Table__column(SEXP table_sexp, SEXP i_sexp){ // table.cpp #if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Table__field(const std::shared_ptr& table, int i); -RcppExport SEXP _arrow_Table__field(SEXP table_sexp, SEXP i_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type table(table_sexp); - Rcpp::traits::input_parameter::type i(i_sexp); - return Rcpp::wrap(Table__field(table, i)); -END_RCPP +std::shared_ptr Table__field(const std::shared_ptr& table, arrow::r::Index i); +extern "C" SEXP _arrow_Table__field(SEXP table_sexp, SEXP i_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type table(table_sexp); + arrow::r::input::type i(i_sexp); + return cpp11::as_sexp(Table__field(table, i)); +END_CPP11 } #else RcppExport SEXP _arrow_Table__field(SEXP table_sexp, SEXP i_sexp){ @@ -5738,11 +5710,11 @@ RcppExport SEXP _arrow_Table__field(SEXP table_sexp, SEXP i_sexp){ // table.cpp #if defined(ARROW_R_WITH_ARROW) std::vector> Table__columns(const std::shared_ptr& table); -RcppExport SEXP _arrow_Table__columns(SEXP table_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type table(table_sexp); - return Rcpp::wrap(Table__columns(table)); -END_RCPP +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 RcppExport SEXP _arrow_Table__columns(SEXP table_sexp){ @@ -5753,11 +5725,11 @@ RcppExport SEXP _arrow_Table__columns(SEXP table_sexp){ // table.cpp #if defined(ARROW_R_WITH_ARROW) std::vector Table__ColumnNames(const std::shared_ptr& table); -RcppExport SEXP _arrow_Table__ColumnNames(SEXP table_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type table(table_sexp); - return Rcpp::wrap(Table__ColumnNames(table)); -END_RCPP +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 RcppExport SEXP _arrow_Table__ColumnNames(SEXP table_sexp){ @@ -5767,13 +5739,13 @@ RcppExport SEXP _arrow_Table__ColumnNames(SEXP table_sexp){ // table.cpp #if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Table__Slice1(const std::shared_ptr& table, int offset); -RcppExport SEXP _arrow_Table__Slice1(SEXP table_sexp, SEXP offset_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type table(table_sexp); - Rcpp::traits::input_parameter::type offset(offset_sexp); - return Rcpp::wrap(Table__Slice1(table, offset)); -END_RCPP +std::shared_ptr Table__Slice1(const std::shared_ptr& table, arrow::r::Index offset); +extern "C" SEXP _arrow_Table__Slice1(SEXP table_sexp, SEXP offset_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type table(table_sexp); + arrow::r::input::type offset(offset_sexp); + return cpp11::as_sexp(Table__Slice1(table, offset)); +END_CPP11 } #else RcppExport SEXP _arrow_Table__Slice1(SEXP table_sexp, SEXP offset_sexp){ @@ -5783,14 +5755,14 @@ RcppExport SEXP _arrow_Table__Slice1(SEXP table_sexp, SEXP offset_sexp){ // table.cpp #if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Table__Slice2(const std::shared_ptr& table, int offset, int length); -RcppExport SEXP _arrow_Table__Slice2(SEXP table_sexp, SEXP offset_sexp, SEXP length_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type table(table_sexp); - Rcpp::traits::input_parameter::type offset(offset_sexp); - Rcpp::traits::input_parameter::type length(length_sexp); - return Rcpp::wrap(Table__Slice2(table, offset, length)); -END_RCPP +std::shared_ptr Table__Slice2(const std::shared_ptr& table, arrow::r::Index offset, arrow::r::Index 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); + arrow::r::input::type offset(offset_sexp); + arrow::r::input::type length(length_sexp); + return cpp11::as_sexp(Table__Slice2(table, offset, length)); +END_CPP11 } #else RcppExport SEXP _arrow_Table__Slice2(SEXP table_sexp, SEXP offset_sexp, SEXP length_sexp){ @@ -5801,13 +5773,13 @@ RcppExport SEXP _arrow_Table__Slice2(SEXP table_sexp, SEXP offset_sexp, SEXP len // table.cpp #if defined(ARROW_R_WITH_ARROW) bool Table__Equals(const std::shared_ptr& lhs, const std::shared_ptr& rhs, bool check_metadata); -RcppExport SEXP _arrow_Table__Equals(SEXP lhs_sexp, SEXP rhs_sexp, SEXP check_metadata_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type lhs(lhs_sexp); - Rcpp::traits::input_parameter&>::type rhs(rhs_sexp); - Rcpp::traits::input_parameter::type check_metadata(check_metadata_sexp); - return Rcpp::wrap(Table__Equals(lhs, rhs, check_metadata)); -END_RCPP +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); + arrow::r::input&>::type rhs(rhs_sexp); + arrow::r::input::type check_metadata(check_metadata_sexp); + return cpp11::as_sexp(Table__Equals(lhs, rhs, check_metadata)); +END_CPP11 } #else RcppExport SEXP _arrow_Table__Equals(SEXP lhs_sexp, SEXP rhs_sexp, SEXP check_metadata_sexp){ @@ -5818,11 +5790,11 @@ RcppExport SEXP _arrow_Table__Equals(SEXP lhs_sexp, SEXP rhs_sexp, SEXP check_me // table.cpp #if defined(ARROW_R_WITH_ARROW) bool Table__Validate(const std::shared_ptr& table); -RcppExport SEXP _arrow_Table__Validate(SEXP table_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type table(table_sexp); - return Rcpp::wrap(Table__Validate(table)); -END_RCPP +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 RcppExport SEXP _arrow_Table__Validate(SEXP table_sexp){ @@ -5833,11 +5805,11 @@ RcppExport SEXP _arrow_Table__Validate(SEXP table_sexp){ // table.cpp #if defined(ARROW_R_WITH_ARROW) bool Table__ValidateFull(const std::shared_ptr& table); -RcppExport SEXP _arrow_Table__ValidateFull(SEXP table_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type table(table_sexp); - return Rcpp::wrap(Table__ValidateFull(table)); -END_RCPP +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 RcppExport SEXP _arrow_Table__ValidateFull(SEXP table_sexp){ @@ -5848,12 +5820,12 @@ RcppExport SEXP _arrow_Table__ValidateFull(SEXP table_sexp){ // table.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr Table__GetColumnByName(const std::shared_ptr& table, const std::string& name); -RcppExport SEXP _arrow_Table__GetColumnByName(SEXP table_sexp, SEXP name_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type table(table_sexp); - Rcpp::traits::input_parameter::type name(name_sexp); - return Rcpp::wrap(Table__GetColumnByName(table, name)); -END_RCPP +extern "C" SEXP _arrow_Table__GetColumnByName(SEXP table_sexp, SEXP name_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type table(table_sexp); + arrow::r::input::type name(name_sexp); + return cpp11::as_sexp(Table__GetColumnByName(table, name)); +END_CPP11 } #else RcppExport SEXP _arrow_Table__GetColumnByName(SEXP table_sexp, SEXP name_sexp){ @@ -5864,12 +5836,12 @@ RcppExport SEXP _arrow_Table__GetColumnByName(SEXP table_sexp, SEXP name_sexp){ // table.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr Table__select(const std::shared_ptr& table, const Rcpp::IntegerVector& indices); -RcppExport SEXP _arrow_Table__select(SEXP table_sexp, SEXP indices_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type table(table_sexp); - Rcpp::traits::input_parameter::type indices(indices_sexp); - return Rcpp::wrap(Table__select(table, indices)); -END_RCPP +extern "C" SEXP _arrow_Table__select(SEXP table_sexp, SEXP indices_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type table(table_sexp); + arrow::r::input::type indices(indices_sexp); + return cpp11::as_sexp(Table__select(table, indices)); +END_CPP11 } #else RcppExport SEXP _arrow_Table__select(SEXP table_sexp, SEXP indices_sexp){ @@ -5877,15 +5849,46 @@ RcppExport SEXP _arrow_Table__select(SEXP table_sexp, SEXP indices_sexp){ } #endif +// table.cpp +#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 +RcppExport SEXP _arrow_all_record_batches(SEXP lst_sexp){ + Rf_error("Cannot call all_record_batches(). Please use arrow::install_arrow() to install required runtime libraries. "); +} +#endif + +// table.cpp +#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); + arrow::r::input::type schema_sxp(schema_sxp_sexp); + return cpp11::as_sexp(Table__from_record_batches(batches, schema_sxp)); +END_CPP11 +} +#else +RcppExport SEXP _arrow_Table__from_record_batches(SEXP batches_sexp, SEXP schema_sxp_sexp){ + Rf_error("Cannot call Table__from_record_batches(). Please use arrow::install_arrow() to install required runtime libraries. "); +} +#endif + // table.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr Table__from_dots(SEXP lst, SEXP schema_sxp); -RcppExport SEXP _arrow_Table__from_dots(SEXP lst_sexp, SEXP schema_sxp_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter::type lst(lst_sexp); - Rcpp::traits::input_parameter::type schema_sxp(schema_sxp_sexp); - return Rcpp::wrap(Table__from_dots(lst, schema_sxp)); -END_RCPP +extern "C" SEXP _arrow_Table__from_dots(SEXP lst_sexp, SEXP schema_sxp_sexp){ +BEGIN_CPP11 + arrow::r::input::type lst(lst_sexp); + arrow::r::input::type schema_sxp(schema_sxp_sexp); + return cpp11::as_sexp(Table__from_dots(lst, schema_sxp)); +END_CPP11 } #else RcppExport SEXP _arrow_Table__from_dots(SEXP lst_sexp, SEXP schema_sxp_sexp){ @@ -5896,10 +5899,10 @@ RcppExport SEXP _arrow_Table__from_dots(SEXP lst_sexp, SEXP schema_sxp_sexp){ // threadpool.cpp #if defined(ARROW_R_WITH_ARROW) int GetCpuThreadPoolCapacity(); -RcppExport SEXP _arrow_GetCpuThreadPoolCapacity(){ -BEGIN_RCPP - return Rcpp::wrap(GetCpuThreadPoolCapacity()); -END_RCPP +extern "C" SEXP _arrow_GetCpuThreadPoolCapacity(){ +BEGIN_CPP11 + return cpp11::as_sexp(GetCpuThreadPoolCapacity()); +END_CPP11 } #else RcppExport SEXP _arrow_GetCpuThreadPoolCapacity(){ @@ -5910,12 +5913,12 @@ RcppExport SEXP _arrow_GetCpuThreadPoolCapacity(){ // threadpool.cpp #if defined(ARROW_R_WITH_ARROW) void SetCpuThreadPoolCapacity(int threads); -RcppExport SEXP _arrow_SetCpuThreadPoolCapacity(SEXP threads_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter::type threads(threads_sexp); +extern "C" SEXP _arrow_SetCpuThreadPoolCapacity(SEXP threads_sexp){ +BEGIN_CPP11 + arrow::r::input::type threads(threads_sexp); SetCpuThreadPoolCapacity(threads); return R_NilValue; -END_RCPP +END_CPP11 } #else RcppExport SEXP _arrow_SetCpuThreadPoolCapacity(SEXP threads_sexp){ @@ -6091,7 +6094,7 @@ static const R_CallMethodDef CallEntries[] = { { "_arrow_list__", (DL_FUNC) &_arrow_list__, 1}, { "_arrow_large_list__", (DL_FUNC) &_arrow_large_list__, 1}, { "_arrow_fixed_size_list__", (DL_FUNC) &_arrow_fixed_size_list__, 2}, - { "_arrow_struct_", (DL_FUNC) &_arrow_struct_, 1}, + { "_arrow_struct__", (DL_FUNC) &_arrow_struct__, 1}, { "_arrow_DataType__ToString", (DL_FUNC) &_arrow_DataType__ToString, 1}, { "_arrow_DataType__name", (DL_FUNC) &_arrow_DataType__name, 1}, { "_arrow_DataType__Equals", (DL_FUNC) &_arrow_DataType__Equals, 2}, @@ -6200,7 +6203,7 @@ static const R_CallMethodDef CallEntries[] = { { "_arrow_io___BufferOutputStream__Finish", (DL_FUNC) &_arrow_io___BufferOutputStream__Finish, 1}, { "_arrow_io___BufferOutputStream__Tell", (DL_FUNC) &_arrow_io___BufferOutputStream__Tell, 1}, { "_arrow_io___BufferOutputStream__Write", (DL_FUNC) &_arrow_io___BufferOutputStream__Write, 2}, - { "_arrow_json___ReadOptions__initialize", (DL_FUNC) &_arrow_json___ReadOptions__initialize, 1}, + { "_arrow_json___ReadOptions__initialize", (DL_FUNC) &_arrow_json___ReadOptions__initialize, 2}, { "_arrow_json___ParseOptions__initialize", (DL_FUNC) &_arrow_json___ParseOptions__initialize, 1}, { "_arrow_json___TableReader__Make", (DL_FUNC) &_arrow_json___TableReader__Make, 3}, { "_arrow_json___TableReader__Read", (DL_FUNC) &_arrow_json___TableReader__Read, 1}, @@ -6260,7 +6263,6 @@ static const R_CallMethodDef CallEntries[] = { { "_arrow_RecordBatch__column", (DL_FUNC) &_arrow_RecordBatch__column, 2}, { "_arrow_RecordBatch__GetColumnByName", (DL_FUNC) &_arrow_RecordBatch__GetColumnByName, 2}, { "_arrow_RecordBatch__select", (DL_FUNC) &_arrow_RecordBatch__select, 2}, - { "_arrow_RecordBatch__from_dataframe", (DL_FUNC) &_arrow_RecordBatch__from_dataframe, 1}, { "_arrow_RecordBatch__Equals", (DL_FUNC) &_arrow_RecordBatch__Equals, 3}, { "_arrow_RecordBatch__RemoveColumn", (DL_FUNC) &_arrow_RecordBatch__RemoveColumn, 2}, { "_arrow_RecordBatch__column_name", (DL_FUNC) &_arrow_RecordBatch__column_name, 2}, @@ -6307,7 +6309,6 @@ static const R_CallMethodDef CallEntries[] = { { "_arrow_Schema__serialize", (DL_FUNC) &_arrow_Schema__serialize, 1}, { "_arrow_Schema__Equals", (DL_FUNC) &_arrow_Schema__Equals, 3}, { "_arrow_arrow__UnifySchemas", (DL_FUNC) &_arrow_arrow__UnifySchemas, 1}, - { "_arrow_Table__from_dataframe", (DL_FUNC) &_arrow_Table__from_dataframe, 1}, { "_arrow_Table__num_columns", (DL_FUNC) &_arrow_Table__num_columns, 1}, { "_arrow_Table__num_rows", (DL_FUNC) &_arrow_Table__num_rows, 1}, { "_arrow_Table__schema", (DL_FUNC) &_arrow_Table__schema, 1}, @@ -6323,6 +6324,8 @@ static const R_CallMethodDef CallEntries[] = { { "_arrow_Table__ValidateFull", (DL_FUNC) &_arrow_Table__ValidateFull, 1}, { "_arrow_Table__GetColumnByName", (DL_FUNC) &_arrow_Table__GetColumnByName, 2}, { "_arrow_Table__select", (DL_FUNC) &_arrow_Table__select, 2}, + { "_arrow_all_record_batches", (DL_FUNC) &_arrow_all_record_batches, 1}, + { "_arrow_Table__from_record_batches", (DL_FUNC) &_arrow_Table__from_record_batches, 2}, { "_arrow_Table__from_dots", (DL_FUNC) &_arrow_Table__from_dots, 2}, { "_arrow_GetCpuThreadPoolCapacity", (DL_FUNC) &_arrow_GetCpuThreadPoolCapacity, 0}, { "_arrow_SetCpuThreadPoolCapacity", (DL_FUNC) &_arrow_SetCpuThreadPoolCapacity, 1}, diff --git a/r/src/arrow_exports.h b/r/src/arrow_exports.h index f568d2a14b9..d9731923a7a 100644 --- a/r/src/arrow_exports.h +++ b/r/src/arrow_exports.h @@ -83,15 +83,4 @@ class FileWriter; } // namespace arrow } // namespace parquet -RCPP_EXPOSED_ENUM_NODECL(arrow::Type::type) -RCPP_EXPOSED_ENUM_NODECL(arrow::DateUnit) -RCPP_EXPOSED_ENUM_NODECL(arrow::ipc::MetadataVersion) -RCPP_EXPOSED_ENUM_NODECL(arrow::TimeUnit::type) -RCPP_EXPOSED_ENUM_NODECL(arrow::StatusCode) -RCPP_EXPOSED_ENUM_NODECL(arrow::io::FileMode::type) -RCPP_EXPOSED_ENUM_NODECL(arrow::ipc::MessageType) -RCPP_EXPOSED_ENUM_NODECL(arrow::Compression::type) -RCPP_EXPOSED_ENUM_NODECL(arrow::fs::FileType) -RCPP_EXPOSED_ENUM_NODECL(parquet::ParquetVersion::type) - #endif diff --git a/r/src/arrow_rcpp.h b/r/src/arrow_rcpp.h index a0a05815c01..81e62af36f4 100644 --- a/r/src/arrow_rcpp.h +++ b/r/src/arrow_rcpp.h @@ -23,6 +23,23 @@ #include #undef Free +#include + +namespace cpp11 { + +template +SEXP as_sexp(const std::shared_ptr& ptr); + +template +SEXP as_sexp(const std::vector>& vec); + +template ::value>::type* = nullptr> +SEXP as_sexp(E e); + +} // namespace cpp11 + +#include + namespace arrow { namespace r { struct symbols { @@ -43,6 +60,7 @@ struct data { static SEXP classes_POSIXct; static SEXP classes_metadata_r; static SEXP classes_vctrs_list_of; + static SEXP classes_tbl_df; static SEXP classes_arrow_binary; static SEXP classes_arrow_large_binary; @@ -63,124 +81,212 @@ struct ns { static SEXP arrow; }; +class Index { + public: + // TODO: uncomment when this is merged in cpp11: https://github.com/r-lib/cpp11/pull/58 + /*explicit*/ Index(SEXP x) : index_(validate_index(x)) {} // NOLINT runtime/explicit + + inline operator R_xlen_t() const { return index_; } + + private: + R_xlen_t index_; + + static R_xlen_t validate_index(SEXP x) { + if (XLENGTH(x) == 1) { + switch (TYPEOF(x)) { + case INTSXP: + return INTEGER_ELT(x, 0); + case REALSXP: + if (cpp11::is_convertable_without_loss_to_integer(REAL_ELT(x, 0))) + return REAL_ELT(x, 0); + case LGLSXP: + return LOGICAL_ELT(x, 0); + default: + break; + } + } + + cpp11::stop("Expected single integer value"); + return 0; + } +}; + } // namespace r } // namespace arrow -namespace Rcpp { -namespace internal { +namespace cpp11 { + +template +typename std::enable_if::value, E>::type as_cpp(SEXP from) { + return E(cpp11::as_cpp(from)); +} + +} // namespace cpp11 + +namespace arrow { +namespace r { template -Pointer r6_to_smart_pointer(SEXP self) { +Pointer r6_to_pointer(SEXP self) { return reinterpret_cast( R_ExternalPtrAddr(Rf_findVarInFrame(self, arrow::r::symbols::xp))); } -} // namespace internal - -template -class ConstReferenceSmartPtrInputParameter { +template class SmartPtr> +class ConstRefSmartPtrInput { public: - using const_reference = const T&; + using const_reference = const SmartPtr&; - explicit ConstReferenceSmartPtrInputParameter(SEXP self) - : ptr(internal::r6_to_smart_pointer(self)) {} + explicit ConstRefSmartPtrInput(SEXP self) + : ptr(r6_to_pointer*>(self)) {} inline operator const_reference() { return *ptr; } private: - const T* ptr; + // this class host + const SmartPtr* ptr; }; -template -class ConstReferenceVectorSmartPtrInputParameter { +template class SmartPtr> +class ConstRefVectorSmartPtrInput { public: - using const_reference = const std::vector&; + using const_reference = const std::vector>&; - explicit ConstReferenceVectorSmartPtrInputParameter(SEXP self) : vec() { + explicit ConstRefVectorSmartPtrInput(SEXP self) : vec() { R_xlen_t n = XLENGTH(self); for (R_xlen_t i = 0; i < n; i++) { - vec.push_back(*internal::r6_to_smart_pointer(VECTOR_ELT(self, i))); + vec.push_back(*r6_to_pointer*>(VECTOR_ELT(self, i))); } } inline operator const_reference() { return vec; } private: - std::vector vec; + std::vector> vec; }; -namespace traits { +template +class default_input { + public: + explicit default_input(SEXP from) : from_(from) {} + + operator T() const { return cpp11::as_cpp(from_); } + + private: + SEXP from_; +}; + +template +class const_reference_input { + public: + explicit const_reference_input(SEXP from) : obj_(cpp11::as_cpp(from)) {} + + using const_reference = const T&; + operator const_reference() const { return obj_; } + + private: + T obj_; +}; template -struct input_parameter&> { - typedef typename Rcpp::ConstReferenceSmartPtrInputParameter> type; +struct input { + using type = default_input; }; template -struct input_parameter&> { - typedef typename Rcpp::ConstReferenceSmartPtrInputParameter> type; +struct input { + using type = const_reference_input::type>; }; template -struct input_parameter>&> { - typedef typename Rcpp::ConstReferenceVectorSmartPtrInputParameter> - type; +struct input&> { + using type = ConstRefSmartPtrInput; }; -struct wrap_type_shared_ptr_tag {}; -struct wrap_type_unique_ptr_tag {}; +template +using default_unique_ptr = std::unique_ptr>; template -struct wrap_type_traits> { - using wrap_category = wrap_type_shared_ptr_tag; +struct input&> { + using type = ConstRefSmartPtrInput; }; template -struct wrap_type_traits> { - using wrap_category = wrap_type_unique_ptr_tag; +struct input>&> { + using type = ConstRefVectorSmartPtrInput; }; -} // namespace traits +template +Rvector to_r_vector(const std::vector>& x, + ToVectorElement&& to_element) { + auto n = x.size(); + Rvector out(n); + for (int i = 0; i < n; i++) { + out[i] = to_element(x[i]); + } + return out; +} -namespace internal { +template +cpp11::writable::strings to_r_strings(const std::vector>& x, + ToString&& to_string) { + return to_r_vector(x, std::forward(to_string)); +} template -inline SEXP wrap_dispatch(const T& x, Rcpp::traits::wrap_type_shared_ptr_tag); +cpp11::writable::list to_r_list(const std::vector>& x) { + auto as_sexp = [](const std::shared_ptr& t) { return cpp11::as_sexp(t); }; + return to_r_vector(x, as_sexp); +} + +template +cpp11::writable::list to_r_list(const std::vector>& x, + ToListElement&& to_element) { + auto as_sexp = [&](const std::shared_ptr& t) { + return cpp11::as_sexp(to_element(t)); + }; + return to_r_vector(x, as_sexp); +} + +inline cpp11::writable::integers short_row_names(int n) { return {NA_INTEGER, -n}; } template -inline SEXP wrap_dispatch(const T& x, Rcpp::traits::wrap_type_unique_ptr_tag); +std::vector from_r_list(cpp11::list args) { + std::vector vec; + R_xlen_t n = args.size(); + for (R_xlen_t i = 0; i < n; i++) { + vec.push_back(cpp11::as_cpp(args[i])); + } + return vec; +} -} // namespace internal -} // namespace Rcpp +} // namespace r +} // namespace arrow -#include +namespace cpp11 { -namespace Rcpp { -namespace internal { +template +using enable_if_shared_ptr = typename std::enable_if< + std::is_same, T>::value, T>::type; template -inline SEXP wrap_dispatch(const T& x, Rcpp::traits::wrap_type_shared_ptr_tag) { - return Rcpp::XPtr>( - new std::shared_ptr(x)); +enable_if_shared_ptr as_cpp(SEXP from) { + return arrow::r::ConstRefSmartPtrInput(from); } template -inline SEXP wrap_dispatch(const T& x, Rcpp::traits::wrap_type_unique_ptr_tag) { - return Rcpp::XPtr>( - new std::unique_ptr(const_cast(x).release())); +SEXP as_sexp(const std::shared_ptr& ptr) { + return cpp11::external_pointer>(new std::shared_ptr(ptr)); } -} // namespace internal - -} // namespace Rcpp +template +SEXP as_sexp(const std::vector>& vec) { + return arrow::r::to_r_list(vec); +} -namespace Rcpp { -using NumericVector_ = Rcpp::Vector; -using IntegerVector_ = Rcpp::Vector; -using LogicalVector_ = Rcpp::Vector; -using StringVector_ = Rcpp::Vector; -using CharacterVector_ = StringVector_; -using RawVector_ = Rcpp::Vector; -using List_ = Rcpp::Vector; +template ::value>::type*> +SEXP as_sexp(E e) { + return as_sexp(static_cast(e)); +} -} // namespace Rcpp +} // namespace cpp11 diff --git a/r/src/arrow_types.h b/r/src/arrow_types.h index 7221bf93a04..5112ac3c1a3 100644 --- a/r/src/arrow_types.h +++ b/r/src/arrow_types.h @@ -17,14 +17,12 @@ #pragma once -#include "./arrow_rcpp.h" +#include -template -struct NoDelete { - inline void operator()(T* ptr) {} -}; +#include "./arrow_rcpp.h" -namespace Rcpp { +namespace arrow { +namespace r { template inline constexpr typename Rcpp::Vector::stored_type default_value() { @@ -35,7 +33,8 @@ inline constexpr Rbyte default_value() { return 0; } -} // namespace Rcpp +} // namespace r +} // namespace arrow #if defined(ARROW_R_WITH_ARROW) @@ -48,19 +47,16 @@ inline constexpr Rbyte default_value() { #include #include -RCPP_EXPOSED_ENUM_NODECL(arrow::StatusCode) - SEXP ChunkedArray__as_vector(const std::shared_ptr& chunked_array); SEXP Array__as_vector(const std::shared_ptr& array); std::shared_ptr Array__from_vector(SEXP x, SEXP type); std::shared_ptr RecordBatch__from_arrays(SEXP, SEXP); -std::shared_ptr RecordBatch__from_dataframe(Rcpp::DataFrame tbl); namespace arrow { static inline void StopIfNotOk(const Status& status) { if (!(status.ok())) { - Rcpp::stop(status.ToString()); + cpp11::stop(status.ToString()); } } @@ -74,27 +70,11 @@ namespace r { std::shared_ptr InferArrowType(SEXP x); -template -inline std::shared_ptr extract(SEXP x) { - return Rcpp::ConstReferenceSmartPtrInputParameter>(x); -} - Status count_fields(SEXP lst, int* out); std::shared_ptr Array__from_vector( SEXP x, const std::shared_ptr& type, bool type_inferred); -template -std::vector> List_to_shared_ptr_vector(SEXP x) { - std::vector> vec; - R_xlen_t n = Rf_xlength(x); - for (R_xlen_t i = 0; i < n; i++) { - Rcpp::ConstReferenceSmartPtrInputParameter> ptr(VECTOR_ELT(x, i)); - vec.push_back(ptr); - } - return vec; -} - void inspect(SEXP obj); // the integer64 sentinel @@ -115,9 +95,9 @@ class RBuffer : public MutableBuffer { std::shared_ptr InferArrowTypeFromFactor(SEXP); -void validate_slice_offset(int offset, int len); +void validate_slice_offset(arrow::r::Index offset, int64_t len); -void validate_slice_length(int length, int available); +void validate_slice_length(arrow::r::Index length, int64_t available); void validate_index(int i, int len); diff --git a/r/src/buffer.cpp b/r/src/buffer.cpp index 09ab39a5f98..600f55f5dda 100644 --- a/r/src/buffer.cpp +++ b/r/src/buffer.cpp @@ -51,8 +51,7 @@ std::shared_ptr r___RBuffer__initialize(SEXP x) { case CPLXSXP: return std::make_shared>(x); default: - Rcpp::stop( - tfm::format("R object of type %s not supported", Rf_type2char(TYPEOF(x)))); + cpp11::stop("R object of type <%s> not supported", Rf_type2char(TYPEOF(x))); } return nullptr; } diff --git a/r/src/chunkedarray.cpp b/r/src/chunkedarray.cpp index a451739f323..2d2774587c7 100644 --- a/r/src/chunkedarray.cpp +++ b/r/src/chunkedarray.cpp @@ -17,9 +17,6 @@ #include "./arrow_types.h" -using Rcpp::List; -using Rcpp::wrap; - #if defined(ARROW_R_WITH_ARROW) #include @@ -47,8 +44,9 @@ std::shared_ptr ChunkedArray__chunk( } // [[arrow::export]] -List ChunkedArray__chunks(const std::shared_ptr& chunked_array) { - return wrap(chunked_array->chunks()); +cpp11::list ChunkedArray__chunks( + const std::shared_ptr& chunked_array) { + return cpp11::as_sexp(chunked_array->chunks()); } // [[arrow::export]] @@ -59,14 +57,15 @@ std::shared_ptr ChunkedArray__type( // [[arrow::export]] std::shared_ptr ChunkedArray__Slice1( - const std::shared_ptr& chunked_array, int offset) { + const std::shared_ptr& chunked_array, arrow::r::Index offset) { arrow::r::validate_slice_offset(offset, chunked_array->length()); return chunked_array->Slice(offset); } // [[arrow::export]] std::shared_ptr ChunkedArray__Slice2( - const std::shared_ptr& chunked_array, int offset, int length) { + const std::shared_ptr& chunked_array, arrow::r::Index offset, + arrow::r::Index length) { arrow::r::validate_slice_offset(offset, chunked_array->length()); arrow::r::validate_slice_length(length, chunked_array->length() - offset); return chunked_array->Slice(offset, length); diff --git a/r/src/compression.cpp b/r/src/compression.cpp index 038390b71b4..fdcceab10a9 100644 --- a/r/src/compression.cpp +++ b/r/src/compression.cpp @@ -21,11 +21,9 @@ #include #include -RCPP_EXPOSED_ENUM_NODECL(arrow::Compression::type) - // [[arrow::export]] -std::shared_ptr util___Codec__Create(arrow::Compression::type codec, - int compression_level) { +std::shared_ptr util___Codec__Create( + arrow::Compression::type codec, arrow::r::Index compression_level) { return ValueOrStop(arrow::util::Codec::Create(codec, compression_level)); } diff --git a/r/src/compute.cpp b/r/src/compute.cpp index 8d185220dd0..2fced04fcce 100644 --- a/r/src/compute.cpp +++ b/r/src/compute.cpp @@ -23,8 +23,6 @@ #include #include -using Rcpp::List_; - // [[arrow::export]] std::shared_ptr compute___CastOptions__initialize( bool allow_int_overflow, bool allow_time_truncate, bool allow_float_truncate) { @@ -86,13 +84,15 @@ std::shared_ptr Table__cast( template std::shared_ptr MaybeUnbox(const char* class_name, SEXP x) { if (Rf_inherits(x, "ArrowObject") && Rf_inherits(x, class_name)) { - Rcpp::ConstReferenceSmartPtrInputParameter> obj(x); - return static_cast>(obj); + return cpp11::as_cpp>(x); } return nullptr; } -arrow::Datum to_datum(SEXP x) { +namespace cpp11 { + +template <> +arrow::Datum as_cpp(SEXP x) { if (auto array = MaybeUnbox("Array", x)) { return array; } @@ -115,40 +115,44 @@ arrow::Datum to_datum(SEXP x) { // This assumes that R objects have already been converted to Arrow objects; // that seems right but should we do the wrapping here too/instead? - Rcpp::stop("to_datum: Not implemented for type %s", Rf_type2char(TYPEOF(x))); + cpp11::stop("to_datum: Not implemented for type %s", Rf_type2char(TYPEOF(x))); + return arrow::Datum(); } +} // namespace cpp11 SEXP from_datum(arrow::Datum datum) { switch (datum.kind()) { case arrow::Datum::SCALAR: - return Rcpp::wrap(datum.scalar()); + return cpp11::as_sexp(datum.scalar()); case arrow::Datum::ARRAY: - return Rcpp::wrap(datum.make_array()); + return cpp11::as_sexp(datum.make_array()); case arrow::Datum::CHUNKED_ARRAY: - return Rcpp::wrap(datum.chunked_array()); + return cpp11::as_sexp(datum.chunked_array()); case arrow::Datum::RECORD_BATCH: - return Rcpp::wrap(datum.record_batch()); + return cpp11::as_sexp(datum.record_batch()); case arrow::Datum::TABLE: - return Rcpp::wrap(datum.table()); + return cpp11::as_sexp(datum.table()); default: break; } auto str = datum.ToString(); - Rcpp::stop("from_datum: Not implemented for Datum %s", str.c_str()); + cpp11::stop("from_datum: Not implemented for Datum %s", str.c_str()); + return R_NilValue; } std::shared_ptr make_compute_options( - std::string func_name, List_ options) { + std::string func_name, cpp11::list options) { if (func_name == "filter") { using Options = arrow::compute::FilterOptions; auto out = std::make_shared(Options::Defaults()); - if (!Rf_isNull(options["keep_na"]) && options["keep_na"]) { + SEXP keep_na = options["keep_na"]; + if (!Rf_isNull(keep_na) && cpp11::as_cpp(keep_na)) { out->null_selection_behavior = Options::EMIT_NULL; } return out; @@ -163,7 +167,8 @@ std::shared_ptr make_compute_options( if (func_name == "min_max") { using Options = arrow::compute::MinMaxOptions; auto out = std::make_shared(Options::Defaults()); - out->null_handling = options["na.rm"] ? Options::SKIP : Options::OUTPUT_NULL; + out->null_handling = + cpp11::as_cpp(options["na.rm"]) ? Options::SKIP : Options::OUTPUT_NULL; return out; } @@ -171,12 +176,9 @@ std::shared_ptr make_compute_options( } // [[arrow::export]] -SEXP compute__CallFunction(std::string func_name, List_ args, List_ options) { +SEXP compute__CallFunction(std::string func_name, cpp11::list args, cpp11::list options) { auto opts = make_compute_options(func_name, options); - std::vector datum_args; - for (auto arg : args) { - datum_args.push_back(to_datum(arg)); - } + auto datum_args = arrow::r::from_r_list(args); auto out = ValueOrStop(arrow::compute::CallFunction(func_name, datum_args, opts.get())); return from_datum(out); } diff --git a/r/src/csv.cpp b/r/src/csv.cpp index 9275c827c18..ce9c068bd41 100644 --- a/r/src/csv.cpp +++ b/r/src/csv.cpp @@ -17,53 +17,51 @@ #include "./arrow_types.h" -using Rcpp::CharacterVector; -using Rcpp::List_; - #if defined(ARROW_R_WITH_ARROW) #include // [[arrow::export]] -std::shared_ptr csv___ReadOptions__initialize(List_ options) { +std::shared_ptr csv___ReadOptions__initialize( + cpp11::list options) { auto res = std::make_shared(arrow::csv::ReadOptions::Defaults()); - res->use_threads = options["use_threads"]; - res->block_size = options["block_size"]; - res->skip_rows = options["skip_rows"]; - res->column_names = Rcpp::as>(options["column_names"]); - res->autogenerate_column_names = options["autogenerate_column_names"]; + res->use_threads = cpp11::as_cpp(options["use_threads"]); + res->block_size = cpp11::as_cpp(options["block_size"]); + res->skip_rows = cpp11::as_cpp(options["skip_rows"]); + res->column_names = cpp11::as_cpp>(options["column_names"]); + res->autogenerate_column_names = + cpp11::as_cpp(options["autogenerate_column_names"]); return res; } -inline char get_char(CharacterVector x) { return CHAR(STRING_ELT(x, 0))[0]; } - // [[arrow::export]] -std::shared_ptr csv___ParseOptions__initialize(List_ options) { +std::shared_ptr csv___ParseOptions__initialize( + cpp11::list options) { auto res = std::make_shared(arrow::csv::ParseOptions::Defaults()); - res->delimiter = get_char(options["delimiter"]); - res->quoting = options["quoting"]; - res->quote_char = get_char(options["quote_char"]); - res->double_quote = options["double_quote"]; - res->escape_char = get_char(options["escape_char"]); - res->newlines_in_values = options["newlines_in_values"]; - res->ignore_empty_lines = options["ignore_empty_lines"]; + res->delimiter = cpp11::as_cpp(options["delimiter"]); + res->quoting = cpp11::as_cpp(options["quoting"]); + res->quote_char = cpp11::as_cpp(options["quote_char"]); + res->double_quote = cpp11::as_cpp(options["double_quote"]); + res->escape_char = cpp11::as_cpp(options["escape_char"]); + res->newlines_in_values = cpp11::as_cpp(options["newlines_in_values"]); + res->ignore_empty_lines = cpp11::as_cpp(options["ignore_empty_lines"]); return res; } // [[arrow::export]] std::shared_ptr csv___ConvertOptions__initialize( - List_ options) { + cpp11::list options) { auto res = std::make_shared( arrow::csv::ConvertOptions::Defaults()); - res->check_utf8 = options["check_utf8"]; + res->check_utf8 = cpp11::as_cpp(options["check_utf8"]); // Recognized spellings for null values - res->null_values = Rcpp::as>(options["null_values"]); + res->null_values = cpp11::as_cpp>(options["null_values"]); // Whether string / binary columns can have null values. // If true, then strings in "null_values" are considered null for string columns. // If false, then all strings are valid string values. - res->strings_can_be_null = options["strings_can_be_null"]; + res->strings_can_be_null = cpp11::as_cpp(options["strings_can_be_null"]); // TODO: there are more conversion options available: // // Optional per-column types (disabling type inference on those columns) // std::unordered_map> column_types; diff --git a/r/src/dataset.cpp b/r/src/dataset.cpp index 873524397a0..24ee255f3d4 100644 --- a/r/src/dataset.cpp +++ b/r/src/dataset.cpp @@ -27,9 +27,6 @@ namespace ds = ::arrow::dataset; namespace fs = ::arrow::fs; -using Rcpp::CharacterVector; -using Rcpp::String; - // Dataset, UnionDataset, FileSystemDataset // [[arrow::export]] @@ -163,7 +160,7 @@ std::string dataset___FileFormat__type_name( // [[arrow::export]] std::shared_ptr dataset___ParquetFileFormat__Make( - bool use_buffered_stream, int64_t buffer_size, CharacterVector dict_columns) { + bool use_buffered_stream, int64_t buffer_size, Rcpp::CharacterVector dict_columns) { auto fmt = std::make_shared(); fmt->reader_options.use_buffered_stream = use_buffered_stream; diff --git a/r/src/datatype.cpp b/r/src/datatype.cpp index 3d6d0c9a753..a8454b134db 100644 --- a/r/src/datatype.cpp +++ b/r/src/datatype.cpp @@ -17,18 +17,9 @@ #include "./arrow_types.h" -using Rcpp::CharacterVector; -using Rcpp::List; -using Rcpp::stop; -using Rcpp::wrap; - #if defined(ARROW_R_WITH_ARROW) #include -RCPP_EXPOSED_ENUM_NODECL(arrow::Type::type) -RCPP_EXPOSED_ENUM_NODECL(arrow::DateUnit) -RCPP_EXPOSED_ENUM_NODECL(arrow::TimeUnit::type) - // [[arrow::export]] bool shared_ptr_is_null(SEXP xp) { return reinterpret_cast*>(R_ExternalPtrAddr(xp))->get() == @@ -108,12 +99,12 @@ std::shared_ptr Decimal128Type__initialize(int32_t precision, } // [[arrow::export]] -std::shared_ptr FixedSizeBinary__initialize(int32_t byte_width) { +std::shared_ptr FixedSizeBinary__initialize(arrow::r::Index byte_width) { if (byte_width == NA_INTEGER) { - Rcpp::stop("'byte_width' cannot be NA"); + cpp11::stop("'byte_width' cannot be NA"); } if (byte_width < 1) { - Rcpp::stop("'byte_width' must be > 0"); + cpp11::stop("'byte_width' must be > 0"); } return arrow::fixed_size_binary(byte_width); } @@ -137,54 +128,55 @@ std::shared_ptr Time64__initialize(arrow::TimeUnit::type unit) // [[arrow::export]] SEXP list__(SEXP x) { if (Rf_inherits(x, "Field")) { - Rcpp::ConstReferenceSmartPtrInputParameter> field(x); - return wrap(arrow::list(field)); + auto field = cpp11::as_cpp>(x); + return cpp11::as_sexp(arrow::list(field)); } if (Rf_inherits(x, "DataType")) { - Rcpp::ConstReferenceSmartPtrInputParameter> type(x); - return wrap(arrow::list(type)); + auto type = cpp11::as_cpp>(x); + return cpp11::as_sexp(arrow::list(type)); } - stop("incompatible"); + cpp11::stop("incompatible"); return R_NilValue; } // [[arrow::export]] SEXP large_list__(SEXP x) { if (Rf_inherits(x, "Field")) { - Rcpp::ConstReferenceSmartPtrInputParameter> field(x); - return wrap(arrow::large_list(field)); + auto field = cpp11::as_cpp>(x); + return cpp11::as_sexp(arrow::large_list(field)); } if (Rf_inherits(x, "DataType")) { - Rcpp::ConstReferenceSmartPtrInputParameter> type(x); - return wrap(arrow::large_list(type)); + auto type = cpp11::as_cpp>(x); + return cpp11::as_sexp(arrow::large_list(type)); } - stop("incompatible"); + cpp11::stop("incompatible"); return R_NilValue; } // [[arrow::export]] SEXP fixed_size_list__(SEXP x, int list_size) { if (Rf_inherits(x, "Field")) { - Rcpp::ConstReferenceSmartPtrInputParameter> field(x); - return wrap(arrow::fixed_size_list(field, list_size)); + auto field = cpp11::as_cpp>(x); + return cpp11::as_sexp(arrow::fixed_size_list(field, list_size)); } if (Rf_inherits(x, "DataType")) { - Rcpp::ConstReferenceSmartPtrInputParameter> type(x); - return wrap(arrow::fixed_size_list(type, list_size)); + auto type = cpp11::as_cpp>(x); + return cpp11::as_sexp(arrow::fixed_size_list(type, list_size)); } - stop("incompatible"); + cpp11::stop("incompatible"); return R_NilValue; } // [[arrow::export]] -std::shared_ptr struct_(List fields) { - return arrow::struct_(arrow::r::List_to_shared_ptr_vector(fields)); +std::shared_ptr struct__( + const std::vector>& fields) { + return arrow::struct_(fields); } // [[arrow::export]] @@ -209,8 +201,9 @@ int DataType__num_children(const std::shared_ptr& type) { } // [[arrow::export]] -List DataType__children_pointer(const std::shared_ptr& type) { - return List(type->fields().begin(), type->fields().end()); +cpp11::writable::list DataType__children_pointer( + const std::shared_ptr& type) { + return arrow::r::to_r_list(type->fields()); } // [[arrow::export]] diff --git a/r/src/feather.cpp b/r/src/feather.cpp index b66da47965d..22bdd7acde0 100644 --- a/r/src/feather.cpp +++ b/r/src/feather.cpp @@ -65,7 +65,7 @@ std::shared_ptr ipc___feather___Reader__Read( StopIfNotOk(reader->Read(&table)); break; default: - Rcpp::stop("incompatible column specification"); + cpp11::stop("incompatible column specification"); break; } @@ -79,15 +79,11 @@ std::shared_ptr ipc___feather___Reader__Open( } // [[arrow::export]] -Rcpp::CharacterVector ipc___feather___Reader__column_names( +cpp11::writable::strings ipc___feather___Reader__column_names( const std::shared_ptr& reader) { - auto sch = reader->schema(); - int64_t n = sch->num_fields(); - Rcpp::CharacterVector out(n); - for (int i = 0; i < n; i++) { - out[i] = sch->field(i)->name(); - } - return out; + return arrow::r::to_r_strings( + reader->schema()->fields(), + [](const std::shared_ptr& field) { return field->name(); }); } #endif diff --git a/r/src/filesystem.cpp b/r/src/filesystem.cpp index ccead59f6cb..75c95ef9015 100644 --- a/r/src/filesystem.cpp +++ b/r/src/filesystem.cpp @@ -16,6 +16,7 @@ // under the License. #include "./arrow_types.h" + #if defined(ARROW_R_WITH_ARROW) #include @@ -23,8 +24,6 @@ namespace fs = ::arrow::fs; -RCPP_EXPOSED_ENUM_NODECL(arrow::fs::FileType) - // FileInfo // [[arrow::export]] @@ -223,11 +222,12 @@ std::shared_ptr fs___SubTreeFileSystem__create( } // [[arrow::export]] -Rcpp::List fs___FileSystemFromUri(const std::string& path) { +cpp11::writable::list fs___FileSystemFromUri(const std::string& path) { + using cpp11::literals::operator""_nm; + std::string out_path; auto file_system = ValueOrStop(fs::FileSystemFromUri(path, &out_path)); - return Rcpp::List::create(Rcpp::Named("fs") = file_system, - Rcpp::Named("path") = out_path); + return cpp11::writable::list({"fs"_nm = file_system, "path"_nm = out_path}); } #endif diff --git a/r/src/io.cpp b/r/src/io.cpp index 763a653bee5..d9384d5ecf3 100644 --- a/r/src/io.cpp +++ b/r/src/io.cpp @@ -17,14 +17,10 @@ #include "./arrow_types.h" -using Rcpp::RawVector_; - #if defined(ARROW_R_WITH_ARROW) #include #include -RCPP_EXPOSED_ENUM_NODECL(arrow::io::FileMode::type) - // ------ arrow::io::Readable // [[arrow::export]] @@ -178,8 +174,9 @@ int64_t io___BufferOutputStream__Tell( // [[arrow::export]] void io___BufferOutputStream__Write( - const std::shared_ptr& stream, RawVector_ bytes) { - StopIfNotOk(stream->Write(bytes.begin(), bytes.size())); + const std::shared_ptr& stream, + cpp11::raws bytes) { + StopIfNotOk(stream->Write(RAW(bytes), bytes.size())); } #endif diff --git a/r/src/json.cpp b/r/src/json.cpp index edeeb343cca..52e50373777 100644 --- a/r/src/json.cpp +++ b/r/src/json.cpp @@ -20,24 +20,22 @@ #include -using Rcpp::CharacterVector; -using Rcpp::List_; - // [[arrow::export]] -std::shared_ptr json___ReadOptions__initialize(List_ options) { +std::shared_ptr json___ReadOptions__initialize(bool use_threads, + int block_size) { auto res = std::make_shared(arrow::json::ReadOptions::Defaults()); - res->use_threads = options["use_threads"]; - res->block_size = options["block_size"]; + res->use_threads = use_threads; + res->block_size = block_size; return res; } // [[arrow::export]] std::shared_ptr json___ParseOptions__initialize( - List_ options) { + bool newlines_in_values) { auto res = std::make_shared(arrow::json::ParseOptions::Defaults()); - res->newlines_in_values = options["newlines_in_values"]; + res->newlines_in_values = newlines_in_values; return res; } diff --git a/r/src/memorypool.cpp b/r/src/memorypool.cpp index 1d475caf235..bc2f576d76e 100644 --- a/r/src/memorypool.cpp +++ b/r/src/memorypool.cpp @@ -22,7 +22,7 @@ // [[arrow::export]] std::shared_ptr MemoryPool__default() { return std::shared_ptr(arrow::default_memory_pool(), - NoDelete()); + [](arrow::MemoryPool* not_deleted) {}); } // [[arrow::export]] diff --git a/r/src/message.cpp b/r/src/message.cpp index 8ec5a3faab0..fd50007d93d 100644 --- a/r/src/message.cpp +++ b/r/src/message.cpp @@ -21,8 +21,6 @@ #include #include -RCPP_EXPOSED_ENUM_NODECL(arrow::ipc::MessageType) - // [[arrow::export]] int64_t ipc___Message__body_length(const std::unique_ptr& message) { return message->body_length(); diff --git a/r/src/parquet.cpp b/r/src/parquet.cpp index 626e58c23af..9a31143602b 100644 --- a/r/src/parquet.cpp +++ b/r/src/parquet.cpp @@ -24,8 +24,6 @@ #include #include -RCPP_EXPOSED_ENUM_NODECL(parquet::ParquetVersion::type) - // [[arrow::export]] std::shared_ptr parquet___arrow___ArrowReaderProperties__Make(bool use_threads) { diff --git a/r/src/recordbatch.cpp b/r/src/recordbatch.cpp index 922bae2217e..21404de2dc7 100644 --- a/r/src/recordbatch.cpp +++ b/r/src/recordbatch.cpp @@ -63,7 +63,7 @@ arrow::ArrayVector RecordBatch__columns( // [[arrow::export]] std::shared_ptr RecordBatch__column( - const std::shared_ptr& batch, int i) { + const std::shared_ptr& batch, arrow::r::Index i) { arrow::r::validate_index(i, batch->num_columns()); return batch->column(i); } @@ -94,24 +94,6 @@ std::shared_ptr RecordBatch__select( return arrow::RecordBatch::Make(schema, nrows, columns); } -// [[arrow::export]] -std::shared_ptr RecordBatch__from_dataframe(Rcpp::DataFrame tbl) { - Rcpp::CharacterVector names = tbl.names(); - - std::vector> fields; - std::vector> arrays; - - for (int i = 0; i < tbl.size(); i++) { - SEXP x = tbl[i]; - arrays.push_back(Array__from_vector(x, R_NilValue)); - fields.push_back( - std::make_shared(std::string(names[i]), arrays[i]->type())); - } - auto schema = std::make_shared(std::move(fields)); - - return arrow::RecordBatch::Make(schema, tbl.nrow(), std::move(arrays)); -} - // [[arrow::export]] bool RecordBatch__Equals(const std::shared_ptr& self, const std::shared_ptr& other, @@ -121,14 +103,14 @@ bool RecordBatch__Equals(const std::shared_ptr& self, // [[arrow::export]] std::shared_ptr RecordBatch__RemoveColumn( - const std::shared_ptr& batch, int i) { + const std::shared_ptr& batch, arrow::r::Index i) { arrow::r::validate_index(i, batch->num_columns()); return ValueOrStop(batch->RemoveColumn(i)); } // [[arrow::export]] std::string RecordBatch__column_name(const std::shared_ptr& batch, - int i) { + arrow::r::Index i) { arrow::r::validate_index(i, batch->num_columns()); return batch->column_name(i); } @@ -146,14 +128,15 @@ Rcpp::CharacterVector RecordBatch__names( // [[arrow::export]] std::shared_ptr RecordBatch__Slice1( - const std::shared_ptr& self, int offset) { + const std::shared_ptr& self, arrow::r::Index offset) { arrow::r::validate_slice_offset(offset, self->num_rows()); return self->Slice(offset); } // [[arrow::export]] std::shared_ptr RecordBatch__Slice2( - const std::shared_ptr& self, int offset, int length) { + const std::shared_ptr& self, arrow::r::Index offset, + arrow::r::Index length) { arrow::r::validate_slice_offset(offset, self->num_rows()); arrow::r::validate_slice_length(length, self->num_rows() - offset); return self->Slice(offset, length); @@ -237,8 +220,8 @@ std::shared_ptr RecordBatch__from_arrays__known_schema( StopIfNotOk(arrow::r::count_fields(lst, &num_fields)); if (schema->num_fields() != num_fields) { - Rcpp::stop("incompatible. schema has %d fields, and %d arrays are supplied", - schema->num_fields(), num_fields); + cpp11::stop("incompatible. schema has %d fields, and %d arrays are supplied", + schema->num_fields(), num_fields); } // convert lst to a vector of arrow::Array @@ -248,8 +231,8 @@ std::shared_ptr RecordBatch__from_arrays__known_schema( auto fill_array = [&arrays, &schema](int j, SEXP x, SEXP name) { name = Rf_mkCharCE(Rf_translateCharUTF8(name), CE_UTF8); if (schema->field(j)->name() != CHAR(name)) { - Rcpp::stop("field at index %d has name '%s' != '%s'", j + 1, - schema->field(j)->name(), CHAR(name)); + cpp11::stop("field at index %d has name '%s' != '%s'", j + 1, + schema->field(j)->name().c_str(), CHAR(name)); } arrays[j] = arrow::r::Array__from_vector(x, schema->field(j)->type(), false); }; diff --git a/r/src/recordbatchreader.cpp b/r/src/recordbatchreader.cpp index 93b54251148..7ecb42002a9 100644 --- a/r/src/recordbatchreader.cpp +++ b/r/src/recordbatchreader.cpp @@ -78,7 +78,7 @@ int ipc___RecordBatchFileReader__num_record_batches( std::shared_ptr ipc___RecordBatchFileReader__ReadRecordBatch( const std::shared_ptr& reader, int i) { if (i < 0 && i >= reader->num_record_batches()) { - Rcpp::stop("Record batch index out of bounds"); + cpp11::stop("Record batch index out of bounds"); } return ValueOrStop(reader->ReadRecordBatch(i)); } diff --git a/r/src/recordbatchwriter.cpp b/r/src/recordbatchwriter.cpp index 9d038dd42ba..865773c01e9 100644 --- a/r/src/recordbatchwriter.cpp +++ b/r/src/recordbatchwriter.cpp @@ -20,8 +20,6 @@ #if defined(ARROW_R_WITH_ARROW) #include -RCPP_EXPOSED_ENUM_NODECL(arrow::ipc::MetadataVersion) - // [[arrow::export]] void ipc___RecordBatchWriter__WriteRecordBatch( const std::shared_ptr& batch_writer, diff --git a/r/src/schema.cpp b/r/src/schema.cpp index 15e7027b815..5cbaf7e0e20 100644 --- a/r/src/schema.cpp +++ b/r/src/schema.cpp @@ -24,8 +24,9 @@ #include // [[arrow::export]] -std::shared_ptr schema_(Rcpp::List fields) { - return arrow::schema(arrow::r::List_to_shared_ptr_vector(fields)); +std::shared_ptr schema_( + const std::vector>& fields) { + return arrow::schema(fields); } // [[arrow::export]] @@ -42,7 +43,7 @@ int Schema__num_fields(const std::shared_ptr& s) { std::shared_ptr Schema__field(const std::shared_ptr& s, int i) { if (i >= s->num_fields() || i < 0) { - Rcpp::stop("Invalid field index for schema."); + cpp11::stop("Invalid field index for schema."); } return s->field(i); @@ -72,47 +73,45 @@ bool Schema__HasMetadata(const std::shared_ptr& schema) { } // [[arrow::export]] -Rcpp::List Schema__metadata(const std::shared_ptr& schema) { +cpp11::writable::list Schema__metadata(const std::shared_ptr& schema) { auto meta = schema->metadata(); int64_t n = 0; if (schema->HasMetadata()) { n = meta->size(); } - Rcpp::List out(n); + cpp11::writable::list out(n); std::vector names_out(n); for (int i = 0; i < n; i++) { auto key = meta->key(i); - out[i] = meta->value(i); + out[i] = cpp11::as_sexp(meta->value(i)); if (key == "r") { - Rf_setAttrib(out[i], R_ClassSymbol, arrow::r::data::classes_metadata_r); + Rf_classgets(out[i], arrow::r::data::classes_metadata_r); } names_out[i] = key; } - out.attr("names") = names_out; + out.names() = names_out; return out; } // [[arrow::export]] std::shared_ptr Schema__WithMetadata( - const std::shared_ptr& schema, Rcpp::CharacterVector metadata) { - auto kv = std::shared_ptr(new arrow::KeyValueMetadata( - metadata.names(), Rcpp::as>(metadata))); - return schema->WithMetadata(kv); + const std::shared_ptr& schema, cpp11::strings metadata) { + auto values = cpp11::as_cpp>(metadata); + auto names = cpp11::as_cpp>(metadata.attr("names")); + + auto kv = + std::make_shared(std::move(names), std::move(values)); + return schema->WithMetadata(std::move(kv)); } // [[arrow::export]] -Rcpp::RawVector Schema__serialize(const std::shared_ptr& schema) { +cpp11::writable::raws Schema__serialize(const std::shared_ptr& schema) { arrow::ipc::DictionaryMemo empty_memo; - std::shared_ptr out = - ValueOrStop(arrow::ipc::SerializeSchema(*schema, &empty_memo)); - + auto out = ValueOrStop(arrow::ipc::SerializeSchema(*schema, &empty_memo)); auto n = out->size(); - Rcpp::RawVector vec(out->size()); - std::copy_n(out->data(), n, vec.begin()); - - return vec; + return cpp11::writable::raws(out->data(), out->data() + n); } // [[arrow::export]] diff --git a/r/src/symbols.cpp b/r/src/symbols.cpp index f087f82ccad..c6becdebdf7 100644 --- a/r/src/symbols.cpp +++ b/r/src/symbols.cpp @@ -37,50 +37,37 @@ SEXP precious(SEXP x) { return x; } -// return R string vector, e.g. -// strings({"foo", "bar"}) returns a size 2 STRSXP -SEXP strings(std::initializer_list list) { - size_t n = list.size(); - SEXP s = PROTECT(Rf_allocVector(STRSXP, n)); - - auto it = list.begin(); - for (size_t i = 0; i < n; i++, ++it) { - SET_STRING_ELT(s, i, Rf_mkCharLen(it->c_str(), it->size())); - } - - UNPROTECT(1); - return s; -} - // returns the namespace environment for package `name` SEXP r_namespace(std::string name) { - SEXP s_name = PROTECT(strings({name})); + SEXP s_name = PROTECT(cpp11::writable::strings({name})); SEXP ns = R_FindNamespace(s_name); UNPROTECT(1); return ns; } -SEXP data::classes_POSIXct = precious(strings({"POSIXct", "POSIXt"})); -SEXP data::classes_metadata_r = precious(strings({"arrow_r_metadata"})); +SEXP data::classes_POSIXct = precious(cpp11::writable::strings({"POSIXct", "POSIXt"})); +SEXP data::classes_metadata_r = precious(cpp11::writable::strings({"arrow_r_metadata"})); SEXP data::classes_vctrs_list_of = - precious(strings({"vctrs_list_of", "vctrs_vctr", "list"})); + precious(cpp11::writable::strings({"vctrs_list_of", "vctrs_vctr", "list"})); +SEXP data::classes_tbl_df = + precious(cpp11::writable::strings({"tbl_df", "tbl", "data.frame"})); SEXP data::classes_arrow_binary = - precious(strings({"arrow_binary", "vctrs_vctr", "list"})); + precious(cpp11::writable::strings({"arrow_binary", "vctrs_vctr", "list"})); SEXP data::classes_arrow_large_binary = - precious(strings({"arrow_large_binary", "vctrs_vctr", "list"})); + precious(cpp11::writable::strings({"arrow_large_binary", "vctrs_vctr", "list"})); SEXP data::classes_arrow_fixed_size_binary = - precious(strings({"arrow_fixed_size_binary", "vctrs_vctr", "list"})); -SEXP data::classes_factor = precious(strings({"factor"})); -SEXP data::classes_ordered = precious(strings({"ordered", "factor"})); + precious(cpp11::writable::strings({"arrow_fixed_size_binary", "vctrs_vctr", "list"})); +SEXP data::classes_factor = precious(cpp11::writable::strings({"factor"})); +SEXP data::classes_ordered = precious(cpp11::writable::strings({"ordered", "factor"})); -SEXP data::classes_arrow_list = - precious(strings({"arrow_list", "vctrs_list_of", "vctrs_vctr", "list"})); -SEXP data::classes_arrow_large_list = - precious(strings({"arrow_large_list", "vctrs_list_of", "vctrs_vctr", "list"})); -SEXP data::classes_arrow_fixed_size_list = - precious(strings({"arrow_fixed_size_list", "vctrs_list_of", "vctrs_vctr", "list"})); +SEXP data::classes_arrow_list = precious( + cpp11::writable::strings({"arrow_list", "vctrs_list_of", "vctrs_vctr", "list"})); +SEXP data::classes_arrow_large_list = precious(cpp11::writable::strings( + {"arrow_large_list", "vctrs_list_of", "vctrs_vctr", "list"})); +SEXP data::classes_arrow_fixed_size_list = precious(cpp11::writable::strings( + {"arrow_fixed_size_list", "vctrs_list_of", "vctrs_vctr", "list"})); -SEXP data::names_metadata = precious(strings({"attributes", "columns"})); +SEXP data::names_metadata = precious(cpp11::writable::strings({"attributes", "columns"})); SEXP data::empty_raw = precious(Rf_allocVector(RAWSXP, 0)); SEXP ns::arrow = precious(r_namespace("arrow")); diff --git a/r/src/table.cpp b/r/src/table.cpp index d9d1efcaa96..4f01091a811 100644 --- a/r/src/table.cpp +++ b/r/src/table.cpp @@ -22,15 +22,6 @@ #include #include -using Rcpp::DataFrame; - -// [[arrow::export]] -std::shared_ptr Table__from_dataframe(DataFrame tbl) { - auto rb = RecordBatch__from_dataframe(tbl); - - return ValueOrStop(arrow::Table::FromRecordBatches({std::move(rb)})); -} - // [[arrow::export]] int Table__num_columns(const std::shared_ptr& x) { return x->num_columns(); @@ -54,14 +45,14 @@ std::shared_ptr Table__ReplaceSchemaMetadata( // [[arrow::export]] std::shared_ptr Table__column( - const std::shared_ptr& table, int i) { + const std::shared_ptr& table, arrow::r::Index i) { arrow::r::validate_index(i, table->num_columns()); return table->column(i); } // [[arrow::export]] std::shared_ptr Table__field(const std::shared_ptr& table, - int i) { + arrow::r::Index i) { arrow::r::validate_index(i, table->num_columns()); return table->field(i); } @@ -84,14 +75,15 @@ std::vector Table__ColumnNames(const std::shared_ptr& // [[arrow::export]] std::shared_ptr Table__Slice1(const std::shared_ptr& table, - int offset) { + arrow::r::Index offset) { arrow::r::validate_slice_offset(offset, table->num_rows()); return table->Slice(offset); } // [[arrow::export]] std::shared_ptr Table__Slice2(const std::shared_ptr& table, - int offset, int length) { + arrow::r::Index offset, + arrow::r::Index length) { arrow::r::validate_slice_offset(offset, table->num_rows()); arrow::r::validate_slice_length(length, table->num_rows() - offset); return table->Slice(offset, length); @@ -139,14 +131,6 @@ std::shared_ptr Table__select(const std::shared_ptr& return arrow::Table::Make(schema, columns); } -bool all_record_batches(SEXP lst) { - R_xlen_t n = XLENGTH(lst); - for (R_xlen_t i = 0; i < n; i++) { - if (!Rf_inherits(VECTOR_ELT(lst, i), "RecordBatch")) return false; - } - return true; -} - namespace arrow { namespace r { @@ -154,7 +138,7 @@ arrow::Status InferSchemaFromDots(SEXP lst, SEXP schema_sxp, int num_fields, std::shared_ptr& schema) { // maybe a schema was given if (Rf_inherits(schema_sxp, "Schema")) { - schema = arrow::r::extract(schema_sxp); + schema = cpp11::as_cpp>(schema_sxp); return arrow::Status::OK(); } @@ -169,10 +153,11 @@ arrow::Status InferSchemaFromDots(SEXP lst, SEXP schema_sxp, int num_fields, // Make sure we're ingesting UTF-8 name = Rf_mkCharCE(Rf_translateCharUTF8(name), CE_UTF8); if (Rf_inherits(x, "ChunkedArray")) { - fields[j] = - arrow::field(CHAR(name), arrow::r::extract(x)->type()); + fields[j] = arrow::field( + CHAR(name), cpp11::as_cpp>(x)->type()); } else if (Rf_inherits(x, "Array")) { - fields[j] = arrow::field(CHAR(name), arrow::r::extract(x)->type()); + fields[j] = arrow::field(CHAR(name), + cpp11::as_cpp>(x)->type()); } else { // TODO: we just need the type at this point fields[j] = arrow::field(CHAR(name), arrow::r::InferArrowType(x)); @@ -326,10 +311,10 @@ arrow::Status CollectTableColumns( std::vector>& columns) { auto extract_one_column = [&columns, &schema, inferred](int j, SEXP x, SEXP name) { if (Rf_inherits(x, "ChunkedArray")) { - columns[j] = arrow::r::extract(x); + columns[j] = cpp11::as_cpp>(x); } else if (Rf_inherits(x, "Array")) { - columns[j] = - std::make_shared(arrow::r::extract(x)); + columns[j] = std::make_shared( + cpp11::as_cpp>(x)); } else { auto array = arrow::r::Array__from_vector(x, schema->field(j)->type(), inferred); columns[j] = std::make_shared(array); @@ -343,23 +328,34 @@ arrow::Status CollectTableColumns( } // namespace arrow // [[arrow::export]] -std::shared_ptr Table__from_dots(SEXP lst, SEXP schema_sxp) { - bool infer_schema = !Rf_inherits(schema_sxp, "Schema"); +bool all_record_batches(SEXP lst) { + R_xlen_t n = XLENGTH(lst); + for (R_xlen_t i = 0; i < n; i++) { + if (!Rf_inherits(VECTOR_ELT(lst, i), "RecordBatch")) return false; + } + return true; +} - if (all_record_batches(lst)) { - auto batches = arrow::r::List_to_shared_ptr_vector(lst); - std::shared_ptr tab; +// [[arrow::export]] +std::shared_ptr Table__from_record_batches( + const std::vector>& batches, SEXP schema_sxp) { + bool infer_schema = !Rf_inherits(schema_sxp, "Schema"); - if (infer_schema) { - tab = ValueOrStop(arrow::Table::FromRecordBatches(std::move(batches))); - } else { - auto schema = arrow::r::extract(schema_sxp); - tab = ValueOrStop(arrow::Table::FromRecordBatches(schema, std::move(batches))); - } + std::shared_ptr tab; - return tab; + if (infer_schema) { + tab = ValueOrStop(arrow::Table::FromRecordBatches(std::move(batches))); + } else { + auto schema = cpp11::as_cpp>(schema_sxp); + tab = ValueOrStop(arrow::Table::FromRecordBatches(schema, std::move(batches))); } + return tab; +} +// [[arrow::export]] +std::shared_ptr Table__from_dots(SEXP lst, SEXP schema_sxp) { + bool infer_schema = !Rf_inherits(schema_sxp, "Schema"); + int num_fields; StopIfNotOk(arrow::r::count_fields(lst, &num_fields)); diff --git a/r/tests/testthat/test-Array-errors.txt b/r/tests/testthat/test-Array-errors.txt index 94a79703de5..7eb4319a62f 100644 --- a/r/tests/testthat/test-Array-errors.txt +++ b/r/tests/testthat/test-Array-errors.txt @@ -1,25 +1,25 @@ > Array$create(list(numeric(0)), list_of(bool())) -Error in Array__from_vector(x, type): Unknown: Cannot convert list element 1 to an Array of type `bool` : Expecting a logical vector +Error: Unknown: Cannot convert list element 1 to an Array of type `bool` : Expecting a logical vector > Array$create(list(numeric(0)), list_of(int32())) -Error in Array__from_vector(x, type): Unknown: Cannot convert list element 1 to an Array of type `int32` : Expecting an integer vector +Error: Unknown: Cannot convert list element 1 to an Array of type `int32` : Expecting an integer vector > Array$create(list(integer(0)), list_of(float64())) -Error in Array__from_vector(x, type): Unknown: Cannot convert list element 1 to an Array of type `double` : Expecting a numeric vector +Error: Unknown: Cannot convert list element 1 to an Array of type `double` : Expecting a numeric vector > lgl <- logical(0) > int <- integer(0) > num <- numeric(0) > char <- character(0) > Array$create(list()) -Error in Array__from_vector(x, type): Requires at least one element to infer the values' type of a list vector +Error: Requires at least one element to infer the values' type of a list vector > Array$create(list(lgl, lgl, int)) -Error in Array__from_vector(x, type): Unknown: Cannot convert list element 3 to an Array of type `bool` : Expecting a logical vector +Error: Unknown: Cannot convert list element 3 to an Array of type `bool` : Expecting a logical vector > Array$create(list(char, num, char)) -Error in Array__from_vector(x, type): Unknown: Cannot convert list element 2 to an Array of type `string` : Expecting a character vector +Error: Unknown: Cannot convert list element 2 to an Array of type `string` : Expecting a character vector > Array$create(list(int, int, num)) -Error in Array__from_vector(x, type): Unknown: Cannot convert list element 3 to an Array of type `int32` : Expecting an integer vector +Error: Unknown: Cannot convert list element 3 to an Array of type `int32` : Expecting an integer vector diff --git a/r/tests/testthat/test-Array.R b/r/tests/testthat/test-Array.R index ce1b5bef176..380426cc5ec 100644 --- a/r/tests/testthat/test-Array.R +++ b/r/tests/testthat/test-Array.R @@ -131,14 +131,14 @@ test_that("Slice() and RangeEquals()", { expect_true(x$RangeEquals(z, 10, 15, 0)) # Input validation - expect_error(x$Slice("ten"), class = "Rcpp::not_compatible") + expect_error(x$Slice("ten")) expect_error(x$Slice(NA_integer_), "Slice 'offset' cannot be NA") expect_error(x$Slice(NA), "Slice 'offset' cannot be NA") - expect_error(x$Slice(10, "ten"), class = "Rcpp::not_compatible") + expect_error(x$Slice(10, "ten")) expect_error(x$Slice(10, NA_integer_), "Slice 'length' cannot be NA") expect_error(x$Slice(NA_integer_, NA_integer_), "Slice 'offset' cannot be NA") - expect_error(x$Slice(c(10, 10)), class = "Rcpp::not_compatible") - expect_error(x$Slice(10, c(10, 10)), class = "Rcpp::not_compatible") + expect_error(x$Slice(c(10, 10))) + expect_error(x$Slice(10, c(10, 10))) expect_error(x$Slice(1000), "Slice 'offset' greater than array length") expect_error(x$Slice(-1), "Slice 'offset' cannot be negative") expect_error(z$Slice(10, 10), "Slice 'offset' greater than array length") @@ -157,7 +157,7 @@ test_that("Slice() and RangeEquals()", { expect_error(x$RangeEquals(y, NA, 24), "'start_idx' cannot be NA") expect_error(x$RangeEquals(y, 10, NA), "'end_idx' cannot be NA") expect_error(x$RangeEquals(y, 10, 24, NA), "'other_start_idx' cannot be NA") - expect_error(x$RangeEquals(y, "ten", 24), class = "Rcpp::not_compatible") + expect_error(x$RangeEquals(y, "ten", 24)) # TODO (if anyone uses RangeEquals) # expect_error(x$RangeEquals(y, 10, 2400, 0)) # does not error # expect_error(x$RangeEquals(y, 1000, 24, 0)) # does not error @@ -186,10 +186,10 @@ test_that("Array supports NA", { expect_equal(as.vector(is.na(x_dbl)), c(rep(FALSE, 10), TRUE)) # Input validation - expect_error(x_int$IsValid("ten"), class = "Rcpp::not_compatible") - expect_error(x_int$IsNull("ten"), class = "Rcpp::not_compatible") - expect_error(x_int$IsValid(c(10, 10)), class = "Rcpp::not_compatible") - expect_error(x_int$IsNull(c(10, 10)), class = "Rcpp::not_compatible") + expect_error(x_int$IsValid("ten")) + expect_error(x_int$IsNull("ten")) + expect_error(x_int$IsValid(c(10, 10))) + expect_error(x_int$IsNull(c(10, 10))) expect_error(x_int$IsValid(NA), "'i' cannot be NA") expect_error(x_int$IsNull(NA), "'i' cannot be NA") expect_error(x_int$IsValid(1000), "subscript out of bounds") diff --git a/r/tests/testthat/test-RecordBatch.R b/r/tests/testthat/test-RecordBatch.R index 3fceb4c5451..1a7f7eecc87 100644 --- a/r/tests/testthat/test-RecordBatch.R +++ b/r/tests/testthat/test-RecordBatch.R @@ -50,8 +50,8 @@ test_that("RecordBatch", { expect_error(batch$column_name(NA), "'i' cannot be NA") expect_error(batch$column_name(-1), "subscript out of bounds") expect_error(batch$column_name(1000), "subscript out of bounds") - expect_error(batch$column_name(1:2), class = "Rcpp::not_compatible") - expect_error(batch$column_name("one"), class = "Rcpp::not_compatible") + expect_error(batch$column_name(1:2)) + expect_error(batch$column_name("one")) col_int <- batch$column(0) expect_true(inherits(col_int, 'Array')) @@ -82,8 +82,8 @@ test_that("RecordBatch", { expect_error(batch$column(NA), "'i' cannot be NA") expect_error(batch$column(-1), "subscript out of bounds") expect_error(batch$column(1000), "subscript out of bounds") - expect_error(batch$column(1:2), class = "Rcpp::not_compatible") - expect_error(batch$column("one"), class = "Rcpp::not_compatible") + expect_error(batch$column(1:2)) + expect_error(batch$column("one")) batch2 <- batch$RemoveColumn(0) expect_equal( @@ -97,8 +97,8 @@ test_that("RecordBatch", { expect_error(batch$RemoveColumn(NA), "'i' cannot be NA") expect_error(batch$RemoveColumn(-1), "subscript out of bounds") expect_error(batch$RemoveColumn(1000), "subscript out of bounds") - expect_error(batch$RemoveColumn(1:2), class = "Rcpp::not_compatible") - expect_error(batch$RemoveColumn("one"), class = "Rcpp::not_compatible") + expect_error(batch$RemoveColumn(1:2)) + expect_error(batch$RemoveColumn("one")) }) test_that("RecordBatch S3 methods", { @@ -117,14 +117,14 @@ test_that("RecordBatch$Slice", { expect_data_frame(batch4, tbl[6:7,]) # Input validation - expect_error(batch$Slice("ten"), class = "Rcpp::not_compatible") + expect_error(batch$Slice("ten")) expect_error(batch$Slice(NA_integer_), "Slice 'offset' cannot be NA") expect_error(batch$Slice(NA), "Slice 'offset' cannot be NA") - expect_error(batch$Slice(10, "ten"), class = "Rcpp::not_compatible") + expect_error(batch$Slice(10, "ten")) expect_error(batch$Slice(10, NA_integer_), "Slice 'length' cannot be NA") expect_error(batch$Slice(NA_integer_, NA_integer_), "Slice 'offset' cannot be NA") - expect_error(batch$Slice(c(10, 10)), class = "Rcpp::not_compatible") - expect_error(batch$Slice(10, c(10, 10)), class = "Rcpp::not_compatible") + expect_error(batch$Slice(c(10, 10))) + expect_error(batch$Slice(10, c(10, 10))) expect_error(batch$Slice(1000), "Slice 'offset' greater than array length") expect_error(batch$Slice(-1), "Slice 'offset' cannot be negative") expect_error(batch4$Slice(10, 10), "Slice 'offset' greater than array length") @@ -155,7 +155,7 @@ test_that("[[ and $ on RecordBatch", { expect_vector(batch[[4]], tbl$chr) expect_null(batch$qwerty) expect_null(batch[["asdf"]]) - expect_error(batch[[c(4, 3)]], class = "Rcpp::not_compatible") + expect_error(batch[[c(4, 3)]]) expect_error(batch[[NA]], "'i' must be character or numeric, not logical") expect_error(batch[[NULL]], "'i' must be character or numeric, not NULL") expect_error(batch[[c("asdf", "jkl;")]], 'name is not a string', fixed = TRUE) diff --git a/r/tests/testthat/test-Table.R b/r/tests/testthat/test-Table.R index b26fd8ca356..bd6206ab197 100644 --- a/r/tests/testthat/test-Table.R +++ b/r/tests/testthat/test-Table.R @@ -80,14 +80,14 @@ test_that("Table $column and $field", { expect_error(tab$column(NA), "'i' cannot be NA") expect_error(tab$column(-1), "subscript out of bounds") expect_error(tab$column(1000), "subscript out of bounds") - expect_error(tab$column(1:2), class = "Rcpp::not_compatible") - expect_error(tab$column("one"), class = "Rcpp::not_compatible") + expect_error(tab$column(1:2)) + expect_error(tab$column("one")) expect_error(tab$field(NA), "'i' cannot be NA") expect_error(tab$field(-1), "subscript out of bounds") expect_error(tab$field(1000), "subscript out of bounds") - expect_error(tab$field(1:2), class = "Rcpp::not_compatible") - expect_error(tab$field("one"), class = "Rcpp::not_compatible") + expect_error(tab$field(1:2)) + expect_error(tab$field("one")) }) test_that("[, [[, $ for Table", { @@ -132,7 +132,7 @@ test_that("[, [[, $ for Table", { expect_data_frame(tab[2:4], tbl[2:4]) expect_data_frame(tab[c(1, 0)], tbl[c(1, 0)]) - expect_error(tab[[c(4, 3)]], class = "Rcpp::not_compatible") + expect_error(tab[[c(4, 3)]]) expect_error(tab[[NA]], "'i' must be character or numeric, not logical") expect_error(tab[[NULL]], "'i' must be character or numeric, not NULL") expect_error(tab[[c("asdf", "jkl;")]], 'length(name) not equal to 1', fixed = TRUE) @@ -153,14 +153,14 @@ test_that("Table$Slice", { expect_data_frame(tab3, tbl[6:7,]) # Input validation - expect_error(tab$Slice("ten"), class = "Rcpp::not_compatible") + expect_error(tab$Slice("ten")) expect_error(tab$Slice(NA_integer_), "Slice 'offset' cannot be NA") expect_error(tab$Slice(NA), "Slice 'offset' cannot be NA") - expect_error(tab$Slice(10, "ten"), class = "Rcpp::not_compatible") + expect_error(tab$Slice(10, "ten")) expect_error(tab$Slice(10, NA_integer_), "Slice 'length' cannot be NA") expect_error(tab$Slice(NA_integer_, NA_integer_), "Slice 'offset' cannot be NA") - expect_error(tab$Slice(c(10, 10)), class = "Rcpp::not_compatible") - expect_error(tab$Slice(10, c(10, 10)), class = "Rcpp::not_compatible") + expect_error(tab$Slice(c(10, 10))) + expect_error(tab$Slice(10, c(10, 10))) expect_error(tab$Slice(1000), "Slice 'offset' greater than array length") expect_error(tab$Slice(-1), "Slice 'offset' cannot be negative") expect_error(tab3$Slice(10, 10), "Slice 'offset' greater than array length") diff --git a/r/tests/testthat/test-chunked-array.R b/r/tests/testthat/test-chunked-array.R index b4695e28eed..e5d3a68e035 100644 --- a/r/tests/testthat/test-chunked-array.R +++ b/r/tests/testthat/test-chunked-array.R @@ -65,18 +65,18 @@ test_that("ChunkedArray", { # input validation expect_error(x$chunk(14), "subscript out of bounds") - expect_error(x$chunk("one"), class = "Rcpp::not_compatible") + expect_error(x$chunk("one")) expect_error(x$chunk(NA_integer_), "'i' cannot be NA") expect_error(x$chunk(-1), "subscript out of bounds") - expect_error(x$Slice("ten"), class = "Rcpp::not_compatible") + expect_error(x$Slice("ten")) expect_error(x$Slice(NA_integer_), "Slice 'offset' cannot be NA") expect_error(x$Slice(NA), "Slice 'offset' cannot be NA") - expect_error(x$Slice(10, "ten"), class = "Rcpp::not_compatible") + expect_error(x$Slice(10, "ten")) expect_error(x$Slice(10, NA_integer_), "Slice 'length' cannot be NA") expect_error(x$Slice(NA_integer_, NA_integer_), "Slice 'offset' cannot be NA") - expect_error(x$Slice(c(10, 10)), class = "Rcpp::not_compatible") - expect_error(x$Slice(10, c(10, 10)), class = "Rcpp::not_compatible") + expect_error(x$Slice(c(10, 10))) + expect_error(x$Slice(10, c(10, 10))) expect_error(x$Slice(1000), "Slice 'offset' greater than array length") expect_error(x$Slice(-1), "Slice 'offset' cannot be negative") expect_error(z$Slice(10, 10), "Slice 'offset' greater than array length") diff --git a/r/tests/testthat/test-data-type.R b/r/tests/testthat/test-data-type.R index b5b652cf289..8ff3fc36713 100644 --- a/r/tests/testthat/test-data-type.R +++ b/r/tests/testthat/test-data-type.R @@ -408,6 +408,6 @@ test_that("FixedSizeBinary", { # input validation expect_error(fixed_size_binary(NA), "'byte_width' cannot be NA") expect_error(fixed_size_binary(-1), "'byte_width' must be > 0") - expect_error(fixed_size_binary("four"), class = "Rcpp::not_compatible") - expect_error(fixed_size_binary(c(2, 4)), class = "Rcpp::not_compatible") + expect_error(fixed_size_binary("four")) + expect_error(fixed_size_binary(c(2, 4))) }) From b4a6192855137a7c0a333b7dcd4c7c6b678d42d5 Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Mon, 3 Aug 2020 10:55:44 +0200 Subject: [PATCH 02/62] dataset.cpp -Rcpp --- r/src/arrowExports.cpp | 4 ++-- r/src/dataset.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/r/src/arrowExports.cpp b/r/src/arrowExports.cpp index 547e0d11669..45c573b977b 100644 --- a/r/src/arrowExports.cpp +++ b/r/src/arrowExports.cpp @@ -1529,12 +1529,12 @@ RcppExport SEXP _arrow_dataset___FileFormat__type_name(SEXP format_sexp){ // dataset.cpp #if defined(ARROW_R_WITH_ARROW) -std::shared_ptr dataset___ParquetFileFormat__Make(bool use_buffered_stream, int64_t buffer_size, Rcpp::CharacterVector dict_columns); +std::shared_ptr dataset___ParquetFileFormat__Make(bool use_buffered_stream, int64_t buffer_size, cpp11::strings dict_columns); extern "C" SEXP _arrow_dataset___ParquetFileFormat__Make(SEXP use_buffered_stream_sexp, SEXP buffer_size_sexp, SEXP dict_columns_sexp){ BEGIN_CPP11 arrow::r::input::type use_buffered_stream(use_buffered_stream_sexp); arrow::r::input::type buffer_size(buffer_size_sexp); - arrow::r::input::type dict_columns(dict_columns_sexp); + arrow::r::input::type dict_columns(dict_columns_sexp); return cpp11::as_sexp(dataset___ParquetFileFormat__Make(use_buffered_stream, buffer_size, dict_columns)); END_CPP11 } diff --git a/r/src/dataset.cpp b/r/src/dataset.cpp index 24ee255f3d4..185946b38e1 100644 --- a/r/src/dataset.cpp +++ b/r/src/dataset.cpp @@ -160,13 +160,13 @@ std::string dataset___FileFormat__type_name( // [[arrow::export]] std::shared_ptr dataset___ParquetFileFormat__Make( - bool use_buffered_stream, int64_t buffer_size, Rcpp::CharacterVector dict_columns) { + bool use_buffered_stream, int64_t buffer_size, cpp11::strings dict_columns) { auto fmt = std::make_shared(); fmt->reader_options.use_buffered_stream = use_buffered_stream; fmt->reader_options.buffer_size = buffer_size; - auto dict_columns_vector = Rcpp::as>(dict_columns); + auto dict_columns_vector = cpp11::as_cpp>(dict_columns); auto& d = fmt->reader_options.dict_columns; std::move(dict_columns_vector.begin(), dict_columns_vector.end(), std::inserter(d, d.end())); From 5da7df7459734ca707672601ce90021a33e1b6db Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Mon, 3 Aug 2020 11:57:42 +0200 Subject: [PATCH 03/62] use RF_type2char instead of Rcpp::type2name --- r/src/array_from_vector.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r/src/array_from_vector.cpp b/r/src/array_from_vector.cpp index c3d26a38fff..e67d8828ab9 100644 --- a/r/src/array_from_vector.cpp +++ b/r/src/array_from_vector.cpp @@ -589,7 +589,7 @@ struct Unbox> { break; } - return Status::Invalid("Cannot convert R vector of type <", Rcpp::type2name(obj), + return Status::Invalid("Cannot convert R vector of type <", Rf_type2char(TYPEOF(obj)), "> to integer Arrow array"); } From 655285a7a5584becf51dfce308bd0f67a8597a3a Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Mon, 3 Aug 2020 11:59:46 +0200 Subject: [PATCH 04/62] -Rcpp --- r/src/symbols.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/r/src/symbols.cpp b/r/src/symbols.cpp index c6becdebdf7..423c9503a4c 100644 --- a/r/src/symbols.cpp +++ b/r/src/symbols.cpp @@ -73,9 +73,10 @@ SEXP data::empty_raw = precious(Rf_allocVector(RAWSXP, 0)); SEXP ns::arrow = precious(r_namespace("arrow")); void inspect(SEXP obj) { - Rcpp::Shield call_inspect(Rf_lang2(symbols::inspect, obj)); - Rcpp::Shield call_internal(Rf_lang2(symbols::dot_Internal, call_inspect)); + SEXP call_inspect = PROTECT(Rf_lang2(symbols::inspect, obj)); + SEXP call_internal = PROTECT(Rf_lang2(symbols::dot_Internal, call_inspect)); Rf_eval(call_internal, R_GlobalEnv); + UNPROTECT(2); } } // namespace r From 14c55bc3572a520bb723a4ceb6963b662c4a9b19 Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Mon, 3 Aug 2020 12:00:06 +0200 Subject: [PATCH 05/62] table.cpp -Rcpp --- r/src/arrowExports.cpp | 8 ++++---- r/src/table.cpp | 9 +++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/r/src/arrowExports.cpp b/r/src/arrowExports.cpp index 45c573b977b..af17e692382 100644 --- a/r/src/arrowExports.cpp +++ b/r/src/arrowExports.cpp @@ -5661,11 +5661,11 @@ RcppExport SEXP _arrow_Table__schema(SEXP x_sexp){ // table.cpp #if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Table__ReplaceSchemaMetadata(const std::shared_ptr& x, Rcpp::CharacterVector metadata); +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); - arrow::r::input::type metadata(metadata_sexp); + arrow::r::input::type metadata(metadata_sexp); return cpp11::as_sexp(Table__ReplaceSchemaMetadata(x, metadata)); END_CPP11 } @@ -5835,11 +5835,11 @@ RcppExport SEXP _arrow_Table__GetColumnByName(SEXP table_sexp, SEXP name_sexp){ // table.cpp #if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Table__select(const std::shared_ptr& table, const Rcpp::IntegerVector& indices); +std::shared_ptr Table__select(const std::shared_ptr& table, cpp11::integers indices); extern "C" SEXP _arrow_Table__select(SEXP table_sexp, SEXP indices_sexp){ BEGIN_CPP11 arrow::r::input&>::type table(table_sexp); - arrow::r::input::type indices(indices_sexp); + arrow::r::input::type indices(indices_sexp); return cpp11::as_sexp(Table__select(table, indices)); END_CPP11 } diff --git a/r/src/table.cpp b/r/src/table.cpp index 4f01091a811..d83cf829c3f 100644 --- a/r/src/table.cpp +++ b/r/src/table.cpp @@ -37,9 +37,10 @@ std::shared_ptr Table__schema(const std::shared_ptr // [[arrow::export]] std::shared_ptr Table__ReplaceSchemaMetadata( - const std::shared_ptr& x, Rcpp::CharacterVector metadata) { - auto kv = std::shared_ptr(new arrow::KeyValueMetadata( - metadata.names(), Rcpp::as>(metadata))); + const std::shared_ptr& x, cpp11::strings metadata) { + auto vec_metadata = cpp11::as_cpp>(metadata); + auto names_metadata = cpp11::as_cpp>(metadata.names()); + auto kv = std::shared_ptr(new arrow::KeyValueMetadata(names_metadata, vec_metadata)); return x->ReplaceSchemaMetadata(kv); } @@ -115,7 +116,7 @@ std::shared_ptr Table__GetColumnByName( // [[arrow::export]] std::shared_ptr Table__select(const std::shared_ptr& table, - const Rcpp::IntegerVector& indices) { + cpp11::integers indices) { R_xlen_t n = indices.size(); std::vector> fields(n); From 0c6acbaa2847ebf764a6126f027b4362e20a9ea8 Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Mon, 3 Aug 2020 12:07:55 +0200 Subject: [PATCH 06/62] parquet.cpp -Rcpp --- r/src/arrowExports.cpp | 16 ++++++++-------- r/src/parquet.cpp | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/r/src/arrowExports.cpp b/r/src/arrowExports.cpp index af17e692382..a699e45d011 100644 --- a/r/src/arrowExports.cpp +++ b/r/src/arrowExports.cpp @@ -4420,12 +4420,12 @@ RcppExport SEXP _arrow_parquet___WriterProperties___Builder__version(SEXP builde // parquet.cpp #if defined(ARROW_R_WITH_ARROW) -void parquet___ArrowWriterProperties___Builder__set_compressions(const std::shared_ptr& builder, const std::vector& paths, const Rcpp::IntegerVector& types); +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); arrow::r::input&>::type paths(paths_sexp); - arrow::r::input::type types(types_sexp); + arrow::r::input::type types(types_sexp); parquet___ArrowWriterProperties___Builder__set_compressions(builder, paths, types); return R_NilValue; END_CPP11 @@ -4438,12 +4438,12 @@ RcppExport SEXP _arrow_parquet___ArrowWriterProperties___Builder__set_compressio // parquet.cpp #if defined(ARROW_R_WITH_ARROW) -void parquet___ArrowWriterProperties___Builder__set_compression_levels(const std::shared_ptr& builder, const std::vector& paths, const Rcpp::IntegerVector& levels); +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); arrow::r::input&>::type paths(paths_sexp); - arrow::r::input::type levels(levels_sexp); + arrow::r::input::type levels(levels_sexp); parquet___ArrowWriterProperties___Builder__set_compression_levels(builder, paths, levels); return R_NilValue; END_CPP11 @@ -4456,12 +4456,12 @@ RcppExport SEXP _arrow_parquet___ArrowWriterProperties___Builder__set_compressio // parquet.cpp #if defined(ARROW_R_WITH_ARROW) -void parquet___ArrowWriterProperties___Builder__set_use_dictionary(const std::shared_ptr& builder, const std::vector& paths, const Rcpp::LogicalVector& use_dictionary); +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); arrow::r::input&>::type paths(paths_sexp); - arrow::r::input::type use_dictionary(use_dictionary_sexp); + arrow::r::input::type use_dictionary(use_dictionary_sexp); parquet___ArrowWriterProperties___Builder__set_use_dictionary(builder, paths, use_dictionary); return R_NilValue; END_CPP11 @@ -4474,12 +4474,12 @@ RcppExport SEXP _arrow_parquet___ArrowWriterProperties___Builder__set_use_dictio // parquet.cpp #if defined(ARROW_R_WITH_ARROW) -void parquet___ArrowWriterProperties___Builder__set_write_statistics(const std::shared_ptr& builder, const std::vector& paths, const Rcpp::LogicalVector& write_statistics); +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); arrow::r::input&>::type paths(paths_sexp); - arrow::r::input::type write_statistics(write_statistics_sexp); + arrow::r::input::type write_statistics(write_statistics_sexp); parquet___ArrowWriterProperties___Builder__set_write_statistics(builder, paths, write_statistics); return R_NilValue; END_CPP11 diff --git a/r/src/parquet.cpp b/r/src/parquet.cpp index 9a31143602b..40d0d1d67cd 100644 --- a/r/src/parquet.cpp +++ b/r/src/parquet.cpp @@ -140,7 +140,7 @@ void parquet___WriterProperties___Builder__version( // [[arrow::export]] void parquet___ArrowWriterProperties___Builder__set_compressions( const std::shared_ptr& builder, - const std::vector& paths, const Rcpp::IntegerVector& types) { + const std::vector& paths, cpp11::integers types) { auto n = types.size(); if (n == 1) { builder->compression(static_cast(types[0])); @@ -154,7 +154,7 @@ void parquet___ArrowWriterProperties___Builder__set_compressions( // [[arrow::export]] void parquet___ArrowWriterProperties___Builder__set_compression_levels( const std::shared_ptr& builder, - const std::vector& paths, const Rcpp::IntegerVector& levels) { + const std::vector& paths, cpp11::integers levels) { auto n = levels.size(); if (n == 1) { builder->compression_level(levels[0]); @@ -168,10 +168,10 @@ void parquet___ArrowWriterProperties___Builder__set_compression_levels( // [[arrow::export]] void parquet___ArrowWriterProperties___Builder__set_use_dictionary( const std::shared_ptr& builder, - const std::vector& paths, const Rcpp::LogicalVector& use_dictionary) { + const std::vector& paths, cpp11::logicals use_dictionary) { auto n = use_dictionary.size(); if (n == 1) { - if (use_dictionary[0]) { + if (use_dictionary[0] == TRUE) { builder->enable_dictionary(); } else { builder->disable_dictionary(); @@ -179,7 +179,7 @@ void parquet___ArrowWriterProperties___Builder__set_use_dictionary( } else { builder->disable_dictionary(); for (decltype(n) i = 0; i < n; i++) { - if (use_dictionary[i]) { + if (use_dictionary[i] == TRUE) { builder->enable_dictionary(paths[i]); } else { builder->disable_dictionary(paths[i]); @@ -191,10 +191,10 @@ void parquet___ArrowWriterProperties___Builder__set_use_dictionary( // [[arrow::export]] void parquet___ArrowWriterProperties___Builder__set_write_statistics( const std::shared_ptr& builder, - const std::vector& paths, const Rcpp::LogicalVector& write_statistics) { + const std::vector& paths, cpp11::logicals write_statistics) { auto n = write_statistics.size(); if (n == 1) { - if (write_statistics[0]) { + if (write_statistics[0] == TRUE) { builder->enable_statistics(); } else { builder->disable_statistics(); @@ -202,7 +202,7 @@ void parquet___ArrowWriterProperties___Builder__set_write_statistics( } else { builder->disable_statistics(); for (decltype(n) i = 0; i < n; i++) { - if (write_statistics[i]) { + if (write_statistics[i] == TRUE) { builder->enable_statistics(paths[i]); } else { builder->disable_statistics(paths[i]); From 811be4c1bc74f1aefc873816cd0febec5729c686 Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Mon, 3 Aug 2020 12:16:30 +0200 Subject: [PATCH 07/62] array.cpp buffer.cpp -Rcpp --- r/src/array.cpp | 8 ++++---- r/src/arrowExports.cpp | 6 +++--- r/src/buffer.cpp | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/r/src/array.cpp b/r/src/array.cpp index ca004da9767..d63be8f40c0 100644 --- a/r/src/array.cpp +++ b/r/src/array.cpp @@ -244,17 +244,17 @@ int64_t FixedSizeListArray__value_offset( } // [[arrow::export]] -Rcpp::IntegerVector ListArray__raw_value_offsets( +cpp11::writable::integers ListArray__raw_value_offsets( const std::shared_ptr& array) { auto offsets = array->raw_value_offsets(); - return Rcpp::IntegerVector(offsets, offsets + array->length()); + return cpp11::writable::integers(offsets, offsets + array->length()); } // [[arrow::export]] -Rcpp::IntegerVector LargeListArray__raw_value_offsets( +cpp11::writable::integers LargeListArray__raw_value_offsets( const std::shared_ptr& array) { auto offsets = array->raw_value_offsets(); - return Rcpp::IntegerVector(offsets, offsets + array->length()); + return cpp11::writable::integers(offsets, offsets + array->length()); } #endif diff --git a/r/src/arrowExports.cpp b/r/src/arrowExports.cpp index a699e45d011..039380e61a4 100644 --- a/r/src/arrowExports.cpp +++ b/r/src/arrowExports.cpp @@ -493,7 +493,7 @@ RcppExport SEXP _arrow_FixedSizeListArray__value_offset(SEXP array_sexp, SEXP i_ // array.cpp #if defined(ARROW_R_WITH_ARROW) -Rcpp::IntegerVector ListArray__raw_value_offsets(const std::shared_ptr& array); +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); @@ -508,7 +508,7 @@ RcppExport SEXP _arrow_ListArray__raw_value_offsets(SEXP array_sexp){ // array.cpp #if defined(ARROW_R_WITH_ARROW) -Rcpp::IntegerVector LargeListArray__raw_value_offsets(const std::shared_ptr& array); +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); @@ -800,7 +800,7 @@ RcppExport SEXP _arrow_r___RBuffer__initialize(SEXP x_sexp){ // buffer.cpp #if defined(ARROW_R_WITH_ARROW) -Rcpp::RawVector Buffer__data(const std::shared_ptr& buffer); +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); diff --git a/r/src/buffer.cpp b/r/src/buffer.cpp index 600f55f5dda..daa67b9fe9d 100644 --- a/r/src/buffer.cpp +++ b/r/src/buffer.cpp @@ -57,8 +57,8 @@ std::shared_ptr r___RBuffer__initialize(SEXP x) { } // [[arrow::export]] -Rcpp::RawVector Buffer__data(const std::shared_ptr& buffer) { - return Rcpp::RawVector(buffer->data(), buffer->data() + buffer->size()); +cpp11::writable::raws Buffer__data(const std::shared_ptr& buffer) { + return cpp11::writable::raws(buffer->data(), buffer->data() + buffer->size()); } // [[arrow::export]] From 1aacf0f70c362b535ae7784199bf67f16814b832 Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Mon, 3 Aug 2020 13:04:35 +0200 Subject: [PATCH 08/62] move test helper function to helper file --- r/tests/testthat/helper-roundtrip.R | 43 +++++++++++++++++++++++++++++ r/tests/testthat/test-Array.R | 27 ------------------ 2 files changed, 43 insertions(+), 27 deletions(-) create mode 100644 r/tests/testthat/helper-roundtrip.R diff --git a/r/tests/testthat/helper-roundtrip.R b/r/tests/testthat/helper-roundtrip.R new file mode 100644 index 00000000000..16d002c9f2a --- /dev/null +++ b/r/tests/testthat/helper-roundtrip.R @@ -0,0 +1,43 @@ +# 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. + +expect_array_roundtrip <- function(x, type, as = NULL) { + a <- Array$create(x, type = as) + expect_type_equal(a$type, type) + expect_identical(length(a), length(x)) + if (!inherits(type, c("ListType", "LargeListType"))) { + # TODO: revisit how missingness works with ListArrays + # R list objects don't handle missingness the same way as other vectors. + # Is there some vctrs thing we should do on the roundtrip back to R? + expect_equal(as.vector(is.na(a)), is.na(x)) + } + expect_equivalent(as.vector(a), x) + # Make sure the storage mode is the same on roundtrip (esp. integer vs. numeric) + expect_identical(typeof(as.vector(a)), typeof(x)) + + if (length(x)) { + a_sliced <- a$Slice(1) + x_sliced <- x[-1] + expect_type_equal(a_sliced$type, type) + expect_identical(length(a_sliced), length(x_sliced)) + if (!inherits(type, c("ListType", "LargeListType"))) { + expect_equal(as.vector(is.na(a_sliced)), is.na(x_sliced)) + } + expect_equivalent(as.vector(a_sliced), x_sliced) + } + invisible(a) +} diff --git a/r/tests/testthat/test-Array.R b/r/tests/testthat/test-Array.R index 380426cc5ec..d8f0b955c89 100644 --- a/r/tests/testthat/test-Array.R +++ b/r/tests/testthat/test-Array.R @@ -17,33 +17,6 @@ context("Array") -expect_array_roundtrip <- function(x, type, as = NULL) { - a <- Array$create(x, type = as) - expect_type_equal(a$type, type) - expect_identical(length(a), length(x)) - if (!inherits(type, c("ListType", "LargeListType"))) { - # TODO: revisit how missingness works with ListArrays - # R list objects don't handle missingness the same way as other vectors. - # Is there some vctrs thing we should do on the roundtrip back to R? - expect_equal(as.vector(is.na(a)), is.na(x)) - } - expect_equivalent(as.vector(a), x) - # Make sure the storage mode is the same on roundtrip (esp. integer vs. numeric) - expect_identical(typeof(as.vector(a)), typeof(x)) - - if (length(x)) { - a_sliced <- a$Slice(1) - x_sliced <- x[-1] - expect_type_equal(a_sliced$type, type) - expect_identical(length(a_sliced), length(x_sliced)) - if (!inherits(type, c("ListType", "LargeListType"))) { - expect_equal(as.vector(is.na(a_sliced)), is.na(x_sliced)) - } - expect_equivalent(as.vector(a_sliced), x_sliced) - } - invisible(a) -} - test_that("Integer Array", { ints <- c(1:10, 1:10, 1:5) x <- expect_array_roundtrip(ints, int32()) From c840073f4b82baca72167a23f23bc79a600cf685 Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Mon, 3 Aug 2020 13:05:02 +0200 Subject: [PATCH 09/62] skip for now --- r/tests/testthat/test-buffer.R | 1 + 1 file changed, 1 insertion(+) diff --git a/r/tests/testthat/test-buffer.R b/r/tests/testthat/test-buffer.R index c19f61196ee..ab96c59db73 100644 --- a/r/tests/testthat/test-buffer.R +++ b/r/tests/testthat/test-buffer.R @@ -39,6 +39,7 @@ test_that("Buffer can be created from numeric vector", { }) test_that("Buffer can be created from complex vector", { + skip("until cpp11 has a complex vector class") vec <- complex(3) buf <- buffer(vec) expect_is(buf, "Buffer") From da9f05cbc3126d87fec2a933486c59958d969178 Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Mon, 3 Aug 2020 14:15:55 +0200 Subject: [PATCH 10/62] Rework Buffer without Rcpp --- r/R/parquet.R | 3 ++- r/src/array_from_vector.cpp | 16 ++++++++-------- r/src/arrowExports.cpp | 12 ++++++------ r/src/arrow_types.h | 29 ++++++++++++++++++++++++----- r/src/buffer.cpp | 11 ++++++----- r/src/recordbatch.cpp | 18 ++++++++++-------- 6 files changed, 56 insertions(+), 33 deletions(-) diff --git a/r/R/parquet.R b/r/R/parquet.R index b44cf189805..15e23014455 100644 --- a/r/R/parquet.R +++ b/r/R/parquet.R @@ -268,7 +268,8 @@ ParquetWriterPropertiesBuilder <- R6Class("ParquetWriterPropertiesBuilder", inhe ) }, set_compression_level = function(table, compression_level){ - assert_that(is_integerish(compression_level)) + # cast to integer but keep names + compression_level <- set_names(as.integer(compression_level), names(compression_level)) private$.set(table, compression_level, parquet___ArrowWriterProperties___Builder__set_compression_levels ) diff --git a/r/src/array_from_vector.cpp b/r/src/array_from_vector.cpp index e67d8828ab9..cd26505fc69 100644 --- a/r/src/array_from_vector.cpp +++ b/r/src/array_from_vector.cpp @@ -1363,15 +1363,15 @@ bool can_reuse_memory(SEXP x, const std::shared_ptr& type) { // this is only used on some special cases when the arrow Array can just use the memory of // the R object, via an RBuffer, hence be zero copy -template +template std::shared_ptr MakeSimpleArray(SEXP x) { using value_type = typename arrow::TypeTraits::ArrayType::value_type; - Rcpp::Vector vec(x); + RVector vec(x); auto n = vec.size(); - auto p_vec_start = reinterpret_cast(vec.begin()); + auto p_vec_start = reinterpret_cast(arrow::r::vector_begin(vec)); auto p_vec_end = p_vec_start + n; std::vector> buffers{nullptr, - std::make_shared>(vec)}; + std::make_shared>(vec)}; int null_count = 0; @@ -1413,13 +1413,13 @@ std::shared_ptr Array__from_vector_reuse_memory(SEXP x) { auto type = TYPEOF(x); if (type == INTSXP) { - return MakeSimpleArray(x); + return MakeSimpleArray(x); } else if (type == REALSXP && Rf_inherits(x, "integer64")) { - return MakeSimpleArray(x); + return MakeSimpleArray(x); } else if (type == REALSXP) { - return MakeSimpleArray(x); + return MakeSimpleArray(x); } else if (type == RAWSXP) { - return MakeSimpleArray(x); + return MakeSimpleArray(x); } Rcpp::stop("Unreachable: you might need to fix can_reuse_memory()"); diff --git a/r/src/arrowExports.cpp b/r/src/arrowExports.cpp index 039380e61a4..f800f920f8a 100644 --- a/r/src/arrowExports.cpp +++ b/r/src/arrowExports.cpp @@ -4817,11 +4817,11 @@ RcppExport SEXP _arrow_RecordBatch__schema(SEXP x_sexp){ // recordbatch.cpp #if defined(ARROW_R_WITH_ARROW) -std::shared_ptr RecordBatch__ReplaceSchemaMetadata(const std::shared_ptr& x, Rcpp::CharacterVector metadata); +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); - arrow::r::input::type metadata(metadata_sexp); + arrow::r::input::type metadata(metadata_sexp); return cpp11::as_sexp(RecordBatch__ReplaceSchemaMetadata(x, metadata)); END_CPP11 } @@ -4880,11 +4880,11 @@ RcppExport SEXP _arrow_RecordBatch__GetColumnByName(SEXP batch_sexp, SEXP name_s // recordbatch.cpp #if defined(ARROW_R_WITH_ARROW) -std::shared_ptr RecordBatch__select(const std::shared_ptr& batch, const Rcpp::IntegerVector& indices); +std::shared_ptr RecordBatch__select(const std::shared_ptr& batch, cpp11::integers indices); extern "C" SEXP _arrow_RecordBatch__select(SEXP batch_sexp, SEXP indices_sexp){ BEGIN_CPP11 arrow::r::input&>::type batch(batch_sexp); - arrow::r::input::type indices(indices_sexp); + arrow::r::input::type indices(indices_sexp); return cpp11::as_sexp(RecordBatch__select(batch, indices)); END_CPP11 } @@ -4945,7 +4945,7 @@ RcppExport SEXP _arrow_RecordBatch__column_name(SEXP batch_sexp, SEXP i_sexp){ // recordbatch.cpp #if defined(ARROW_R_WITH_ARROW) -Rcpp::CharacterVector RecordBatch__names(const std::shared_ptr& batch); +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); @@ -4993,7 +4993,7 @@ RcppExport SEXP _arrow_RecordBatch__Slice2(SEXP self_sexp, SEXP offset_sexp, SEX // recordbatch.cpp #if defined(ARROW_R_WITH_ARROW) -Rcpp::RawVector ipc___SerializeRecordBatch__Raw(const std::shared_ptr& batch); +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); diff --git a/r/src/arrow_types.h b/r/src/arrow_types.h index 5112ac3c1a3..6aac1764efd 100644 --- a/r/src/arrow_types.h +++ b/r/src/arrow_types.h @@ -80,17 +80,35 @@ void inspect(SEXP obj); // the integer64 sentinel constexpr int64_t NA_INT64 = std::numeric_limits::min(); -template > +template +typename RVector::value_type* vector_begin(const RVector& vec) ; + +template <> +inline uint8_t* vector_begin(const cpp11::raws& vec) { + return RAW(vec); +} + +template <> +inline int* vector_begin(const cpp11::integers& vec) { + return INTEGER(vec); +} + +template <> +inline double* vector_begin(const cpp11::doubles& vec) { + return REAL(vec); +} + +template class RBuffer : public MutableBuffer { public: - explicit RBuffer(Vec vec) - : MutableBuffer(reinterpret_cast(vec.begin()), - vec.size() * sizeof(typename Vec::stored_type)), + explicit RBuffer(RVector vec) + : MutableBuffer(reinterpret_cast(arrow::r::vector_begin(vec)), + vec.size() * sizeof(typename RVector::value_type)), vec_(vec) {} private: // vec_ holds the memory - Vec vec_; + RVector vec_; }; std::shared_ptr InferArrowTypeFromFactor(SEXP); @@ -127,6 +145,7 @@ arrow::Status InferSchemaFromDots(SEXP lst, SEXP schema_sxp, int num_fields, arrow::Status AddMetadataFromDots(SEXP lst, int num_fields, std::shared_ptr& schema); + } // namespace r } // namespace arrow diff --git a/r/src/buffer.cpp b/r/src/buffer.cpp index daa67b9fe9d..31345e94994 100644 --- a/r/src/buffer.cpp +++ b/r/src/buffer.cpp @@ -43,13 +43,14 @@ int64_t Buffer__size(const std::shared_ptr& buffer) { std::shared_ptr r___RBuffer__initialize(SEXP x) { switch (TYPEOF(x)) { case RAWSXP: - return std::make_shared>(x); + return std::make_shared>(x); case REALSXP: - return std::make_shared>(x); + return std::make_shared>(x); case INTSXP: - return std::make_shared>(x); - case CPLXSXP: - return std::make_shared>(x); + return std::make_shared>(x); + // until cpp11 has a CPLXSXP vector + // case CPLXSXP: + // return std::make_shared>(x); default: cpp11::stop("R object of type <%s> not supported", Rf_type2char(TYPEOF(x))); } diff --git a/r/src/recordbatch.cpp b/r/src/recordbatch.cpp index 21404de2dc7..bdba77da9c9 100644 --- a/r/src/recordbatch.cpp +++ b/r/src/recordbatch.cpp @@ -44,9 +44,11 @@ std::shared_ptr RecordBatch__schema( // [[arrow::export]] std::shared_ptr RecordBatch__ReplaceSchemaMetadata( - const std::shared_ptr& x, Rcpp::CharacterVector metadata) { + const std::shared_ptr& x, cpp11::strings metadata) { + auto vec_metadata = cpp11::as_cpp>(metadata); + auto names_metadata = cpp11::as_cpp>(metadata.names()); auto kv = std::shared_ptr(new arrow::KeyValueMetadata( - metadata.names(), Rcpp::as>(metadata))); + names_metadata, vec_metadata)); return x->ReplaceSchemaMetadata(kv); } @@ -77,7 +79,7 @@ std::shared_ptr RecordBatch__GetColumnByName( // [[arrow::export]] std::shared_ptr RecordBatch__select( const std::shared_ptr& batch, - const Rcpp::IntegerVector& indices) { + cpp11::integers indices) { R_xlen_t n = indices.size(); auto nrows = batch->num_rows(); @@ -116,10 +118,10 @@ std::string RecordBatch__column_name(const std::shared_ptr& } // [[arrow::export]] -Rcpp::CharacterVector RecordBatch__names( +cpp11::writable::strings RecordBatch__names( const std::shared_ptr& batch) { int n = batch->num_columns(); - Rcpp::CharacterVector names(n); + cpp11::writable::strings names(n); for (int i = 0; i < n; i++) { names[i] = batch->column_name(i); } @@ -143,17 +145,17 @@ std::shared_ptr RecordBatch__Slice2( } // [[arrow::export]] -Rcpp::RawVector ipc___SerializeRecordBatch__Raw( +cpp11::raws ipc___SerializeRecordBatch__Raw( const std::shared_ptr& batch) { // how many bytes do we need ? int64_t size; StopIfNotOk(arrow::ipc::GetRecordBatchSize(*batch, &size)); // allocate the result raw vector - Rcpp::RawVector out(Rcpp::no_init(size)); + cpp11::writable::raws out(size); // serialize into the bytes of the raw vector - auto buffer = std::make_shared>(out); + auto buffer = std::make_shared>(out); arrow::io::FixedSizeBufferWriter stream(buffer); StopIfNotOk(arrow::ipc::SerializeRecordBatch( *batch, arrow::ipc::IpcWriteOptions::Defaults(), &stream)); From 3aec7301a0ff3b8f373f0f87cd06bbe21f4d6a09 Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Mon, 3 Aug 2020 15:07:08 +0200 Subject: [PATCH 11/62] use cpp11::stop() --- r/src/array_from_vector.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r/src/array_from_vector.cpp b/r/src/array_from_vector.cpp index cd26505fc69..c53030a4e75 100644 --- a/r/src/array_from_vector.cpp +++ b/r/src/array_from_vector.cpp @@ -1422,7 +1422,7 @@ std::shared_ptr Array__from_vector_reuse_memory(SEXP x) { return MakeSimpleArray(x); } - Rcpp::stop("Unreachable: you might need to fix can_reuse_memory()"); + cpp11::stop("Unreachable: you might need to fix can_reuse_memory()"); } bool CheckCompatibleFactor(SEXP obj, const std::shared_ptr& type) { From e58330839e055305c1f3bc7998ce7c4eaf630d82 Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Mon, 3 Aug 2020 15:28:39 +0200 Subject: [PATCH 12/62] remove some Rcpp uses --- r/src/array_to_vector.cpp | 41 ++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/r/src/array_to_vector.cpp b/r/src/array_to_vector.cpp index 5aef11f450f..15bc08f1e5a 100644 --- a/r/src/array_to_vector.cpp +++ b/r/src/array_to_vector.cpp @@ -161,8 +161,9 @@ Status IngestSome(const std::shared_ptr& array, R_xlen_t n, Lambda SEXP ArrayVector__as_vector(R_xlen_t n, const std::shared_ptr& type, const ArrayVector& arrays) { auto converter = Converter::Make(type, arrays); - Rcpp::Shield data(converter->Allocate(n)); + SEXP data = PROTECT(converter->Allocate(n)); StopIfNotOk(converter->IngestSerial(data)); + UNPROTECT(1); return data; } @@ -194,7 +195,7 @@ class Converter_Date32 : public Converter_SimpleArray { : Converter_SimpleArray(arrays) {} SEXP Allocate(R_xlen_t n) const { - Rcpp::NumericVector data(Rcpp::no_init(n)); + cpp11::writable::doubles data(n); data.attr("class") = "Date"; return data; } @@ -440,7 +441,7 @@ class Converter_Dictionary : public Converter { } SEXP Allocate(R_xlen_t n) const { - Rcpp::IntegerVector data(Rcpp::no_init(n)); + cpp11::writable::integers data(n); data.attr("levels") = GetLevels(); if (GetOrdered()) { Rf_classgets(data, arrow::r::data::classes_ordered); @@ -605,7 +606,7 @@ class Converter_Date64 : public Converter { explicit Converter_Date64(const ArrayVector& arrays) : Converter(arrays) {} SEXP Allocate(R_xlen_t n) const { - Rcpp::NumericVector data(Rcpp::no_init(n)); + cpp11::writable::doubles data(n); Rf_classgets(data, arrow::r::data::classes_POSIXct); return data; } @@ -657,10 +658,11 @@ class Converter_Time : public Converter { explicit Converter_Time(const ArrayVector& arrays) : Converter(arrays) {} SEXP Allocate(R_xlen_t n) const { - Rcpp::NumericVector data(Rcpp::no_init(n)); - data.attr("class") = Rcpp::CharacterVector::create("hms", "difftime"); + cpp11::writable::doubles data(n); + data.attr("class") = cpp11::writable::strings({"hms", "difftime"}); + // hms difftime is always stored as "seconds" - data.attr("units") = Rcpp::CharacterVector::create("secs"); + data.attr("units") = cpp11::writable::strings({"secs"}); return data; } @@ -703,7 +705,7 @@ class Converter_Timestamp : public Converter_Time { : Converter_Time(arrays) {} SEXP Allocate(R_xlen_t n) const { - Rcpp::NumericVector data(Rcpp::no_init(n)); + cpp11::writable::doubles data(n); Rf_classgets(data, arrow::r::data::classes_POSIXct); auto array = checked_cast(this->arrays_[0].get()); auto array_type = checked_cast(array->type().get()); @@ -854,7 +856,7 @@ class Converter_Int64 : public Converter { explicit Converter_Int64(const ArrayVector& arrays) : Converter(arrays) {} SEXP Allocate(R_xlen_t n) const { - Rcpp::NumericVector data(Rcpp::no_init(n)); + cpp11::writable::doubles data(n); data.attr("class") = "integer64"; return data; } @@ -893,7 +895,10 @@ class Converter_Null : public Converter { explicit Converter_Null(const ArrayVector& arrays) : Converter(arrays) {} SEXP Allocate(R_xlen_t n) const { - Rcpp::LogicalVector data(n, NA_LOGICAL); + cpp11::writable::logicals data(n); + for (R_xlen_t i = 0; i < n; i++) { + data[i] = NA_LOGICAL; + } data.attr("class") = "vctrs_unspecified"; return data; } @@ -1070,7 +1075,7 @@ std::shared_ptr Converter::Make(const std::shared_ptr& type } cpp11::writable::list to_dataframe_serial( - int64_t nr, int64_t nc, const Rcpp::CharacterVector& names, + int64_t nr, int64_t nc, const cpp11::writable::strings& names, const std::vector>& converters) { cpp11::writable::list tbl(nc); for (int i = 0; i < nc; i++) { @@ -1084,7 +1089,7 @@ cpp11::writable::list to_dataframe_serial( } cpp11::writable::list to_dataframe_parallel( - int64_t nr, int64_t nc, const Rcpp::CharacterVector& names, + int64_t nr, int64_t nc, const cpp11::writable::strings& names, const std::vector>& converters) { cpp11::writable::list tbl(nc); @@ -1144,12 +1149,12 @@ cpp11::writable::list RecordBatch__to_dataframe( const std::shared_ptr& batch, bool use_threads) { int64_t nc = batch->num_columns(); int64_t nr = batch->num_rows(); - Rcpp::CharacterVector names(nc); + cpp11::writable::strings names(nc); std::vector arrays(nc); std::vector> converters(nc); - for (int64_t i = 0; i < nc; i++) { - names[i] = Rcpp::String(batch->column_name(i), CE_UTF8); + for (R_xlen_t i = 0; i < nc; i++) { + names[i] = batch->column_name(i); arrays[i] = {batch->column(i)}; converters[i] = arrow::r::Converter::Make(batch->column(i)->type(), arrays[i]); } @@ -1166,13 +1171,13 @@ cpp11::writable::list Table__to_dataframe(const std::shared_ptr& t bool use_threads) { int64_t nc = table->num_columns(); int64_t nr = table->num_rows(); - Rcpp::CharacterVector names(nc); + cpp11::writable::strings names(nc); std::vector> converters(nc); - for (int64_t i = 0; i < nc; i++) { + for (R_xlen_t i = 0; i < nc; i++) { converters[i] = arrow::r::Converter::Make(table->column(i)->type(), table->column(i)->chunks()); - names[i] = Rcpp::String(table->field(i)->name(), CE_UTF8); + names[i] = table->field(i)->name(); } if (use_threads) { From 97f524f6d4628fe3d978fc48f4e2ef4f523bfcb5 Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Tue, 4 Aug 2020 15:22:39 +0200 Subject: [PATCH 13/62] rather mention c++ than Rcpp --- r/README.md | 2 +- r/vignettes/install.Rmd | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/r/README.md b/r/README.md index 1d560195676..fcaf01ed526 100644 --- a/r/README.md +++ b/r/README.md @@ -149,7 +149,7 @@ For any other build/configuration challenges, see the [C++ developer guide](https://arrow.apache.org/docs/developers/cpp/building.html) and `vignette("install", package = "arrow")`. -### Editing Rcpp code +### Editing C++ code The `arrow` package uses some customized tools on top of `Rcpp` to prepare its C++ code in `src/`. If you change C++ code in the R package, diff --git a/r/vignettes/install.Rmd b/r/vignettes/install.Rmd index 1415a2d3f10..77729388f21 100644 --- a/r/vignettes/install.Rmd +++ b/r/vignettes/install.Rmd @@ -303,8 +303,8 @@ By default, these are all unset. All boolean variables are case-insensitive. `NOT_CRAN=true` as part of their workflow, without requiring additional environment variables to be set. * `ARROW_R_DEV`: If set to `true`, more verbose messaging will be printed - in the build script. This variable also is needed if you're modifying `Rcpp` - code in the package: see "Editing Rcpp code" in the README. + in the build script. This variable also is needed if you're modifying C++ + code in the package: see "Editing C++ code" in the README. * `LIBARROW_DEBUG_DIR`: If the C++ library building from source fails (`cmake`), there may be messages telling you to check some log file in the build directory. However, when the library is built during R package installation, From e228053c010b632048bee074b3dbc8a6cf4a6024 Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Tue, 4 Aug 2020 15:23:16 +0200 Subject: [PATCH 14/62] Rework array_to_vector so that it does not use Rcpp --- r/R/arrow-package.R | 1 - r/R/schema.R | 1 - r/README.md | 4 +- r/data-raw/codegen.R | 9 +- r/src/array_from_vector.cpp | 1 + r/src/array_to_vector.cpp | 357 +++++++++-------- r/src/arrowExports.cpp | 757 ++++++++++++++++++------------------ r/src/arrow_rcpp.h | 4 - r/src/arrow_types.h | 34 +- 9 files changed, 606 insertions(+), 562 deletions(-) diff --git a/r/R/arrow-package.R b/r/R/arrow-package.R index 45715a0ed12..5ab67937f32 100644 --- a/r/R/arrow-package.R +++ b/r/R/arrow-package.R @@ -19,7 +19,6 @@ #' @importFrom purrr as_mapper map map2 map_chr map_dfr map_int map_lgl #' @importFrom assertthat assert_that is.string #' @importFrom rlang list2 %||% is_false abort dots_n warn enquo quo_is_null enquos is_integerish quos eval_tidy new_data_mask syms env env_bind as_label set_names -#' @importFrom Rcpp sourceCpp #' @importFrom tidyselect vars_select #' @useDynLib arrow, .registration = TRUE #' @keywords internal diff --git a/r/R/schema.R b/r/R/schema.R index ddbf30fe93b..218bee66f19 100644 --- a/r/R/schema.R +++ b/r/R/schema.R @@ -85,7 +85,6 @@ Schema <- R6Class("Schema", active = list( names = function() { out <- Schema__field_names(self) - # Hack: Rcpp should set the encoding Encoding(out) <- "UTF-8" out }, diff --git a/r/README.md b/r/README.md index fcaf01ed526..28cbeda6fbc 100644 --- a/r/README.md +++ b/r/README.md @@ -107,7 +107,7 @@ Note that after any change to the C++ library, you must reinstall it and run `make clean` or `git clean -fdx .` to remove any cached object code in the `r/src/` directory before reinstalling the R package. This is only necessary if you make changes to the C++ library source; you do not -need to manually purge object files if you are only editing R or Rcpp +need to manually purge object files if you are only editing R or C++ code inside `r/`. Once you’ve built the C++ library, you can install the R package and its @@ -120,7 +120,7 @@ R -e 'install.packages(c("devtools", "roxygen2", "pkgdown", "covr")); devtools:: R CMD INSTALL . ``` -If you need to set any compilation flags while building the Rcpp +If you need to set any compilation flags while building the C++ extensions, you can use the `ARROW_R_CXXFLAGS` environment variable. For example, if you are using `perf` to profile the R extensions, you may need to set diff --git a/r/data-raw/codegen.R b/r/data-raw/codegen.R index 0b2379ce627..a5c1e31af19 100644 --- a/r/data-raw/codegen.R +++ b/r/data-raw/codegen.R @@ -18,10 +18,10 @@ # This file is used to generate code in the files # src/arrowExports.cpp and R/arrowExports.R # -# This is similar to what Rcpp::compileAttributes() would do, +# This is similar to what compileAttributes() would do, # with some arrow specific changes. # -# Functions are decorated with [[arrow::export]] instead of [[Rcpp::export]] +# Functions are decorated with [[arrow::export]] # and the generated code adds a layer of protection so that # the arrow package can be installed even when libarrow is not # @@ -84,7 +84,7 @@ cpp_functions_definitions <- arrow_exports %>% END_CPP11 }} #else - RcppExport SEXP _arrow_{name}({sexp_params}){{ + extern "C" SEXP _arrow_{name}({sexp_params}){{ \tRf_error("Cannot call {name}(). Please use arrow::install_arrow() to install required runtime libraries. "); }} #endif @@ -112,7 +112,6 @@ writeLines(con = "src/arrowExports.cpp", glue::glue(' #include #include "./arrow_exports.h" -#include {cpp_functions_definitions} @@ -143,7 +142,7 @@ static const R_CallMethodDef CallEntries[] = {{ \t\t{{NULL, NULL, 0}} }}; -RcppExport void R_init_arrow(DllInfo* dll){{ +extern "C" void R_init_arrow(DllInfo* dll){{ R_registerRoutines(dll, NULL, CallEntries, NULL, NULL); R_useDynamicSymbols(dll, FALSE); }} diff --git a/r/src/array_from_vector.cpp b/r/src/array_from_vector.cpp index c53030a4e75..b191601993a 100644 --- a/r/src/array_from_vector.cpp +++ b/r/src/array_from_vector.cpp @@ -1423,6 +1423,7 @@ std::shared_ptr Array__from_vector_reuse_memory(SEXP x) { } cpp11::stop("Unreachable: you might need to fix can_reuse_memory()"); + return nullptr; } bool CheckCompatibleFactor(SEXP obj, const std::shared_ptr& type) { diff --git a/r/src/array_to_vector.cpp b/r/src/array_to_vector.cpp index 15bc08f1e5a..ba44248eb7b 100644 --- a/r/src/array_to_vector.cpp +++ b/r/src/array_to_vector.cpp @@ -85,7 +85,7 @@ class Converter { // // for each array, add a task to the task group // - // The task group is Finish() iun the caller + // The task group is Finish() in the caller void IngestParallel(SEXP data, const std::shared_ptr& tg) { R_xlen_t k = 0, i = 0; for (const auto& array : arrays_) { @@ -104,59 +104,42 @@ class Converter { ArrayVector arrays_; }; -// data[start:(start+n)] = NA -template -Status AllNull_Ingest(SEXP data, R_xlen_t start, R_xlen_t n) { - auto p_data = Rcpp::internal::r_vector_start(data) + start; - std::fill_n(p_data, n, arrow::r::default_value()); +template +Status Ingest_OnlyNulls(cpp11::r_vector vec, R_xlen_t start, R_xlen_t n) { + auto p_data = arrow::r::vector_begin(vec) + start; + std::fill_n(p_data, n, arrow::r::na()); return Status::OK(); } -// ingest the data from `array` into a slice of `data` -// -// each element goes through `lambda` when some conversion is needed -template -Status SomeNull_Ingest(SEXP data, R_xlen_t start, R_xlen_t n, - const array_value_type* p_values, - const std::shared_ptr& array, Lambda lambda) { - if (!p_values) { - return Status::Invalid("Invalid data buffer"); - } - auto p_data = Rcpp::internal::r_vector_start(data) + start; - - if (array->null_count()) { - arrow::internal::BitmapReader bitmap_reader(array->null_bitmap()->data(), - array->offset(), n); - for (R_xlen_t i = 0; i < n; i++, bitmap_reader.Next(), ++p_data, ++p_values) { - *p_data = - bitmap_reader.IsSet() ? lambda(*p_values) : arrow::r::default_value(); - } - } else { - std::transform(p_values, p_values + n, p_data, lambda); - } - - return Status::OK(); -} - -template -Status IngestSome(const std::shared_ptr& array, R_xlen_t n, Lambda lambda) { +template +Status IngestSome(const std::shared_ptr& array, R_xlen_t n, SetNonNull&& set_non_null, SetNull&& set_null) { if (array->null_count()) { internal::BitmapReader bitmap_reader(array->null_bitmap()->data(), array->offset(), n); for (R_xlen_t i = 0; i < n; i++, bitmap_reader.Next()) { - if (bitmap_reader.IsSet()) RETURN_NOT_OK(lambda(i)); + if (bitmap_reader.IsSet()) { + RETURN_NOT_OK(set_non_null(i)); + } else { + RETURN_NOT_OK(set_null(i)); + } } } else { for (R_xlen_t i = 0; i < n; i++) { - RETURN_NOT_OK(lambda(i)); + RETURN_NOT_OK(set_non_null(i)); } } return Status::OK(); } +template +Status IngestSome(const std::shared_ptr& array, R_xlen_t n, SetNonNull&& set_non_null) { + auto nothing = [](R_xlen_t i){ return Status::OK();}; + return IngestSome(array, n, std::forward(set_non_null), nothing); +} + // Allocate + Ingest SEXP ArrayVector__as_vector(R_xlen_t n, const std::shared_ptr& type, const ArrayVector& arrays) { @@ -167,44 +150,113 @@ SEXP ArrayVector__as_vector(R_xlen_t n, const std::shared_ptr& type, return data; } -template -class Converter_SimpleArray : public Converter { - using Vector = Rcpp::Vector; - using value_type = typename Vector::stored_type; +template +class Converter_Int : public Converter { + using value_type = typename TypeTraits::ArrayType::value_type; + +public: + explicit Converter_Int(const ArrayVector& arrays) : Converter(arrays) {} - public: - explicit Converter_SimpleArray(const ArrayVector& arrays) : Converter(arrays) {} + SEXP Allocate(R_xlen_t n) const { + return Rf_allocVector(INTSXP, n); + } + + Status Ingest_all_nulls(SEXP data, R_xlen_t start, R_xlen_t n) const { + std::fill_n(INTEGER(data) + start, n, NA_INTEGER); + return Status::OK(); + } + + Status Ingest_some_nulls(SEXP data, const std::shared_ptr& array, + R_xlen_t start, R_xlen_t n, size_t chunk_index) const { + auto p_values = array->data()->GetValues(1); + if (!p_values) { + return Status::Invalid("Invalid data buffer"); + } + auto p_data = INTEGER(data) + start; + auto ingest_one = [&](R_xlen_t i) { + p_data[i] = static_cast(p_values[i]); + return Status::OK(); + }; + auto null_one = [&](R_xlen_t i) { + p_data[i] = NA_INTEGER; + return Status::OK(); + }; - SEXP Allocate(R_xlen_t n) const { return Vector(Rcpp::no_init(n)); } + return IngestSome(array, n, ingest_one, null_one); + } +}; + +template +class Converter_Double : public Converter { + using value_type = typename TypeTraits::ArrayType::value_type; + +public: + explicit Converter_Double(const ArrayVector& arrays) : Converter(arrays) {} + + SEXP Allocate(R_xlen_t n) const { + return Rf_allocVector(REALSXP, n); + } Status Ingest_all_nulls(SEXP data, R_xlen_t start, R_xlen_t n) const { - return AllNull_Ingest(data, start, n); + std::fill_n(REAL(data) + start, n, NA_REAL); + return Status::OK(); } Status Ingest_some_nulls(SEXP data, const std::shared_ptr& array, R_xlen_t start, R_xlen_t n, size_t chunk_index) const { auto p_values = array->data()->GetValues(1); - auto echo = [](value_type value) { return value; }; - return SomeNull_Ingest(data, start, n, p_values, array, echo); + if (!p_values) { + return Status::Invalid("Invalid data buffer"); + } + auto p_data = REAL(data) + start; + auto ingest_one = [&](R_xlen_t i) { + p_data[i] = static_cast(p_values[i]); + return Status::OK(); + }; + auto null_one = [&](R_xlen_t i) { + p_data[i] = NA_REAL; + return Status::OK(); + }; + + return IngestSome(array, n, ingest_one, null_one); } }; -class Converter_Date32 : public Converter_SimpleArray { +class Converter_Date32 : public Converter { public: explicit Converter_Date32(const ArrayVector& arrays) - : Converter_SimpleArray(arrays) {} + : Converter(arrays) {} SEXP Allocate(R_xlen_t n) const { - cpp11::writable::doubles data(n); - data.attr("class") = "Date"; + SEXP data = PROTECT(Rf_allocVector(REALSXP, n)); + Rf_classgets(data, Rf_mkString("Date")); + UNPROTECT(1); return data; } + Status Ingest_all_nulls(SEXP data, R_xlen_t start, R_xlen_t n) const { + std::fill_n(REAL(data) + start, n, NA_REAL); + return Status::OK(); + } + Status Ingest_some_nulls(SEXP data, const std::shared_ptr& array, R_xlen_t start, R_xlen_t n, size_t chunk_index) const { - auto convert = [](int days) { return static_cast(days); }; - return SomeNull_Ingest(data, start, n, array->data()->GetValues(1), - array, convert); + + auto p_values = array->data()->GetValues(1); + if (!p_values) { + return Status::Invalid("Invalid data buffer"); + } + auto p_data = REAL(data) + start; + auto ingest_one = [&](R_xlen_t i) { + p_data[i] = static_cast(p_values[i]); + return Status::OK(); + }; + auto null_one = [&](R_xlen_t i) { + p_data[i] = NA_REAL; + return Status::OK(); + }; + + return IngestSome(array, n, ingest_one, null_one); } }; @@ -216,7 +268,10 @@ struct Converter_String : public Converter { SEXP Allocate(R_xlen_t n) const { return Rf_allocVector(STRSXP, n); } Status Ingest_all_nulls(SEXP data, R_xlen_t start, R_xlen_t n) const { - return AllNull_Ingest(data, start, n); + for (R_xlen_t i = 0; i < n; i++) { + SET_STRING_ELT(data, i + start, NA_STRING); + } + return Status::OK(); } Status Ingest_some_nulls(SEXP data, const std::shared_ptr& array, @@ -250,7 +305,7 @@ struct Converter_String : public Converter { array->offset(), n); for (int i = 0; i < n; i++, null_reader.Next()) { if (null_reader.IsSet()) { - SET_STRING_ELT(data, start + i, r_string(string_array->GetString(i))); + SET_STRING_ELT(data, start + i, cpp11::r_string(string_array->GetString(i))); } else { SET_STRING_ELT(data, start + i, NA_STRING); } @@ -258,7 +313,7 @@ struct Converter_String : public Converter { } else { for (int i = 0; i < n; i++) { - SET_STRING_ELT(data, start + i, r_string(string_array->GetString(i))); + SET_STRING_ELT(data, start + i, cpp11::r_string(string_array->GetString(i))); } } @@ -266,10 +321,6 @@ struct Converter_String : public Converter { } bool Parallel() const { return false; } - - inline SEXP r_string(const arrow::util::string_view& view) const { - return Rf_mkCharLenCE(view.data(), view.size(), CE_UTF8); - } }; class Converter_Boolean : public Converter { @@ -279,32 +330,32 @@ class Converter_Boolean : public Converter { SEXP Allocate(R_xlen_t n) const { return Rf_allocVector(LGLSXP, n); } Status Ingest_all_nulls(SEXP data, R_xlen_t start, R_xlen_t n) const { - return AllNull_Ingest(data, start, n); + std::fill_n(LOGICAL(data) + start, n, NA_LOGICAL); + return Status::OK(); } Status Ingest_some_nulls(SEXP data, const std::shared_ptr& array, R_xlen_t start, R_xlen_t n, size_t chunk_index) const { - auto p_data = Rcpp::internal::r_vector_start(data) + start; + auto p_data = LOGICAL(data) + start; auto p_bools = array->data()->GetValues(1, 0); if (!p_bools) { return Status::Invalid("Invalid data buffer"); } arrow::internal::BitmapReader data_reader(p_bools, array->offset(), n); - if (array->null_count()) { - arrow::internal::BitmapReader null_reader(array->null_bitmap()->data(), - array->offset(), n); + auto ingest_one = [&](R_xlen_t i) { + p_data[i] = data_reader.IsSet(); + data_reader.Next(); + return Status::OK(); + }; - for (R_xlen_t i = 0; i < n; i++, data_reader.Next(), null_reader.Next(), ++p_data) { - *p_data = null_reader.IsSet() ? data_reader.IsSet() : NA_LOGICAL; - } - } else { - for (R_xlen_t i = 0; i < n; i++, data_reader.Next(), ++p_data) { - *p_data = data_reader.IsSet(); - } - } + auto null_one = [&](R_xlen_t i) { + data_reader.Next(); + p_data[i] = NA_LOGICAL; + return Status::OK(); + }; - return Status::OK(); + return IngestSome(array, n, ingest_one, null_one); } }; @@ -342,7 +393,7 @@ class Converter_Binary : public Converter { SEXP raw = PROTECT(Rf_allocVector(RAWSXP, ni)); std::copy(value, value + ni, RAW(raw)); - SET_VECTOR_ELT(data, i, raw); + SET_VECTOR_ELT(data, i + start, raw); UNPROTECT(1); return Status::OK(); @@ -380,7 +431,7 @@ class Converter_FixedSizeBinary : public Converter { SEXP raw = PROTECT(Rf_allocVector(RAWSXP, byte_width)); std::copy(value, value + byte_width, RAW(raw)); - SET_VECTOR_ELT(data, i, raw); + SET_VECTOR_ELT(data, i + start, raw); UNPROTECT(1); return Status::OK(); @@ -452,7 +503,8 @@ class Converter_Dictionary : public Converter { } Status Ingest_all_nulls(SEXP data, R_xlen_t start, R_xlen_t n) const { - return AllNull_Ingest(data, start, n); + std::fill_n(INTEGER(data) + start, n, NA_INTEGER); + return Status::OK(); } Status Ingest_some_nulls(SEXP data, const std::shared_ptr& array, @@ -490,20 +542,31 @@ class Converter_Dictionary : public Converter { auto indices = checked_cast(*array).indices(); auto raw_indices = indices->data()->GetValues(1); + auto p_data = INTEGER(data) + start; + auto null_one = [&](R_xlen_t i) { + p_data[i] = NA_INTEGER; + return Status::OK(); + }; + // convert the 0-based indices from the arrow Array // to 1-based indices used in R factors if (need_unification_) { // transpose the indices before converting auto transposed = reinterpret_cast(arrays_transpose_[chunk_index]->data()); - auto transpose_convert = [=](index_type i) { return transposed[i] + 1; }; - return SomeNull_Ingest(data, start, n, raw_indices, indices, - transpose_convert); - } else { - auto convert = [](index_type i) { return static_cast(i) + 1; }; + auto ingest_one = [&](R_xlen_t i) { + p_data[i] = transposed[raw_indices[i]] + 1; + return Status::OK(); + }; - return SomeNull_Ingest(data, start, n, raw_indices, indices, convert); + return IngestSome(array, n, ingest_one, null_one); + } else { + auto ingest_one = [&](R_xlen_t i) { + p_data[i] = static_cast(raw_indices[i]) + 1; + return Status::OK(); + }; + return IngestSome(array, n, ingest_one, null_one); } } @@ -612,43 +675,23 @@ class Converter_Date64 : public Converter { } Status Ingest_all_nulls(SEXP data, R_xlen_t start, R_xlen_t n) const { - return AllNull_Ingest(data, start, n); - } - - Status Ingest_some_nulls(SEXP data, const std::shared_ptr& array, - R_xlen_t start, R_xlen_t n, size_t chunk_index) const { - auto convert = [](int64_t ms) { return static_cast(ms / 1000); }; - return SomeNull_Ingest( - data, start, n, array->data()->GetValues(1), array, convert); - } -}; - -template -class Converter_Promotion : public Converter { - using r_stored_type = typename Rcpp::Vector::stored_type; - using value_type = typename TypeTraits::ArrayType::value_type; - - public: - explicit Converter_Promotion(const ArrayVector& arrays) : Converter(arrays) {} - - SEXP Allocate(R_xlen_t n) const { - return Rcpp::Vector(Rcpp::no_init(n)); - } - - Status Ingest_all_nulls(SEXP data, R_xlen_t start, R_xlen_t n) const { - return AllNull_Ingest(data, start, n); + std::fill_n(REAL(data) + start, n, NA_REAL); + return Status::OK(); } Status Ingest_some_nulls(SEXP data, const std::shared_ptr& array, R_xlen_t start, R_xlen_t n, size_t chunk_index) const { - auto convert = [](value_type value) { return static_cast(value); }; - return SomeNull_Ingest( - data, start, n, array->data()->GetValues(1), array, convert); - } - - private: - static r_stored_type value_convert(value_type value) { - return static_cast(value); + auto p_data = REAL(data) + start; + auto p_values = array->data()->GetValues(1); + auto ingest_one = [&](R_xlen_t i) { + p_data[i] = static_cast(p_values[i] / 1000); + return Status::OK(); + }; + auto null_one = [&](R_xlen_t i) { + p_data[i] = NA_REAL; + return Status::OK(); + }; + return IngestSome(array, n, ingest_one, null_one); } }; @@ -667,17 +710,26 @@ class Converter_Time : public Converter { } Status Ingest_all_nulls(SEXP data, R_xlen_t start, R_xlen_t n) const { - return AllNull_Ingest(data, start, n); + std::fill_n(REAL(data) + start, n, NA_REAL); + return Status::OK(); } Status Ingest_some_nulls(SEXP data, const std::shared_ptr& array, R_xlen_t start, R_xlen_t n, size_t chunk_index) const { int multiplier = TimeUnit_multiplier(array); - auto convert = [=](value_type value) { - return static_cast(value) / multiplier; + + auto p_data = REAL(data) + start; + auto p_values = array->data()->GetValues(1); + auto ingest_one = [&](R_xlen_t i) { + p_data[i] = static_cast(p_values[i]) / multiplier; + return Status::OK(); }; - return SomeNull_Ingest( - data, start, n, array->data()->GetValues(1), array, convert); + auto null_one = [&](R_xlen_t i) { + p_data[i] = NA_REAL; + return Status::OK(); + }; + return IngestSome(array, n, ingest_one, null_one); + } private: @@ -724,29 +776,25 @@ class Converter_Decimal : public Converter { SEXP Allocate(R_xlen_t n) const { return Rf_allocVector(REALSXP, n); } Status Ingest_all_nulls(SEXP data, R_xlen_t start, R_xlen_t n) const { - return AllNull_Ingest(data, start, n); + std::fill_n(REAL(data) + start, n, NA_REAL); + return Status::OK(); } Status Ingest_some_nulls(SEXP data, const std::shared_ptr& array, R_xlen_t start, R_xlen_t n, size_t chunk_index) const { - auto p_data = Rcpp::internal::r_vector_start(data) + start; + auto p_data = REAL(data) + start; const auto& decimals_arr = checked_cast(*array); - if (array->null_count()) { - internal::BitmapReader bitmap_reader(array->null_bitmap()->data(), array->offset(), - n); - - for (R_xlen_t i = 0; i < n; i++, bitmap_reader.Next(), ++p_data) { - *p_data = bitmap_reader.IsSet() ? std::stod(decimals_arr.FormatValue(i).c_str()) - : NA_REAL; - } - } else { - for (R_xlen_t i = 0; i < n; i++, ++p_data) { - *p_data = std::stod(decimals_arr.FormatValue(i).c_str()); - } - } + auto ingest_one = [&](R_xlen_t i) { + p_data[i] = std::stod(decimals_arr.FormatValue(i).c_str()); + return Status::OK(); + }; + auto null_one = [&](R_xlen_t i) { + p_data[i] = NA_REAL; + return Status::OK(); + }; - return Status::OK(); + return IngestSome(array, n, ingest_one, null_one); } }; @@ -895,11 +943,10 @@ class Converter_Null : public Converter { explicit Converter_Null(const ArrayVector& arrays) : Converter(arrays) {} SEXP Allocate(R_xlen_t n) const { - cpp11::writable::logicals data(n); - for (R_xlen_t i = 0; i < n; i++) { - data[i] = NA_LOGICAL; - } - data.attr("class") = "vctrs_unspecified"; + SEXP data = PROTECT(Rf_allocVector(LGLSXP, n)); + std::fill_n(LOGICAL(data), n, NA_LOGICAL); + Rf_classgets(data, Rf_mkString("vctrs_unspecified")); + UNPROTECT(1); return data; } @@ -935,10 +982,10 @@ std::shared_ptr Converter::Make(const std::shared_ptr& type switch (type->id()) { // direct support case Type::INT32: - return std::make_shared>(std::move(arrays)); + return std::make_shared>(std::move(arrays)); case Type::DOUBLE: - return std::make_shared>( + return std::make_shared>( std::move(arrays)); // need to handle 1-bit case @@ -978,47 +1025,47 @@ std::shared_ptr Converter::Make(const std::shared_ptr& type // promotions to integer vector case Type::INT8: - return std::make_shared>( + return std::make_shared>( std::move(arrays)); case Type::UINT8: - return std::make_shared>( + return std::make_shared>( std::move(arrays)); case Type::INT16: - return std::make_shared>( + return std::make_shared>( std::move(arrays)); case Type::UINT16: - return std::make_shared>( + return std::make_shared>( std::move(arrays)); // promotions to numeric vector, if they don't fit into int32 case Type::UINT32: if (ArraysCanFitInteger(arrays)) { - return std::make_shared>( + return std::make_shared>( std::move(arrays)); } else { return std::make_shared< - arrow::r::Converter_Promotion>(std::move(arrays)); + arrow::r::Converter_Double>(std::move(arrays)); } case Type::UINT64: if (ArraysCanFitInteger(arrays)) { - return std::make_shared>( + return std::make_shared>( std::move(arrays)); } else { return std::make_shared< - arrow::r::Converter_Promotion>(std::move(arrays)); + arrow::r::Converter_Double>(std::move(arrays)); } case Type::HALF_FLOAT: return std::make_shared< - arrow::r::Converter_Promotion>( + arrow::r::Converter_Double>( std::move(arrays)); case Type::FLOAT: - return std::make_shared>( + return std::make_shared>( std::move(arrays)); // time32 and time64 @@ -1034,7 +1081,7 @@ std::shared_ptr Converter::Make(const std::shared_ptr& type case Type::INT64: // Prefer integer if it fits if (ArraysCanFitInteger(arrays)) { - return std::make_shared>( + return std::make_shared>( std::move(arrays)); } else { return std::make_shared(std::move(arrays)); diff --git a/r/src/arrowExports.cpp b/r/src/arrowExports.cpp index f800f920f8a..9c8debe7b49 100644 --- a/r/src/arrowExports.cpp +++ b/r/src/arrowExports.cpp @@ -3,7 +3,6 @@ #include #include "./arrow_exports.h" -#include // array.cpp #if defined(ARROW_R_WITH_ARROW) @@ -16,7 +15,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Array__Slice1(SEXP array_sexp, SEXP offset_sexp){ +extern "C" SEXP _arrow_Array__Slice1(SEXP array_sexp, SEXP offset_sexp){ Rf_error("Cannot call Array__Slice1(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -33,7 +32,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Array__Slice2(SEXP array_sexp, SEXP offset_sexp, SEXP length_sexp){ +extern "C" SEXP _arrow_Array__Slice2(SEXP array_sexp, SEXP offset_sexp, SEXP length_sexp){ Rf_error("Cannot call Array__Slice2(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -49,7 +48,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Array__IsNull(SEXP x_sexp, SEXP i_sexp){ +extern "C" SEXP _arrow_Array__IsNull(SEXP x_sexp, SEXP i_sexp){ Rf_error("Cannot call Array__IsNull(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -65,7 +64,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Array__IsValid(SEXP x_sexp, SEXP i_sexp){ +extern "C" SEXP _arrow_Array__IsValid(SEXP x_sexp, SEXP i_sexp){ Rf_error("Cannot call Array__IsValid(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -80,7 +79,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Array__length(SEXP x_sexp){ +extern "C" SEXP _arrow_Array__length(SEXP x_sexp){ Rf_error("Cannot call Array__length(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -95,7 +94,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Array__offset(SEXP x_sexp){ +extern "C" SEXP _arrow_Array__offset(SEXP x_sexp){ Rf_error("Cannot call Array__offset(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -110,7 +109,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Array__null_count(SEXP x_sexp){ +extern "C" SEXP _arrow_Array__null_count(SEXP x_sexp){ Rf_error("Cannot call Array__null_count(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -125,7 +124,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Array__type(SEXP x_sexp){ +extern "C" SEXP _arrow_Array__type(SEXP x_sexp){ Rf_error("Cannot call Array__type(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -140,7 +139,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Array__ToString(SEXP x_sexp){ +extern "C" SEXP _arrow_Array__ToString(SEXP x_sexp){ Rf_error("Cannot call Array__ToString(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -155,7 +154,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Array__type_id(SEXP x_sexp){ +extern "C" SEXP _arrow_Array__type_id(SEXP x_sexp){ Rf_error("Cannot call Array__type_id(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -171,7 +170,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Array__Equals(SEXP lhs_sexp, SEXP rhs_sexp){ +extern "C" SEXP _arrow_Array__Equals(SEXP lhs_sexp, SEXP rhs_sexp){ Rf_error("Cannot call Array__Equals(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -187,7 +186,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Array__ApproxEquals(SEXP lhs_sexp, SEXP rhs_sexp){ +extern "C" SEXP _arrow_Array__ApproxEquals(SEXP lhs_sexp, SEXP rhs_sexp){ Rf_error("Cannot call Array__ApproxEquals(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -202,7 +201,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Array__data(SEXP array_sexp){ +extern "C" SEXP _arrow_Array__data(SEXP array_sexp){ Rf_error("Cannot call Array__data(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -221,7 +220,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Array__RangeEquals(SEXP self_sexp, SEXP other_sexp, SEXP start_idx_sexp, SEXP end_idx_sexp, SEXP other_start_idx_sexp){ +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(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -237,7 +236,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Array__View(SEXP array_sexp, SEXP type_sexp){ +extern "C" SEXP _arrow_Array__View(SEXP array_sexp, SEXP type_sexp){ Rf_error("Cannot call Array__View(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -253,7 +252,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Array__Validate(SEXP array_sexp){ +extern "C" SEXP _arrow_Array__Validate(SEXP array_sexp){ Rf_error("Cannot call Array__Validate(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -268,7 +267,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_DictionaryArray__indices(SEXP array_sexp){ +extern "C" SEXP _arrow_DictionaryArray__indices(SEXP array_sexp){ Rf_error("Cannot call DictionaryArray__indices(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -283,7 +282,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_DictionaryArray__dictionary(SEXP array_sexp){ +extern "C" SEXP _arrow_DictionaryArray__dictionary(SEXP array_sexp){ Rf_error("Cannot call DictionaryArray__dictionary(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -299,7 +298,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_StructArray__field(SEXP array_sexp, SEXP i_sexp){ +extern "C" SEXP _arrow_StructArray__field(SEXP array_sexp, SEXP i_sexp){ Rf_error("Cannot call StructArray__field(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -315,7 +314,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_StructArray__GetFieldByName(SEXP array_sexp, SEXP name_sexp){ +extern "C" SEXP _arrow_StructArray__GetFieldByName(SEXP array_sexp, SEXP name_sexp){ Rf_error("Cannot call StructArray__GetFieldByName(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -330,7 +329,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_StructArray__Flatten(SEXP array_sexp){ +extern "C" SEXP _arrow_StructArray__Flatten(SEXP array_sexp){ Rf_error("Cannot call StructArray__Flatten(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -345,7 +344,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ListArray__value_type(SEXP array_sexp){ +extern "C" SEXP _arrow_ListArray__value_type(SEXP array_sexp){ Rf_error("Cannot call ListArray__value_type(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -360,7 +359,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_LargeListArray__value_type(SEXP array_sexp){ +extern "C" SEXP _arrow_LargeListArray__value_type(SEXP array_sexp){ Rf_error("Cannot call LargeListArray__value_type(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -375,7 +374,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ListArray__values(SEXP array_sexp){ +extern "C" SEXP _arrow_ListArray__values(SEXP array_sexp){ Rf_error("Cannot call ListArray__values(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -390,7 +389,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_LargeListArray__values(SEXP array_sexp){ +extern "C" SEXP _arrow_LargeListArray__values(SEXP array_sexp){ Rf_error("Cannot call LargeListArray__values(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -406,7 +405,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ListArray__value_length(SEXP array_sexp, SEXP i_sexp){ +extern "C" SEXP _arrow_ListArray__value_length(SEXP array_sexp, SEXP i_sexp){ Rf_error("Cannot call ListArray__value_length(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -422,7 +421,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_LargeListArray__value_length(SEXP array_sexp, SEXP i_sexp){ +extern "C" SEXP _arrow_LargeListArray__value_length(SEXP array_sexp, SEXP i_sexp){ Rf_error("Cannot call LargeListArray__value_length(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -438,7 +437,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_FixedSizeListArray__value_length(SEXP array_sexp, SEXP i_sexp){ +extern "C" SEXP _arrow_FixedSizeListArray__value_length(SEXP array_sexp, SEXP i_sexp){ Rf_error("Cannot call FixedSizeListArray__value_length(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -454,7 +453,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ListArray__value_offset(SEXP array_sexp, SEXP i_sexp){ +extern "C" SEXP _arrow_ListArray__value_offset(SEXP array_sexp, SEXP i_sexp){ Rf_error("Cannot call ListArray__value_offset(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -470,7 +469,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_LargeListArray__value_offset(SEXP array_sexp, SEXP i_sexp){ +extern "C" SEXP _arrow_LargeListArray__value_offset(SEXP array_sexp, SEXP i_sexp){ Rf_error("Cannot call LargeListArray__value_offset(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -486,7 +485,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_FixedSizeListArray__value_offset(SEXP array_sexp, SEXP i_sexp){ +extern "C" SEXP _arrow_FixedSizeListArray__value_offset(SEXP array_sexp, SEXP i_sexp){ Rf_error("Cannot call FixedSizeListArray__value_offset(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -501,7 +500,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ListArray__raw_value_offsets(SEXP array_sexp){ +extern "C" SEXP _arrow_ListArray__raw_value_offsets(SEXP array_sexp){ Rf_error("Cannot call ListArray__raw_value_offsets(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -516,7 +515,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_LargeListArray__raw_value_offsets(SEXP array_sexp){ +extern "C" SEXP _arrow_LargeListArray__raw_value_offsets(SEXP array_sexp){ Rf_error("Cannot call LargeListArray__raw_value_offsets(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -531,7 +530,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Array__infer_type(SEXP x_sexp){ +extern "C" SEXP _arrow_Array__infer_type(SEXP x_sexp){ Rf_error("Cannot call Array__infer_type(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -547,7 +546,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Array__from_vector(SEXP x_sexp, SEXP s_type_sexp){ +extern "C" SEXP _arrow_Array__from_vector(SEXP x_sexp, SEXP s_type_sexp){ Rf_error("Cannot call Array__from_vector(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -563,7 +562,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ChunkedArray__from_list(SEXP chunks_sexp, SEXP s_type_sexp){ +extern "C" SEXP _arrow_ChunkedArray__from_list(SEXP chunks_sexp, SEXP s_type_sexp){ Rf_error("Cannot call ChunkedArray__from_list(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -580,7 +579,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_DictionaryArray__FromArrays(SEXP type_sexp, SEXP indices_sexp, SEXP dict_sexp){ +extern "C" SEXP _arrow_DictionaryArray__FromArrays(SEXP type_sexp, SEXP indices_sexp, SEXP dict_sexp){ Rf_error("Cannot call DictionaryArray__FromArrays(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -595,7 +594,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Array__as_vector(SEXP array_sexp){ +extern "C" SEXP _arrow_Array__as_vector(SEXP array_sexp){ Rf_error("Cannot call Array__as_vector(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -610,7 +609,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ChunkedArray__as_vector(SEXP chunked_array_sexp){ +extern "C" SEXP _arrow_ChunkedArray__as_vector(SEXP chunked_array_sexp){ Rf_error("Cannot call ChunkedArray__as_vector(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -626,7 +625,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_RecordBatch__to_dataframe(SEXP batch_sexp, SEXP use_threads_sexp){ +extern "C" SEXP _arrow_RecordBatch__to_dataframe(SEXP batch_sexp, SEXP use_threads_sexp){ Rf_error("Cannot call RecordBatch__to_dataframe(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -642,7 +641,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Table__to_dataframe(SEXP table_sexp, SEXP use_threads_sexp){ +extern "C" SEXP _arrow_Table__to_dataframe(SEXP table_sexp, SEXP use_threads_sexp){ Rf_error("Cannot call Table__to_dataframe(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -657,7 +656,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ArrayData__get_type(SEXP x_sexp){ +extern "C" SEXP _arrow_ArrayData__get_type(SEXP x_sexp){ Rf_error("Cannot call ArrayData__get_type(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -672,7 +671,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ArrayData__get_length(SEXP x_sexp){ +extern "C" SEXP _arrow_ArrayData__get_length(SEXP x_sexp){ Rf_error("Cannot call ArrayData__get_length(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -687,7 +686,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ArrayData__get_null_count(SEXP x_sexp){ +extern "C" SEXP _arrow_ArrayData__get_null_count(SEXP x_sexp){ Rf_error("Cannot call ArrayData__get_null_count(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -702,7 +701,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ArrayData__get_offset(SEXP x_sexp){ +extern "C" SEXP _arrow_ArrayData__get_offset(SEXP x_sexp){ Rf_error("Cannot call ArrayData__get_offset(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -717,7 +716,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ArrayData__buffers(SEXP x_sexp){ +extern "C" SEXP _arrow_ArrayData__buffers(SEXP x_sexp){ Rf_error("Cannot call ArrayData__buffers(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -732,7 +731,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Buffer__is_mutable(SEXP buffer_sexp){ +extern "C" SEXP _arrow_Buffer__is_mutable(SEXP buffer_sexp){ Rf_error("Cannot call Buffer__is_mutable(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -748,7 +747,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Buffer__ZeroPadding(SEXP buffer_sexp){ +extern "C" SEXP _arrow_Buffer__ZeroPadding(SEXP buffer_sexp){ Rf_error("Cannot call Buffer__ZeroPadding(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -763,7 +762,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Buffer__capacity(SEXP buffer_sexp){ +extern "C" SEXP _arrow_Buffer__capacity(SEXP buffer_sexp){ Rf_error("Cannot call Buffer__capacity(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -778,7 +777,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Buffer__size(SEXP buffer_sexp){ +extern "C" SEXP _arrow_Buffer__size(SEXP buffer_sexp){ Rf_error("Cannot call Buffer__size(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -793,7 +792,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_r___RBuffer__initialize(SEXP x_sexp){ +extern "C" SEXP _arrow_r___RBuffer__initialize(SEXP x_sexp){ Rf_error("Cannot call r___RBuffer__initialize(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -808,7 +807,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Buffer__data(SEXP buffer_sexp){ +extern "C" SEXP _arrow_Buffer__data(SEXP buffer_sexp){ Rf_error("Cannot call Buffer__data(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -824,7 +823,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Buffer__Equals(SEXP x_sexp, SEXP y_sexp){ +extern "C" SEXP _arrow_Buffer__Equals(SEXP x_sexp, SEXP y_sexp){ Rf_error("Cannot call Buffer__Equals(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -839,7 +838,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ChunkedArray__length(SEXP chunked_array_sexp){ +extern "C" SEXP _arrow_ChunkedArray__length(SEXP chunked_array_sexp){ Rf_error("Cannot call ChunkedArray__length(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -854,7 +853,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ChunkedArray__null_count(SEXP chunked_array_sexp){ +extern "C" SEXP _arrow_ChunkedArray__null_count(SEXP chunked_array_sexp){ Rf_error("Cannot call ChunkedArray__null_count(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -869,7 +868,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ChunkedArray__num_chunks(SEXP chunked_array_sexp){ +extern "C" SEXP _arrow_ChunkedArray__num_chunks(SEXP chunked_array_sexp){ Rf_error("Cannot call ChunkedArray__num_chunks(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -885,7 +884,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ChunkedArray__chunk(SEXP chunked_array_sexp, SEXP i_sexp){ +extern "C" SEXP _arrow_ChunkedArray__chunk(SEXP chunked_array_sexp, SEXP i_sexp){ Rf_error("Cannot call ChunkedArray__chunk(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -900,7 +899,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ChunkedArray__chunks(SEXP chunked_array_sexp){ +extern "C" SEXP _arrow_ChunkedArray__chunks(SEXP chunked_array_sexp){ Rf_error("Cannot call ChunkedArray__chunks(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -915,7 +914,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ChunkedArray__type(SEXP chunked_array_sexp){ +extern "C" SEXP _arrow_ChunkedArray__type(SEXP chunked_array_sexp){ Rf_error("Cannot call ChunkedArray__type(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -931,7 +930,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ChunkedArray__Slice1(SEXP chunked_array_sexp, SEXP offset_sexp){ +extern "C" SEXP _arrow_ChunkedArray__Slice1(SEXP chunked_array_sexp, SEXP offset_sexp){ Rf_error("Cannot call ChunkedArray__Slice1(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -948,7 +947,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ChunkedArray__Slice2(SEXP chunked_array_sexp, SEXP offset_sexp, SEXP length_sexp){ +extern "C" SEXP _arrow_ChunkedArray__Slice2(SEXP chunked_array_sexp, SEXP offset_sexp, SEXP length_sexp){ Rf_error("Cannot call ChunkedArray__Slice2(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -964,7 +963,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ChunkedArray__View(SEXP array_sexp, SEXP type_sexp){ +extern "C" SEXP _arrow_ChunkedArray__View(SEXP array_sexp, SEXP type_sexp){ Rf_error("Cannot call ChunkedArray__View(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -980,7 +979,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ChunkedArray__Validate(SEXP chunked_array_sexp){ +extern "C" SEXP _arrow_ChunkedArray__Validate(SEXP chunked_array_sexp){ Rf_error("Cannot call ChunkedArray__Validate(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -996,7 +995,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ChunkedArray__Equals(SEXP x_sexp, SEXP y_sexp){ +extern "C" SEXP _arrow_ChunkedArray__Equals(SEXP x_sexp, SEXP y_sexp){ Rf_error("Cannot call ChunkedArray__Equals(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1011,7 +1010,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ChunkedArray__ToString(SEXP x_sexp){ +extern "C" SEXP _arrow_ChunkedArray__ToString(SEXP x_sexp){ Rf_error("Cannot call ChunkedArray__ToString(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1027,7 +1026,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_util___Codec__Create(SEXP codec_sexp, SEXP compression_level_sexp){ +extern "C" SEXP _arrow_util___Codec__Create(SEXP codec_sexp, SEXP compression_level_sexp){ Rf_error("Cannot call util___Codec__Create(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1042,7 +1041,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_util___Codec__name(SEXP codec_sexp){ +extern "C" SEXP _arrow_util___Codec__name(SEXP codec_sexp){ Rf_error("Cannot call util___Codec__name(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1057,7 +1056,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_util___Codec__IsAvailable(SEXP codec_sexp){ +extern "C" SEXP _arrow_util___Codec__IsAvailable(SEXP codec_sexp){ Rf_error("Cannot call util___Codec__IsAvailable(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1073,7 +1072,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_io___CompressedOutputStream__Make(SEXP codec_sexp, SEXP raw_sexp){ +extern "C" SEXP _arrow_io___CompressedOutputStream__Make(SEXP codec_sexp, SEXP raw_sexp){ Rf_error("Cannot call io___CompressedOutputStream__Make(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1089,7 +1088,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_io___CompressedInputStream__Make(SEXP codec_sexp, SEXP raw_sexp){ +extern "C" SEXP _arrow_io___CompressedInputStream__Make(SEXP codec_sexp, SEXP raw_sexp){ Rf_error("Cannot call io___CompressedInputStream__Make(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1106,7 +1105,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_compute___CastOptions__initialize(SEXP allow_int_overflow_sexp, SEXP allow_time_truncate_sexp, SEXP allow_float_truncate_sexp){ +extern "C" SEXP _arrow_compute___CastOptions__initialize(SEXP allow_int_overflow_sexp, SEXP allow_time_truncate_sexp, SEXP allow_float_truncate_sexp){ Rf_error("Cannot call compute___CastOptions__initialize(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1123,7 +1122,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Array__cast(SEXP array_sexp, SEXP target_type_sexp, SEXP options_sexp){ +extern "C" SEXP _arrow_Array__cast(SEXP array_sexp, SEXP target_type_sexp, SEXP options_sexp){ Rf_error("Cannot call Array__cast(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1140,7 +1139,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ChunkedArray__cast(SEXP chunked_array_sexp, SEXP target_type_sexp, SEXP options_sexp){ +extern "C" SEXP _arrow_ChunkedArray__cast(SEXP chunked_array_sexp, SEXP target_type_sexp, SEXP options_sexp){ Rf_error("Cannot call ChunkedArray__cast(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1157,7 +1156,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_RecordBatch__cast(SEXP batch_sexp, SEXP schema_sexp, SEXP options_sexp){ +extern "C" SEXP _arrow_RecordBatch__cast(SEXP batch_sexp, SEXP schema_sexp, SEXP options_sexp){ Rf_error("Cannot call RecordBatch__cast(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1174,7 +1173,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Table__cast(SEXP table_sexp, SEXP schema_sexp, SEXP options_sexp){ +extern "C" SEXP _arrow_Table__cast(SEXP table_sexp, SEXP schema_sexp, SEXP options_sexp){ Rf_error("Cannot call Table__cast(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1191,7 +1190,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_compute__CallFunction(SEXP func_name_sexp, SEXP args_sexp, SEXP options_sexp){ +extern "C" SEXP _arrow_compute__CallFunction(SEXP func_name_sexp, SEXP args_sexp, SEXP options_sexp){ Rf_error("Cannot call compute__CallFunction(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1206,7 +1205,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_csv___ReadOptions__initialize(SEXP options_sexp){ +extern "C" SEXP _arrow_csv___ReadOptions__initialize(SEXP options_sexp){ Rf_error("Cannot call csv___ReadOptions__initialize(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1221,7 +1220,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_csv___ParseOptions__initialize(SEXP options_sexp){ +extern "C" SEXP _arrow_csv___ParseOptions__initialize(SEXP options_sexp){ Rf_error("Cannot call csv___ParseOptions__initialize(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1236,7 +1235,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_csv___ConvertOptions__initialize(SEXP options_sexp){ +extern "C" SEXP _arrow_csv___ConvertOptions__initialize(SEXP options_sexp){ Rf_error("Cannot call csv___ConvertOptions__initialize(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1254,7 +1253,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_csv___TableReader__Make(SEXP input_sexp, SEXP read_options_sexp, SEXP parse_options_sexp, SEXP convert_options_sexp){ +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(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1269,7 +1268,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_csv___TableReader__Read(SEXP table_reader_sexp){ +extern "C" SEXP _arrow_csv___TableReader__Read(SEXP table_reader_sexp){ Rf_error("Cannot call csv___TableReader__Read(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1284,7 +1283,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_dataset___Dataset__NewScan(SEXP ds_sexp){ +extern "C" SEXP _arrow_dataset___Dataset__NewScan(SEXP ds_sexp){ Rf_error("Cannot call dataset___Dataset__NewScan(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1299,7 +1298,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_dataset___Dataset__schema(SEXP dataset_sexp){ +extern "C" SEXP _arrow_dataset___Dataset__schema(SEXP dataset_sexp){ Rf_error("Cannot call dataset___Dataset__schema(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1314,7 +1313,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_dataset___Dataset__type_name(SEXP dataset_sexp){ +extern "C" SEXP _arrow_dataset___Dataset__type_name(SEXP dataset_sexp){ Rf_error("Cannot call dataset___Dataset__type_name(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1330,7 +1329,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_dataset___Dataset__ReplaceSchema(SEXP dataset_sexp, SEXP schm_sexp){ +extern "C" SEXP _arrow_dataset___Dataset__ReplaceSchema(SEXP dataset_sexp, SEXP schm_sexp){ Rf_error("Cannot call dataset___Dataset__ReplaceSchema(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1346,7 +1345,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_dataset___UnionDataset__create(SEXP datasets_sexp, SEXP schm_sexp){ +extern "C" SEXP _arrow_dataset___UnionDataset__create(SEXP datasets_sexp, SEXP schm_sexp){ Rf_error("Cannot call dataset___UnionDataset__create(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1361,7 +1360,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_dataset___UnionDataset__children(SEXP ds_sexp){ +extern "C" SEXP _arrow_dataset___UnionDataset__children(SEXP ds_sexp){ Rf_error("Cannot call dataset___UnionDataset__children(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1376,7 +1375,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_dataset___FileSystemDataset__format(SEXP dataset_sexp){ +extern "C" SEXP _arrow_dataset___FileSystemDataset__format(SEXP dataset_sexp){ Rf_error("Cannot call dataset___FileSystemDataset__format(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1391,7 +1390,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_dataset___FileSystemDataset__files(SEXP dataset_sexp){ +extern "C" SEXP _arrow_dataset___FileSystemDataset__files(SEXP dataset_sexp){ Rf_error("Cannot call dataset___FileSystemDataset__files(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1407,7 +1406,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_dataset___DatasetFactory__Finish1(SEXP factory_sexp, SEXP unify_schemas_sexp){ +extern "C" SEXP _arrow_dataset___DatasetFactory__Finish1(SEXP factory_sexp, SEXP unify_schemas_sexp){ Rf_error("Cannot call dataset___DatasetFactory__Finish1(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1423,7 +1422,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_dataset___DatasetFactory__Finish2(SEXP factory_sexp, SEXP schema_sexp){ +extern "C" SEXP _arrow_dataset___DatasetFactory__Finish2(SEXP factory_sexp, SEXP schema_sexp){ Rf_error("Cannot call dataset___DatasetFactory__Finish2(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1439,7 +1438,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_dataset___DatasetFactory__Inspect(SEXP factory_sexp, SEXP unify_schemas_sexp){ +extern "C" SEXP _arrow_dataset___DatasetFactory__Inspect(SEXP factory_sexp, SEXP unify_schemas_sexp){ Rf_error("Cannot call dataset___DatasetFactory__Inspect(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1454,7 +1453,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_dataset___UnionDatasetFactory__Make(SEXP children_sexp){ +extern "C" SEXP _arrow_dataset___UnionDatasetFactory__Make(SEXP children_sexp){ Rf_error("Cannot call dataset___UnionDatasetFactory__Make(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1472,7 +1471,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_dataset___FileSystemDatasetFactory__Make2(SEXP fs_sexp, SEXP selector_sexp, SEXP format_sexp, SEXP partitioning_sexp){ +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(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1489,7 +1488,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_dataset___FileSystemDatasetFactory__Make1(SEXP fs_sexp, SEXP selector_sexp, SEXP format_sexp){ +extern "C" SEXP _arrow_dataset___FileSystemDatasetFactory__Make1(SEXP fs_sexp, SEXP selector_sexp, SEXP format_sexp){ Rf_error("Cannot call dataset___FileSystemDatasetFactory__Make1(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1507,7 +1506,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_dataset___FileSystemDatasetFactory__Make3(SEXP fs_sexp, SEXP selector_sexp, SEXP format_sexp, SEXP factory_sexp){ +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(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1522,7 +1521,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_dataset___FileFormat__type_name(SEXP format_sexp){ +extern "C" SEXP _arrow_dataset___FileFormat__type_name(SEXP format_sexp){ Rf_error("Cannot call dataset___FileFormat__type_name(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1539,7 +1538,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_dataset___ParquetFileFormat__Make(SEXP use_buffered_stream_sexp, SEXP buffer_size_sexp, SEXP dict_columns_sexp){ +extern "C" SEXP _arrow_dataset___ParquetFileFormat__Make(SEXP use_buffered_stream_sexp, SEXP buffer_size_sexp, SEXP dict_columns_sexp){ Rf_error("Cannot call dataset___ParquetFileFormat__Make(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1553,7 +1552,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_dataset___IpcFileFormat__Make(){ +extern "C" SEXP _arrow_dataset___IpcFileFormat__Make(){ Rf_error("Cannot call dataset___IpcFileFormat__Make(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1568,7 +1567,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_dataset___CsvFileFormat__Make(SEXP parse_options_sexp){ +extern "C" SEXP _arrow_dataset___CsvFileFormat__Make(SEXP parse_options_sexp){ Rf_error("Cannot call dataset___CsvFileFormat__Make(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1583,7 +1582,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_dataset___DirectoryPartitioning(SEXP schm_sexp){ +extern "C" SEXP _arrow_dataset___DirectoryPartitioning(SEXP schm_sexp){ Rf_error("Cannot call dataset___DirectoryPartitioning(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1598,7 +1597,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_dataset___DirectoryPartitioning__MakeFactory(SEXP field_names_sexp){ +extern "C" SEXP _arrow_dataset___DirectoryPartitioning__MakeFactory(SEXP field_names_sexp){ Rf_error("Cannot call dataset___DirectoryPartitioning__MakeFactory(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1613,7 +1612,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_dataset___HivePartitioning(SEXP schm_sexp){ +extern "C" SEXP _arrow_dataset___HivePartitioning(SEXP schm_sexp){ Rf_error("Cannot call dataset___HivePartitioning(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1627,7 +1626,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_dataset___HivePartitioning__MakeFactory(){ +extern "C" SEXP _arrow_dataset___HivePartitioning__MakeFactory(){ Rf_error("Cannot call dataset___HivePartitioning__MakeFactory(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1644,7 +1643,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_dataset___ScannerBuilder__Project(SEXP sb_sexp, SEXP cols_sexp){ +extern "C" SEXP _arrow_dataset___ScannerBuilder__Project(SEXP sb_sexp, SEXP cols_sexp){ Rf_error("Cannot call dataset___ScannerBuilder__Project(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1661,7 +1660,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_dataset___ScannerBuilder__Filter(SEXP sb_sexp, SEXP expr_sexp){ +extern "C" SEXP _arrow_dataset___ScannerBuilder__Filter(SEXP sb_sexp, SEXP expr_sexp){ Rf_error("Cannot call dataset___ScannerBuilder__Filter(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1678,7 +1677,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_dataset___ScannerBuilder__UseThreads(SEXP sb_sexp, SEXP threads_sexp){ +extern "C" SEXP _arrow_dataset___ScannerBuilder__UseThreads(SEXP sb_sexp, SEXP threads_sexp){ Rf_error("Cannot call dataset___ScannerBuilder__UseThreads(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1695,7 +1694,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_dataset___ScannerBuilder__BatchSize(SEXP sb_sexp, SEXP batch_size_sexp){ +extern "C" SEXP _arrow_dataset___ScannerBuilder__BatchSize(SEXP sb_sexp, SEXP batch_size_sexp){ Rf_error("Cannot call dataset___ScannerBuilder__BatchSize(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1710,7 +1709,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_dataset___ScannerBuilder__schema(SEXP sb_sexp){ +extern "C" SEXP _arrow_dataset___ScannerBuilder__schema(SEXP sb_sexp){ Rf_error("Cannot call dataset___ScannerBuilder__schema(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1725,7 +1724,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_dataset___ScannerBuilder__Finish(SEXP sb_sexp){ +extern "C" SEXP _arrow_dataset___ScannerBuilder__Finish(SEXP sb_sexp){ Rf_error("Cannot call dataset___ScannerBuilder__Finish(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1740,7 +1739,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_dataset___Scanner__ToTable(SEXP scanner_sexp){ +extern "C" SEXP _arrow_dataset___Scanner__ToTable(SEXP scanner_sexp){ Rf_error("Cannot call dataset___Scanner__ToTable(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1771,7 +1770,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_dataset___Scanner__Scan(SEXP scanner_sexp){ +extern "C" SEXP _arrow_dataset___Scanner__Scan(SEXP scanner_sexp){ Rf_error("Cannot call dataset___Scanner__Scan(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1786,7 +1785,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_dataset___ScanTask__get_batches(SEXP scan_task_sexp){ +extern "C" SEXP _arrow_dataset___ScanTask__get_batches(SEXP scan_task_sexp){ Rf_error("Cannot call dataset___ScanTask__get_batches(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1822,7 +1821,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_shared_ptr_is_null(SEXP xp_sexp){ +extern "C" SEXP _arrow_shared_ptr_is_null(SEXP xp_sexp){ Rf_error("Cannot call shared_ptr_is_null(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1837,7 +1836,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_unique_ptr_is_null(SEXP xp_sexp){ +extern "C" SEXP _arrow_unique_ptr_is_null(SEXP xp_sexp){ Rf_error("Cannot call unique_ptr_is_null(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1851,7 +1850,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Int8__initialize(){ +extern "C" SEXP _arrow_Int8__initialize(){ Rf_error("Cannot call Int8__initialize(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1865,7 +1864,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Int16__initialize(){ +extern "C" SEXP _arrow_Int16__initialize(){ Rf_error("Cannot call Int16__initialize(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1879,7 +1878,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Int32__initialize(){ +extern "C" SEXP _arrow_Int32__initialize(){ Rf_error("Cannot call Int32__initialize(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1893,7 +1892,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Int64__initialize(){ +extern "C" SEXP _arrow_Int64__initialize(){ Rf_error("Cannot call Int64__initialize(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1907,7 +1906,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_UInt8__initialize(){ +extern "C" SEXP _arrow_UInt8__initialize(){ Rf_error("Cannot call UInt8__initialize(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1921,7 +1920,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_UInt16__initialize(){ +extern "C" SEXP _arrow_UInt16__initialize(){ Rf_error("Cannot call UInt16__initialize(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1935,7 +1934,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_UInt32__initialize(){ +extern "C" SEXP _arrow_UInt32__initialize(){ Rf_error("Cannot call UInt32__initialize(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1949,7 +1948,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_UInt64__initialize(){ +extern "C" SEXP _arrow_UInt64__initialize(){ Rf_error("Cannot call UInt64__initialize(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1963,7 +1962,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Float16__initialize(){ +extern "C" SEXP _arrow_Float16__initialize(){ Rf_error("Cannot call Float16__initialize(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1977,7 +1976,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Float32__initialize(){ +extern "C" SEXP _arrow_Float32__initialize(){ Rf_error("Cannot call Float32__initialize(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -1991,7 +1990,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Float64__initialize(){ +extern "C" SEXP _arrow_Float64__initialize(){ Rf_error("Cannot call Float64__initialize(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2005,7 +2004,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Boolean__initialize(){ +extern "C" SEXP _arrow_Boolean__initialize(){ Rf_error("Cannot call Boolean__initialize(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2019,7 +2018,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Utf8__initialize(){ +extern "C" SEXP _arrow_Utf8__initialize(){ Rf_error("Cannot call Utf8__initialize(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2033,7 +2032,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_LargeUtf8__initialize(){ +extern "C" SEXP _arrow_LargeUtf8__initialize(){ Rf_error("Cannot call LargeUtf8__initialize(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2047,7 +2046,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Binary__initialize(){ +extern "C" SEXP _arrow_Binary__initialize(){ Rf_error("Cannot call Binary__initialize(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2061,7 +2060,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_LargeBinary__initialize(){ +extern "C" SEXP _arrow_LargeBinary__initialize(){ Rf_error("Cannot call LargeBinary__initialize(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2075,7 +2074,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Date32__initialize(){ +extern "C" SEXP _arrow_Date32__initialize(){ Rf_error("Cannot call Date32__initialize(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2089,7 +2088,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Date64__initialize(){ +extern "C" SEXP _arrow_Date64__initialize(){ Rf_error("Cannot call Date64__initialize(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2103,7 +2102,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Null__initialize(){ +extern "C" SEXP _arrow_Null__initialize(){ Rf_error("Cannot call Null__initialize(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2119,7 +2118,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Decimal128Type__initialize(SEXP precision_sexp, SEXP scale_sexp){ +extern "C" SEXP _arrow_Decimal128Type__initialize(SEXP precision_sexp, SEXP scale_sexp){ Rf_error("Cannot call Decimal128Type__initialize(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2134,7 +2133,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_FixedSizeBinary__initialize(SEXP byte_width_sexp){ +extern "C" SEXP _arrow_FixedSizeBinary__initialize(SEXP byte_width_sexp){ Rf_error("Cannot call FixedSizeBinary__initialize(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2150,7 +2149,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Timestamp__initialize(SEXP unit_sexp, SEXP timezone_sexp){ +extern "C" SEXP _arrow_Timestamp__initialize(SEXP unit_sexp, SEXP timezone_sexp){ Rf_error("Cannot call Timestamp__initialize(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2165,7 +2164,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Time32__initialize(SEXP unit_sexp){ +extern "C" SEXP _arrow_Time32__initialize(SEXP unit_sexp){ Rf_error("Cannot call Time32__initialize(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2180,7 +2179,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Time64__initialize(SEXP unit_sexp){ +extern "C" SEXP _arrow_Time64__initialize(SEXP unit_sexp){ Rf_error("Cannot call Time64__initialize(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2195,7 +2194,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_list__(SEXP x_sexp){ +extern "C" SEXP _arrow_list__(SEXP x_sexp){ Rf_error("Cannot call list__(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2210,7 +2209,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_large_list__(SEXP x_sexp){ +extern "C" SEXP _arrow_large_list__(SEXP x_sexp){ Rf_error("Cannot call large_list__(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2226,7 +2225,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_fixed_size_list__(SEXP x_sexp, SEXP list_size_sexp){ +extern "C" SEXP _arrow_fixed_size_list__(SEXP x_sexp, SEXP list_size_sexp){ Rf_error("Cannot call fixed_size_list__(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2241,7 +2240,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_struct__(SEXP fields_sexp){ +extern "C" SEXP _arrow_struct__(SEXP fields_sexp){ Rf_error("Cannot call struct__(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2256,7 +2255,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_DataType__ToString(SEXP type_sexp){ +extern "C" SEXP _arrow_DataType__ToString(SEXP type_sexp){ Rf_error("Cannot call DataType__ToString(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2271,7 +2270,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_DataType__name(SEXP type_sexp){ +extern "C" SEXP _arrow_DataType__name(SEXP type_sexp){ Rf_error("Cannot call DataType__name(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2287,7 +2286,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_DataType__Equals(SEXP lhs_sexp, SEXP rhs_sexp){ +extern "C" SEXP _arrow_DataType__Equals(SEXP lhs_sexp, SEXP rhs_sexp){ Rf_error("Cannot call DataType__Equals(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2302,7 +2301,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_DataType__num_children(SEXP type_sexp){ +extern "C" SEXP _arrow_DataType__num_children(SEXP type_sexp){ Rf_error("Cannot call DataType__num_children(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2317,7 +2316,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_DataType__children_pointer(SEXP type_sexp){ +extern "C" SEXP _arrow_DataType__children_pointer(SEXP type_sexp){ Rf_error("Cannot call DataType__children_pointer(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2332,7 +2331,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_DataType__id(SEXP type_sexp){ +extern "C" SEXP _arrow_DataType__id(SEXP type_sexp){ Rf_error("Cannot call DataType__id(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2347,7 +2346,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ListType__ToString(SEXP type_sexp){ +extern "C" SEXP _arrow_ListType__ToString(SEXP type_sexp){ Rf_error("Cannot call ListType__ToString(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2362,7 +2361,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_FixedWidthType__bit_width(SEXP type_sexp){ +extern "C" SEXP _arrow_FixedWidthType__bit_width(SEXP type_sexp){ Rf_error("Cannot call FixedWidthType__bit_width(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2377,7 +2376,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_DateType__unit(SEXP type_sexp){ +extern "C" SEXP _arrow_DateType__unit(SEXP type_sexp){ Rf_error("Cannot call DateType__unit(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2392,7 +2391,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_TimeType__unit(SEXP type_sexp){ +extern "C" SEXP _arrow_TimeType__unit(SEXP type_sexp){ Rf_error("Cannot call TimeType__unit(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2407,7 +2406,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_DecimalType__precision(SEXP type_sexp){ +extern "C" SEXP _arrow_DecimalType__precision(SEXP type_sexp){ Rf_error("Cannot call DecimalType__precision(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2422,7 +2421,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_DecimalType__scale(SEXP type_sexp){ +extern "C" SEXP _arrow_DecimalType__scale(SEXP type_sexp){ Rf_error("Cannot call DecimalType__scale(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2437,7 +2436,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_TimestampType__timezone(SEXP type_sexp){ +extern "C" SEXP _arrow_TimestampType__timezone(SEXP type_sexp){ Rf_error("Cannot call TimestampType__timezone(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2452,7 +2451,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_TimestampType__unit(SEXP type_sexp){ +extern "C" SEXP _arrow_TimestampType__unit(SEXP type_sexp){ Rf_error("Cannot call TimestampType__unit(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2469,7 +2468,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_DictionaryType__initialize(SEXP index_type_sexp, SEXP value_type_sexp, SEXP ordered_sexp){ +extern "C" SEXP _arrow_DictionaryType__initialize(SEXP index_type_sexp, SEXP value_type_sexp, SEXP ordered_sexp){ Rf_error("Cannot call DictionaryType__initialize(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2484,7 +2483,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_DictionaryType__index_type(SEXP type_sexp){ +extern "C" SEXP _arrow_DictionaryType__index_type(SEXP type_sexp){ Rf_error("Cannot call DictionaryType__index_type(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2499,7 +2498,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_DictionaryType__value_type(SEXP type_sexp){ +extern "C" SEXP _arrow_DictionaryType__value_type(SEXP type_sexp){ Rf_error("Cannot call DictionaryType__value_type(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2514,7 +2513,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_DictionaryType__name(SEXP type_sexp){ +extern "C" SEXP _arrow_DictionaryType__name(SEXP type_sexp){ Rf_error("Cannot call DictionaryType__name(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2529,7 +2528,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_DictionaryType__ordered(SEXP type_sexp){ +extern "C" SEXP _arrow_DictionaryType__ordered(SEXP type_sexp){ Rf_error("Cannot call DictionaryType__ordered(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2545,7 +2544,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_StructType__GetFieldByName(SEXP type_sexp, SEXP name_sexp){ +extern "C" SEXP _arrow_StructType__GetFieldByName(SEXP type_sexp, SEXP name_sexp){ Rf_error("Cannot call StructType__GetFieldByName(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2561,7 +2560,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_StructType__GetFieldIndex(SEXP type_sexp, SEXP name_sexp){ +extern "C" SEXP _arrow_StructType__GetFieldIndex(SEXP type_sexp, SEXP name_sexp){ Rf_error("Cannot call StructType__GetFieldIndex(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2576,7 +2575,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ListType__value_field(SEXP type_sexp){ +extern "C" SEXP _arrow_ListType__value_field(SEXP type_sexp){ Rf_error("Cannot call ListType__value_field(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2591,7 +2590,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ListType__value_type(SEXP type_sexp){ +extern "C" SEXP _arrow_ListType__value_type(SEXP type_sexp){ Rf_error("Cannot call ListType__value_type(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2606,7 +2605,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_LargeListType__value_field(SEXP type_sexp){ +extern "C" SEXP _arrow_LargeListType__value_field(SEXP type_sexp){ Rf_error("Cannot call LargeListType__value_field(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2621,7 +2620,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_LargeListType__value_type(SEXP type_sexp){ +extern "C" SEXP _arrow_LargeListType__value_type(SEXP type_sexp){ Rf_error("Cannot call LargeListType__value_type(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2636,7 +2635,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_FixedSizeListType__value_field(SEXP type_sexp){ +extern "C" SEXP _arrow_FixedSizeListType__value_field(SEXP type_sexp){ Rf_error("Cannot call FixedSizeListType__value_field(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2651,7 +2650,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_FixedSizeListType__value_type(SEXP type_sexp){ +extern "C" SEXP _arrow_FixedSizeListType__value_type(SEXP type_sexp){ Rf_error("Cannot call FixedSizeListType__value_type(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2666,7 +2665,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_FixedSizeListType__list_size(SEXP type_sexp){ +extern "C" SEXP _arrow_FixedSizeListType__list_size(SEXP type_sexp){ Rf_error("Cannot call FixedSizeListType__list_size(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2681,7 +2680,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_dataset___expr__field_ref(SEXP name_sexp){ +extern "C" SEXP _arrow_dataset___expr__field_ref(SEXP name_sexp){ Rf_error("Cannot call dataset___expr__field_ref(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2697,7 +2696,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_dataset___expr__equal(SEXP lhs_sexp, SEXP rhs_sexp){ +extern "C" SEXP _arrow_dataset___expr__equal(SEXP lhs_sexp, SEXP rhs_sexp){ Rf_error("Cannot call dataset___expr__equal(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2713,7 +2712,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_dataset___expr__not_equal(SEXP lhs_sexp, SEXP rhs_sexp){ +extern "C" SEXP _arrow_dataset___expr__not_equal(SEXP lhs_sexp, SEXP rhs_sexp){ Rf_error("Cannot call dataset___expr__not_equal(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2729,7 +2728,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_dataset___expr__greater(SEXP lhs_sexp, SEXP rhs_sexp){ +extern "C" SEXP _arrow_dataset___expr__greater(SEXP lhs_sexp, SEXP rhs_sexp){ Rf_error("Cannot call dataset___expr__greater(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2745,7 +2744,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_dataset___expr__greater_equal(SEXP lhs_sexp, SEXP rhs_sexp){ +extern "C" SEXP _arrow_dataset___expr__greater_equal(SEXP lhs_sexp, SEXP rhs_sexp){ Rf_error("Cannot call dataset___expr__greater_equal(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2761,7 +2760,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_dataset___expr__less(SEXP lhs_sexp, SEXP rhs_sexp){ +extern "C" SEXP _arrow_dataset___expr__less(SEXP lhs_sexp, SEXP rhs_sexp){ Rf_error("Cannot call dataset___expr__less(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2777,7 +2776,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_dataset___expr__less_equal(SEXP lhs_sexp, SEXP rhs_sexp){ +extern "C" SEXP _arrow_dataset___expr__less_equal(SEXP lhs_sexp, SEXP rhs_sexp){ Rf_error("Cannot call dataset___expr__less_equal(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2793,7 +2792,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_dataset___expr__in(SEXP lhs_sexp, SEXP rhs_sexp){ +extern "C" SEXP _arrow_dataset___expr__in(SEXP lhs_sexp, SEXP rhs_sexp){ Rf_error("Cannot call dataset___expr__in(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2809,7 +2808,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_dataset___expr__and(SEXP lhs_sexp, SEXP rhs_sexp){ +extern "C" SEXP _arrow_dataset___expr__and(SEXP lhs_sexp, SEXP rhs_sexp){ Rf_error("Cannot call dataset___expr__and(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2825,7 +2824,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_dataset___expr__or(SEXP lhs_sexp, SEXP rhs_sexp){ +extern "C" SEXP _arrow_dataset___expr__or(SEXP lhs_sexp, SEXP rhs_sexp){ Rf_error("Cannot call dataset___expr__or(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2840,7 +2839,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_dataset___expr__not(SEXP lhs_sexp){ +extern "C" SEXP _arrow_dataset___expr__not(SEXP lhs_sexp){ Rf_error("Cannot call dataset___expr__not(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2855,7 +2854,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_dataset___expr__is_valid(SEXP lhs_sexp){ +extern "C" SEXP _arrow_dataset___expr__is_valid(SEXP lhs_sexp){ Rf_error("Cannot call dataset___expr__is_valid(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2870,7 +2869,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_dataset___expr__scalar(SEXP x_sexp){ +extern "C" SEXP _arrow_dataset___expr__scalar(SEXP x_sexp){ Rf_error("Cannot call dataset___expr__scalar(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2885,7 +2884,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_dataset___expr__ToString(SEXP x_sexp){ +extern "C" SEXP _arrow_dataset___expr__ToString(SEXP x_sexp){ Rf_error("Cannot call dataset___expr__ToString(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2906,7 +2905,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport 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){ +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(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2921,7 +2920,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ipc___feather___Reader__version(SEXP reader_sexp){ +extern "C" SEXP _arrow_ipc___feather___Reader__version(SEXP reader_sexp){ Rf_error("Cannot call ipc___feather___Reader__version(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2937,7 +2936,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ipc___feather___Reader__Read(SEXP reader_sexp, SEXP columns_sexp){ +extern "C" SEXP _arrow_ipc___feather___Reader__Read(SEXP reader_sexp, SEXP columns_sexp){ Rf_error("Cannot call ipc___feather___Reader__Read(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2952,7 +2951,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ipc___feather___Reader__Open(SEXP stream_sexp){ +extern "C" SEXP _arrow_ipc___feather___Reader__Open(SEXP stream_sexp){ Rf_error("Cannot call ipc___feather___Reader__Open(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2967,7 +2966,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ipc___feather___Reader__column_names(SEXP reader_sexp){ +extern "C" SEXP _arrow_ipc___feather___Reader__column_names(SEXP reader_sexp){ Rf_error("Cannot call ipc___feather___Reader__column_names(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2984,7 +2983,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Field__initialize(SEXP name_sexp, SEXP field_sexp, SEXP nullable_sexp){ +extern "C" SEXP _arrow_Field__initialize(SEXP name_sexp, SEXP field_sexp, SEXP nullable_sexp){ Rf_error("Cannot call Field__initialize(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -2999,7 +2998,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Field__ToString(SEXP field_sexp){ +extern "C" SEXP _arrow_Field__ToString(SEXP field_sexp){ Rf_error("Cannot call Field__ToString(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3014,7 +3013,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Field__name(SEXP field_sexp){ +extern "C" SEXP _arrow_Field__name(SEXP field_sexp){ Rf_error("Cannot call Field__name(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3030,7 +3029,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Field__Equals(SEXP field_sexp, SEXP other_sexp){ +extern "C" SEXP _arrow_Field__Equals(SEXP field_sexp, SEXP other_sexp){ Rf_error("Cannot call Field__Equals(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3045,7 +3044,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Field__nullable(SEXP field_sexp){ +extern "C" SEXP _arrow_Field__nullable(SEXP field_sexp){ Rf_error("Cannot call Field__nullable(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3060,7 +3059,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Field__type(SEXP field_sexp){ +extern "C" SEXP _arrow_Field__type(SEXP field_sexp){ Rf_error("Cannot call Field__type(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3075,7 +3074,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_fs___FileInfo__type(SEXP x_sexp){ +extern "C" SEXP _arrow_fs___FileInfo__type(SEXP x_sexp){ Rf_error("Cannot call fs___FileInfo__type(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3092,7 +3091,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_fs___FileInfo__set_type(SEXP x_sexp, SEXP type_sexp){ +extern "C" SEXP _arrow_fs___FileInfo__set_type(SEXP x_sexp, SEXP type_sexp){ Rf_error("Cannot call fs___FileInfo__set_type(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3107,7 +3106,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_fs___FileInfo__path(SEXP x_sexp){ +extern "C" SEXP _arrow_fs___FileInfo__path(SEXP x_sexp){ Rf_error("Cannot call fs___FileInfo__path(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3124,7 +3123,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_fs___FileInfo__set_path(SEXP x_sexp, SEXP path_sexp){ +extern "C" SEXP _arrow_fs___FileInfo__set_path(SEXP x_sexp, SEXP path_sexp){ Rf_error("Cannot call fs___FileInfo__set_path(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3139,7 +3138,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_fs___FileInfo__size(SEXP x_sexp){ +extern "C" SEXP _arrow_fs___FileInfo__size(SEXP x_sexp){ Rf_error("Cannot call fs___FileInfo__size(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3156,7 +3155,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_fs___FileInfo__set_size(SEXP x_sexp, SEXP size_sexp){ +extern "C" SEXP _arrow_fs___FileInfo__set_size(SEXP x_sexp, SEXP size_sexp){ Rf_error("Cannot call fs___FileInfo__set_size(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3171,7 +3170,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_fs___FileInfo__base_name(SEXP x_sexp){ +extern "C" SEXP _arrow_fs___FileInfo__base_name(SEXP x_sexp){ Rf_error("Cannot call fs___FileInfo__base_name(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3186,7 +3185,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_fs___FileInfo__extension(SEXP x_sexp){ +extern "C" SEXP _arrow_fs___FileInfo__extension(SEXP x_sexp){ Rf_error("Cannot call fs___FileInfo__extension(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3201,7 +3200,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_fs___FileInfo__mtime(SEXP x_sexp){ +extern "C" SEXP _arrow_fs___FileInfo__mtime(SEXP x_sexp){ Rf_error("Cannot call fs___FileInfo__mtime(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3218,7 +3217,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_fs___FileInfo__set_mtime(SEXP x_sexp, SEXP time_sexp){ +extern "C" SEXP _arrow_fs___FileInfo__set_mtime(SEXP x_sexp, SEXP time_sexp){ Rf_error("Cannot call fs___FileInfo__set_mtime(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3233,7 +3232,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_fs___FileSelector__base_dir(SEXP selector_sexp){ +extern "C" SEXP _arrow_fs___FileSelector__base_dir(SEXP selector_sexp){ Rf_error("Cannot call fs___FileSelector__base_dir(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3248,7 +3247,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_fs___FileSelector__allow_not_found(SEXP selector_sexp){ +extern "C" SEXP _arrow_fs___FileSelector__allow_not_found(SEXP selector_sexp){ Rf_error("Cannot call fs___FileSelector__allow_not_found(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3263,7 +3262,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_fs___FileSelector__recursive(SEXP selector_sexp){ +extern "C" SEXP _arrow_fs___FileSelector__recursive(SEXP selector_sexp){ Rf_error("Cannot call fs___FileSelector__recursive(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3280,7 +3279,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_fs___FileSelector__create(SEXP base_dir_sexp, SEXP allow_not_found_sexp, SEXP recursive_sexp){ +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(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3296,7 +3295,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_fs___FileSystem__GetTargetInfos_Paths(SEXP file_system_sexp, SEXP paths_sexp){ +extern "C" SEXP _arrow_fs___FileSystem__GetTargetInfos_Paths(SEXP file_system_sexp, SEXP paths_sexp){ Rf_error("Cannot call fs___FileSystem__GetTargetInfos_Paths(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3312,7 +3311,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_fs___FileSystem__GetTargetInfos_FileSelector(SEXP file_system_sexp, SEXP selector_sexp){ +extern "C" SEXP _arrow_fs___FileSystem__GetTargetInfos_FileSelector(SEXP file_system_sexp, SEXP selector_sexp){ Rf_error("Cannot call fs___FileSystem__GetTargetInfos_FileSelector(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3330,7 +3329,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_fs___FileSystem__CreateDir(SEXP file_system_sexp, SEXP path_sexp, SEXP recursive_sexp){ +extern "C" SEXP _arrow_fs___FileSystem__CreateDir(SEXP file_system_sexp, SEXP path_sexp, SEXP recursive_sexp){ Rf_error("Cannot call fs___FileSystem__CreateDir(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3347,7 +3346,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_fs___FileSystem__DeleteDir(SEXP file_system_sexp, SEXP path_sexp){ +extern "C" SEXP _arrow_fs___FileSystem__DeleteDir(SEXP file_system_sexp, SEXP path_sexp){ Rf_error("Cannot call fs___FileSystem__DeleteDir(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3364,7 +3363,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_fs___FileSystem__DeleteDirContents(SEXP file_system_sexp, SEXP path_sexp){ +extern "C" SEXP _arrow_fs___FileSystem__DeleteDirContents(SEXP file_system_sexp, SEXP path_sexp){ Rf_error("Cannot call fs___FileSystem__DeleteDirContents(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3381,7 +3380,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_fs___FileSystem__DeleteFile(SEXP file_system_sexp, SEXP path_sexp){ +extern "C" SEXP _arrow_fs___FileSystem__DeleteFile(SEXP file_system_sexp, SEXP path_sexp){ Rf_error("Cannot call fs___FileSystem__DeleteFile(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3398,7 +3397,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_fs___FileSystem__DeleteFiles(SEXP file_system_sexp, SEXP paths_sexp){ +extern "C" SEXP _arrow_fs___FileSystem__DeleteFiles(SEXP file_system_sexp, SEXP paths_sexp){ Rf_error("Cannot call fs___FileSystem__DeleteFiles(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3416,7 +3415,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_fs___FileSystem__Move(SEXP file_system_sexp, SEXP src_sexp, SEXP dest_sexp){ +extern "C" SEXP _arrow_fs___FileSystem__Move(SEXP file_system_sexp, SEXP src_sexp, SEXP dest_sexp){ Rf_error("Cannot call fs___FileSystem__Move(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3434,7 +3433,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_fs___FileSystem__CopyFile(SEXP file_system_sexp, SEXP src_sexp, SEXP dest_sexp){ +extern "C" SEXP _arrow_fs___FileSystem__CopyFile(SEXP file_system_sexp, SEXP src_sexp, SEXP dest_sexp){ Rf_error("Cannot call fs___FileSystem__CopyFile(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3450,7 +3449,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_fs___FileSystem__OpenInputStream(SEXP file_system_sexp, SEXP path_sexp){ +extern "C" SEXP _arrow_fs___FileSystem__OpenInputStream(SEXP file_system_sexp, SEXP path_sexp){ Rf_error("Cannot call fs___FileSystem__OpenInputStream(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3466,7 +3465,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_fs___FileSystem__OpenInputFile(SEXP file_system_sexp, SEXP path_sexp){ +extern "C" SEXP _arrow_fs___FileSystem__OpenInputFile(SEXP file_system_sexp, SEXP path_sexp){ Rf_error("Cannot call fs___FileSystem__OpenInputFile(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3482,7 +3481,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_fs___FileSystem__OpenOutputStream(SEXP file_system_sexp, SEXP path_sexp){ +extern "C" SEXP _arrow_fs___FileSystem__OpenOutputStream(SEXP file_system_sexp, SEXP path_sexp){ Rf_error("Cannot call fs___FileSystem__OpenOutputStream(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3498,7 +3497,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_fs___FileSystem__OpenAppendStream(SEXP file_system_sexp, SEXP path_sexp){ +extern "C" SEXP _arrow_fs___FileSystem__OpenAppendStream(SEXP file_system_sexp, SEXP path_sexp){ Rf_error("Cannot call fs___FileSystem__OpenAppendStream(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3513,7 +3512,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_fs___FileSystem__type_name(SEXP file_system_sexp){ +extern "C" SEXP _arrow_fs___FileSystem__type_name(SEXP file_system_sexp){ Rf_error("Cannot call fs___FileSystem__type_name(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3527,7 +3526,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_fs___LocalFileSystem__create(){ +extern "C" SEXP _arrow_fs___LocalFileSystem__create(){ Rf_error("Cannot call fs___LocalFileSystem__create(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3543,7 +3542,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_fs___SubTreeFileSystem__create(SEXP base_path_sexp, SEXP base_fs_sexp){ +extern "C" SEXP _arrow_fs___SubTreeFileSystem__create(SEXP base_path_sexp, SEXP base_fs_sexp){ Rf_error("Cannot call fs___SubTreeFileSystem__create(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3558,7 +3557,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_fs___FileSystemFromUri(SEXP path_sexp){ +extern "C" SEXP _arrow_fs___FileSystemFromUri(SEXP path_sexp){ Rf_error("Cannot call fs___FileSystemFromUri(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3573,7 +3572,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_fs___EnsureS3Initialized(){ +extern "C" SEXP _arrow_fs___EnsureS3Initialized(){ Rf_error("Cannot call fs___EnsureS3Initialized(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3587,7 +3586,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_fs___S3FileSystem__create(){ +extern "C" SEXP _arrow_fs___S3FileSystem__create(){ Rf_error("Cannot call fs___S3FileSystem__create(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3603,7 +3602,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_io___Readable__Read(SEXP x_sexp, SEXP nbytes_sexp){ +extern "C" SEXP _arrow_io___Readable__Read(SEXP x_sexp, SEXP nbytes_sexp){ Rf_error("Cannot call io___Readable__Read(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3619,7 +3618,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_io___InputStream__Close(SEXP x_sexp){ +extern "C" SEXP _arrow_io___InputStream__Close(SEXP x_sexp){ Rf_error("Cannot call io___InputStream__Close(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3635,7 +3634,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_io___OutputStream__Close(SEXP x_sexp){ +extern "C" SEXP _arrow_io___OutputStream__Close(SEXP x_sexp){ Rf_error("Cannot call io___OutputStream__Close(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3650,7 +3649,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_io___RandomAccessFile__GetSize(SEXP x_sexp){ +extern "C" SEXP _arrow_io___RandomAccessFile__GetSize(SEXP x_sexp){ Rf_error("Cannot call io___RandomAccessFile__GetSize(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3665,7 +3664,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_io___RandomAccessFile__supports_zero_copy(SEXP x_sexp){ +extern "C" SEXP _arrow_io___RandomAccessFile__supports_zero_copy(SEXP x_sexp){ Rf_error("Cannot call io___RandomAccessFile__supports_zero_copy(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3682,7 +3681,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_io___RandomAccessFile__Seek(SEXP x_sexp, SEXP position_sexp){ +extern "C" SEXP _arrow_io___RandomAccessFile__Seek(SEXP x_sexp, SEXP position_sexp){ Rf_error("Cannot call io___RandomAccessFile__Seek(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3697,7 +3696,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_io___RandomAccessFile__Tell(SEXP x_sexp){ +extern "C" SEXP _arrow_io___RandomAccessFile__Tell(SEXP x_sexp){ Rf_error("Cannot call io___RandomAccessFile__Tell(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3712,7 +3711,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_io___RandomAccessFile__Read0(SEXP x_sexp){ +extern "C" SEXP _arrow_io___RandomAccessFile__Read0(SEXP x_sexp){ Rf_error("Cannot call io___RandomAccessFile__Read0(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3729,7 +3728,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_io___RandomAccessFile__ReadAt(SEXP x_sexp, SEXP position_sexp, SEXP nbytes_sexp){ +extern "C" SEXP _arrow_io___RandomAccessFile__ReadAt(SEXP x_sexp, SEXP position_sexp, SEXP nbytes_sexp){ Rf_error("Cannot call io___RandomAccessFile__ReadAt(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3745,7 +3744,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_io___MemoryMappedFile__Create(SEXP path_sexp, SEXP size_sexp){ +extern "C" SEXP _arrow_io___MemoryMappedFile__Create(SEXP path_sexp, SEXP size_sexp){ Rf_error("Cannot call io___MemoryMappedFile__Create(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3761,7 +3760,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_io___MemoryMappedFile__Open(SEXP path_sexp, SEXP mode_sexp){ +extern "C" SEXP _arrow_io___MemoryMappedFile__Open(SEXP path_sexp, SEXP mode_sexp){ Rf_error("Cannot call io___MemoryMappedFile__Open(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3778,7 +3777,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_io___MemoryMappedFile__Resize(SEXP x_sexp, SEXP size_sexp){ +extern "C" SEXP _arrow_io___MemoryMappedFile__Resize(SEXP x_sexp, SEXP size_sexp){ Rf_error("Cannot call io___MemoryMappedFile__Resize(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3793,7 +3792,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_io___ReadableFile__Open(SEXP path_sexp){ +extern "C" SEXP _arrow_io___ReadableFile__Open(SEXP path_sexp){ Rf_error("Cannot call io___ReadableFile__Open(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3808,7 +3807,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_io___BufferReader__initialize(SEXP buffer_sexp){ +extern "C" SEXP _arrow_io___BufferReader__initialize(SEXP buffer_sexp){ Rf_error("Cannot call io___BufferReader__initialize(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3825,7 +3824,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_io___Writable__write(SEXP stream_sexp, SEXP buf_sexp){ +extern "C" SEXP _arrow_io___Writable__write(SEXP stream_sexp, SEXP buf_sexp){ Rf_error("Cannot call io___Writable__write(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3840,7 +3839,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_io___OutputStream__Tell(SEXP stream_sexp){ +extern "C" SEXP _arrow_io___OutputStream__Tell(SEXP stream_sexp){ Rf_error("Cannot call io___OutputStream__Tell(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3855,7 +3854,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_io___FileOutputStream__Open(SEXP path_sexp){ +extern "C" SEXP _arrow_io___FileOutputStream__Open(SEXP path_sexp){ Rf_error("Cannot call io___FileOutputStream__Open(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3870,7 +3869,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_io___BufferOutputStream__Create(SEXP initial_capacity_sexp){ +extern "C" SEXP _arrow_io___BufferOutputStream__Create(SEXP initial_capacity_sexp){ Rf_error("Cannot call io___BufferOutputStream__Create(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3885,7 +3884,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_io___BufferOutputStream__capacity(SEXP stream_sexp){ +extern "C" SEXP _arrow_io___BufferOutputStream__capacity(SEXP stream_sexp){ Rf_error("Cannot call io___BufferOutputStream__capacity(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3900,7 +3899,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_io___BufferOutputStream__Finish(SEXP stream_sexp){ +extern "C" SEXP _arrow_io___BufferOutputStream__Finish(SEXP stream_sexp){ Rf_error("Cannot call io___BufferOutputStream__Finish(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3915,7 +3914,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_io___BufferOutputStream__Tell(SEXP stream_sexp){ +extern "C" SEXP _arrow_io___BufferOutputStream__Tell(SEXP stream_sexp){ Rf_error("Cannot call io___BufferOutputStream__Tell(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3932,7 +3931,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_io___BufferOutputStream__Write(SEXP stream_sexp, SEXP bytes_sexp){ +extern "C" SEXP _arrow_io___BufferOutputStream__Write(SEXP stream_sexp, SEXP bytes_sexp){ Rf_error("Cannot call io___BufferOutputStream__Write(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3948,7 +3947,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_json___ReadOptions__initialize(SEXP use_threads_sexp, SEXP block_size_sexp){ +extern "C" SEXP _arrow_json___ReadOptions__initialize(SEXP use_threads_sexp, SEXP block_size_sexp){ Rf_error("Cannot call json___ReadOptions__initialize(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3963,7 +3962,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_json___ParseOptions__initialize(SEXP newlines_in_values_sexp){ +extern "C" SEXP _arrow_json___ParseOptions__initialize(SEXP newlines_in_values_sexp){ Rf_error("Cannot call json___ParseOptions__initialize(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3980,7 +3979,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_json___TableReader__Make(SEXP input_sexp, SEXP read_options_sexp, SEXP parse_options_sexp){ +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(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -3995,7 +3994,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_json___TableReader__Read(SEXP table_reader_sexp){ +extern "C" SEXP _arrow_json___TableReader__Read(SEXP table_reader_sexp){ Rf_error("Cannot call json___TableReader__Read(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4009,7 +4008,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_MemoryPool__default(){ +extern "C" SEXP _arrow_MemoryPool__default(){ Rf_error("Cannot call MemoryPool__default(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4024,7 +4023,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_MemoryPool__bytes_allocated(SEXP pool_sexp){ +extern "C" SEXP _arrow_MemoryPool__bytes_allocated(SEXP pool_sexp){ Rf_error("Cannot call MemoryPool__bytes_allocated(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4039,7 +4038,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_MemoryPool__max_memory(SEXP pool_sexp){ +extern "C" SEXP _arrow_MemoryPool__max_memory(SEXP pool_sexp){ Rf_error("Cannot call MemoryPool__max_memory(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4054,7 +4053,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ipc___Message__body_length(SEXP message_sexp){ +extern "C" SEXP _arrow_ipc___Message__body_length(SEXP message_sexp){ Rf_error("Cannot call ipc___Message__body_length(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4069,7 +4068,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ipc___Message__metadata(SEXP message_sexp){ +extern "C" SEXP _arrow_ipc___Message__metadata(SEXP message_sexp){ Rf_error("Cannot call ipc___Message__metadata(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4084,7 +4083,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ipc___Message__body(SEXP message_sexp){ +extern "C" SEXP _arrow_ipc___Message__body(SEXP message_sexp){ Rf_error("Cannot call ipc___Message__body(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4099,7 +4098,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ipc___Message__Verify(SEXP message_sexp){ +extern "C" SEXP _arrow_ipc___Message__Verify(SEXP message_sexp){ Rf_error("Cannot call ipc___Message__Verify(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4114,7 +4113,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ipc___Message__type(SEXP message_sexp){ +extern "C" SEXP _arrow_ipc___Message__type(SEXP message_sexp){ Rf_error("Cannot call ipc___Message__type(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4130,7 +4129,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ipc___Message__Equals(SEXP x_sexp, SEXP y_sexp){ +extern "C" SEXP _arrow_ipc___Message__Equals(SEXP x_sexp, SEXP y_sexp){ Rf_error("Cannot call ipc___Message__Equals(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4146,7 +4145,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ipc___ReadRecordBatch__Message__Schema(SEXP message_sexp, SEXP schema_sexp){ +extern "C" SEXP _arrow_ipc___ReadRecordBatch__Message__Schema(SEXP message_sexp, SEXP schema_sexp){ Rf_error("Cannot call ipc___ReadRecordBatch__Message__Schema(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4161,7 +4160,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ipc___ReadSchema_InputStream(SEXP stream_sexp){ +extern "C" SEXP _arrow_ipc___ReadSchema_InputStream(SEXP stream_sexp){ Rf_error("Cannot call ipc___ReadSchema_InputStream(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4176,7 +4175,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ipc___ReadSchema_Message(SEXP message_sexp){ +extern "C" SEXP _arrow_ipc___ReadSchema_Message(SEXP message_sexp){ Rf_error("Cannot call ipc___ReadSchema_Message(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4191,7 +4190,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ipc___MessageReader__Open(SEXP stream_sexp){ +extern "C" SEXP _arrow_ipc___MessageReader__Open(SEXP stream_sexp){ Rf_error("Cannot call ipc___MessageReader__Open(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4206,7 +4205,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ipc___MessageReader__ReadNextMessage(SEXP reader_sexp){ +extern "C" SEXP _arrow_ipc___MessageReader__ReadNextMessage(SEXP reader_sexp){ Rf_error("Cannot call ipc___MessageReader__ReadNextMessage(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4221,7 +4220,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ipc___ReadMessage(SEXP stream_sexp){ +extern "C" SEXP _arrow_ipc___ReadMessage(SEXP stream_sexp){ Rf_error("Cannot call ipc___ReadMessage(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4236,7 +4235,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_parquet___arrow___ArrowReaderProperties__Make(SEXP use_threads_sexp){ +extern "C" SEXP _arrow_parquet___arrow___ArrowReaderProperties__Make(SEXP use_threads_sexp){ Rf_error("Cannot call parquet___arrow___ArrowReaderProperties__Make(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4253,7 +4252,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_parquet___arrow___ArrowReaderProperties__set_use_threads(SEXP properties_sexp, SEXP use_threads_sexp){ +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(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4269,7 +4268,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_parquet___arrow___ArrowReaderProperties__get_use_threads(SEXP properties_sexp, SEXP use_threads_sexp){ +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(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4285,7 +4284,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_parquet___arrow___ArrowReaderProperties__get_read_dictionary(SEXP properties_sexp, SEXP column_index_sexp){ +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(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4303,7 +4302,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_parquet___arrow___ArrowReaderProperties__set_read_dictionary(SEXP properties_sexp, SEXP column_index_sexp, SEXP read_dict_sexp){ +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(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4319,7 +4318,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_parquet___arrow___FileReader__OpenFile(SEXP file_sexp, SEXP props_sexp){ +extern "C" SEXP _arrow_parquet___arrow___FileReader__OpenFile(SEXP file_sexp, SEXP props_sexp){ Rf_error("Cannot call parquet___arrow___FileReader__OpenFile(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4334,7 +4333,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_parquet___arrow___FileReader__ReadTable1(SEXP reader_sexp){ +extern "C" SEXP _arrow_parquet___arrow___FileReader__ReadTable1(SEXP reader_sexp){ Rf_error("Cannot call parquet___arrow___FileReader__ReadTable1(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4350,7 +4349,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_parquet___arrow___FileReader__ReadTable2(SEXP reader_sexp, SEXP column_indices_sexp){ +extern "C" SEXP _arrow_parquet___arrow___FileReader__ReadTable2(SEXP reader_sexp, SEXP column_indices_sexp){ Rf_error("Cannot call parquet___arrow___FileReader__ReadTable2(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4365,7 +4364,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_parquet___arrow___FileReader__num_rows(SEXP reader_sexp){ +extern "C" SEXP _arrow_parquet___arrow___FileReader__num_rows(SEXP reader_sexp){ Rf_error("Cannot call parquet___arrow___FileReader__num_rows(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4382,7 +4381,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_parquet___ArrowWriterProperties___create(SEXP allow_truncated_timestamps_sexp, SEXP use_deprecated_int96_timestamps_sexp, SEXP timestamp_unit_sexp){ +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(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4396,7 +4395,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_parquet___WriterProperties___Builder__create(){ +extern "C" SEXP _arrow_parquet___WriterProperties___Builder__create(){ Rf_error("Cannot call parquet___WriterProperties___Builder__create(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4413,7 +4412,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_parquet___WriterProperties___Builder__version(SEXP builder_sexp, SEXP version_sexp){ +extern "C" SEXP _arrow_parquet___WriterProperties___Builder__version(SEXP builder_sexp, SEXP version_sexp){ Rf_error("Cannot call parquet___WriterProperties___Builder__version(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4431,7 +4430,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_parquet___ArrowWriterProperties___Builder__set_compressions(SEXP builder_sexp, SEXP paths_sexp, SEXP types_sexp){ +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(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4449,7 +4448,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_parquet___ArrowWriterProperties___Builder__set_compression_levels(SEXP builder_sexp, SEXP paths_sexp, SEXP levels_sexp){ +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(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4467,7 +4466,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_parquet___ArrowWriterProperties___Builder__set_use_dictionary(SEXP builder_sexp, SEXP paths_sexp, SEXP use_dictionary_sexp){ +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(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4485,7 +4484,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_parquet___ArrowWriterProperties___Builder__set_write_statistics(SEXP builder_sexp, SEXP paths_sexp, SEXP write_statistics_sexp){ +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(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4502,7 +4501,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_parquet___ArrowWriterProperties___Builder__data_page_size(SEXP builder_sexp, SEXP data_page_size_sexp){ +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(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4517,7 +4516,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_parquet___WriterProperties___Builder__build(SEXP builder_sexp){ +extern "C" SEXP _arrow_parquet___WriterProperties___Builder__build(SEXP builder_sexp){ Rf_error("Cannot call parquet___WriterProperties___Builder__build(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4535,7 +4534,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_parquet___arrow___ParquetFileWriter__Open(SEXP schema_sexp, SEXP sink_sexp, SEXP properties_sexp, SEXP arrow_properties_sexp){ +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(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4553,7 +4552,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_parquet___arrow___FileWriter__WriteTable(SEXP writer_sexp, SEXP table_sexp, SEXP chunk_size_sexp){ +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(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4569,7 +4568,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_parquet___arrow___FileWriter__Close(SEXP writer_sexp){ +extern "C" SEXP _arrow_parquet___arrow___FileWriter__Close(SEXP writer_sexp){ Rf_error("Cannot call parquet___arrow___FileWriter__Close(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4588,7 +4587,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_parquet___arrow___WriteTable(SEXP table_sexp, SEXP sink_sexp, SEXP properties_sexp, SEXP arrow_properties_sexp){ +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(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4603,7 +4602,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_parquet___arrow___FileReader__GetSchema(SEXP reader_sexp){ +extern "C" SEXP _arrow_parquet___arrow___FileReader__GetSchema(SEXP reader_sexp){ Rf_error("Cannot call parquet___arrow___FileReader__GetSchema(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4619,7 +4618,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ImportArray(SEXP array_sexp, SEXP schema_sexp){ +extern "C" SEXP _arrow_ImportArray(SEXP array_sexp, SEXP schema_sexp){ Rf_error("Cannot call ImportArray(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4635,7 +4634,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ImportRecordBatch(SEXP array_sexp, SEXP schema_sexp){ +extern "C" SEXP _arrow_ImportRecordBatch(SEXP array_sexp, SEXP schema_sexp){ Rf_error("Cannot call ImportRecordBatch(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4649,7 +4648,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_allocate_arrow_schema(){ +extern "C" SEXP _arrow_allocate_arrow_schema(){ Rf_error("Cannot call allocate_arrow_schema(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4665,7 +4664,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_delete_arrow_schema(SEXP ptr_sexp){ +extern "C" SEXP _arrow_delete_arrow_schema(SEXP ptr_sexp){ Rf_error("Cannot call delete_arrow_schema(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4679,7 +4678,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_allocate_arrow_array(){ +extern "C" SEXP _arrow_allocate_arrow_array(){ Rf_error("Cannot call allocate_arrow_array(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4695,7 +4694,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_delete_arrow_array(SEXP ptr_sexp){ +extern "C" SEXP _arrow_delete_arrow_array(SEXP ptr_sexp){ Rf_error("Cannot call delete_arrow_array(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4712,7 +4711,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ExportType(SEXP type_sexp, SEXP ptr_sexp){ +extern "C" SEXP _arrow_ExportType(SEXP type_sexp, SEXP ptr_sexp){ Rf_error("Cannot call ExportType(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4729,7 +4728,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ExportSchema(SEXP schema_sexp, SEXP ptr_sexp){ +extern "C" SEXP _arrow_ExportSchema(SEXP schema_sexp, SEXP ptr_sexp){ Rf_error("Cannot call ExportSchema(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4747,7 +4746,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ExportArray(SEXP array_sexp, SEXP ptr_sexp, SEXP schema_ptr_sexp){ +extern "C" SEXP _arrow_ExportArray(SEXP array_sexp, SEXP ptr_sexp, SEXP schema_ptr_sexp){ Rf_error("Cannot call ExportArray(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4765,7 +4764,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ExportRecordBatch(SEXP batch_sexp, SEXP ptr_sexp, SEXP schema_ptr_sexp){ +extern "C" SEXP _arrow_ExportRecordBatch(SEXP batch_sexp, SEXP ptr_sexp, SEXP schema_ptr_sexp){ Rf_error("Cannot call ExportRecordBatch(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4780,7 +4779,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_RecordBatch__num_columns(SEXP x_sexp){ +extern "C" SEXP _arrow_RecordBatch__num_columns(SEXP x_sexp){ Rf_error("Cannot call RecordBatch__num_columns(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4795,7 +4794,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_RecordBatch__num_rows(SEXP x_sexp){ +extern "C" SEXP _arrow_RecordBatch__num_rows(SEXP x_sexp){ Rf_error("Cannot call RecordBatch__num_rows(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4810,7 +4809,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_RecordBatch__schema(SEXP x_sexp){ +extern "C" SEXP _arrow_RecordBatch__schema(SEXP x_sexp){ Rf_error("Cannot call RecordBatch__schema(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4826,7 +4825,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_RecordBatch__ReplaceSchemaMetadata(SEXP x_sexp, SEXP metadata_sexp){ +extern "C" SEXP _arrow_RecordBatch__ReplaceSchemaMetadata(SEXP x_sexp, SEXP metadata_sexp){ Rf_error("Cannot call RecordBatch__ReplaceSchemaMetadata(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4841,7 +4840,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_RecordBatch__columns(SEXP batch_sexp){ +extern "C" SEXP _arrow_RecordBatch__columns(SEXP batch_sexp){ Rf_error("Cannot call RecordBatch__columns(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4857,7 +4856,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_RecordBatch__column(SEXP batch_sexp, SEXP i_sexp){ +extern "C" SEXP _arrow_RecordBatch__column(SEXP batch_sexp, SEXP i_sexp){ Rf_error("Cannot call RecordBatch__column(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4873,7 +4872,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_RecordBatch__GetColumnByName(SEXP batch_sexp, SEXP name_sexp){ +extern "C" SEXP _arrow_RecordBatch__GetColumnByName(SEXP batch_sexp, SEXP name_sexp){ Rf_error("Cannot call RecordBatch__GetColumnByName(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4889,7 +4888,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_RecordBatch__select(SEXP batch_sexp, SEXP indices_sexp){ +extern "C" SEXP _arrow_RecordBatch__select(SEXP batch_sexp, SEXP indices_sexp){ Rf_error("Cannot call RecordBatch__select(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4906,7 +4905,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_RecordBatch__Equals(SEXP self_sexp, SEXP other_sexp, SEXP check_metadata_sexp){ +extern "C" SEXP _arrow_RecordBatch__Equals(SEXP self_sexp, SEXP other_sexp, SEXP check_metadata_sexp){ Rf_error("Cannot call RecordBatch__Equals(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4922,7 +4921,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_RecordBatch__RemoveColumn(SEXP batch_sexp, SEXP i_sexp){ +extern "C" SEXP _arrow_RecordBatch__RemoveColumn(SEXP batch_sexp, SEXP i_sexp){ Rf_error("Cannot call RecordBatch__RemoveColumn(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4938,7 +4937,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_RecordBatch__column_name(SEXP batch_sexp, SEXP i_sexp){ +extern "C" SEXP _arrow_RecordBatch__column_name(SEXP batch_sexp, SEXP i_sexp){ Rf_error("Cannot call RecordBatch__column_name(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4953,7 +4952,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_RecordBatch__names(SEXP batch_sexp){ +extern "C" SEXP _arrow_RecordBatch__names(SEXP batch_sexp){ Rf_error("Cannot call RecordBatch__names(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4969,7 +4968,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_RecordBatch__Slice1(SEXP self_sexp, SEXP offset_sexp){ +extern "C" SEXP _arrow_RecordBatch__Slice1(SEXP self_sexp, SEXP offset_sexp){ Rf_error("Cannot call RecordBatch__Slice1(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -4986,7 +4985,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_RecordBatch__Slice2(SEXP self_sexp, SEXP offset_sexp, SEXP length_sexp){ +extern "C" SEXP _arrow_RecordBatch__Slice2(SEXP self_sexp, SEXP offset_sexp, SEXP length_sexp){ Rf_error("Cannot call RecordBatch__Slice2(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5001,7 +5000,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ipc___SerializeRecordBatch__Raw(SEXP batch_sexp){ +extern "C" SEXP _arrow_ipc___SerializeRecordBatch__Raw(SEXP batch_sexp){ Rf_error("Cannot call ipc___SerializeRecordBatch__Raw(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5017,7 +5016,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ipc___ReadRecordBatch__InputStream__Schema(SEXP stream_sexp, SEXP schema_sexp){ +extern "C" SEXP _arrow_ipc___ReadRecordBatch__InputStream__Schema(SEXP stream_sexp, SEXP schema_sexp){ Rf_error("Cannot call ipc___ReadRecordBatch__InputStream__Schema(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5033,7 +5032,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_RecordBatch__from_arrays(SEXP schema_sxp_sexp, SEXP lst_sexp){ +extern "C" SEXP _arrow_RecordBatch__from_arrays(SEXP schema_sxp_sexp, SEXP lst_sexp){ Rf_error("Cannot call RecordBatch__from_arrays(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5048,7 +5047,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_RecordBatchReader__schema(SEXP reader_sexp){ +extern "C" SEXP _arrow_RecordBatchReader__schema(SEXP reader_sexp){ Rf_error("Cannot call RecordBatchReader__schema(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5063,7 +5062,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_RecordBatchReader__ReadNext(SEXP reader_sexp){ +extern "C" SEXP _arrow_RecordBatchReader__ReadNext(SEXP reader_sexp){ Rf_error("Cannot call RecordBatchReader__ReadNext(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5078,7 +5077,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ipc___RecordBatchStreamReader__Open(SEXP stream_sexp){ +extern "C" SEXP _arrow_ipc___RecordBatchStreamReader__Open(SEXP stream_sexp){ Rf_error("Cannot call ipc___RecordBatchStreamReader__Open(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5093,7 +5092,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ipc___RecordBatchStreamReader__batches(SEXP reader_sexp){ +extern "C" SEXP _arrow_ipc___RecordBatchStreamReader__batches(SEXP reader_sexp){ Rf_error("Cannot call ipc___RecordBatchStreamReader__batches(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5108,7 +5107,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ipc___RecordBatchFileReader__schema(SEXP reader_sexp){ +extern "C" SEXP _arrow_ipc___RecordBatchFileReader__schema(SEXP reader_sexp){ Rf_error("Cannot call ipc___RecordBatchFileReader__schema(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5123,7 +5122,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ipc___RecordBatchFileReader__num_record_batches(SEXP reader_sexp){ +extern "C" SEXP _arrow_ipc___RecordBatchFileReader__num_record_batches(SEXP reader_sexp){ Rf_error("Cannot call ipc___RecordBatchFileReader__num_record_batches(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5139,7 +5138,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ipc___RecordBatchFileReader__ReadRecordBatch(SEXP reader_sexp, SEXP i_sexp){ +extern "C" SEXP _arrow_ipc___RecordBatchFileReader__ReadRecordBatch(SEXP reader_sexp, SEXP i_sexp){ Rf_error("Cannot call ipc___RecordBatchFileReader__ReadRecordBatch(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5154,7 +5153,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ipc___RecordBatchFileReader__Open(SEXP file_sexp){ +extern "C" SEXP _arrow_ipc___RecordBatchFileReader__Open(SEXP file_sexp){ Rf_error("Cannot call ipc___RecordBatchFileReader__Open(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5169,7 +5168,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Table__from_RecordBatchFileReader(SEXP reader_sexp){ +extern "C" SEXP _arrow_Table__from_RecordBatchFileReader(SEXP reader_sexp){ Rf_error("Cannot call Table__from_RecordBatchFileReader(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5184,7 +5183,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Table__from_RecordBatchStreamReader(SEXP reader_sexp){ +extern "C" SEXP _arrow_Table__from_RecordBatchStreamReader(SEXP reader_sexp){ Rf_error("Cannot call Table__from_RecordBatchStreamReader(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5199,7 +5198,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ipc___RecordBatchFileReader__batches(SEXP reader_sexp){ +extern "C" SEXP _arrow_ipc___RecordBatchFileReader__batches(SEXP reader_sexp){ Rf_error("Cannot call ipc___RecordBatchFileReader__batches(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5216,7 +5215,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ipc___RecordBatchWriter__WriteRecordBatch(SEXP batch_writer_sexp, SEXP batch_sexp){ +extern "C" SEXP _arrow_ipc___RecordBatchWriter__WriteRecordBatch(SEXP batch_writer_sexp, SEXP batch_sexp){ Rf_error("Cannot call ipc___RecordBatchWriter__WriteRecordBatch(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5233,7 +5232,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ipc___RecordBatchWriter__WriteTable(SEXP batch_writer_sexp, SEXP table_sexp){ +extern "C" SEXP _arrow_ipc___RecordBatchWriter__WriteTable(SEXP batch_writer_sexp, SEXP table_sexp){ Rf_error("Cannot call ipc___RecordBatchWriter__WriteTable(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5249,7 +5248,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ipc___RecordBatchWriter__Close(SEXP batch_writer_sexp){ +extern "C" SEXP _arrow_ipc___RecordBatchWriter__Close(SEXP batch_writer_sexp){ Rf_error("Cannot call ipc___RecordBatchWriter__Close(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5267,7 +5266,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ipc___RecordBatchFileWriter__Open(SEXP stream_sexp, SEXP schema_sexp, SEXP use_legacy_format_sexp, SEXP metadata_version_sexp){ +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(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5285,7 +5284,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_ipc___RecordBatchStreamWriter__Open(SEXP stream_sexp, SEXP schema_sexp, SEXP use_legacy_format_sexp, SEXP metadata_version_sexp){ +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(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5301,7 +5300,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Array__GetScalar(SEXP x_sexp, SEXP i_sexp){ +extern "C" SEXP _arrow_Array__GetScalar(SEXP x_sexp, SEXP i_sexp){ Rf_error("Cannot call Array__GetScalar(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5316,7 +5315,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Scalar__ToString(SEXP s_sexp){ +extern "C" SEXP _arrow_Scalar__ToString(SEXP s_sexp){ Rf_error("Cannot call Scalar__ToString(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5332,7 +5331,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Scalar__CastTo(SEXP s_sexp, SEXP t_sexp){ +extern "C" SEXP _arrow_Scalar__CastTo(SEXP s_sexp, SEXP t_sexp){ Rf_error("Cannot call Scalar__CastTo(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5348,7 +5347,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_StructScalar__field(SEXP s_sexp, SEXP i_sexp){ +extern "C" SEXP _arrow_StructScalar__field(SEXP s_sexp, SEXP i_sexp){ Rf_error("Cannot call StructScalar__field(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5364,7 +5363,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_StructScalar__GetFieldByName(SEXP s_sexp, SEXP name_sexp){ +extern "C" SEXP _arrow_StructScalar__GetFieldByName(SEXP s_sexp, SEXP name_sexp){ Rf_error("Cannot call StructScalar__GetFieldByName(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5379,7 +5378,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Scalar__as_vector(SEXP scalar_sexp){ +extern "C" SEXP _arrow_Scalar__as_vector(SEXP scalar_sexp){ Rf_error("Cannot call Scalar__as_vector(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5394,7 +5393,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Scalar__is_valid(SEXP s_sexp){ +extern "C" SEXP _arrow_Scalar__is_valid(SEXP s_sexp){ Rf_error("Cannot call Scalar__is_valid(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5409,7 +5408,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Scalar__type(SEXP s_sexp){ +extern "C" SEXP _arrow_Scalar__type(SEXP s_sexp){ Rf_error("Cannot call Scalar__type(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5424,7 +5423,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_schema_(SEXP fields_sexp){ +extern "C" SEXP _arrow_schema_(SEXP fields_sexp){ Rf_error("Cannot call schema_(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5439,7 +5438,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Schema__ToString(SEXP s_sexp){ +extern "C" SEXP _arrow_Schema__ToString(SEXP s_sexp){ Rf_error("Cannot call Schema__ToString(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5454,7 +5453,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Schema__num_fields(SEXP s_sexp){ +extern "C" SEXP _arrow_Schema__num_fields(SEXP s_sexp){ Rf_error("Cannot call Schema__num_fields(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5470,7 +5469,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Schema__field(SEXP s_sexp, SEXP i_sexp){ +extern "C" SEXP _arrow_Schema__field(SEXP s_sexp, SEXP i_sexp){ Rf_error("Cannot call Schema__field(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5486,7 +5485,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Schema__GetFieldByName(SEXP s_sexp, SEXP x_sexp){ +extern "C" SEXP _arrow_Schema__GetFieldByName(SEXP s_sexp, SEXP x_sexp){ Rf_error("Cannot call Schema__GetFieldByName(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5501,7 +5500,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Schema__fields(SEXP schema_sexp){ +extern "C" SEXP _arrow_Schema__fields(SEXP schema_sexp){ Rf_error("Cannot call Schema__fields(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5516,7 +5515,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Schema__field_names(SEXP schema_sexp){ +extern "C" SEXP _arrow_Schema__field_names(SEXP schema_sexp){ Rf_error("Cannot call Schema__field_names(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5531,7 +5530,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Schema__HasMetadata(SEXP schema_sexp){ +extern "C" SEXP _arrow_Schema__HasMetadata(SEXP schema_sexp){ Rf_error("Cannot call Schema__HasMetadata(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5546,7 +5545,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Schema__metadata(SEXP schema_sexp){ +extern "C" SEXP _arrow_Schema__metadata(SEXP schema_sexp){ Rf_error("Cannot call Schema__metadata(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5562,7 +5561,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Schema__WithMetadata(SEXP schema_sexp, SEXP metadata_sexp){ +extern "C" SEXP _arrow_Schema__WithMetadata(SEXP schema_sexp, SEXP metadata_sexp){ Rf_error("Cannot call Schema__WithMetadata(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5577,7 +5576,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Schema__serialize(SEXP schema_sexp){ +extern "C" SEXP _arrow_Schema__serialize(SEXP schema_sexp){ Rf_error("Cannot call Schema__serialize(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5594,7 +5593,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Schema__Equals(SEXP schema_sexp, SEXP other_sexp, SEXP check_metadata_sexp){ +extern "C" SEXP _arrow_Schema__Equals(SEXP schema_sexp, SEXP other_sexp, SEXP check_metadata_sexp){ Rf_error("Cannot call Schema__Equals(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5609,7 +5608,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_arrow__UnifySchemas(SEXP schemas_sexp){ +extern "C" SEXP _arrow_arrow__UnifySchemas(SEXP schemas_sexp){ Rf_error("Cannot call arrow__UnifySchemas(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5624,7 +5623,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Table__num_columns(SEXP x_sexp){ +extern "C" SEXP _arrow_Table__num_columns(SEXP x_sexp){ Rf_error("Cannot call Table__num_columns(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5639,7 +5638,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Table__num_rows(SEXP x_sexp){ +extern "C" SEXP _arrow_Table__num_rows(SEXP x_sexp){ Rf_error("Cannot call Table__num_rows(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5654,7 +5653,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Table__schema(SEXP x_sexp){ +extern "C" SEXP _arrow_Table__schema(SEXP x_sexp){ Rf_error("Cannot call Table__schema(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5670,7 +5669,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Table__ReplaceSchemaMetadata(SEXP x_sexp, SEXP metadata_sexp){ +extern "C" SEXP _arrow_Table__ReplaceSchemaMetadata(SEXP x_sexp, SEXP metadata_sexp){ Rf_error("Cannot call Table__ReplaceSchemaMetadata(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5686,7 +5685,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Table__column(SEXP table_sexp, SEXP i_sexp){ +extern "C" SEXP _arrow_Table__column(SEXP table_sexp, SEXP i_sexp){ Rf_error("Cannot call Table__column(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5702,7 +5701,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Table__field(SEXP table_sexp, SEXP i_sexp){ +extern "C" SEXP _arrow_Table__field(SEXP table_sexp, SEXP i_sexp){ Rf_error("Cannot call Table__field(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5717,7 +5716,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Table__columns(SEXP table_sexp){ +extern "C" SEXP _arrow_Table__columns(SEXP table_sexp){ Rf_error("Cannot call Table__columns(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5732,7 +5731,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Table__ColumnNames(SEXP table_sexp){ +extern "C" SEXP _arrow_Table__ColumnNames(SEXP table_sexp){ Rf_error("Cannot call Table__ColumnNames(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5748,7 +5747,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Table__Slice1(SEXP table_sexp, SEXP offset_sexp){ +extern "C" SEXP _arrow_Table__Slice1(SEXP table_sexp, SEXP offset_sexp){ Rf_error("Cannot call Table__Slice1(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5765,7 +5764,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Table__Slice2(SEXP table_sexp, SEXP offset_sexp, SEXP length_sexp){ +extern "C" SEXP _arrow_Table__Slice2(SEXP table_sexp, SEXP offset_sexp, SEXP length_sexp){ Rf_error("Cannot call Table__Slice2(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5782,7 +5781,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Table__Equals(SEXP lhs_sexp, SEXP rhs_sexp, SEXP check_metadata_sexp){ +extern "C" SEXP _arrow_Table__Equals(SEXP lhs_sexp, SEXP rhs_sexp, SEXP check_metadata_sexp){ Rf_error("Cannot call Table__Equals(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5797,7 +5796,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Table__Validate(SEXP table_sexp){ +extern "C" SEXP _arrow_Table__Validate(SEXP table_sexp){ Rf_error("Cannot call Table__Validate(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5812,7 +5811,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Table__ValidateFull(SEXP table_sexp){ +extern "C" SEXP _arrow_Table__ValidateFull(SEXP table_sexp){ Rf_error("Cannot call Table__ValidateFull(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5828,7 +5827,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Table__GetColumnByName(SEXP table_sexp, SEXP name_sexp){ +extern "C" SEXP _arrow_Table__GetColumnByName(SEXP table_sexp, SEXP name_sexp){ Rf_error("Cannot call Table__GetColumnByName(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5844,7 +5843,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Table__select(SEXP table_sexp, SEXP indices_sexp){ +extern "C" SEXP _arrow_Table__select(SEXP table_sexp, SEXP indices_sexp){ Rf_error("Cannot call Table__select(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5859,7 +5858,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_all_record_batches(SEXP lst_sexp){ +extern "C" SEXP _arrow_all_record_batches(SEXP lst_sexp){ Rf_error("Cannot call all_record_batches(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5875,7 +5874,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Table__from_record_batches(SEXP batches_sexp, SEXP schema_sxp_sexp){ +extern "C" SEXP _arrow_Table__from_record_batches(SEXP batches_sexp, SEXP schema_sxp_sexp){ Rf_error("Cannot call Table__from_record_batches(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5891,7 +5890,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_Table__from_dots(SEXP lst_sexp, SEXP schema_sxp_sexp){ +extern "C" SEXP _arrow_Table__from_dots(SEXP lst_sexp, SEXP schema_sxp_sexp){ Rf_error("Cannot call Table__from_dots(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5905,7 +5904,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_GetCpuThreadPoolCapacity(){ +extern "C" SEXP _arrow_GetCpuThreadPoolCapacity(){ Rf_error("Cannot call GetCpuThreadPoolCapacity(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -5921,7 +5920,7 @@ BEGIN_CPP11 END_CPP11 } #else -RcppExport SEXP _arrow_SetCpuThreadPoolCapacity(SEXP threads_sexp){ +extern "C" SEXP _arrow_SetCpuThreadPoolCapacity(SEXP threads_sexp){ Rf_error("Cannot call SetCpuThreadPoolCapacity(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif @@ -6332,7 +6331,7 @@ static const R_CallMethodDef CallEntries[] = { {NULL, NULL, 0} }; -RcppExport void R_init_arrow(DllInfo* dll){ +extern "C" void R_init_arrow(DllInfo* dll){ R_registerRoutines(dll, NULL, CallEntries, NULL, NULL); R_useDynamicSymbols(dll, FALSE); } diff --git a/r/src/arrow_rcpp.h b/r/src/arrow_rcpp.h index 81e62af36f4..dfec08b96fc 100644 --- a/r/src/arrow_rcpp.h +++ b/r/src/arrow_rcpp.h @@ -15,16 +15,12 @@ // specific language governing permissions and limitations // under the License. -#include - #include #include #include #include #undef Free -#include - namespace cpp11 { template diff --git a/r/src/arrow_types.h b/r/src/arrow_types.h index 6aac1764efd..8865f8348bd 100644 --- a/r/src/arrow_types.h +++ b/r/src/arrow_types.h @@ -21,21 +21,6 @@ #include "./arrow_rcpp.h" -namespace arrow { -namespace r { - -template -inline constexpr typename Rcpp::Vector::stored_type default_value() { - return Rcpp::Vector::get_na(); -} -template <> -inline constexpr Rbyte default_value() { - return 0; -} - -} // namespace r -} // namespace arrow - #if defined(ARROW_R_WITH_ARROW) #include // for RBuffer definition below @@ -98,6 +83,25 @@ inline double* vector_begin(const cpp11::doubles& vec) { return REAL(vec); } +template +T na() ; + +template <> +inline int na() { + return NA_INTEGER; +}; + +template <> +inline double na() { + return NA_REAL; +}; + +template <> +inline cpp11::r_string na() { + return NA_STRING; +}; + + template class RBuffer : public MutableBuffer { public: From f9f126ec305e9303e17c719e3a36ecf90d3b7a4c Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Tue, 4 Aug 2020 15:25:47 +0200 Subject: [PATCH 15/62] No longer need Rcpp --- r/DESCRIPTION | 1 - r/NAMESPACE | 1 - 2 files changed, 2 deletions(-) diff --git a/r/DESCRIPTION b/r/DESCRIPTION index 1d1204910b1..0d0a6dba502 100644 --- a/r/DESCRIPTION +++ b/r/DESCRIPTION @@ -24,7 +24,6 @@ LazyData: true SystemRequirements: C++11 Biarch: true LinkingTo: - Rcpp (>= 1.0.1), cpp11 Imports: assertthat, diff --git a/r/NAMESPACE b/r/NAMESPACE index be3d5b43780..8adb10125d9 100644 --- a/r/NAMESPACE +++ b/r/NAMESPACE @@ -253,7 +253,6 @@ export(write_ipc_stream) export(write_parquet) export(write_to_raw) importFrom(R6,R6Class) -importFrom(Rcpp,sourceCpp) importFrom(assertthat,assert_that) importFrom(assertthat,is.string) importFrom(bit64,print.integer64) From 80ed2a4000d15a099fe80329916a4f74e6df55d2 Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Tue, 4 Aug 2020 15:38:07 +0000 Subject: [PATCH 16/62] Autoformat/render all the things [automated commit] --- r/src/array_from_vector.cpp | 4 ++-- r/src/array_to_vector.cpp | 39 ++++++++++++++++--------------------- r/src/arrow_types.h | 6 ++---- r/src/io.cpp | 3 +-- r/src/recordbatch.cpp | 7 +++---- r/src/table.cpp | 3 ++- 6 files changed, 27 insertions(+), 35 deletions(-) diff --git a/r/src/array_from_vector.cpp b/r/src/array_from_vector.cpp index b191601993a..1c4e90c7dbb 100644 --- a/r/src/array_from_vector.cpp +++ b/r/src/array_from_vector.cpp @@ -1370,8 +1370,8 @@ std::shared_ptr MakeSimpleArray(SEXP x) { auto n = vec.size(); auto p_vec_start = reinterpret_cast(arrow::r::vector_begin(vec)); auto p_vec_end = p_vec_start + n; - std::vector> buffers{nullptr, - std::make_shared>(vec)}; + std::vector> buffers{ + nullptr, std::make_shared>(vec)}; int null_count = 0; diff --git a/r/src/array_to_vector.cpp b/r/src/array_to_vector.cpp index ba44248eb7b..5e3629ff61d 100644 --- a/r/src/array_to_vector.cpp +++ b/r/src/array_to_vector.cpp @@ -112,7 +112,8 @@ Status Ingest_OnlyNulls(cpp11::r_vector vec, R_xlen_t start, R_xlen_t n) { } template -Status IngestSome(const std::shared_ptr& array, R_xlen_t n, SetNonNull&& set_non_null, SetNull&& set_null) { +Status IngestSome(const std::shared_ptr& array, R_xlen_t n, + SetNonNull&& set_non_null, SetNull&& set_null) { if (array->null_count()) { internal::BitmapReader bitmap_reader(array->null_bitmap()->data(), array->offset(), n); @@ -135,8 +136,9 @@ Status IngestSome(const std::shared_ptr& array, R_xlen_t n, SetNon } template -Status IngestSome(const std::shared_ptr& array, R_xlen_t n, SetNonNull&& set_non_null) { - auto nothing = [](R_xlen_t i){ return Status::OK();}; +Status IngestSome(const std::shared_ptr& array, R_xlen_t n, + SetNonNull&& set_non_null) { + auto nothing = [](R_xlen_t i) { return Status::OK(); }; return IngestSome(array, n, std::forward(set_non_null), nothing); } @@ -154,12 +156,10 @@ template class Converter_Int : public Converter { using value_type = typename TypeTraits::ArrayType::value_type; -public: + public: explicit Converter_Int(const ArrayVector& arrays) : Converter(arrays) {} - SEXP Allocate(R_xlen_t n) const { - return Rf_allocVector(INTSXP, n); - } + SEXP Allocate(R_xlen_t n) const { return Rf_allocVector(INTSXP, n); } Status Ingest_all_nulls(SEXP data, R_xlen_t start, R_xlen_t n) const { std::fill_n(INTEGER(data) + start, n, NA_INTEGER); @@ -190,12 +190,10 @@ template class Converter_Double : public Converter { using value_type = typename TypeTraits::ArrayType::value_type; -public: + public: explicit Converter_Double(const ArrayVector& arrays) : Converter(arrays) {} - SEXP Allocate(R_xlen_t n) const { - return Rf_allocVector(REALSXP, n); - } + SEXP Allocate(R_xlen_t n) const { return Rf_allocVector(REALSXP, n); } Status Ingest_all_nulls(SEXP data, R_xlen_t start, R_xlen_t n) const { std::fill_n(REAL(data) + start, n, NA_REAL); @@ -224,8 +222,7 @@ class Converter_Double : public Converter { class Converter_Date32 : public Converter { public: - explicit Converter_Date32(const ArrayVector& arrays) - : Converter(arrays) {} + explicit Converter_Date32(const ArrayVector& arrays) : Converter(arrays) {} SEXP Allocate(R_xlen_t n) const { SEXP data = PROTECT(Rf_allocVector(REALSXP, n)); @@ -241,7 +238,6 @@ class Converter_Date32 : public Converter { Status Ingest_some_nulls(SEXP data, const std::shared_ptr& array, R_xlen_t start, R_xlen_t n, size_t chunk_index) const { - auto p_values = array->data()->GetValues(1); if (!p_values) { return Status::Invalid("Invalid data buffer"); @@ -729,7 +725,6 @@ class Converter_Time : public Converter { return Status::OK(); }; return IngestSome(array, n, ingest_one, null_one); - } private: @@ -982,7 +977,8 @@ std::shared_ptr Converter::Make(const std::shared_ptr& type switch (type->id()) { // direct support case Type::INT32: - return std::make_shared>(std::move(arrays)); + return std::make_shared>( + std::move(arrays)); case Type::DOUBLE: return std::make_shared>( @@ -1046,8 +1042,8 @@ std::shared_ptr Converter::Make(const std::shared_ptr& type return std::make_shared>( std::move(arrays)); } else { - return std::make_shared< - arrow::r::Converter_Double>(std::move(arrays)); + return std::make_shared>( + std::move(arrays)); } case Type::UINT64: @@ -1055,13 +1051,12 @@ std::shared_ptr Converter::Make(const std::shared_ptr& type return std::make_shared>( std::move(arrays)); } else { - return std::make_shared< - arrow::r::Converter_Double>(std::move(arrays)); + return std::make_shared>( + std::move(arrays)); } case Type::HALF_FLOAT: - return std::make_shared< - arrow::r::Converter_Double>( + return std::make_shared>( std::move(arrays)); case Type::FLOAT: diff --git a/r/src/arrow_types.h b/r/src/arrow_types.h index 8865f8348bd..9076fa204b1 100644 --- a/r/src/arrow_types.h +++ b/r/src/arrow_types.h @@ -66,7 +66,7 @@ void inspect(SEXP obj); constexpr int64_t NA_INT64 = std::numeric_limits::min(); template -typename RVector::value_type* vector_begin(const RVector& vec) ; +typename RVector::value_type* vector_begin(const RVector& vec); template <> inline uint8_t* vector_begin(const cpp11::raws& vec) { @@ -84,7 +84,7 @@ inline double* vector_begin(const cpp11::doubles& vec) { } template -T na() ; +T na(); template <> inline int na() { @@ -101,7 +101,6 @@ inline cpp11::r_string na() { return NA_STRING; }; - template class RBuffer : public MutableBuffer { public: @@ -149,7 +148,6 @@ arrow::Status InferSchemaFromDots(SEXP lst, SEXP schema_sxp, int num_fields, arrow::Status AddMetadataFromDots(SEXP lst, int num_fields, std::shared_ptr& schema); - } // namespace r } // namespace arrow diff --git a/r/src/io.cpp b/r/src/io.cpp index d9384d5ecf3..8cfbea02149 100644 --- a/r/src/io.cpp +++ b/r/src/io.cpp @@ -174,8 +174,7 @@ int64_t io___BufferOutputStream__Tell( // [[arrow::export]] void io___BufferOutputStream__Write( - const std::shared_ptr& stream, - cpp11::raws bytes) { + const std::shared_ptr& stream, cpp11::raws bytes) { StopIfNotOk(stream->Write(RAW(bytes), bytes.size())); } diff --git a/r/src/recordbatch.cpp b/r/src/recordbatch.cpp index bdba77da9c9..d4468369582 100644 --- a/r/src/recordbatch.cpp +++ b/r/src/recordbatch.cpp @@ -47,8 +47,8 @@ std::shared_ptr RecordBatch__ReplaceSchemaMetadata( const std::shared_ptr& x, cpp11::strings metadata) { auto vec_metadata = cpp11::as_cpp>(metadata); auto names_metadata = cpp11::as_cpp>(metadata.names()); - auto kv = std::shared_ptr(new arrow::KeyValueMetadata( - names_metadata, vec_metadata)); + auto kv = std::shared_ptr( + new arrow::KeyValueMetadata(names_metadata, vec_metadata)); return x->ReplaceSchemaMetadata(kv); } @@ -78,8 +78,7 @@ std::shared_ptr RecordBatch__GetColumnByName( // [[arrow::export]] std::shared_ptr RecordBatch__select( - const std::shared_ptr& batch, - cpp11::integers indices) { + const std::shared_ptr& batch, cpp11::integers indices) { R_xlen_t n = indices.size(); auto nrows = batch->num_rows(); diff --git a/r/src/table.cpp b/r/src/table.cpp index d83cf829c3f..a127d19c9d6 100644 --- a/r/src/table.cpp +++ b/r/src/table.cpp @@ -40,7 +40,8 @@ std::shared_ptr Table__ReplaceSchemaMetadata( const std::shared_ptr& x, cpp11::strings metadata) { auto vec_metadata = cpp11::as_cpp>(metadata); auto names_metadata = cpp11::as_cpp>(metadata.names()); - auto kv = std::shared_ptr(new arrow::KeyValueMetadata(names_metadata, vec_metadata)); + auto kv = std::shared_ptr( + new arrow::KeyValueMetadata(names_metadata, vec_metadata)); return x->ReplaceSchemaMetadata(kv); } From 0ad4771fbd833538b32431a4e64b1f1999be5918 Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Wed, 5 Aug 2020 09:27:55 +0200 Subject: [PATCH 17/62] s/Rcpp/cpp11/ --- r/DESCRIPTION | 1 - r/README.md | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/r/DESCRIPTION b/r/DESCRIPTION index 0d0a6dba502..1bb072c0845 100644 --- a/r/DESCRIPTION +++ b/r/DESCRIPTION @@ -31,7 +31,6 @@ Imports: methods, purrr, R6, - Rcpp (>= 1.0.1), rlang, tidyselect, utils, diff --git a/r/README.md b/r/README.md index 28cbeda6fbc..6fb9cba7f35 100644 --- a/r/README.md +++ b/r/README.md @@ -151,7 +151,7 @@ guide](https://arrow.apache.org/docs/developers/cpp/building.html) and ### Editing C++ code -The `arrow` package uses some customized tools on top of `Rcpp` to +The `arrow` package uses some customized tools on top of `cpp11` to prepare its C++ code in `src/`. If you change C++ code in the R package, you will need to set the `ARROW_R_DEV` environment variable to `TRUE` (optionally, add it to your`~/.Renviron` file to persist across From b5c5dbc4749edc90322c04752ad23268ef175f67 Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Wed, 5 Aug 2020 09:28:16 +0200 Subject: [PATCH 18/62] arrow_rcpp -> arrow_cpp11 --- r/src/{arrow_rcpp.h => arrow_cpp11.h} | 0 r/src/arrow_exports.h | 2 +- r/src/arrow_types.h | 3 +-- 3 files changed, 2 insertions(+), 3 deletions(-) rename r/src/{arrow_rcpp.h => arrow_cpp11.h} (100%) diff --git a/r/src/arrow_rcpp.h b/r/src/arrow_cpp11.h similarity index 100% rename from r/src/arrow_rcpp.h rename to r/src/arrow_cpp11.h diff --git a/r/src/arrow_exports.h b/r/src/arrow_exports.h index d9731923a7a..92d451de795 100644 --- a/r/src/arrow_exports.h +++ b/r/src/arrow_exports.h @@ -19,7 +19,7 @@ #pragma once -#include "./arrow_rcpp.h" +#include "./arrow_cpp11.h" #if defined(ARROW_R_WITH_ARROW) #include diff --git a/r/src/arrow_types.h b/r/src/arrow_types.h index 9076fa204b1..a61de32e994 100644 --- a/r/src/arrow_types.h +++ b/r/src/arrow_types.h @@ -18,8 +18,7 @@ #pragma once #include - -#include "./arrow_rcpp.h" +#include "./arrow_cpp11.h" #if defined(ARROW_R_WITH_ARROW) From f36ff3d1a781f7590d1b8020c8338926d1fec920 Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Wed, 5 Aug 2020 12:30:57 +0200 Subject: [PATCH 19/62] cpp11 handles enums, but this needs https://github.com/r-lib/cpp11/pull/74 --- r/DESCRIPTION | 2 ++ r/src/arrow_cpp11.h | 18 +----------------- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/r/DESCRIPTION b/r/DESCRIPTION index 1bb072c0845..d18beeec06a 100644 --- a/r/DESCRIPTION +++ b/r/DESCRIPTION @@ -49,6 +49,8 @@ Suggests: rmarkdown, testthat, tibble +Remotes: + r-lib/cpp11#74 Collate: 'enums.R' 'arrow-package.R' diff --git a/r/src/arrow_cpp11.h b/r/src/arrow_cpp11.h index dfec08b96fc..f59a58e2173 100644 --- a/r/src/arrow_cpp11.h +++ b/r/src/arrow_cpp11.h @@ -79,8 +79,7 @@ struct ns { class Index { public: - // TODO: uncomment when this is merged in cpp11: https://github.com/r-lib/cpp11/pull/58 - /*explicit*/ Index(SEXP x) : index_(validate_index(x)) {} // NOLINT runtime/explicit + Index(SEXP x) : index_(validate_index(x)) {} inline operator R_xlen_t() const { return index_; } @@ -107,21 +106,6 @@ class Index { } }; -} // namespace r -} // namespace arrow - -namespace cpp11 { - -template -typename std::enable_if::value, E>::type as_cpp(SEXP from) { - return E(cpp11::as_cpp(from)); -} - -} // namespace cpp11 - -namespace arrow { -namespace r { - template Pointer r6_to_pointer(SEXP self) { return reinterpret_cast( From 84d542dbb8475015050d1ec7463a71b9cb456442 Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Wed, 5 Aug 2020 13:08:06 +0200 Subject: [PATCH 20/62] no longer need class arrow::r::Index --- r/src/array.cpp | 18 ++++----- r/src/arrowExports.cpp | 84 +++++++++++++++++++++--------------------- r/src/arrow_cpp11.h | 29 --------------- r/src/arrow_types.h | 4 +- r/src/chunkedarray.cpp | 6 +-- r/src/compression.cpp | 2 +- r/src/datatype.cpp | 2 +- r/src/recordbatch.cpp | 12 +++--- r/src/table.cpp | 10 ++--- 9 files changed, 69 insertions(+), 98 deletions(-) diff --git a/r/src/array.cpp b/r/src/array.cpp index d63be8f40c0..4533ab365ec 100644 --- a/r/src/array.cpp +++ b/r/src/array.cpp @@ -22,7 +22,7 @@ #include #include -void arrow::r::validate_slice_offset(arrow::r::Index offset, int64_t len) { +void arrow::r::validate_slice_offset(R_xlen_t offset, int64_t len) { if (offset == NA_INTEGER) { cpp11::stop("Slice 'offset' cannot be NA"); } @@ -34,7 +34,7 @@ void arrow::r::validate_slice_offset(arrow::r::Index offset, int64_t len) { } } -void arrow::r::validate_slice_length(arrow::r::Index length, int64_t available) { +void arrow::r::validate_slice_length(R_xlen_t length, int64_t available) { if (length == NA_INTEGER) { cpp11::stop("Slice 'length' cannot be NA"); } @@ -48,15 +48,15 @@ void arrow::r::validate_slice_length(arrow::r::Index length, int64_t available) // [[arrow::export]] std::shared_ptr Array__Slice1(const std::shared_ptr& array, - arrow::r::Index offset) { + R_xlen_t offset) { arrow::r::validate_slice_offset(offset, array->length()); return array->Slice(offset); } // [[arrow::export]] std::shared_ptr Array__Slice2(const std::shared_ptr& array, - arrow::r::Index offset, - arrow::r::Index length) { + R_xlen_t offset, + R_xlen_t length) { arrow::r::validate_slice_offset(offset, array->length()); arrow::r::validate_slice_length(length, array->length() - offset); return array->Slice(offset, length); @@ -72,13 +72,13 @@ void arrow::r::validate_index(int i, int len) { } // [[arrow::export]] -bool Array__IsNull(const std::shared_ptr& x, arrow::r::Index i) { +bool Array__IsNull(const std::shared_ptr& x, R_xlen_t i) { arrow::r::validate_index(i, x->length()); return x->IsNull(i); } // [[arrow::export]] -bool Array__IsValid(const std::shared_ptr& x, arrow::r::Index i) { +bool Array__IsValid(const std::shared_ptr& x, R_xlen_t i) { arrow::r::validate_index(i, x->length()); return x->IsValid(i); } @@ -128,8 +128,8 @@ std::shared_ptr Array__data( // [[arrow::export]] bool Array__RangeEquals(const std::shared_ptr& self, const std::shared_ptr& other, - arrow::r::Index start_idx, arrow::r::Index end_idx, - arrow::r::Index other_start_idx) { + R_xlen_t start_idx, R_xlen_t end_idx, + R_xlen_t other_start_idx) { if (start_idx == NA_INTEGER) { cpp11::stop("'start_idx' cannot be NA"); } diff --git a/r/src/arrowExports.cpp b/r/src/arrowExports.cpp index 9c8debe7b49..50c6da2f8c2 100644 --- a/r/src/arrowExports.cpp +++ b/r/src/arrowExports.cpp @@ -6,11 +6,11 @@ // array.cpp #if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Array__Slice1(const std::shared_ptr& array, arrow::r::Index offset); +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); - arrow::r::input::type offset(offset_sexp); + arrow::r::input::type offset(offset_sexp); return cpp11::as_sexp(Array__Slice1(array, offset)); END_CPP11 } @@ -22,12 +22,12 @@ extern "C" SEXP _arrow_Array__Slice1(SEXP array_sexp, SEXP offset_sexp){ // array.cpp #if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Array__Slice2(const std::shared_ptr& array, arrow::r::Index offset, arrow::r::Index length); +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); - arrow::r::input::type offset(offset_sexp); - arrow::r::input::type length(length_sexp); + arrow::r::input::type offset(offset_sexp); + arrow::r::input::type length(length_sexp); return cpp11::as_sexp(Array__Slice2(array, offset, length)); END_CPP11 } @@ -39,11 +39,11 @@ extern "C" SEXP _arrow_Array__Slice2(SEXP array_sexp, SEXP offset_sexp, SEXP len // array.cpp #if defined(ARROW_R_WITH_ARROW) -bool Array__IsNull(const std::shared_ptr& x, arrow::r::Index i); +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); - arrow::r::input::type i(i_sexp); + arrow::r::input::type i(i_sexp); return cpp11::as_sexp(Array__IsNull(x, i)); END_CPP11 } @@ -55,11 +55,11 @@ extern "C" SEXP _arrow_Array__IsNull(SEXP x_sexp, SEXP i_sexp){ // array.cpp #if defined(ARROW_R_WITH_ARROW) -bool Array__IsValid(const std::shared_ptr& x, arrow::r::Index i); +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); - arrow::r::input::type i(i_sexp); + arrow::r::input::type i(i_sexp); return cpp11::as_sexp(Array__IsValid(x, i)); END_CPP11 } @@ -208,14 +208,14 @@ extern "C" SEXP _arrow_Array__data(SEXP array_sexp){ // array.cpp #if defined(ARROW_R_WITH_ARROW) -bool Array__RangeEquals(const std::shared_ptr& self, const std::shared_ptr& other, arrow::r::Index start_idx, arrow::r::Index end_idx, arrow::r::Index other_start_idx); +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); arrow::r::input&>::type other(other_sexp); - arrow::r::input::type start_idx(start_idx_sexp); - arrow::r::input::type end_idx(end_idx_sexp); - arrow::r::input::type other_start_idx(other_start_idx_sexp); + arrow::r::input::type start_idx(start_idx_sexp); + arrow::r::input::type end_idx(end_idx_sexp); + arrow::r::input::type other_start_idx(other_start_idx_sexp); return cpp11::as_sexp(Array__RangeEquals(self, other, start_idx, end_idx, other_start_idx)); END_CPP11 } @@ -921,11 +921,11 @@ extern "C" SEXP _arrow_ChunkedArray__type(SEXP chunked_array_sexp){ // chunkedarray.cpp #if defined(ARROW_R_WITH_ARROW) -std::shared_ptr ChunkedArray__Slice1(const std::shared_ptr& chunked_array, arrow::r::Index offset); +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); - arrow::r::input::type offset(offset_sexp); + arrow::r::input::type offset(offset_sexp); return cpp11::as_sexp(ChunkedArray__Slice1(chunked_array, offset)); END_CPP11 } @@ -937,12 +937,12 @@ extern "C" SEXP _arrow_ChunkedArray__Slice1(SEXP chunked_array_sexp, SEXP offset // chunkedarray.cpp #if defined(ARROW_R_WITH_ARROW) -std::shared_ptr ChunkedArray__Slice2(const std::shared_ptr& chunked_array, arrow::r::Index offset, arrow::r::Index length); +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); - arrow::r::input::type offset(offset_sexp); - arrow::r::input::type length(length_sexp); + arrow::r::input::type offset(offset_sexp); + arrow::r::input::type length(length_sexp); return cpp11::as_sexp(ChunkedArray__Slice2(chunked_array, offset, length)); END_CPP11 } @@ -1017,11 +1017,11 @@ extern "C" SEXP _arrow_ChunkedArray__ToString(SEXP x_sexp){ // compression.cpp #if defined(ARROW_R_WITH_ARROW) -std::shared_ptr util___Codec__Create(arrow::Compression::type codec, arrow::r::Index compression_level); +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); - arrow::r::input::type compression_level(compression_level_sexp); + arrow::r::input::type compression_level(compression_level_sexp); return cpp11::as_sexp(util___Codec__Create(codec, compression_level)); END_CPP11 } @@ -2125,10 +2125,10 @@ extern "C" SEXP _arrow_Decimal128Type__initialize(SEXP precision_sexp, SEXP scal // datatype.cpp #if defined(ARROW_R_WITH_ARROW) -std::shared_ptr FixedSizeBinary__initialize(arrow::r::Index byte_width); +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); + arrow::r::input::type byte_width(byte_width_sexp); return cpp11::as_sexp(FixedSizeBinary__initialize(byte_width)); END_CPP11 } @@ -4847,11 +4847,11 @@ extern "C" SEXP _arrow_RecordBatch__columns(SEXP batch_sexp){ // recordbatch.cpp #if defined(ARROW_R_WITH_ARROW) -std::shared_ptr RecordBatch__column(const std::shared_ptr& batch, arrow::r::Index i); +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); - arrow::r::input::type i(i_sexp); + arrow::r::input::type i(i_sexp); return cpp11::as_sexp(RecordBatch__column(batch, i)); END_CPP11 } @@ -4912,11 +4912,11 @@ extern "C" SEXP _arrow_RecordBatch__Equals(SEXP self_sexp, SEXP other_sexp, SEXP // recordbatch.cpp #if defined(ARROW_R_WITH_ARROW) -std::shared_ptr RecordBatch__RemoveColumn(const std::shared_ptr& batch, arrow::r::Index i); +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); - arrow::r::input::type i(i_sexp); + arrow::r::input::type i(i_sexp); return cpp11::as_sexp(RecordBatch__RemoveColumn(batch, i)); END_CPP11 } @@ -4928,11 +4928,11 @@ extern "C" SEXP _arrow_RecordBatch__RemoveColumn(SEXP batch_sexp, SEXP i_sexp){ // recordbatch.cpp #if defined(ARROW_R_WITH_ARROW) -std::string RecordBatch__column_name(const std::shared_ptr& batch, arrow::r::Index i); +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); - arrow::r::input::type i(i_sexp); + arrow::r::input::type i(i_sexp); return cpp11::as_sexp(RecordBatch__column_name(batch, i)); END_CPP11 } @@ -4959,11 +4959,11 @@ extern "C" SEXP _arrow_RecordBatch__names(SEXP batch_sexp){ // recordbatch.cpp #if defined(ARROW_R_WITH_ARROW) -std::shared_ptr RecordBatch__Slice1(const std::shared_ptr& self, arrow::r::Index offset); +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); - arrow::r::input::type offset(offset_sexp); + arrow::r::input::type offset(offset_sexp); return cpp11::as_sexp(RecordBatch__Slice1(self, offset)); END_CPP11 } @@ -4975,12 +4975,12 @@ extern "C" SEXP _arrow_RecordBatch__Slice1(SEXP self_sexp, SEXP offset_sexp){ // recordbatch.cpp #if defined(ARROW_R_WITH_ARROW) -std::shared_ptr RecordBatch__Slice2(const std::shared_ptr& self, arrow::r::Index offset, arrow::r::Index length); +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); - arrow::r::input::type offset(offset_sexp); - arrow::r::input::type length(length_sexp); + arrow::r::input::type offset(offset_sexp); + arrow::r::input::type length(length_sexp); return cpp11::as_sexp(RecordBatch__Slice2(self, offset, length)); END_CPP11 } @@ -5676,11 +5676,11 @@ extern "C" SEXP _arrow_Table__ReplaceSchemaMetadata(SEXP x_sexp, SEXP metadata_s // table.cpp #if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Table__column(const std::shared_ptr& table, arrow::r::Index i); +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); - arrow::r::input::type i(i_sexp); + arrow::r::input::type i(i_sexp); return cpp11::as_sexp(Table__column(table, i)); END_CPP11 } @@ -5692,11 +5692,11 @@ extern "C" SEXP _arrow_Table__column(SEXP table_sexp, SEXP i_sexp){ // table.cpp #if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Table__field(const std::shared_ptr& table, arrow::r::Index i); +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); - arrow::r::input::type i(i_sexp); + arrow::r::input::type i(i_sexp); return cpp11::as_sexp(Table__field(table, i)); END_CPP11 } @@ -5738,11 +5738,11 @@ extern "C" SEXP _arrow_Table__ColumnNames(SEXP table_sexp){ // table.cpp #if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Table__Slice1(const std::shared_ptr& table, arrow::r::Index offset); +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); - arrow::r::input::type offset(offset_sexp); + arrow::r::input::type offset(offset_sexp); return cpp11::as_sexp(Table__Slice1(table, offset)); END_CPP11 } @@ -5754,12 +5754,12 @@ extern "C" SEXP _arrow_Table__Slice1(SEXP table_sexp, SEXP offset_sexp){ // table.cpp #if defined(ARROW_R_WITH_ARROW) -std::shared_ptr Table__Slice2(const std::shared_ptr& table, arrow::r::Index offset, arrow::r::Index length); +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); - arrow::r::input::type offset(offset_sexp); - arrow::r::input::type length(length_sexp); + arrow::r::input::type offset(offset_sexp); + arrow::r::input::type length(length_sexp); return cpp11::as_sexp(Table__Slice2(table, offset, length)); END_CPP11 } diff --git a/r/src/arrow_cpp11.h b/r/src/arrow_cpp11.h index f59a58e2173..45adfba111a 100644 --- a/r/src/arrow_cpp11.h +++ b/r/src/arrow_cpp11.h @@ -77,35 +77,6 @@ struct ns { static SEXP arrow; }; -class Index { - public: - Index(SEXP x) : index_(validate_index(x)) {} - - inline operator R_xlen_t() const { return index_; } - - private: - R_xlen_t index_; - - static R_xlen_t validate_index(SEXP x) { - if (XLENGTH(x) == 1) { - switch (TYPEOF(x)) { - case INTSXP: - return INTEGER_ELT(x, 0); - case REALSXP: - if (cpp11::is_convertable_without_loss_to_integer(REAL_ELT(x, 0))) - return REAL_ELT(x, 0); - case LGLSXP: - return LOGICAL_ELT(x, 0); - default: - break; - } - } - - cpp11::stop("Expected single integer value"); - return 0; - } -}; - template Pointer r6_to_pointer(SEXP self) { return reinterpret_cast( diff --git a/r/src/arrow_types.h b/r/src/arrow_types.h index a61de32e994..b4dc95c184c 100644 --- a/r/src/arrow_types.h +++ b/r/src/arrow_types.h @@ -115,9 +115,9 @@ class RBuffer : public MutableBuffer { std::shared_ptr InferArrowTypeFromFactor(SEXP); -void validate_slice_offset(arrow::r::Index offset, int64_t len); +void validate_slice_offset(R_xlen_t offset, int64_t len); -void validate_slice_length(arrow::r::Index length, int64_t available); +void validate_slice_length(R_xlen_t length, int64_t available); void validate_index(int i, int len); diff --git a/r/src/chunkedarray.cpp b/r/src/chunkedarray.cpp index 2d2774587c7..f52f20ee0de 100644 --- a/r/src/chunkedarray.cpp +++ b/r/src/chunkedarray.cpp @@ -57,15 +57,15 @@ std::shared_ptr ChunkedArray__type( // [[arrow::export]] std::shared_ptr ChunkedArray__Slice1( - const std::shared_ptr& chunked_array, arrow::r::Index offset) { + const std::shared_ptr& chunked_array, R_xlen_t offset) { arrow::r::validate_slice_offset(offset, chunked_array->length()); return chunked_array->Slice(offset); } // [[arrow::export]] std::shared_ptr ChunkedArray__Slice2( - const std::shared_ptr& chunked_array, arrow::r::Index offset, - arrow::r::Index length) { + const std::shared_ptr& chunked_array, R_xlen_t offset, + R_xlen_t length) { arrow::r::validate_slice_offset(offset, chunked_array->length()); arrow::r::validate_slice_length(length, chunked_array->length() - offset); return chunked_array->Slice(offset, length); diff --git a/r/src/compression.cpp b/r/src/compression.cpp index fdcceab10a9..688acf7b68b 100644 --- a/r/src/compression.cpp +++ b/r/src/compression.cpp @@ -23,7 +23,7 @@ // [[arrow::export]] std::shared_ptr util___Codec__Create( - arrow::Compression::type codec, arrow::r::Index compression_level) { + arrow::Compression::type codec, R_xlen_t compression_level) { return ValueOrStop(arrow::util::Codec::Create(codec, compression_level)); } diff --git a/r/src/datatype.cpp b/r/src/datatype.cpp index a8454b134db..81d2bd40dd7 100644 --- a/r/src/datatype.cpp +++ b/r/src/datatype.cpp @@ -99,7 +99,7 @@ std::shared_ptr Decimal128Type__initialize(int32_t precision, } // [[arrow::export]] -std::shared_ptr FixedSizeBinary__initialize(arrow::r::Index byte_width) { +std::shared_ptr FixedSizeBinary__initialize(R_xlen_t byte_width) { if (byte_width == NA_INTEGER) { cpp11::stop("'byte_width' cannot be NA"); } diff --git a/r/src/recordbatch.cpp b/r/src/recordbatch.cpp index d4468369582..3189b11290c 100644 --- a/r/src/recordbatch.cpp +++ b/r/src/recordbatch.cpp @@ -65,7 +65,7 @@ arrow::ArrayVector RecordBatch__columns( // [[arrow::export]] std::shared_ptr RecordBatch__column( - const std::shared_ptr& batch, arrow::r::Index i) { + const std::shared_ptr& batch, R_xlen_t i) { arrow::r::validate_index(i, batch->num_columns()); return batch->column(i); } @@ -104,14 +104,14 @@ bool RecordBatch__Equals(const std::shared_ptr& self, // [[arrow::export]] std::shared_ptr RecordBatch__RemoveColumn( - const std::shared_ptr& batch, arrow::r::Index i) { + const std::shared_ptr& batch, R_xlen_t i) { arrow::r::validate_index(i, batch->num_columns()); return ValueOrStop(batch->RemoveColumn(i)); } // [[arrow::export]] std::string RecordBatch__column_name(const std::shared_ptr& batch, - arrow::r::Index i) { + R_xlen_t i) { arrow::r::validate_index(i, batch->num_columns()); return batch->column_name(i); } @@ -129,15 +129,15 @@ cpp11::writable::strings RecordBatch__names( // [[arrow::export]] std::shared_ptr RecordBatch__Slice1( - const std::shared_ptr& self, arrow::r::Index offset) { + const std::shared_ptr& self, R_xlen_t offset) { arrow::r::validate_slice_offset(offset, self->num_rows()); return self->Slice(offset); } // [[arrow::export]] std::shared_ptr RecordBatch__Slice2( - const std::shared_ptr& self, arrow::r::Index offset, - arrow::r::Index length) { + const std::shared_ptr& self, R_xlen_t offset, + R_xlen_t length) { arrow::r::validate_slice_offset(offset, self->num_rows()); arrow::r::validate_slice_length(length, self->num_rows() - offset); return self->Slice(offset, length); diff --git a/r/src/table.cpp b/r/src/table.cpp index a127d19c9d6..f98f18131af 100644 --- a/r/src/table.cpp +++ b/r/src/table.cpp @@ -47,14 +47,14 @@ std::shared_ptr Table__ReplaceSchemaMetadata( // [[arrow::export]] std::shared_ptr Table__column( - const std::shared_ptr& table, arrow::r::Index i) { + const std::shared_ptr& table, R_xlen_t i) { arrow::r::validate_index(i, table->num_columns()); return table->column(i); } // [[arrow::export]] std::shared_ptr Table__field(const std::shared_ptr& table, - arrow::r::Index i) { + R_xlen_t i) { arrow::r::validate_index(i, table->num_columns()); return table->field(i); } @@ -77,15 +77,15 @@ std::vector Table__ColumnNames(const std::shared_ptr& // [[arrow::export]] std::shared_ptr Table__Slice1(const std::shared_ptr& table, - arrow::r::Index offset) { + R_xlen_t offset) { arrow::r::validate_slice_offset(offset, table->num_rows()); return table->Slice(offset); } // [[arrow::export]] std::shared_ptr Table__Slice2(const std::shared_ptr& table, - arrow::r::Index offset, - arrow::r::Index length) { + R_xlen_t offset, + R_xlen_t length) { arrow::r::validate_slice_offset(offset, table->num_rows()); arrow::r::validate_slice_length(length, table->num_rows() - offset); return table->Slice(offset, length); From cd8c040b400feff05e189a479d4dc20baacadb8c Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Wed, 5 Aug 2020 13:42:08 +0200 Subject: [PATCH 21/62] lint --- r/src/array.cpp | 8 +++----- r/src/arrow_types.h | 1 + r/src/compression.cpp | 4 ++-- r/src/recordbatch.cpp | 3 +-- r/src/table.cpp | 3 +-- 5 files changed, 8 insertions(+), 11 deletions(-) diff --git a/r/src/array.cpp b/r/src/array.cpp index 4533ab365ec..844ac2a704d 100644 --- a/r/src/array.cpp +++ b/r/src/array.cpp @@ -55,8 +55,7 @@ std::shared_ptr Array__Slice1(const std::shared_ptr& // [[arrow::export]] std::shared_ptr Array__Slice2(const std::shared_ptr& array, - R_xlen_t offset, - R_xlen_t length) { + R_xlen_t offset, R_xlen_t length) { arrow::r::validate_slice_offset(offset, array->length()); arrow::r::validate_slice_length(length, array->length() - offset); return array->Slice(offset, length); @@ -127,9 +126,8 @@ std::shared_ptr Array__data( // [[arrow::export]] 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) { + const std::shared_ptr& other, R_xlen_t start_idx, + R_xlen_t end_idx, R_xlen_t other_start_idx) { if (start_idx == NA_INTEGER) { cpp11::stop("'start_idx' cannot be NA"); } diff --git a/r/src/arrow_types.h b/r/src/arrow_types.h index b4dc95c184c..ed40ec4bb79 100644 --- a/r/src/arrow_types.h +++ b/r/src/arrow_types.h @@ -18,6 +18,7 @@ #pragma once #include + #include "./arrow_cpp11.h" #if defined(ARROW_R_WITH_ARROW) diff --git a/r/src/compression.cpp b/r/src/compression.cpp index 688acf7b68b..c406649a74b 100644 --- a/r/src/compression.cpp +++ b/r/src/compression.cpp @@ -22,8 +22,8 @@ #include // [[arrow::export]] -std::shared_ptr util___Codec__Create( - arrow::Compression::type codec, R_xlen_t compression_level) { +std::shared_ptr util___Codec__Create(arrow::Compression::type codec, + R_xlen_t compression_level) { return ValueOrStop(arrow::util::Codec::Create(codec, compression_level)); } diff --git a/r/src/recordbatch.cpp b/r/src/recordbatch.cpp index 3189b11290c..acf17da7d76 100644 --- a/r/src/recordbatch.cpp +++ b/r/src/recordbatch.cpp @@ -136,8 +136,7 @@ std::shared_ptr RecordBatch__Slice1( // [[arrow::export]] std::shared_ptr RecordBatch__Slice2( - const std::shared_ptr& self, R_xlen_t offset, - R_xlen_t length) { + const std::shared_ptr& self, R_xlen_t offset, R_xlen_t length) { arrow::r::validate_slice_offset(offset, self->num_rows()); arrow::r::validate_slice_length(length, self->num_rows() - offset); return self->Slice(offset, length); diff --git a/r/src/table.cpp b/r/src/table.cpp index f98f18131af..c3f9ffd6c25 100644 --- a/r/src/table.cpp +++ b/r/src/table.cpp @@ -84,8 +84,7 @@ std::shared_ptr Table__Slice1(const std::shared_ptr& // [[arrow::export]] std::shared_ptr Table__Slice2(const std::shared_ptr& table, - R_xlen_t offset, - R_xlen_t length) { + R_xlen_t offset, R_xlen_t length) { arrow::r::validate_slice_offset(offset, table->num_rows()); arrow::r::validate_slice_length(length, table->num_rows() - offset); return table->Slice(offset, length); From f1659ae9b0a6543b608fbff43fd69efcf907461b Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Wed, 5 Aug 2020 13:43:18 +0200 Subject: [PATCH 22/62] You don't need a ; after a } --- r/src/arrow_types.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/r/src/arrow_types.h b/r/src/arrow_types.h index ed40ec4bb79..5241ae84a25 100644 --- a/r/src/arrow_types.h +++ b/r/src/arrow_types.h @@ -89,17 +89,17 @@ T na(); template <> inline int na() { return NA_INTEGER; -}; +} template <> inline double na() { return NA_REAL; -}; +} template <> inline cpp11::r_string na() { return NA_STRING; -}; +} template class RBuffer : public MutableBuffer { From b5117864b840ba416f8e5e5992923f3f10d10d5b Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Wed, 5 Aug 2020 14:07:09 +0200 Subject: [PATCH 23/62] use DATAPTR() instead of vector_begin() --- r/src/array_from_vector.cpp | 2 +- r/src/array_to_vector.cpp | 7 ------- r/src/arrow_types.h | 38 +------------------------------------ 3 files changed, 2 insertions(+), 45 deletions(-) diff --git a/r/src/array_from_vector.cpp b/r/src/array_from_vector.cpp index 1c4e90c7dbb..9e966ae57a3 100644 --- a/r/src/array_from_vector.cpp +++ b/r/src/array_from_vector.cpp @@ -1368,7 +1368,7 @@ std::shared_ptr MakeSimpleArray(SEXP x) { using value_type = typename arrow::TypeTraits::ArrayType::value_type; RVector vec(x); auto n = vec.size(); - auto p_vec_start = reinterpret_cast(arrow::r::vector_begin(vec)); + auto p_vec_start = reinterpret_cast(DATAPTR(vec)); auto p_vec_end = p_vec_start + n; std::vector> buffers{ nullptr, std::make_shared>(vec)}; diff --git a/r/src/array_to_vector.cpp b/r/src/array_to_vector.cpp index 5e3629ff61d..c69c40a8910 100644 --- a/r/src/array_to_vector.cpp +++ b/r/src/array_to_vector.cpp @@ -104,13 +104,6 @@ class Converter { ArrayVector arrays_; }; -template -Status Ingest_OnlyNulls(cpp11::r_vector vec, R_xlen_t start, R_xlen_t n) { - auto p_data = arrow::r::vector_begin(vec) + start; - std::fill_n(p_data, n, arrow::r::na()); - return Status::OK(); -} - template Status IngestSome(const std::shared_ptr& array, R_xlen_t n, SetNonNull&& set_non_null, SetNull&& set_null) { diff --git a/r/src/arrow_types.h b/r/src/arrow_types.h index 5241ae84a25..e1951db7436 100644 --- a/r/src/arrow_types.h +++ b/r/src/arrow_types.h @@ -65,47 +65,11 @@ void inspect(SEXP obj); // the integer64 sentinel constexpr int64_t NA_INT64 = std::numeric_limits::min(); -template -typename RVector::value_type* vector_begin(const RVector& vec); - -template <> -inline uint8_t* vector_begin(const cpp11::raws& vec) { - return RAW(vec); -} - -template <> -inline int* vector_begin(const cpp11::integers& vec) { - return INTEGER(vec); -} - -template <> -inline double* vector_begin(const cpp11::doubles& vec) { - return REAL(vec); -} - -template -T na(); - -template <> -inline int na() { - return NA_INTEGER; -} - -template <> -inline double na() { - return NA_REAL; -} - -template <> -inline cpp11::r_string na() { - return NA_STRING; -} - template class RBuffer : public MutableBuffer { public: explicit RBuffer(RVector vec) - : MutableBuffer(reinterpret_cast(arrow::r::vector_begin(vec)), + : MutableBuffer(reinterpret_cast(DATAPTR(vec)), vec.size() * sizeof(typename RVector::value_type)), vec_(vec) {} From 5bbdbd724de30458b42e0a3c406729290b7913b3 Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Wed, 5 Aug 2020 16:22:00 +0200 Subject: [PATCH 24/62] + TraverseDotsNoName for when traversing ... without dealing wkth the names --- r/src/arrow_types.h | 19 +++++++++++++++++++ r/src/recordbatch.cpp | 4 ++-- r/src/table.cpp | 16 +++++++--------- 3 files changed, 28 insertions(+), 11 deletions(-) diff --git a/r/src/arrow_types.h b/r/src/arrow_types.h index e1951db7436..ab1e09230e2 100644 --- a/r/src/arrow_types.h +++ b/r/src/arrow_types.h @@ -106,6 +106,25 @@ void TraverseDots(SEXP dots, int num_fields, Lambda lambda) { } } +template +void TraverseDotsNoName(SEXP dots, int num_fields, Lambda lambda) { + SEXP names = Rf_getAttrib(dots, R_NamesSymbol); + + for (R_xlen_t i = 0, j = 0; j < num_fields; i++) { + SEXP name_i = STRING_ELT(names, i); + SEXP x_i = VECTOR_ELT(dots, i); + + if (LENGTH(name_i) == 0) { + for (R_xlen_t k = 0; k < XLENGTH(x_i); k++, j++) { + lambda(j, VECTOR_ELT(x_i, k)); + } + } else { + lambda(j, x_i); + j++; + } + } +} + arrow::Status InferSchemaFromDots(SEXP lst, SEXP schema_sxp, int num_fields, std::shared_ptr& schema); diff --git a/r/src/recordbatch.cpp b/r/src/recordbatch.cpp index acf17da7d76..a4e6f9dd571 100644 --- a/r/src/recordbatch.cpp +++ b/r/src/recordbatch.cpp @@ -263,10 +263,10 @@ namespace r { arrow::Status CollectRecordBatchArrays( SEXP lst, const std::shared_ptr& schema, int num_fields, bool inferred, std::vector>& arrays) { - auto extract_one_array = [&arrays, &schema, inferred](int j, SEXP x, SEXP name) { + auto extract_one_array = [&arrays, &schema, inferred](int j, SEXP x) { arrays[j] = arrow::r::Array__from_vector(x, schema->field(j)->type(), inferred); }; - arrow::r::TraverseDots(lst, num_fields, extract_one_array); + arrow::r::TraverseDotsNoName(lst, num_fields, extract_one_array); return arrow::Status::OK(); } diff --git a/r/src/table.cpp b/r/src/table.cpp index c3f9ffd6c25..5807cb74ff2 100644 --- a/r/src/table.cpp +++ b/r/src/table.cpp @@ -150,18 +150,16 @@ arrow::Status InferSchemaFromDots(SEXP lst, SEXP schema_sxp, int num_fields, // infer the schema from the `...` std::vector> fields(num_fields); - auto extract_one_field = [&fields](int j, SEXP x, SEXP name) { - // Make sure we're ingesting UTF-8 - name = Rf_mkCharCE(Rf_translateCharUTF8(name), CE_UTF8); + auto extract_one_field = [&fields](int j, SEXP x, cpp11::r_string name) { if (Rf_inherits(x, "ChunkedArray")) { fields[j] = arrow::field( - CHAR(name), cpp11::as_cpp>(x)->type()); + name, cpp11::as_cpp>(x)->type()); } else if (Rf_inherits(x, "Array")) { - fields[j] = arrow::field(CHAR(name), - cpp11::as_cpp>(x)->type()); + fields[j] = + arrow::field(name, cpp11::as_cpp>(x)->type()); } else { // TODO: we just need the type at this point - fields[j] = arrow::field(CHAR(name), arrow::r::InferArrowType(x)); + fields[j] = arrow::field(name, arrow::r::InferArrowType(x)); } }; arrow::r::TraverseDots(lst, num_fields, extract_one_field); @@ -310,7 +308,7 @@ arrow::Status AddMetadataFromDots(SEXP lst, int num_fields, arrow::Status CollectTableColumns( SEXP lst, const std::shared_ptr& schema, int num_fields, bool inferred, std::vector>& columns) { - auto extract_one_column = [&columns, &schema, inferred](int j, SEXP x, SEXP name) { + auto extract_one_column = [&columns, &schema, inferred](int j, SEXP x) { if (Rf_inherits(x, "ChunkedArray")) { columns[j] = cpp11::as_cpp>(x); } else if (Rf_inherits(x, "Array")) { @@ -321,7 +319,7 @@ arrow::Status CollectTableColumns( columns[j] = std::make_shared(array); } }; - arrow::r::TraverseDots(lst, num_fields, extract_one_column); + arrow::r::TraverseDotsNoName(lst, num_fields, extract_one_column); return arrow::Status::OK(); } From 2d5fc61759a1a14064265e5e17ed050673079924 Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Thu, 6 Aug 2020 13:40:22 +0200 Subject: [PATCH 25/62] not using verify_output() as the error differs on github actions --- r/tests/testthat/test-Array-errors.txt | 25 ------------------------- r/tests/testthat/test-Array.R | 26 ++++++++++++-------------- 2 files changed, 12 insertions(+), 39 deletions(-) delete mode 100644 r/tests/testthat/test-Array-errors.txt diff --git a/r/tests/testthat/test-Array-errors.txt b/r/tests/testthat/test-Array-errors.txt deleted file mode 100644 index 7eb4319a62f..00000000000 --- a/r/tests/testthat/test-Array-errors.txt +++ /dev/null @@ -1,25 +0,0 @@ -> Array$create(list(numeric(0)), list_of(bool())) -Error: Unknown: Cannot convert list element 1 to an Array of type `bool` : Expecting a logical vector - -> Array$create(list(numeric(0)), list_of(int32())) -Error: Unknown: Cannot convert list element 1 to an Array of type `int32` : Expecting an integer vector - -> Array$create(list(integer(0)), list_of(float64())) -Error: Unknown: Cannot convert list element 1 to an Array of type `double` : Expecting a numeric vector - -> lgl <- logical(0) -> int <- integer(0) -> num <- numeric(0) -> char <- character(0) -> Array$create(list()) -Error: Requires at least one element to infer the values' type of a list vector - -> Array$create(list(lgl, lgl, int)) -Error: Unknown: Cannot convert list element 3 to an Array of type `bool` : Expecting a logical vector - -> Array$create(list(char, num, char)) -Error: Unknown: Cannot convert list element 2 to an Array of type `string` : Expecting a character vector - -> Array$create(list(int, int, num)) -Error: Unknown: Cannot convert list element 3 to an Array of type `int32` : Expecting an integer vector - diff --git a/r/tests/testthat/test-Array.R b/r/tests/testthat/test-Array.R index d8f0b955c89..075090c1619 100644 --- a/r/tests/testthat/test-Array.R +++ b/r/tests/testthat/test-Array.R @@ -617,20 +617,18 @@ test_that("Array$create() handles vector -> fixed size list arrays", { }) test_that("Array$create() should have helpful error", { - verify_output(test_path("test-Array-errors.txt"), { - Array$create(list(numeric(0)), list_of(bool())) - Array$create(list(numeric(0)), list_of(int32())) - Array$create(list(integer(0)), list_of(float64())) - - lgl <- logical(0) - int <- integer(0) - num <- numeric(0) - char <- character(0) - Array$create(list()) - Array$create(list(lgl, lgl, int)) - Array$create(list(char, num, char)) - Array$create(list(int, int, num)) - }) + expect_error(Array$create(list(numeric(0)), list_of(bool())), "Expecting a logical vector") + expect_error(Array$create(list(numeric(0)), list_of(int32())), "Expecting an integer vector") + expect_error(Array$create(list(integer(0)), list_of(float64())), "Expecting a numeric vector") + + lgl <- logical(0) + int <- integer(0) + num <- numeric(0) + char <- character(0) + expect_error(Array$create(list()), "Requires at least one element to infer") + expect_error(Array$create(list(lgl, lgl, int)), "Expecting a logical vector") + expect_error(Array$create(list(char, num, char)), "Expecting a character vector") + expect_error(Array$create(list(int, int, num)), "Expecting an integer vector") }) test_that("Array$View() (ARROW-6542)", { From 65289c7b75f14e1ca148cfec8b4ec8ef904b2d08 Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Thu, 6 Aug 2020 13:49:27 +0200 Subject: [PATCH 26/62] No longer need to set the encoding to utf-8 as cpp11 will prperly make utf8 string vector out of vector --- r/R/schema.R | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/r/R/schema.R b/r/R/schema.R index 218bee66f19..ef2598864dc 100644 --- a/r/R/schema.R +++ b/r/R/schema.R @@ -84,9 +84,7 @@ Schema <- R6Class("Schema", ), active = list( names = function() { - out <- Schema__field_names(self) - Encoding(out) <- "UTF-8" - out + Schema__field_names(self) }, num_fields = function() Schema__num_fields(self), fields = function() map(Schema__fields(self), shared_ptr, class = Field), From 1802182c345c95dbe352427ec23c9729a12bea0a Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Thu, 6 Aug 2020 14:08:48 +0200 Subject: [PATCH 27/62] rebase and adjust to cpp11 --- r/src/arrowExports.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/r/src/arrowExports.cpp b/r/src/arrowExports.cpp index 50c6da2f8c2..c50a4daa7d7 100644 --- a/r/src/arrowExports.cpp +++ b/r/src/arrowExports.cpp @@ -1793,20 +1793,20 @@ extern "C" SEXP _arrow_dataset___ScanTask__get_batches(SEXP scan_task_sexp){ // dataset.cpp #if defined(ARROW_R_WITH_ARROW) void dataset___Dataset__Write(const std::shared_ptr& ds, const std::shared_ptr& schema, const std::shared_ptr& format, const std::shared_ptr& filesystem, std::string path, const std::shared_ptr& partitioning); -RcppExport SEXP _arrow_dataset___Dataset__Write(SEXP ds_sexp, SEXP schema_sexp, SEXP format_sexp, SEXP filesystem_sexp, SEXP path_sexp, SEXP partitioning_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type ds(ds_sexp); - Rcpp::traits::input_parameter&>::type schema(schema_sexp); - Rcpp::traits::input_parameter&>::type format(format_sexp); - Rcpp::traits::input_parameter&>::type filesystem(filesystem_sexp); - Rcpp::traits::input_parameter::type path(path_sexp); - Rcpp::traits::input_parameter&>::type partitioning(partitioning_sexp); +extern "C" SEXP _arrow_dataset___Dataset__Write(SEXP ds_sexp, SEXP schema_sexp, SEXP format_sexp, SEXP filesystem_sexp, SEXP path_sexp, SEXP partitioning_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type ds(ds_sexp); + arrow::r::input&>::type schema(schema_sexp); + arrow::r::input&>::type format(format_sexp); + arrow::r::input&>::type filesystem(filesystem_sexp); + arrow::r::input::type path(path_sexp); + arrow::r::input&>::type partitioning(partitioning_sexp); dataset___Dataset__Write(ds, schema, format, filesystem, path, partitioning); return R_NilValue; -END_RCPP +END_CPP11 } #else -RcppExport SEXP _arrow_dataset___Dataset__Write(SEXP ds_sexp, SEXP schema_sexp, SEXP format_sexp, SEXP filesystem_sexp, SEXP path_sexp, SEXP partitioning_sexp){ +extern "C" SEXP _arrow_dataset___Dataset__Write(SEXP ds_sexp, SEXP schema_sexp, SEXP format_sexp, SEXP filesystem_sexp, SEXP path_sexp, SEXP partitioning_sexp){ Rf_error("Cannot call dataset___Dataset__Write(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif From 3e9eabeb34a202090f8efbbd2f49f2688a8286bd Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Thu, 6 Aug 2020 16:06:35 +0200 Subject: [PATCH 28/62] skipping python related tests for now. --- r/tests/testthat/test-python.R | 2 ++ 1 file changed, 2 insertions(+) diff --git a/r/tests/testthat/test-python.R b/r/tests/testthat/test-python.R index df910169052..cac0b2959ff 100644 --- a/r/tests/testthat/test-python.R +++ b/r/tests/testthat/test-python.R @@ -17,6 +17,8 @@ context("To/from Python") +skip("for now") + test_that("install_pyarrow", { skip_on_cran() skip_if_not_dev_mode() From 0ab7091da6e311d8aaf446a22e0aefbdf83bfbc3 Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Thu, 6 Aug 2020 18:02:42 +0200 Subject: [PATCH 29/62] PR https://github.com/r-lib/cpp11/pull/74 was merged --- r/DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r/DESCRIPTION b/r/DESCRIPTION index d18beeec06a..a215e75f11e 100644 --- a/r/DESCRIPTION +++ b/r/DESCRIPTION @@ -50,7 +50,7 @@ Suggests: testthat, tibble Remotes: - r-lib/cpp11#74 + r-lib/cpp11 Collate: 'enums.R' 'arrow-package.R' From 9ddb222874c4c70d65a613f987602ec3890723b0 Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Thu, 6 Aug 2020 18:03:34 +0200 Subject: [PATCH 30/62] Rework StringVectorConverter<>::Ingest() to use cpp11 --- r/src/array_from_vector.cpp | 47 +++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/r/src/array_from_vector.cpp b/r/src/array_from_vector.cpp index 9e966ae57a3..74d58dee380 100644 --- a/r/src/array_from_vector.cpp +++ b/r/src/array_from_vector.cpp @@ -170,16 +170,13 @@ struct VectorToArrayConverter { R_xlen_t n = XLENGTH(x); RETURN_NOT_OK(builder->Reserve(n)); for (R_xlen_t i = 0; i < n; i++) { - SEXP s = STRING_ELT(x, i); - if (s == NA_STRING) { + SEXP si = STRING_ELT(x, i); + if (si == NA_STRING) { RETURN_NOT_OK(binary_builder->AppendNull()); continue; - } else { - // Make sure we're ingesting UTF-8 - s = Rf_mkCharCE(Rf_translateCharUTF8(s), CE_UTF8); } - - RETURN_NOT_OK(binary_builder->Append(CHAR(s), LENGTH(s))); + std::string s = cpp11::r_string(si); + RETURN_NOT_OK(binary_builder->Append(s.c_str(), s.size())); } return Status::OK(); @@ -1066,42 +1063,42 @@ class FixedSizeBinaryVectorConverter : public VectorConverter { FixedSizeBinaryBuilder* typed_builder_; }; -template +template class StringVectorConverter : public VectorConverter { public: ~StringVectorConverter() {} Status Init(ArrayBuilder* builder) { - typed_builder_ = checked_cast(builder); + typed_builder_ = checked_cast(builder); return Status::OK(); } Status Ingest(SEXP obj) { ARROW_RETURN_IF(TYPEOF(obj) != STRSXP, Status::RError("Expecting a character vector")); - R_xlen_t n = XLENGTH(obj); - // Reserve enough space before appending - int64_t size = 0; - for (R_xlen_t i = 0; i < n; i++) { - SEXP string_i = STRING_ELT(obj, i); - if (string_i != NA_STRING) { - size += XLENGTH(Rf_mkCharCE(Rf_translateCharUTF8(string_i), CE_UTF8)); - } + cpp11::strings s(obj); + RETURN_NOT_OK(typed_builder_->Reserve(s.size())); + + // note: the total length is calculated without utf8 + // conversion, so see this more as a hint rather than + // the actual total length + auto total_length_hint = 0; + for (cpp11::r_string si : s) { + total_length_hint += (si == NA_STRING) ? 0 : si.size(); } - RETURN_NOT_OK(typed_builder_->Reserve(size)); + RETURN_NOT_OK(typed_builder_->ReserveData(total_length_hint)); // append - for (R_xlen_t i = 0; i < n; i++) { - SEXP string_i = STRING_ELT(obj, i); - if (string_i == NA_STRING) { + for (cpp11::r_string si : s) { + if (si == NA_STRING) { RETURN_NOT_OK(typed_builder_->AppendNull()); } else { - // Make sure we're ingesting UTF-8 - string_i = Rf_mkCharCE(Rf_translateCharUTF8(string_i), CE_UTF8); - RETURN_NOT_OK(typed_builder_->Append(CHAR(string_i), XLENGTH(string_i))); + // converting the r_string to a std::string enforces utf-8 + RETURN_NOT_OK(typed_builder_->Append(std::string(si))); } } + return Status::OK(); } @@ -1110,7 +1107,7 @@ class StringVectorConverter : public VectorConverter { } private: - Builder* typed_builder_; + StringBuilder* typed_builder_; }; #define NUMERIC_CONVERTER(TYPE_ENUM, TYPE) \ From e536ee440ea3e1683b30a12d6ba975dd8749b450 Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Thu, 6 Aug 2020 18:15:53 +0200 Subject: [PATCH 31/62] lint --- r/src/array_from_vector.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r/src/array_from_vector.cpp b/r/src/array_from_vector.cpp index 74d58dee380..7d3175e0727 100644 --- a/r/src/array_from_vector.cpp +++ b/r/src/array_from_vector.cpp @@ -1107,7 +1107,7 @@ class StringVectorConverter : public VectorConverter { } private: - StringBuilder* typed_builder_; + StringBuilder* typed_builder_; }; #define NUMERIC_CONVERTER(TYPE_ENUM, TYPE) \ From 7077fd222cea0016bbb3b9276cf5b77978601146 Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Mon, 17 Aug 2020 10:31:28 +0200 Subject: [PATCH 32/62] using https://github.com/r-lib/cpp11/pull/85 --- r/DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r/DESCRIPTION b/r/DESCRIPTION index a215e75f11e..48524fc45da 100644 --- a/r/DESCRIPTION +++ b/r/DESCRIPTION @@ -50,7 +50,7 @@ Suggests: testthat, tibble Remotes: - r-lib/cpp11 + r-lib/cpp11#85 Collate: 'enums.R' 'arrow-package.R' From 234ba84b6478202c28dd4ec874cc76df5cf4ab1d Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Mon, 17 Aug 2020 10:45:45 +0200 Subject: [PATCH 33/62] cpp11::stop() is marked as noreturn --- r/src/array_from_vector.cpp | 4 ---- r/src/array_to_vector.cpp | 1 - r/src/buffer.cpp | 4 ++-- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/r/src/array_from_vector.cpp b/r/src/array_from_vector.cpp index 7d3175e0727..b671e9ae4af 100644 --- a/r/src/array_from_vector.cpp +++ b/r/src/array_from_vector.cpp @@ -408,7 +408,6 @@ std::shared_ptr MakeFactorArray(cpp11::integers factor, cpp11::stop("Cannot convert to dictionary with index_type '%s'", dict_type.index_type()->ToString().c_str()); - return nullptr; } std::shared_ptr MakeStructArray(SEXP df, const std::shared_ptr& type) { @@ -1200,7 +1199,6 @@ std::shared_ptr InferArrowTypeFromVector(SEXP x) { } cpp11::stop("Unrecognized vector instance for type ENVSXP"); - return nullptr; } template <> @@ -1337,7 +1335,6 @@ std::shared_ptr InferArrowType(SEXP x) { } cpp11::stop("Cannot infer type from vector"); - return nullptr; } // in some situations we can just use the memory of the R object in an RBuffer @@ -1420,7 +1417,6 @@ std::shared_ptr Array__from_vector_reuse_memory(SEXP x) { } cpp11::stop("Unreachable: you might need to fix can_reuse_memory()"); - return nullptr; } bool CheckCompatibleFactor(SEXP obj, const std::shared_ptr& type) { diff --git a/r/src/array_to_vector.cpp b/r/src/array_to_vector.cpp index c69c40a8910..2298a36075a 100644 --- a/r/src/array_to_vector.cpp +++ b/r/src/array_to_vector.cpp @@ -1106,7 +1106,6 @@ std::shared_ptr Converter::Make(const std::shared_ptr& type } cpp11::stop("cannot handle Array of type ", type->name().c_str()); - return nullptr; } cpp11::writable::list to_dataframe_serial( diff --git a/r/src/buffer.cpp b/r/src/buffer.cpp index 31345e94994..4609d66bb38 100644 --- a/r/src/buffer.cpp +++ b/r/src/buffer.cpp @@ -52,9 +52,9 @@ std::shared_ptr r___RBuffer__initialize(SEXP x) { // case CPLXSXP: // return std::make_shared>(x); default: - cpp11::stop("R object of type <%s> not supported", Rf_type2char(TYPEOF(x))); + break; } - return nullptr; + cpp11::stop("R object of type <%s> not supported", Rf_type2char(TYPEOF(x))); } // [[arrow::export]] From 19e580d2e83e143d2d017ad7482a3ca9d36dad94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Fran=C3=A7ois?= Date: Mon, 17 Aug 2020 10:52:13 +0200 Subject: [PATCH 34/62] Update r/src/array_from_vector.cpp Co-authored-by: Benjamin Kietzman --- r/src/array_from_vector.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r/src/array_from_vector.cpp b/r/src/array_from_vector.cpp index b671e9ae4af..60c6ee818ea 100644 --- a/r/src/array_from_vector.cpp +++ b/r/src/array_from_vector.cpp @@ -1084,7 +1084,7 @@ class StringVectorConverter : public VectorConverter { // the actual total length auto total_length_hint = 0; for (cpp11::r_string si : s) { - total_length_hint += (si == NA_STRING) ? 0 : si.size(); + total_length_hint += cpp11::is_na(si) ? 0 : si.size(); } RETURN_NOT_OK(typed_builder_->ReserveData(total_length_hint)); From 758f7e956dc6be8f4a8fcf32d2b05ca410f7ddbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Fran=C3=A7ois?= Date: Mon, 17 Aug 2020 10:52:30 +0200 Subject: [PATCH 35/62] Update r/src/array_from_vector.cpp Co-authored-by: Benjamin Kietzman --- r/src/array_from_vector.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r/src/array_from_vector.cpp b/r/src/array_from_vector.cpp index 60c6ee818ea..4674da014fd 100644 --- a/r/src/array_from_vector.cpp +++ b/r/src/array_from_vector.cpp @@ -1082,7 +1082,7 @@ class StringVectorConverter : public VectorConverter { // note: the total length is calculated without utf8 // conversion, so see this more as a hint rather than // the actual total length - auto total_length_hint = 0; + int64_t total_length_hint = 0; for (cpp11::r_string si : s) { total_length_hint += cpp11::is_na(si) ? 0 : si.size(); } From 5dbb6481663ae1b6ad155c780f29d505db8f6f99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Fran=C3=A7ois?= Date: Mon, 17 Aug 2020 10:53:04 +0200 Subject: [PATCH 36/62] Update r/src/arrow_cpp11.h Co-authored-by: Benjamin Kietzman --- r/src/arrow_cpp11.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/r/src/arrow_cpp11.h b/r/src/arrow_cpp11.h index 45adfba111a..3043afef2b6 100644 --- a/r/src/arrow_cpp11.h +++ b/r/src/arrow_cpp11.h @@ -29,9 +29,6 @@ SEXP as_sexp(const std::shared_ptr& ptr); template SEXP as_sexp(const std::vector>& vec); -template ::value>::type* = nullptr> -SEXP as_sexp(E e); - } // namespace cpp11 #include From 0843196e3f11a5165f6e015f4606544df2d6b4e7 Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Mon, 17 Aug 2020 11:07:15 +0200 Subject: [PATCH 37/62] update decor after rebase --- r/src/arrowExports.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/r/src/arrowExports.cpp b/r/src/arrowExports.cpp index c50a4daa7d7..85fa6f6bc97 100644 --- a/r/src/arrowExports.cpp +++ b/r/src/arrowExports.cpp @@ -1747,15 +1747,15 @@ extern "C" SEXP _arrow_dataset___Scanner__ToTable(SEXP scanner_sexp){ // dataset.cpp #if defined(ARROW_R_WITH_ARROW) std::shared_ptr dataset___Scanner__head(const std::shared_ptr& scanner, int n); -RcppExport SEXP _arrow_dataset___Scanner__head(SEXP scanner_sexp, SEXP n_sexp){ -BEGIN_RCPP - Rcpp::traits::input_parameter&>::type scanner(scanner_sexp); - Rcpp::traits::input_parameter::type n(n_sexp); - return Rcpp::wrap(dataset___Scanner__head(scanner, n)); -END_RCPP +extern "C" SEXP _arrow_dataset___Scanner__head(SEXP scanner_sexp, SEXP n_sexp){ +BEGIN_CPP11 + arrow::r::input&>::type scanner(scanner_sexp); + arrow::r::input::type n(n_sexp); + return cpp11::as_sexp(dataset___Scanner__head(scanner, n)); +END_CPP11 } #else -RcppExport SEXP _arrow_dataset___Scanner__head(SEXP scanner_sexp, SEXP n_sexp){ +extern "C" SEXP _arrow_dataset___Scanner__head(SEXP scanner_sexp, SEXP n_sexp){ Rf_error("Cannot call dataset___Scanner__head(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif From 895729983c6dbdce80bccbcf153e21f8ec504fe6 Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Mon, 17 Aug 2020 11:07:57 +0200 Subject: [PATCH 38/62] Actually this still needs as_sexp but cpp11 should have it --- r/src/arrow_cpp11.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/r/src/arrow_cpp11.h b/r/src/arrow_cpp11.h index 3043afef2b6..a738c1c9c25 100644 --- a/r/src/arrow_cpp11.h +++ b/r/src/arrow_cpp11.h @@ -232,8 +232,8 @@ SEXP as_sexp(const std::vector>& vec) { return arrow::r::to_r_list(vec); } -template ::value>::type*> -SEXP as_sexp(E e) { +template +enable_if_enum as_sexp(E e) { return as_sexp(static_cast(e)); } From 5627aaf0f6ea526abaf050f9f5cf2c673606c70d Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Mon, 17 Aug 2020 15:08:09 +0200 Subject: [PATCH 39/62] camel case --- r/data-raw/codegen.R | 2 +- r/src/arrowExports.cpp | 1134 ++++++++++++++++++++-------------------- r/src/arrow_cpp11.h | 68 ++- 3 files changed, 598 insertions(+), 606 deletions(-) diff --git a/r/data-raw/codegen.R b/r/data-raw/codegen.R index a5c1e31af19..ede4043c46f 100644 --- a/r/data-raw/codegen.R +++ b/r/data-raw/codegen.R @@ -93,7 +93,7 @@ cpp_functions_definitions <- arrow_exports %>% sep = "\n", real_params = glue_collapse_data(args, "{type} {name}"), sexp_params = glue_collapse_data(args, "SEXP {name}_sexp"), - input_params = glue_collapse_data(args, "\tarrow::r::input<{type}>::type {name}({name}_sexp);", sep = "\n"), + input_params = glue_collapse_data(args, "\tarrow::r::Input<{type}>::type {name}({name}_sexp);", sep = "\n"), return_line = if(nrow(args)) "\n" else "" ) }) %>% diff --git a/r/src/arrowExports.cpp b/r/src/arrowExports.cpp index 85fa6f6bc97..ef8dbaaf45b 100644 --- a/r/src/arrowExports.cpp +++ b/r/src/arrowExports.cpp @@ -9,8 +9,8 @@ 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); - arrow::r::input::type offset(offset_sexp); + arrow::r::Input&>::type array(array_sexp); + arrow::r::Input::type offset(offset_sexp); return cpp11::as_sexp(Array__Slice1(array, offset)); END_CPP11 } @@ -25,9 +25,9 @@ extern "C" SEXP _arrow_Array__Slice1(SEXP array_sexp, SEXP offset_sexp){ 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); - arrow::r::input::type offset(offset_sexp); - arrow::r::input::type length(length_sexp); + arrow::r::Input&>::type array(array_sexp); + arrow::r::Input::type offset(offset_sexp); + arrow::r::Input::type length(length_sexp); return cpp11::as_sexp(Array__Slice2(array, offset, length)); END_CPP11 } @@ -42,8 +42,8 @@ extern "C" SEXP _arrow_Array__Slice2(SEXP array_sexp, SEXP offset_sexp, SEXP len 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); - arrow::r::input::type i(i_sexp); + arrow::r::Input&>::type x(x_sexp); + arrow::r::Input::type i(i_sexp); return cpp11::as_sexp(Array__IsNull(x, i)); END_CPP11 } @@ -58,8 +58,8 @@ extern "C" SEXP _arrow_Array__IsNull(SEXP x_sexp, SEXP i_sexp){ 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); - arrow::r::input::type i(i_sexp); + arrow::r::Input&>::type x(x_sexp); + arrow::r::Input::type i(i_sexp); return cpp11::as_sexp(Array__IsValid(x, i)); END_CPP11 } @@ -74,7 +74,7 @@ extern "C" SEXP _arrow_Array__IsValid(SEXP x_sexp, SEXP i_sexp){ 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); + arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(Array__length(x)); END_CPP11 } @@ -89,7 +89,7 @@ extern "C" SEXP _arrow_Array__length(SEXP x_sexp){ 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); + arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(Array__offset(x)); END_CPP11 } @@ -104,7 +104,7 @@ extern "C" SEXP _arrow_Array__offset(SEXP x_sexp){ 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); + arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(Array__null_count(x)); END_CPP11 } @@ -119,7 +119,7 @@ extern "C" SEXP _arrow_Array__null_count(SEXP x_sexp){ 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); + arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(Array__type(x)); END_CPP11 } @@ -134,7 +134,7 @@ extern "C" SEXP _arrow_Array__type(SEXP x_sexp){ 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); + arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(Array__ToString(x)); END_CPP11 } @@ -149,7 +149,7 @@ extern "C" SEXP _arrow_Array__ToString(SEXP x_sexp){ 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); + arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(Array__type_id(x)); END_CPP11 } @@ -164,8 +164,8 @@ extern "C" SEXP _arrow_Array__type_id(SEXP x_sexp){ 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); - arrow::r::input&>::type rhs(rhs_sexp); + arrow::r::Input&>::type lhs(lhs_sexp); + arrow::r::Input&>::type rhs(rhs_sexp); return cpp11::as_sexp(Array__Equals(lhs, rhs)); END_CPP11 } @@ -180,8 +180,8 @@ extern "C" SEXP _arrow_Array__Equals(SEXP lhs_sexp, SEXP rhs_sexp){ 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); - arrow::r::input&>::type rhs(rhs_sexp); + arrow::r::Input&>::type lhs(lhs_sexp); + arrow::r::Input&>::type rhs(rhs_sexp); return cpp11::as_sexp(Array__ApproxEquals(lhs, rhs)); END_CPP11 } @@ -196,7 +196,7 @@ extern "C" SEXP _arrow_Array__ApproxEquals(SEXP lhs_sexp, SEXP rhs_sexp){ 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); + arrow::r::Input&>::type array(array_sexp); return cpp11::as_sexp(Array__data(array)); END_CPP11 } @@ -211,11 +211,11 @@ extern "C" SEXP _arrow_Array__data(SEXP array_sexp){ 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); - arrow::r::input&>::type other(other_sexp); - arrow::r::input::type start_idx(start_idx_sexp); - arrow::r::input::type end_idx(end_idx_sexp); - arrow::r::input::type other_start_idx(other_start_idx_sexp); + arrow::r::Input&>::type self(self_sexp); + arrow::r::Input&>::type other(other_sexp); + arrow::r::Input::type start_idx(start_idx_sexp); + arrow::r::Input::type end_idx(end_idx_sexp); + arrow::r::Input::type other_start_idx(other_start_idx_sexp); return cpp11::as_sexp(Array__RangeEquals(self, other, start_idx, end_idx, other_start_idx)); END_CPP11 } @@ -230,8 +230,8 @@ extern "C" SEXP _arrow_Array__RangeEquals(SEXP self_sexp, SEXP other_sexp, SEXP 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); - arrow::r::input&>::type type(type_sexp); + arrow::r::Input&>::type array(array_sexp); + arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(Array__View(array, type)); END_CPP11 } @@ -246,7 +246,7 @@ extern "C" SEXP _arrow_Array__View(SEXP array_sexp, SEXP type_sexp){ 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); + arrow::r::Input&>::type array(array_sexp); Array__Validate(array); return R_NilValue; END_CPP11 @@ -262,7 +262,7 @@ extern "C" SEXP _arrow_Array__Validate(SEXP array_sexp){ 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); + arrow::r::Input&>::type array(array_sexp); return cpp11::as_sexp(DictionaryArray__indices(array)); END_CPP11 } @@ -277,7 +277,7 @@ extern "C" SEXP _arrow_DictionaryArray__indices(SEXP array_sexp){ 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); + arrow::r::Input&>::type array(array_sexp); return cpp11::as_sexp(DictionaryArray__dictionary(array)); END_CPP11 } @@ -292,8 +292,8 @@ extern "C" SEXP _arrow_DictionaryArray__dictionary(SEXP array_sexp){ 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); - arrow::r::input::type i(i_sexp); + arrow::r::Input&>::type array(array_sexp); + arrow::r::Input::type i(i_sexp); return cpp11::as_sexp(StructArray__field(array, i)); END_CPP11 } @@ -308,8 +308,8 @@ extern "C" SEXP _arrow_StructArray__field(SEXP array_sexp, SEXP i_sexp){ 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); - arrow::r::input::type name(name_sexp); + arrow::r::Input&>::type array(array_sexp); + arrow::r::Input::type name(name_sexp); return cpp11::as_sexp(StructArray__GetFieldByName(array, name)); END_CPP11 } @@ -324,7 +324,7 @@ extern "C" SEXP _arrow_StructArray__GetFieldByName(SEXP array_sexp, SEXP name_se arrow::ArrayVector 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); + arrow::r::Input&>::type array(array_sexp); return cpp11::as_sexp(StructArray__Flatten(array)); END_CPP11 } @@ -339,7 +339,7 @@ extern "C" SEXP _arrow_StructArray__Flatten(SEXP array_sexp){ 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); + arrow::r::Input&>::type array(array_sexp); return cpp11::as_sexp(ListArray__value_type(array)); END_CPP11 } @@ -354,7 +354,7 @@ extern "C" SEXP _arrow_ListArray__value_type(SEXP array_sexp){ 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); + arrow::r::Input&>::type array(array_sexp); return cpp11::as_sexp(LargeListArray__value_type(array)); END_CPP11 } @@ -369,7 +369,7 @@ extern "C" SEXP _arrow_LargeListArray__value_type(SEXP array_sexp){ 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); + arrow::r::Input&>::type array(array_sexp); return cpp11::as_sexp(ListArray__values(array)); END_CPP11 } @@ -384,7 +384,7 @@ extern "C" SEXP _arrow_ListArray__values(SEXP array_sexp){ 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); + arrow::r::Input&>::type array(array_sexp); return cpp11::as_sexp(LargeListArray__values(array)); END_CPP11 } @@ -399,8 +399,8 @@ extern "C" SEXP _arrow_LargeListArray__values(SEXP array_sexp){ 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); - arrow::r::input::type i(i_sexp); + arrow::r::Input&>::type array(array_sexp); + arrow::r::Input::type i(i_sexp); return cpp11::as_sexp(ListArray__value_length(array, i)); END_CPP11 } @@ -415,8 +415,8 @@ extern "C" SEXP _arrow_ListArray__value_length(SEXP array_sexp, SEXP i_sexp){ 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); - arrow::r::input::type i(i_sexp); + arrow::r::Input&>::type array(array_sexp); + arrow::r::Input::type i(i_sexp); return cpp11::as_sexp(LargeListArray__value_length(array, i)); END_CPP11 } @@ -431,8 +431,8 @@ extern "C" SEXP _arrow_LargeListArray__value_length(SEXP array_sexp, SEXP i_sexp 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); - arrow::r::input::type i(i_sexp); + arrow::r::Input&>::type array(array_sexp); + arrow::r::Input::type i(i_sexp); return cpp11::as_sexp(FixedSizeListArray__value_length(array, i)); END_CPP11 } @@ -447,8 +447,8 @@ extern "C" SEXP _arrow_FixedSizeListArray__value_length(SEXP array_sexp, SEXP i_ 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); - arrow::r::input::type i(i_sexp); + arrow::r::Input&>::type array(array_sexp); + arrow::r::Input::type i(i_sexp); return cpp11::as_sexp(ListArray__value_offset(array, i)); END_CPP11 } @@ -463,8 +463,8 @@ extern "C" SEXP _arrow_ListArray__value_offset(SEXP array_sexp, SEXP i_sexp){ 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); - arrow::r::input::type i(i_sexp); + arrow::r::Input&>::type array(array_sexp); + arrow::r::Input::type i(i_sexp); return cpp11::as_sexp(LargeListArray__value_offset(array, i)); END_CPP11 } @@ -479,8 +479,8 @@ extern "C" SEXP _arrow_LargeListArray__value_offset(SEXP array_sexp, SEXP i_sexp 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); - arrow::r::input::type i(i_sexp); + arrow::r::Input&>::type array(array_sexp); + arrow::r::Input::type i(i_sexp); return cpp11::as_sexp(FixedSizeListArray__value_offset(array, i)); END_CPP11 } @@ -495,7 +495,7 @@ extern "C" SEXP _arrow_FixedSizeListArray__value_offset(SEXP array_sexp, SEXP i_ 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); + arrow::r::Input&>::type array(array_sexp); return cpp11::as_sexp(ListArray__raw_value_offsets(array)); END_CPP11 } @@ -510,7 +510,7 @@ extern "C" SEXP _arrow_ListArray__raw_value_offsets(SEXP array_sexp){ 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); + arrow::r::Input&>::type array(array_sexp); return cpp11::as_sexp(LargeListArray__raw_value_offsets(array)); END_CPP11 } @@ -525,7 +525,7 @@ extern "C" SEXP _arrow_LargeListArray__raw_value_offsets(SEXP array_sexp){ 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); + arrow::r::Input::type x(x_sexp); return cpp11::as_sexp(Array__infer_type(x)); END_CPP11 } @@ -540,8 +540,8 @@ extern "C" SEXP _arrow_Array__infer_type(SEXP x_sexp){ std::shared_ptr Array__from_vector(SEXP x, SEXP s_type); extern "C" SEXP _arrow_Array__from_vector(SEXP x_sexp, SEXP s_type_sexp){ BEGIN_CPP11 - arrow::r::input::type x(x_sexp); - arrow::r::input::type s_type(s_type_sexp); + arrow::r::Input::type x(x_sexp); + arrow::r::Input::type s_type(s_type_sexp); return cpp11::as_sexp(Array__from_vector(x, s_type)); END_CPP11 } @@ -556,8 +556,8 @@ extern "C" SEXP _arrow_Array__from_vector(SEXP x_sexp, SEXP s_type_sexp){ 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); - arrow::r::input::type s_type(s_type_sexp); + arrow::r::Input::type chunks(chunks_sexp); + arrow::r::Input::type s_type(s_type_sexp); return cpp11::as_sexp(ChunkedArray__from_list(chunks, s_type)); END_CPP11 } @@ -572,9 +572,9 @@ extern "C" SEXP _arrow_ChunkedArray__from_list(SEXP chunks_sexp, SEXP s_type_sex 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); - arrow::r::input&>::type indices(indices_sexp); - arrow::r::input&>::type dict(dict_sexp); + arrow::r::Input&>::type type(type_sexp); + arrow::r::Input&>::type indices(indices_sexp); + arrow::r::Input&>::type dict(dict_sexp); return cpp11::as_sexp(DictionaryArray__FromArrays(type, indices, dict)); END_CPP11 } @@ -589,7 +589,7 @@ extern "C" SEXP _arrow_DictionaryArray__FromArrays(SEXP type_sexp, SEXP indices_ 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); + arrow::r::Input&>::type array(array_sexp); return cpp11::as_sexp(Array__as_vector(array)); END_CPP11 } @@ -604,7 +604,7 @@ extern "C" SEXP _arrow_Array__as_vector(SEXP array_sexp){ SEXP ChunkedArray__as_vector(const std::shared_ptr& chunked_array); extern "C" SEXP _arrow_ChunkedArray__as_vector(SEXP chunked_array_sexp){ BEGIN_CPP11 - arrow::r::input&>::type chunked_array(chunked_array_sexp); + arrow::r::Input&>::type chunked_array(chunked_array_sexp); return cpp11::as_sexp(ChunkedArray__as_vector(chunked_array)); END_CPP11 } @@ -619,8 +619,8 @@ extern "C" SEXP _arrow_ChunkedArray__as_vector(SEXP chunked_array_sexp){ 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); - arrow::r::input::type use_threads(use_threads_sexp); + arrow::r::Input&>::type batch(batch_sexp); + arrow::r::Input::type use_threads(use_threads_sexp); return cpp11::as_sexp(RecordBatch__to_dataframe(batch, use_threads)); END_CPP11 } @@ -635,8 +635,8 @@ extern "C" SEXP _arrow_RecordBatch__to_dataframe(SEXP batch_sexp, SEXP use_threa 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); - arrow::r::input::type use_threads(use_threads_sexp); + arrow::r::Input&>::type table(table_sexp); + arrow::r::Input::type use_threads(use_threads_sexp); return cpp11::as_sexp(Table__to_dataframe(table, use_threads)); END_CPP11 } @@ -651,7 +651,7 @@ extern "C" SEXP _arrow_Table__to_dataframe(SEXP table_sexp, SEXP use_threads_sex 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); + arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(ArrayData__get_type(x)); END_CPP11 } @@ -666,7 +666,7 @@ extern "C" SEXP _arrow_ArrayData__get_type(SEXP x_sexp){ 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); + arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(ArrayData__get_length(x)); END_CPP11 } @@ -681,7 +681,7 @@ extern "C" SEXP _arrow_ArrayData__get_length(SEXP x_sexp){ 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); + arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(ArrayData__get_null_count(x)); END_CPP11 } @@ -696,7 +696,7 @@ extern "C" SEXP _arrow_ArrayData__get_null_count(SEXP x_sexp){ 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); + arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(ArrayData__get_offset(x)); END_CPP11 } @@ -711,7 +711,7 @@ extern "C" SEXP _arrow_ArrayData__get_offset(SEXP x_sexp){ 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); + arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(ArrayData__buffers(x)); END_CPP11 } @@ -726,7 +726,7 @@ extern "C" SEXP _arrow_ArrayData__buffers(SEXP x_sexp){ 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); + arrow::r::Input&>::type buffer(buffer_sexp); return cpp11::as_sexp(Buffer__is_mutable(buffer)); END_CPP11 } @@ -741,7 +741,7 @@ extern "C" SEXP _arrow_Buffer__is_mutable(SEXP buffer_sexp){ 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); + arrow::r::Input&>::type buffer(buffer_sexp); Buffer__ZeroPadding(buffer); return R_NilValue; END_CPP11 @@ -757,7 +757,7 @@ extern "C" SEXP _arrow_Buffer__ZeroPadding(SEXP buffer_sexp){ 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); + arrow::r::Input&>::type buffer(buffer_sexp); return cpp11::as_sexp(Buffer__capacity(buffer)); END_CPP11 } @@ -772,7 +772,7 @@ extern "C" SEXP _arrow_Buffer__capacity(SEXP buffer_sexp){ 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); + arrow::r::Input&>::type buffer(buffer_sexp); return cpp11::as_sexp(Buffer__size(buffer)); END_CPP11 } @@ -787,7 +787,7 @@ extern "C" SEXP _arrow_Buffer__size(SEXP buffer_sexp){ 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); + arrow::r::Input::type x(x_sexp); return cpp11::as_sexp(r___RBuffer__initialize(x)); END_CPP11 } @@ -802,7 +802,7 @@ extern "C" SEXP _arrow_r___RBuffer__initialize(SEXP x_sexp){ 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); + arrow::r::Input&>::type buffer(buffer_sexp); return cpp11::as_sexp(Buffer__data(buffer)); END_CPP11 } @@ -817,8 +817,8 @@ extern "C" SEXP _arrow_Buffer__data(SEXP buffer_sexp){ 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); - arrow::r::input&>::type y(y_sexp); + arrow::r::Input&>::type x(x_sexp); + arrow::r::Input&>::type y(y_sexp); return cpp11::as_sexp(Buffer__Equals(x, y)); END_CPP11 } @@ -833,7 +833,7 @@ extern "C" SEXP _arrow_Buffer__Equals(SEXP x_sexp, SEXP y_sexp){ 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); + arrow::r::Input&>::type chunked_array(chunked_array_sexp); return cpp11::as_sexp(ChunkedArray__length(chunked_array)); END_CPP11 } @@ -848,7 +848,7 @@ extern "C" SEXP _arrow_ChunkedArray__length(SEXP chunked_array_sexp){ 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); + arrow::r::Input&>::type chunked_array(chunked_array_sexp); return cpp11::as_sexp(ChunkedArray__null_count(chunked_array)); END_CPP11 } @@ -863,7 +863,7 @@ extern "C" SEXP _arrow_ChunkedArray__null_count(SEXP chunked_array_sexp){ 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); + arrow::r::Input&>::type chunked_array(chunked_array_sexp); return cpp11::as_sexp(ChunkedArray__num_chunks(chunked_array)); END_CPP11 } @@ -878,8 +878,8 @@ extern "C" SEXP _arrow_ChunkedArray__num_chunks(SEXP chunked_array_sexp){ 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); - arrow::r::input::type i(i_sexp); + arrow::r::Input&>::type chunked_array(chunked_array_sexp); + arrow::r::Input::type i(i_sexp); return cpp11::as_sexp(ChunkedArray__chunk(chunked_array, i)); END_CPP11 } @@ -894,7 +894,7 @@ extern "C" SEXP _arrow_ChunkedArray__chunk(SEXP chunked_array_sexp, SEXP i_sexp) 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); + arrow::r::Input&>::type chunked_array(chunked_array_sexp); return cpp11::as_sexp(ChunkedArray__chunks(chunked_array)); END_CPP11 } @@ -909,7 +909,7 @@ extern "C" SEXP _arrow_ChunkedArray__chunks(SEXP chunked_array_sexp){ 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); + arrow::r::Input&>::type chunked_array(chunked_array_sexp); return cpp11::as_sexp(ChunkedArray__type(chunked_array)); END_CPP11 } @@ -924,8 +924,8 @@ extern "C" SEXP _arrow_ChunkedArray__type(SEXP chunked_array_sexp){ 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); - arrow::r::input::type offset(offset_sexp); + arrow::r::Input&>::type chunked_array(chunked_array_sexp); + arrow::r::Input::type offset(offset_sexp); return cpp11::as_sexp(ChunkedArray__Slice1(chunked_array, offset)); END_CPP11 } @@ -940,9 +940,9 @@ extern "C" SEXP _arrow_ChunkedArray__Slice1(SEXP chunked_array_sexp, SEXP offset 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); - arrow::r::input::type offset(offset_sexp); - arrow::r::input::type length(length_sexp); + arrow::r::Input&>::type chunked_array(chunked_array_sexp); + arrow::r::Input::type offset(offset_sexp); + arrow::r::Input::type length(length_sexp); return cpp11::as_sexp(ChunkedArray__Slice2(chunked_array, offset, length)); END_CPP11 } @@ -957,8 +957,8 @@ extern "C" SEXP _arrow_ChunkedArray__Slice2(SEXP chunked_array_sexp, SEXP offset 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); - arrow::r::input&>::type type(type_sexp); + arrow::r::Input&>::type array(array_sexp); + arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(ChunkedArray__View(array, type)); END_CPP11 } @@ -973,7 +973,7 @@ extern "C" SEXP _arrow_ChunkedArray__View(SEXP array_sexp, SEXP type_sexp){ 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); + arrow::r::Input&>::type chunked_array(chunked_array_sexp); ChunkedArray__Validate(chunked_array); return R_NilValue; END_CPP11 @@ -989,8 +989,8 @@ extern "C" SEXP _arrow_ChunkedArray__Validate(SEXP chunked_array_sexp){ 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); - arrow::r::input&>::type y(y_sexp); + arrow::r::Input&>::type x(x_sexp); + arrow::r::Input&>::type y(y_sexp); return cpp11::as_sexp(ChunkedArray__Equals(x, y)); END_CPP11 } @@ -1005,7 +1005,7 @@ extern "C" SEXP _arrow_ChunkedArray__Equals(SEXP x_sexp, SEXP y_sexp){ 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); + arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(ChunkedArray__ToString(x)); END_CPP11 } @@ -1020,8 +1020,8 @@ extern "C" SEXP _arrow_ChunkedArray__ToString(SEXP x_sexp){ 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); - arrow::r::input::type compression_level(compression_level_sexp); + arrow::r::Input::type codec(codec_sexp); + arrow::r::Input::type compression_level(compression_level_sexp); return cpp11::as_sexp(util___Codec__Create(codec, compression_level)); END_CPP11 } @@ -1036,7 +1036,7 @@ extern "C" SEXP _arrow_util___Codec__Create(SEXP codec_sexp, SEXP compression_le 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); + arrow::r::Input&>::type codec(codec_sexp); return cpp11::as_sexp(util___Codec__name(codec)); END_CPP11 } @@ -1051,7 +1051,7 @@ extern "C" SEXP _arrow_util___Codec__name(SEXP codec_sexp){ 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); + arrow::r::Input::type codec(codec_sexp); return cpp11::as_sexp(util___Codec__IsAvailable(codec)); END_CPP11 } @@ -1066,8 +1066,8 @@ extern "C" SEXP _arrow_util___Codec__IsAvailable(SEXP codec_sexp){ 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); - arrow::r::input&>::type raw(raw_sexp); + arrow::r::Input&>::type codec(codec_sexp); + arrow::r::Input&>::type raw(raw_sexp); return cpp11::as_sexp(io___CompressedOutputStream__Make(codec, raw)); END_CPP11 } @@ -1082,8 +1082,8 @@ extern "C" SEXP _arrow_io___CompressedOutputStream__Make(SEXP codec_sexp, SEXP r 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); - arrow::r::input&>::type raw(raw_sexp); + arrow::r::Input&>::type codec(codec_sexp); + arrow::r::Input&>::type raw(raw_sexp); return cpp11::as_sexp(io___CompressedInputStream__Make(codec, raw)); END_CPP11 } @@ -1098,9 +1098,9 @@ extern "C" SEXP _arrow_io___CompressedInputStream__Make(SEXP codec_sexp, SEXP ra std::shared_ptr compute___CastOptions__initialize(bool allow_int_overflow, bool allow_time_truncate, bool allow_float_truncate); extern "C" SEXP _arrow_compute___CastOptions__initialize(SEXP allow_int_overflow_sexp, SEXP allow_time_truncate_sexp, SEXP allow_float_truncate_sexp){ BEGIN_CPP11 - arrow::r::input::type allow_int_overflow(allow_int_overflow_sexp); - arrow::r::input::type allow_time_truncate(allow_time_truncate_sexp); - arrow::r::input::type allow_float_truncate(allow_float_truncate_sexp); + arrow::r::Input::type allow_int_overflow(allow_int_overflow_sexp); + arrow::r::Input::type allow_time_truncate(allow_time_truncate_sexp); + arrow::r::Input::type allow_float_truncate(allow_float_truncate_sexp); return cpp11::as_sexp(compute___CastOptions__initialize(allow_int_overflow, allow_time_truncate, allow_float_truncate)); END_CPP11 } @@ -1115,9 +1115,9 @@ extern "C" SEXP _arrow_compute___CastOptions__initialize(SEXP allow_int_overflow std::shared_ptr Array__cast(const std::shared_ptr& array, const std::shared_ptr& target_type, const std::shared_ptr& options); extern "C" SEXP _arrow_Array__cast(SEXP array_sexp, SEXP target_type_sexp, SEXP options_sexp){ BEGIN_CPP11 - arrow::r::input&>::type array(array_sexp); - arrow::r::input&>::type target_type(target_type_sexp); - arrow::r::input&>::type options(options_sexp); + arrow::r::Input&>::type array(array_sexp); + arrow::r::Input&>::type target_type(target_type_sexp); + arrow::r::Input&>::type options(options_sexp); return cpp11::as_sexp(Array__cast(array, target_type, options)); END_CPP11 } @@ -1132,9 +1132,9 @@ extern "C" SEXP _arrow_Array__cast(SEXP array_sexp, SEXP target_type_sexp, SEXP std::shared_ptr ChunkedArray__cast(const std::shared_ptr& chunked_array, const std::shared_ptr& target_type, const std::shared_ptr& options); extern "C" SEXP _arrow_ChunkedArray__cast(SEXP chunked_array_sexp, SEXP target_type_sexp, SEXP options_sexp){ BEGIN_CPP11 - arrow::r::input&>::type chunked_array(chunked_array_sexp); - arrow::r::input&>::type target_type(target_type_sexp); - arrow::r::input&>::type options(options_sexp); + arrow::r::Input&>::type chunked_array(chunked_array_sexp); + arrow::r::Input&>::type target_type(target_type_sexp); + arrow::r::Input&>::type options(options_sexp); return cpp11::as_sexp(ChunkedArray__cast(chunked_array, target_type, options)); END_CPP11 } @@ -1149,9 +1149,9 @@ extern "C" SEXP _arrow_ChunkedArray__cast(SEXP chunked_array_sexp, SEXP target_t std::shared_ptr RecordBatch__cast(const std::shared_ptr& batch, const std::shared_ptr& schema, const std::shared_ptr& 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); - arrow::r::input&>::type schema(schema_sexp); - arrow::r::input&>::type options(options_sexp); + arrow::r::Input&>::type batch(batch_sexp); + arrow::r::Input&>::type schema(schema_sexp); + arrow::r::Input&>::type options(options_sexp); return cpp11::as_sexp(RecordBatch__cast(batch, schema, options)); END_CPP11 } @@ -1166,9 +1166,9 @@ extern "C" SEXP _arrow_RecordBatch__cast(SEXP batch_sexp, SEXP schema_sexp, SEXP std::shared_ptr Table__cast(const std::shared_ptr& table, const std::shared_ptr& schema, const std::shared_ptr& 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); - arrow::r::input&>::type schema(schema_sexp); - arrow::r::input&>::type options(options_sexp); + arrow::r::Input&>::type table(table_sexp); + arrow::r::Input&>::type schema(schema_sexp); + arrow::r::Input&>::type options(options_sexp); return cpp11::as_sexp(Table__cast(table, schema, options)); END_CPP11 } @@ -1183,9 +1183,9 @@ extern "C" SEXP _arrow_Table__cast(SEXP table_sexp, SEXP schema_sexp, SEXP optio 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); - arrow::r::input::type args(args_sexp); - arrow::r::input::type options(options_sexp); + arrow::r::Input::type func_name(func_name_sexp); + arrow::r::Input::type args(args_sexp); + arrow::r::Input::type options(options_sexp); return cpp11::as_sexp(compute__CallFunction(func_name, args, options)); END_CPP11 } @@ -1200,7 +1200,7 @@ extern "C" SEXP _arrow_compute__CallFunction(SEXP func_name_sexp, SEXP args_sexp 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); + arrow::r::Input::type options(options_sexp); return cpp11::as_sexp(csv___ReadOptions__initialize(options)); END_CPP11 } @@ -1215,7 +1215,7 @@ extern "C" SEXP _arrow_csv___ReadOptions__initialize(SEXP options_sexp){ 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); + arrow::r::Input::type options(options_sexp); return cpp11::as_sexp(csv___ParseOptions__initialize(options)); END_CPP11 } @@ -1230,7 +1230,7 @@ extern "C" SEXP _arrow_csv___ParseOptions__initialize(SEXP options_sexp){ 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); + arrow::r::Input::type options(options_sexp); return cpp11::as_sexp(csv___ConvertOptions__initialize(options)); END_CPP11 } @@ -1245,10 +1245,10 @@ extern "C" SEXP _arrow_csv___ConvertOptions__initialize(SEXP options_sexp){ 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); - arrow::r::input&>::type read_options(read_options_sexp); - arrow::r::input&>::type parse_options(parse_options_sexp); - arrow::r::input&>::type convert_options(convert_options_sexp); + arrow::r::Input&>::type input(input_sexp); + arrow::r::Input&>::type read_options(read_options_sexp); + arrow::r::Input&>::type parse_options(parse_options_sexp); + arrow::r::Input&>::type convert_options(convert_options_sexp); return cpp11::as_sexp(csv___TableReader__Make(input, read_options, parse_options, convert_options)); END_CPP11 } @@ -1263,7 +1263,7 @@ extern "C" SEXP _arrow_csv___TableReader__Make(SEXP input_sexp, SEXP read_option 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); + arrow::r::Input&>::type table_reader(table_reader_sexp); return cpp11::as_sexp(csv___TableReader__Read(table_reader)); END_CPP11 } @@ -1278,7 +1278,7 @@ extern "C" SEXP _arrow_csv___TableReader__Read(SEXP table_reader_sexp){ 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); + arrow::r::Input&>::type ds(ds_sexp); return cpp11::as_sexp(dataset___Dataset__NewScan(ds)); END_CPP11 } @@ -1293,7 +1293,7 @@ extern "C" SEXP _arrow_dataset___Dataset__NewScan(SEXP ds_sexp){ 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); + arrow::r::Input&>::type dataset(dataset_sexp); return cpp11::as_sexp(dataset___Dataset__schema(dataset)); END_CPP11 } @@ -1308,7 +1308,7 @@ extern "C" SEXP _arrow_dataset___Dataset__schema(SEXP dataset_sexp){ 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); + arrow::r::Input&>::type dataset(dataset_sexp); return cpp11::as_sexp(dataset___Dataset__type_name(dataset)); END_CPP11 } @@ -1323,8 +1323,8 @@ extern "C" SEXP _arrow_dataset___Dataset__type_name(SEXP dataset_sexp){ 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); - arrow::r::input&>::type schm(schm_sexp); + arrow::r::Input&>::type dataset(dataset_sexp); + arrow::r::Input&>::type schm(schm_sexp); return cpp11::as_sexp(dataset___Dataset__ReplaceSchema(dataset, schm)); END_CPP11 } @@ -1339,8 +1339,8 @@ extern "C" SEXP _arrow_dataset___Dataset__ReplaceSchema(SEXP dataset_sexp, SEXP 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); - arrow::r::input&>::type schm(schm_sexp); + arrow::r::Input::type datasets(datasets_sexp); + arrow::r::Input&>::type schm(schm_sexp); return cpp11::as_sexp(dataset___UnionDataset__create(datasets, schm)); END_CPP11 } @@ -1355,7 +1355,7 @@ extern "C" SEXP _arrow_dataset___UnionDataset__create(SEXP datasets_sexp, SEXP s ds::DatasetVector 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); + arrow::r::Input&>::type ds(ds_sexp); return cpp11::as_sexp(dataset___UnionDataset__children(ds)); END_CPP11 } @@ -1370,7 +1370,7 @@ extern "C" SEXP _arrow_dataset___UnionDataset__children(SEXP ds_sexp){ 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); + arrow::r::Input&>::type dataset(dataset_sexp); return cpp11::as_sexp(dataset___FileSystemDataset__format(dataset)); END_CPP11 } @@ -1385,7 +1385,7 @@ extern "C" SEXP _arrow_dataset___FileSystemDataset__format(SEXP dataset_sexp){ 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); + arrow::r::Input&>::type dataset(dataset_sexp); return cpp11::as_sexp(dataset___FileSystemDataset__files(dataset)); END_CPP11 } @@ -1400,8 +1400,8 @@ extern "C" SEXP _arrow_dataset___FileSystemDataset__files(SEXP dataset_sexp){ 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); - arrow::r::input::type unify_schemas(unify_schemas_sexp); + arrow::r::Input&>::type factory(factory_sexp); + arrow::r::Input::type unify_schemas(unify_schemas_sexp); return cpp11::as_sexp(dataset___DatasetFactory__Finish1(factory, unify_schemas)); END_CPP11 } @@ -1416,8 +1416,8 @@ extern "C" SEXP _arrow_dataset___DatasetFactory__Finish1(SEXP factory_sexp, SEXP 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); - arrow::r::input&>::type schema(schema_sexp); + arrow::r::Input&>::type factory(factory_sexp); + arrow::r::Input&>::type schema(schema_sexp); return cpp11::as_sexp(dataset___DatasetFactory__Finish2(factory, schema)); END_CPP11 } @@ -1432,8 +1432,8 @@ extern "C" SEXP _arrow_dataset___DatasetFactory__Finish2(SEXP factory_sexp, SEXP 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); - arrow::r::input::type unify_schemas(unify_schemas_sexp); + arrow::r::Input&>::type factory(factory_sexp); + arrow::r::Input::type unify_schemas(unify_schemas_sexp); return cpp11::as_sexp(dataset___DatasetFactory__Inspect(factory, unify_schemas)); END_CPP11 } @@ -1448,7 +1448,7 @@ extern "C" SEXP _arrow_dataset___DatasetFactory__Inspect(SEXP factory_sexp, SEXP 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); + arrow::r::Input>&>::type children(children_sexp); return cpp11::as_sexp(dataset___UnionDatasetFactory__Make(children)); END_CPP11 } @@ -1463,10 +1463,10 @@ extern "C" SEXP _arrow_dataset___UnionDatasetFactory__Make(SEXP children_sexp){ 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); - arrow::r::input&>::type selector(selector_sexp); - arrow::r::input&>::type format(format_sexp); - arrow::r::input&>::type partitioning(partitioning_sexp); + arrow::r::Input&>::type fs(fs_sexp); + arrow::r::Input&>::type selector(selector_sexp); + arrow::r::Input&>::type format(format_sexp); + arrow::r::Input&>::type partitioning(partitioning_sexp); return cpp11::as_sexp(dataset___FileSystemDatasetFactory__Make2(fs, selector, format, partitioning)); END_CPP11 } @@ -1481,9 +1481,9 @@ extern "C" SEXP _arrow_dataset___FileSystemDatasetFactory__Make2(SEXP fs_sexp, S 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); - arrow::r::input&>::type selector(selector_sexp); - arrow::r::input&>::type format(format_sexp); + arrow::r::Input&>::type fs(fs_sexp); + arrow::r::Input&>::type selector(selector_sexp); + arrow::r::Input&>::type format(format_sexp); return cpp11::as_sexp(dataset___FileSystemDatasetFactory__Make1(fs, selector, format)); END_CPP11 } @@ -1498,10 +1498,10 @@ extern "C" SEXP _arrow_dataset___FileSystemDatasetFactory__Make1(SEXP fs_sexp, S 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); - arrow::r::input&>::type selector(selector_sexp); - arrow::r::input&>::type format(format_sexp); - arrow::r::input&>::type factory(factory_sexp); + arrow::r::Input&>::type fs(fs_sexp); + arrow::r::Input&>::type selector(selector_sexp); + arrow::r::Input&>::type format(format_sexp); + arrow::r::Input&>::type factory(factory_sexp); return cpp11::as_sexp(dataset___FileSystemDatasetFactory__Make3(fs, selector, format, factory)); END_CPP11 } @@ -1516,7 +1516,7 @@ extern "C" SEXP _arrow_dataset___FileSystemDatasetFactory__Make3(SEXP fs_sexp, S 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); + arrow::r::Input&>::type format(format_sexp); return cpp11::as_sexp(dataset___FileFormat__type_name(format)); END_CPP11 } @@ -1531,9 +1531,9 @@ extern "C" SEXP _arrow_dataset___FileFormat__type_name(SEXP format_sexp){ std::shared_ptr dataset___ParquetFileFormat__Make(bool use_buffered_stream, int64_t buffer_size, cpp11::strings dict_columns); extern "C" SEXP _arrow_dataset___ParquetFileFormat__Make(SEXP use_buffered_stream_sexp, SEXP buffer_size_sexp, SEXP dict_columns_sexp){ BEGIN_CPP11 - arrow::r::input::type use_buffered_stream(use_buffered_stream_sexp); - arrow::r::input::type buffer_size(buffer_size_sexp); - arrow::r::input::type dict_columns(dict_columns_sexp); + arrow::r::Input::type use_buffered_stream(use_buffered_stream_sexp); + arrow::r::Input::type buffer_size(buffer_size_sexp); + arrow::r::Input::type dict_columns(dict_columns_sexp); return cpp11::as_sexp(dataset___ParquetFileFormat__Make(use_buffered_stream, buffer_size, dict_columns)); END_CPP11 } @@ -1562,7 +1562,7 @@ extern "C" SEXP _arrow_dataset___IpcFileFormat__Make(){ std::shared_ptr dataset___CsvFileFormat__Make(const std::shared_ptr& parse_options); extern "C" SEXP _arrow_dataset___CsvFileFormat__Make(SEXP parse_options_sexp){ BEGIN_CPP11 - arrow::r::input&>::type parse_options(parse_options_sexp); + arrow::r::Input&>::type parse_options(parse_options_sexp); return cpp11::as_sexp(dataset___CsvFileFormat__Make(parse_options)); END_CPP11 } @@ -1577,7 +1577,7 @@ extern "C" SEXP _arrow_dataset___CsvFileFormat__Make(SEXP parse_options_sexp){ std::shared_ptr dataset___DirectoryPartitioning(const std::shared_ptr& schm); extern "C" SEXP _arrow_dataset___DirectoryPartitioning(SEXP schm_sexp){ BEGIN_CPP11 - arrow::r::input&>::type schm(schm_sexp); + arrow::r::Input&>::type schm(schm_sexp); return cpp11::as_sexp(dataset___DirectoryPartitioning(schm)); END_CPP11 } @@ -1592,7 +1592,7 @@ extern "C" SEXP _arrow_dataset___DirectoryPartitioning(SEXP schm_sexp){ std::shared_ptr dataset___DirectoryPartitioning__MakeFactory(const std::vector& field_names); extern "C" SEXP _arrow_dataset___DirectoryPartitioning__MakeFactory(SEXP field_names_sexp){ BEGIN_CPP11 - arrow::r::input&>::type field_names(field_names_sexp); + arrow::r::Input&>::type field_names(field_names_sexp); return cpp11::as_sexp(dataset___DirectoryPartitioning__MakeFactory(field_names)); END_CPP11 } @@ -1607,7 +1607,7 @@ extern "C" SEXP _arrow_dataset___DirectoryPartitioning__MakeFactory(SEXP field_n std::shared_ptr dataset___HivePartitioning(const std::shared_ptr& schm); extern "C" SEXP _arrow_dataset___HivePartitioning(SEXP schm_sexp){ BEGIN_CPP11 - arrow::r::input&>::type schm(schm_sexp); + arrow::r::Input&>::type schm(schm_sexp); return cpp11::as_sexp(dataset___HivePartitioning(schm)); END_CPP11 } @@ -1636,8 +1636,8 @@ extern "C" SEXP _arrow_dataset___HivePartitioning__MakeFactory(){ void dataset___ScannerBuilder__Project(const std::shared_ptr& sb, const std::vector& cols); extern "C" SEXP _arrow_dataset___ScannerBuilder__Project(SEXP sb_sexp, SEXP cols_sexp){ BEGIN_CPP11 - arrow::r::input&>::type sb(sb_sexp); - arrow::r::input&>::type cols(cols_sexp); + arrow::r::Input&>::type sb(sb_sexp); + arrow::r::Input&>::type cols(cols_sexp); dataset___ScannerBuilder__Project(sb, cols); return R_NilValue; END_CPP11 @@ -1653,8 +1653,8 @@ extern "C" SEXP _arrow_dataset___ScannerBuilder__Project(SEXP sb_sexp, SEXP cols 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); - arrow::r::input&>::type expr(expr_sexp); + arrow::r::Input&>::type sb(sb_sexp); + arrow::r::Input&>::type expr(expr_sexp); dataset___ScannerBuilder__Filter(sb, expr); return R_NilValue; END_CPP11 @@ -1670,8 +1670,8 @@ extern "C" SEXP _arrow_dataset___ScannerBuilder__Filter(SEXP sb_sexp, SEXP expr_ 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); - arrow::r::input::type threads(threads_sexp); + arrow::r::Input&>::type sb(sb_sexp); + arrow::r::Input::type threads(threads_sexp); dataset___ScannerBuilder__UseThreads(sb, threads); return R_NilValue; END_CPP11 @@ -1687,8 +1687,8 @@ extern "C" SEXP _arrow_dataset___ScannerBuilder__UseThreads(SEXP sb_sexp, SEXP t 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); - arrow::r::input::type batch_size(batch_size_sexp); + arrow::r::Input&>::type sb(sb_sexp); + arrow::r::Input::type batch_size(batch_size_sexp); dataset___ScannerBuilder__BatchSize(sb, batch_size); return R_NilValue; END_CPP11 @@ -1704,7 +1704,7 @@ extern "C" SEXP _arrow_dataset___ScannerBuilder__BatchSize(SEXP sb_sexp, SEXP ba 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); + arrow::r::Input&>::type sb(sb_sexp); return cpp11::as_sexp(dataset___ScannerBuilder__schema(sb)); END_CPP11 } @@ -1719,7 +1719,7 @@ extern "C" SEXP _arrow_dataset___ScannerBuilder__schema(SEXP sb_sexp){ 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); + arrow::r::Input&>::type sb(sb_sexp); return cpp11::as_sexp(dataset___ScannerBuilder__Finish(sb)); END_CPP11 } @@ -1734,7 +1734,7 @@ extern "C" SEXP _arrow_dataset___ScannerBuilder__Finish(SEXP sb_sexp){ 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); + arrow::r::Input&>::type scanner(scanner_sexp); return cpp11::as_sexp(dataset___Scanner__ToTable(scanner)); END_CPP11 } @@ -1749,8 +1749,8 @@ extern "C" SEXP _arrow_dataset___Scanner__ToTable(SEXP scanner_sexp){ 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); - arrow::r::input::type n(n_sexp); + arrow::r::Input&>::type scanner(scanner_sexp); + arrow::r::Input::type n(n_sexp); return cpp11::as_sexp(dataset___Scanner__head(scanner, n)); END_CPP11 } @@ -1765,7 +1765,7 @@ extern "C" SEXP _arrow_dataset___Scanner__head(SEXP scanner_sexp, SEXP n_sexp){ std::vector> dataset___Scanner__Scan(const std::shared_ptr& scanner); extern "C" SEXP _arrow_dataset___Scanner__Scan(SEXP scanner_sexp){ BEGIN_CPP11 - arrow::r::input&>::type scanner(scanner_sexp); + arrow::r::Input&>::type scanner(scanner_sexp); return cpp11::as_sexp(dataset___Scanner__Scan(scanner)); END_CPP11 } @@ -1780,7 +1780,7 @@ extern "C" SEXP _arrow_dataset___Scanner__Scan(SEXP scanner_sexp){ std::vector> 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); + arrow::r::Input&>::type scan_task(scan_task_sexp); return cpp11::as_sexp(dataset___ScanTask__get_batches(scan_task)); END_CPP11 } @@ -1795,12 +1795,12 @@ extern "C" SEXP _arrow_dataset___ScanTask__get_batches(SEXP scan_task_sexp){ void dataset___Dataset__Write(const std::shared_ptr& ds, const std::shared_ptr& schema, const std::shared_ptr& format, const std::shared_ptr& filesystem, std::string path, const std::shared_ptr& partitioning); extern "C" SEXP _arrow_dataset___Dataset__Write(SEXP ds_sexp, SEXP schema_sexp, SEXP format_sexp, SEXP filesystem_sexp, SEXP path_sexp, SEXP partitioning_sexp){ BEGIN_CPP11 - arrow::r::input&>::type ds(ds_sexp); - arrow::r::input&>::type schema(schema_sexp); - arrow::r::input&>::type format(format_sexp); - arrow::r::input&>::type filesystem(filesystem_sexp); - arrow::r::input::type path(path_sexp); - arrow::r::input&>::type partitioning(partitioning_sexp); + arrow::r::Input&>::type ds(ds_sexp); + arrow::r::Input&>::type schema(schema_sexp); + arrow::r::Input&>::type format(format_sexp); + arrow::r::Input&>::type filesystem(filesystem_sexp); + arrow::r::Input::type path(path_sexp); + arrow::r::Input&>::type partitioning(partitioning_sexp); dataset___Dataset__Write(ds, schema, format, filesystem, path, partitioning); return R_NilValue; END_CPP11 @@ -1816,7 +1816,7 @@ extern "C" SEXP _arrow_dataset___Dataset__Write(SEXP ds_sexp, SEXP schema_sexp, bool shared_ptr_is_null(SEXP xp); extern "C" SEXP _arrow_shared_ptr_is_null(SEXP xp_sexp){ BEGIN_CPP11 - arrow::r::input::type xp(xp_sexp); + arrow::r::Input::type xp(xp_sexp); return cpp11::as_sexp(shared_ptr_is_null(xp)); END_CPP11 } @@ -1831,7 +1831,7 @@ extern "C" SEXP _arrow_shared_ptr_is_null(SEXP xp_sexp){ bool unique_ptr_is_null(SEXP xp); extern "C" SEXP _arrow_unique_ptr_is_null(SEXP xp_sexp){ BEGIN_CPP11 - arrow::r::input::type xp(xp_sexp); + arrow::r::Input::type xp(xp_sexp); return cpp11::as_sexp(unique_ptr_is_null(xp)); END_CPP11 } @@ -2112,8 +2112,8 @@ extern "C" SEXP _arrow_Null__initialize(){ 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); - arrow::r::input::type scale(scale_sexp); + arrow::r::Input::type precision(precision_sexp); + arrow::r::Input::type scale(scale_sexp); return cpp11::as_sexp(Decimal128Type__initialize(precision, scale)); END_CPP11 } @@ -2128,7 +2128,7 @@ extern "C" SEXP _arrow_Decimal128Type__initialize(SEXP precision_sexp, SEXP scal 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); + arrow::r::Input::type byte_width(byte_width_sexp); return cpp11::as_sexp(FixedSizeBinary__initialize(byte_width)); END_CPP11 } @@ -2143,8 +2143,8 @@ extern "C" SEXP _arrow_FixedSizeBinary__initialize(SEXP byte_width_sexp){ 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); - arrow::r::input::type timezone(timezone_sexp); + arrow::r::Input::type unit(unit_sexp); + arrow::r::Input::type timezone(timezone_sexp); return cpp11::as_sexp(Timestamp__initialize(unit, timezone)); END_CPP11 } @@ -2159,7 +2159,7 @@ extern "C" SEXP _arrow_Timestamp__initialize(SEXP unit_sexp, SEXP timezone_sexp) 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); + arrow::r::Input::type unit(unit_sexp); return cpp11::as_sexp(Time32__initialize(unit)); END_CPP11 } @@ -2174,7 +2174,7 @@ extern "C" SEXP _arrow_Time32__initialize(SEXP unit_sexp){ 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); + arrow::r::Input::type unit(unit_sexp); return cpp11::as_sexp(Time64__initialize(unit)); END_CPP11 } @@ -2189,7 +2189,7 @@ extern "C" SEXP _arrow_Time64__initialize(SEXP unit_sexp){ SEXP list__(SEXP x); extern "C" SEXP _arrow_list__(SEXP x_sexp){ BEGIN_CPP11 - arrow::r::input::type x(x_sexp); + arrow::r::Input::type x(x_sexp); return cpp11::as_sexp(list__(x)); END_CPP11 } @@ -2204,7 +2204,7 @@ extern "C" SEXP _arrow_list__(SEXP x_sexp){ SEXP large_list__(SEXP x); extern "C" SEXP _arrow_large_list__(SEXP x_sexp){ BEGIN_CPP11 - arrow::r::input::type x(x_sexp); + arrow::r::Input::type x(x_sexp); return cpp11::as_sexp(large_list__(x)); END_CPP11 } @@ -2219,8 +2219,8 @@ extern "C" SEXP _arrow_large_list__(SEXP x_sexp){ SEXP 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); - arrow::r::input::type list_size(list_size_sexp); + arrow::r::Input::type x(x_sexp); + arrow::r::Input::type list_size(list_size_sexp); return cpp11::as_sexp(fixed_size_list__(x, list_size)); END_CPP11 } @@ -2235,7 +2235,7 @@ extern "C" SEXP _arrow_fixed_size_list__(SEXP x_sexp, SEXP list_size_sexp){ 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); + arrow::r::Input>&>::type fields(fields_sexp); return cpp11::as_sexp(struct__(fields)); END_CPP11 } @@ -2250,7 +2250,7 @@ extern "C" SEXP _arrow_struct__(SEXP fields_sexp){ 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); + arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(DataType__ToString(type)); END_CPP11 } @@ -2265,7 +2265,7 @@ extern "C" SEXP _arrow_DataType__ToString(SEXP type_sexp){ 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); + arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(DataType__name(type)); END_CPP11 } @@ -2280,8 +2280,8 @@ extern "C" SEXP _arrow_DataType__name(SEXP type_sexp){ 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); - arrow::r::input&>::type rhs(rhs_sexp); + arrow::r::Input&>::type lhs(lhs_sexp); + arrow::r::Input&>::type rhs(rhs_sexp); return cpp11::as_sexp(DataType__Equals(lhs, rhs)); END_CPP11 } @@ -2296,7 +2296,7 @@ extern "C" SEXP _arrow_DataType__Equals(SEXP lhs_sexp, SEXP rhs_sexp){ int DataType__num_children(const std::shared_ptr& type); extern "C" SEXP _arrow_DataType__num_children(SEXP type_sexp){ BEGIN_CPP11 - arrow::r::input&>::type type(type_sexp); + arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(DataType__num_children(type)); END_CPP11 } @@ -2311,7 +2311,7 @@ extern "C" SEXP _arrow_DataType__num_children(SEXP type_sexp){ cpp11::writable::list DataType__children_pointer(const std::shared_ptr& type); extern "C" SEXP _arrow_DataType__children_pointer(SEXP type_sexp){ BEGIN_CPP11 - arrow::r::input&>::type type(type_sexp); + arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(DataType__children_pointer(type)); END_CPP11 } @@ -2326,7 +2326,7 @@ extern "C" SEXP _arrow_DataType__children_pointer(SEXP type_sexp){ 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); + arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(DataType__id(type)); END_CPP11 } @@ -2341,7 +2341,7 @@ extern "C" SEXP _arrow_DataType__id(SEXP type_sexp){ 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); + arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(ListType__ToString(type)); END_CPP11 } @@ -2356,7 +2356,7 @@ extern "C" SEXP _arrow_ListType__ToString(SEXP type_sexp){ 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); + arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(FixedWidthType__bit_width(type)); END_CPP11 } @@ -2371,7 +2371,7 @@ extern "C" SEXP _arrow_FixedWidthType__bit_width(SEXP type_sexp){ 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); + arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(DateType__unit(type)); END_CPP11 } @@ -2386,7 +2386,7 @@ extern "C" SEXP _arrow_DateType__unit(SEXP type_sexp){ 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); + arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(TimeType__unit(type)); END_CPP11 } @@ -2401,7 +2401,7 @@ extern "C" SEXP _arrow_TimeType__unit(SEXP type_sexp){ 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); + arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(DecimalType__precision(type)); END_CPP11 } @@ -2416,7 +2416,7 @@ extern "C" SEXP _arrow_DecimalType__precision(SEXP type_sexp){ 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); + arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(DecimalType__scale(type)); END_CPP11 } @@ -2431,7 +2431,7 @@ extern "C" SEXP _arrow_DecimalType__scale(SEXP type_sexp){ 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); + arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(TimestampType__timezone(type)); END_CPP11 } @@ -2446,7 +2446,7 @@ extern "C" SEXP _arrow_TimestampType__timezone(SEXP type_sexp){ 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); + arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(TimestampType__unit(type)); END_CPP11 } @@ -2461,9 +2461,9 @@ extern "C" SEXP _arrow_TimestampType__unit(SEXP type_sexp){ 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); - arrow::r::input&>::type value_type(value_type_sexp); - arrow::r::input::type ordered(ordered_sexp); + arrow::r::Input&>::type index_type(index_type_sexp); + arrow::r::Input&>::type value_type(value_type_sexp); + arrow::r::Input::type ordered(ordered_sexp); return cpp11::as_sexp(DictionaryType__initialize(index_type, value_type, ordered)); END_CPP11 } @@ -2478,7 +2478,7 @@ extern "C" SEXP _arrow_DictionaryType__initialize(SEXP index_type_sexp, SEXP val 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); + arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(DictionaryType__index_type(type)); END_CPP11 } @@ -2493,7 +2493,7 @@ extern "C" SEXP _arrow_DictionaryType__index_type(SEXP type_sexp){ 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); + arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(DictionaryType__value_type(type)); END_CPP11 } @@ -2508,7 +2508,7 @@ extern "C" SEXP _arrow_DictionaryType__value_type(SEXP type_sexp){ 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); + arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(DictionaryType__name(type)); END_CPP11 } @@ -2523,7 +2523,7 @@ extern "C" SEXP _arrow_DictionaryType__name(SEXP type_sexp){ 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); + arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(DictionaryType__ordered(type)); END_CPP11 } @@ -2538,8 +2538,8 @@ extern "C" SEXP _arrow_DictionaryType__ordered(SEXP type_sexp){ 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); - arrow::r::input::type name(name_sexp); + arrow::r::Input&>::type type(type_sexp); + arrow::r::Input::type name(name_sexp); return cpp11::as_sexp(StructType__GetFieldByName(type, name)); END_CPP11 } @@ -2554,8 +2554,8 @@ extern "C" SEXP _arrow_StructType__GetFieldByName(SEXP type_sexp, SEXP name_sexp 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); - arrow::r::input::type name(name_sexp); + arrow::r::Input&>::type type(type_sexp); + arrow::r::Input::type name(name_sexp); return cpp11::as_sexp(StructType__GetFieldIndex(type, name)); END_CPP11 } @@ -2570,7 +2570,7 @@ extern "C" SEXP _arrow_StructType__GetFieldIndex(SEXP type_sexp, SEXP name_sexp) 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); + arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(ListType__value_field(type)); END_CPP11 } @@ -2585,7 +2585,7 @@ extern "C" SEXP _arrow_ListType__value_field(SEXP type_sexp){ 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); + arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(ListType__value_type(type)); END_CPP11 } @@ -2600,7 +2600,7 @@ extern "C" SEXP _arrow_ListType__value_type(SEXP type_sexp){ 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); + arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(LargeListType__value_field(type)); END_CPP11 } @@ -2615,7 +2615,7 @@ extern "C" SEXP _arrow_LargeListType__value_field(SEXP type_sexp){ 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); + arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(LargeListType__value_type(type)); END_CPP11 } @@ -2630,7 +2630,7 @@ extern "C" SEXP _arrow_LargeListType__value_type(SEXP type_sexp){ 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); + arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(FixedSizeListType__value_field(type)); END_CPP11 } @@ -2645,7 +2645,7 @@ extern "C" SEXP _arrow_FixedSizeListType__value_field(SEXP type_sexp){ 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); + arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(FixedSizeListType__value_type(type)); END_CPP11 } @@ -2660,7 +2660,7 @@ extern "C" SEXP _arrow_FixedSizeListType__value_type(SEXP type_sexp){ 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); + arrow::r::Input&>::type type(type_sexp); return cpp11::as_sexp(FixedSizeListType__list_size(type)); END_CPP11 } @@ -2675,7 +2675,7 @@ extern "C" SEXP _arrow_FixedSizeListType__list_size(SEXP type_sexp){ std::shared_ptr dataset___expr__field_ref(std::string name); extern "C" SEXP _arrow_dataset___expr__field_ref(SEXP name_sexp){ BEGIN_CPP11 - arrow::r::input::type name(name_sexp); + arrow::r::Input::type name(name_sexp); return cpp11::as_sexp(dataset___expr__field_ref(name)); END_CPP11 } @@ -2690,8 +2690,8 @@ extern "C" SEXP _arrow_dataset___expr__field_ref(SEXP name_sexp){ std::shared_ptr dataset___expr__equal(const std::shared_ptr& lhs, const std::shared_ptr& rhs); extern "C" SEXP _arrow_dataset___expr__equal(SEXP lhs_sexp, SEXP rhs_sexp){ BEGIN_CPP11 - arrow::r::input&>::type lhs(lhs_sexp); - arrow::r::input&>::type rhs(rhs_sexp); + arrow::r::Input&>::type lhs(lhs_sexp); + arrow::r::Input&>::type rhs(rhs_sexp); return cpp11::as_sexp(dataset___expr__equal(lhs, rhs)); END_CPP11 } @@ -2706,8 +2706,8 @@ extern "C" SEXP _arrow_dataset___expr__equal(SEXP lhs_sexp, SEXP rhs_sexp){ std::shared_ptr dataset___expr__not_equal(const std::shared_ptr& lhs, const std::shared_ptr& rhs); extern "C" SEXP _arrow_dataset___expr__not_equal(SEXP lhs_sexp, SEXP rhs_sexp){ BEGIN_CPP11 - arrow::r::input&>::type lhs(lhs_sexp); - arrow::r::input&>::type rhs(rhs_sexp); + arrow::r::Input&>::type lhs(lhs_sexp); + arrow::r::Input&>::type rhs(rhs_sexp); return cpp11::as_sexp(dataset___expr__not_equal(lhs, rhs)); END_CPP11 } @@ -2722,8 +2722,8 @@ extern "C" SEXP _arrow_dataset___expr__not_equal(SEXP lhs_sexp, SEXP rhs_sexp){ std::shared_ptr dataset___expr__greater(const std::shared_ptr& lhs, const std::shared_ptr& rhs); extern "C" SEXP _arrow_dataset___expr__greater(SEXP lhs_sexp, SEXP rhs_sexp){ BEGIN_CPP11 - arrow::r::input&>::type lhs(lhs_sexp); - arrow::r::input&>::type rhs(rhs_sexp); + arrow::r::Input&>::type lhs(lhs_sexp); + arrow::r::Input&>::type rhs(rhs_sexp); return cpp11::as_sexp(dataset___expr__greater(lhs, rhs)); END_CPP11 } @@ -2738,8 +2738,8 @@ extern "C" SEXP _arrow_dataset___expr__greater(SEXP lhs_sexp, SEXP rhs_sexp){ std::shared_ptr dataset___expr__greater_equal(const std::shared_ptr& lhs, const std::shared_ptr& rhs); extern "C" SEXP _arrow_dataset___expr__greater_equal(SEXP lhs_sexp, SEXP rhs_sexp){ BEGIN_CPP11 - arrow::r::input&>::type lhs(lhs_sexp); - arrow::r::input&>::type rhs(rhs_sexp); + arrow::r::Input&>::type lhs(lhs_sexp); + arrow::r::Input&>::type rhs(rhs_sexp); return cpp11::as_sexp(dataset___expr__greater_equal(lhs, rhs)); END_CPP11 } @@ -2754,8 +2754,8 @@ extern "C" SEXP _arrow_dataset___expr__greater_equal(SEXP lhs_sexp, SEXP rhs_sex std::shared_ptr dataset___expr__less(const std::shared_ptr& lhs, const std::shared_ptr& rhs); extern "C" SEXP _arrow_dataset___expr__less(SEXP lhs_sexp, SEXP rhs_sexp){ BEGIN_CPP11 - arrow::r::input&>::type lhs(lhs_sexp); - arrow::r::input&>::type rhs(rhs_sexp); + arrow::r::Input&>::type lhs(lhs_sexp); + arrow::r::Input&>::type rhs(rhs_sexp); return cpp11::as_sexp(dataset___expr__less(lhs, rhs)); END_CPP11 } @@ -2770,8 +2770,8 @@ extern "C" SEXP _arrow_dataset___expr__less(SEXP lhs_sexp, SEXP rhs_sexp){ std::shared_ptr dataset___expr__less_equal(const std::shared_ptr& lhs, const std::shared_ptr& rhs); extern "C" SEXP _arrow_dataset___expr__less_equal(SEXP lhs_sexp, SEXP rhs_sexp){ BEGIN_CPP11 - arrow::r::input&>::type lhs(lhs_sexp); - arrow::r::input&>::type rhs(rhs_sexp); + arrow::r::Input&>::type lhs(lhs_sexp); + arrow::r::Input&>::type rhs(rhs_sexp); return cpp11::as_sexp(dataset___expr__less_equal(lhs, rhs)); END_CPP11 } @@ -2786,8 +2786,8 @@ extern "C" SEXP _arrow_dataset___expr__less_equal(SEXP lhs_sexp, SEXP rhs_sexp){ std::shared_ptr dataset___expr__in(const std::shared_ptr& lhs, const std::shared_ptr& rhs); extern "C" SEXP _arrow_dataset___expr__in(SEXP lhs_sexp, SEXP rhs_sexp){ BEGIN_CPP11 - arrow::r::input&>::type lhs(lhs_sexp); - arrow::r::input&>::type rhs(rhs_sexp); + arrow::r::Input&>::type lhs(lhs_sexp); + arrow::r::Input&>::type rhs(rhs_sexp); return cpp11::as_sexp(dataset___expr__in(lhs, rhs)); END_CPP11 } @@ -2802,8 +2802,8 @@ extern "C" SEXP _arrow_dataset___expr__in(SEXP lhs_sexp, SEXP rhs_sexp){ std::shared_ptr dataset___expr__and(const std::shared_ptr& lhs, const std::shared_ptr& rhs); extern "C" SEXP _arrow_dataset___expr__and(SEXP lhs_sexp, SEXP rhs_sexp){ BEGIN_CPP11 - arrow::r::input&>::type lhs(lhs_sexp); - arrow::r::input&>::type rhs(rhs_sexp); + arrow::r::Input&>::type lhs(lhs_sexp); + arrow::r::Input&>::type rhs(rhs_sexp); return cpp11::as_sexp(dataset___expr__and(lhs, rhs)); END_CPP11 } @@ -2818,8 +2818,8 @@ extern "C" SEXP _arrow_dataset___expr__and(SEXP lhs_sexp, SEXP rhs_sexp){ std::shared_ptr dataset___expr__or(const std::shared_ptr& lhs, const std::shared_ptr& rhs); extern "C" SEXP _arrow_dataset___expr__or(SEXP lhs_sexp, SEXP rhs_sexp){ BEGIN_CPP11 - arrow::r::input&>::type lhs(lhs_sexp); - arrow::r::input&>::type rhs(rhs_sexp); + arrow::r::Input&>::type lhs(lhs_sexp); + arrow::r::Input&>::type rhs(rhs_sexp); return cpp11::as_sexp(dataset___expr__or(lhs, rhs)); END_CPP11 } @@ -2834,7 +2834,7 @@ extern "C" SEXP _arrow_dataset___expr__or(SEXP lhs_sexp, SEXP rhs_sexp){ std::shared_ptr dataset___expr__not(const std::shared_ptr& lhs); extern "C" SEXP _arrow_dataset___expr__not(SEXP lhs_sexp){ BEGIN_CPP11 - arrow::r::input&>::type lhs(lhs_sexp); + arrow::r::Input&>::type lhs(lhs_sexp); return cpp11::as_sexp(dataset___expr__not(lhs)); END_CPP11 } @@ -2849,7 +2849,7 @@ extern "C" SEXP _arrow_dataset___expr__not(SEXP lhs_sexp){ std::shared_ptr dataset___expr__is_valid(const std::shared_ptr& lhs); extern "C" SEXP _arrow_dataset___expr__is_valid(SEXP lhs_sexp){ BEGIN_CPP11 - arrow::r::input&>::type lhs(lhs_sexp); + arrow::r::Input&>::type lhs(lhs_sexp); return cpp11::as_sexp(dataset___expr__is_valid(lhs)); END_CPP11 } @@ -2864,7 +2864,7 @@ extern "C" SEXP _arrow_dataset___expr__is_valid(SEXP lhs_sexp){ std::shared_ptr dataset___expr__scalar(const std::shared_ptr& x); extern "C" SEXP _arrow_dataset___expr__scalar(SEXP x_sexp){ BEGIN_CPP11 - arrow::r::input&>::type x(x_sexp); + arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(dataset___expr__scalar(x)); END_CPP11 } @@ -2879,7 +2879,7 @@ extern "C" SEXP _arrow_dataset___expr__scalar(SEXP x_sexp){ std::string dataset___expr__ToString(const std::shared_ptr& x); extern "C" SEXP _arrow_dataset___expr__ToString(SEXP x_sexp){ BEGIN_CPP11 - arrow::r::input&>::type x(x_sexp); + arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(dataset___expr__ToString(x)); END_CPP11 } @@ -2894,12 +2894,12 @@ extern "C" SEXP _arrow_dataset___expr__ToString(SEXP x_sexp){ 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); - arrow::r::input&>::type table(table_sexp); - arrow::r::input::type version(version_sexp); - arrow::r::input::type chunk_size(chunk_size_sexp); - arrow::r::input::type compression(compression_sexp); - arrow::r::input::type compression_level(compression_level_sexp); + arrow::r::Input&>::type stream(stream_sexp); + arrow::r::Input&>::type table(table_sexp); + arrow::r::Input::type version(version_sexp); + arrow::r::Input::type chunk_size(chunk_size_sexp); + arrow::r::Input::type compression(compression_sexp); + arrow::r::Input::type compression_level(compression_level_sexp); ipc___WriteFeather__Table(stream, table, version, chunk_size, compression, compression_level); return R_NilValue; END_CPP11 @@ -2915,7 +2915,7 @@ extern "C" SEXP _arrow_ipc___WriteFeather__Table(SEXP stream_sexp, SEXP table_se 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); + arrow::r::Input&>::type reader(reader_sexp); return cpp11::as_sexp(ipc___feather___Reader__version(reader)); END_CPP11 } @@ -2930,8 +2930,8 @@ extern "C" SEXP _arrow_ipc___feather___Reader__version(SEXP reader_sexp){ 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); - arrow::r::input::type columns(columns_sexp); + arrow::r::Input&>::type reader(reader_sexp); + arrow::r::Input::type columns(columns_sexp); return cpp11::as_sexp(ipc___feather___Reader__Read(reader, columns)); END_CPP11 } @@ -2946,7 +2946,7 @@ extern "C" SEXP _arrow_ipc___feather___Reader__Read(SEXP reader_sexp, SEXP colum 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); + arrow::r::Input&>::type stream(stream_sexp); return cpp11::as_sexp(ipc___feather___Reader__Open(stream)); END_CPP11 } @@ -2961,7 +2961,7 @@ extern "C" SEXP _arrow_ipc___feather___Reader__Open(SEXP stream_sexp){ cpp11::writable::strings ipc___feather___Reader__column_names(const std::shared_ptr& reader); extern "C" SEXP _arrow_ipc___feather___Reader__column_names(SEXP reader_sexp){ BEGIN_CPP11 - arrow::r::input&>::type reader(reader_sexp); + arrow::r::Input&>::type reader(reader_sexp); return cpp11::as_sexp(ipc___feather___Reader__column_names(reader)); END_CPP11 } @@ -2976,9 +2976,9 @@ extern "C" SEXP _arrow_ipc___feather___Reader__column_names(SEXP reader_sexp){ 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); - arrow::r::input&>::type field(field_sexp); - arrow::r::input::type nullable(nullable_sexp); + arrow::r::Input::type name(name_sexp); + arrow::r::Input&>::type field(field_sexp); + arrow::r::Input::type nullable(nullable_sexp); return cpp11::as_sexp(Field__initialize(name, field, nullable)); END_CPP11 } @@ -2993,7 +2993,7 @@ extern "C" SEXP _arrow_Field__initialize(SEXP name_sexp, SEXP field_sexp, SEXP n 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); + arrow::r::Input&>::type field(field_sexp); return cpp11::as_sexp(Field__ToString(field)); END_CPP11 } @@ -3008,7 +3008,7 @@ extern "C" SEXP _arrow_Field__ToString(SEXP field_sexp){ 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); + arrow::r::Input&>::type field(field_sexp); return cpp11::as_sexp(Field__name(field)); END_CPP11 } @@ -3023,8 +3023,8 @@ extern "C" SEXP _arrow_Field__name(SEXP field_sexp){ 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); - arrow::r::input&>::type other(other_sexp); + arrow::r::Input&>::type field(field_sexp); + arrow::r::Input&>::type other(other_sexp); return cpp11::as_sexp(Field__Equals(field, other)); END_CPP11 } @@ -3039,7 +3039,7 @@ extern "C" SEXP _arrow_Field__Equals(SEXP field_sexp, SEXP other_sexp){ 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); + arrow::r::Input&>::type field(field_sexp); return cpp11::as_sexp(Field__nullable(field)); END_CPP11 } @@ -3054,7 +3054,7 @@ extern "C" SEXP _arrow_Field__nullable(SEXP field_sexp){ 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); + arrow::r::Input&>::type field(field_sexp); return cpp11::as_sexp(Field__type(field)); END_CPP11 } @@ -3069,7 +3069,7 @@ extern "C" SEXP _arrow_Field__type(SEXP field_sexp){ 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); + arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(fs___FileInfo__type(x)); END_CPP11 } @@ -3084,8 +3084,8 @@ extern "C" SEXP _arrow_fs___FileInfo__type(SEXP x_sexp){ 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); - arrow::r::input::type type(type_sexp); + arrow::r::Input&>::type x(x_sexp); + arrow::r::Input::type type(type_sexp); fs___FileInfo__set_type(x, type); return R_NilValue; END_CPP11 @@ -3101,7 +3101,7 @@ extern "C" SEXP _arrow_fs___FileInfo__set_type(SEXP x_sexp, SEXP type_sexp){ 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); + arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(fs___FileInfo__path(x)); END_CPP11 } @@ -3116,8 +3116,8 @@ extern "C" SEXP _arrow_fs___FileInfo__path(SEXP x_sexp){ 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); - arrow::r::input::type path(path_sexp); + arrow::r::Input&>::type x(x_sexp); + arrow::r::Input::type path(path_sexp); fs___FileInfo__set_path(x, path); return R_NilValue; END_CPP11 @@ -3133,7 +3133,7 @@ extern "C" SEXP _arrow_fs___FileInfo__set_path(SEXP x_sexp, SEXP path_sexp){ 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); + arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(fs___FileInfo__size(x)); END_CPP11 } @@ -3148,8 +3148,8 @@ extern "C" SEXP _arrow_fs___FileInfo__size(SEXP x_sexp){ 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); - arrow::r::input::type size(size_sexp); + arrow::r::Input&>::type x(x_sexp); + arrow::r::Input::type size(size_sexp); fs___FileInfo__set_size(x, size); return R_NilValue; END_CPP11 @@ -3165,7 +3165,7 @@ extern "C" SEXP _arrow_fs___FileInfo__set_size(SEXP x_sexp, SEXP size_sexp){ 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); + arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(fs___FileInfo__base_name(x)); END_CPP11 } @@ -3180,7 +3180,7 @@ extern "C" SEXP _arrow_fs___FileInfo__base_name(SEXP x_sexp){ 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); + arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(fs___FileInfo__extension(x)); END_CPP11 } @@ -3195,7 +3195,7 @@ extern "C" SEXP _arrow_fs___FileInfo__extension(SEXP x_sexp){ 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); + arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(fs___FileInfo__mtime(x)); END_CPP11 } @@ -3210,8 +3210,8 @@ extern "C" SEXP _arrow_fs___FileInfo__mtime(SEXP x_sexp){ 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); - arrow::r::input::type time(time_sexp); + arrow::r::Input&>::type x(x_sexp); + arrow::r::Input::type time(time_sexp); fs___FileInfo__set_mtime(x, time); return R_NilValue; END_CPP11 @@ -3227,7 +3227,7 @@ extern "C" SEXP _arrow_fs___FileInfo__set_mtime(SEXP x_sexp, SEXP time_sexp){ 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); + arrow::r::Input&>::type selector(selector_sexp); return cpp11::as_sexp(fs___FileSelector__base_dir(selector)); END_CPP11 } @@ -3242,7 +3242,7 @@ extern "C" SEXP _arrow_fs___FileSelector__base_dir(SEXP selector_sexp){ 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); + arrow::r::Input&>::type selector(selector_sexp); return cpp11::as_sexp(fs___FileSelector__allow_not_found(selector)); END_CPP11 } @@ -3257,7 +3257,7 @@ extern "C" SEXP _arrow_fs___FileSelector__allow_not_found(SEXP selector_sexp){ 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); + arrow::r::Input&>::type selector(selector_sexp); return cpp11::as_sexp(fs___FileSelector__recursive(selector)); END_CPP11 } @@ -3272,9 +3272,9 @@ extern "C" SEXP _arrow_fs___FileSelector__recursive(SEXP selector_sexp){ 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); - arrow::r::input::type allow_not_found(allow_not_found_sexp); - arrow::r::input::type recursive(recursive_sexp); + arrow::r::Input::type base_dir(base_dir_sexp); + arrow::r::Input::type allow_not_found(allow_not_found_sexp); + arrow::r::Input::type recursive(recursive_sexp); return cpp11::as_sexp(fs___FileSelector__create(base_dir, allow_not_found, recursive)); END_CPP11 } @@ -3289,8 +3289,8 @@ extern "C" SEXP _arrow_fs___FileSelector__create(SEXP base_dir_sexp, SEXP allow_ std::vector> 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); - arrow::r::input&>::type paths(paths_sexp); + arrow::r::Input&>::type file_system(file_system_sexp); + arrow::r::Input&>::type paths(paths_sexp); return cpp11::as_sexp(fs___FileSystem__GetTargetInfos_Paths(file_system, paths)); END_CPP11 } @@ -3305,8 +3305,8 @@ extern "C" SEXP _arrow_fs___FileSystem__GetTargetInfos_Paths(SEXP file_system_se std::vector> 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); - arrow::r::input&>::type selector(selector_sexp); + arrow::r::Input&>::type file_system(file_system_sexp); + arrow::r::Input&>::type selector(selector_sexp); return cpp11::as_sexp(fs___FileSystem__GetTargetInfos_FileSelector(file_system, selector)); END_CPP11 } @@ -3321,9 +3321,9 @@ extern "C" SEXP _arrow_fs___FileSystem__GetTargetInfos_FileSelector(SEXP file_sy 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); - arrow::r::input::type path(path_sexp); - arrow::r::input::type recursive(recursive_sexp); + arrow::r::Input&>::type file_system(file_system_sexp); + arrow::r::Input::type path(path_sexp); + arrow::r::Input::type recursive(recursive_sexp); fs___FileSystem__CreateDir(file_system, path, recursive); return R_NilValue; END_CPP11 @@ -3339,8 +3339,8 @@ extern "C" SEXP _arrow_fs___FileSystem__CreateDir(SEXP file_system_sexp, SEXP pa 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); - arrow::r::input::type path(path_sexp); + arrow::r::Input&>::type file_system(file_system_sexp); + arrow::r::Input::type path(path_sexp); fs___FileSystem__DeleteDir(file_system, path); return R_NilValue; END_CPP11 @@ -3356,8 +3356,8 @@ extern "C" SEXP _arrow_fs___FileSystem__DeleteDir(SEXP file_system_sexp, SEXP pa 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); - arrow::r::input::type path(path_sexp); + arrow::r::Input&>::type file_system(file_system_sexp); + arrow::r::Input::type path(path_sexp); fs___FileSystem__DeleteDirContents(file_system, path); return R_NilValue; END_CPP11 @@ -3373,8 +3373,8 @@ extern "C" SEXP _arrow_fs___FileSystem__DeleteDirContents(SEXP file_system_sexp, 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); - arrow::r::input::type path(path_sexp); + arrow::r::Input&>::type file_system(file_system_sexp); + arrow::r::Input::type path(path_sexp); fs___FileSystem__DeleteFile(file_system, path); return R_NilValue; END_CPP11 @@ -3390,8 +3390,8 @@ extern "C" SEXP _arrow_fs___FileSystem__DeleteFile(SEXP file_system_sexp, SEXP p 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); - arrow::r::input&>::type paths(paths_sexp); + arrow::r::Input&>::type file_system(file_system_sexp); + arrow::r::Input&>::type paths(paths_sexp); fs___FileSystem__DeleteFiles(file_system, paths); return R_NilValue; END_CPP11 @@ -3407,9 +3407,9 @@ extern "C" SEXP _arrow_fs___FileSystem__DeleteFiles(SEXP file_system_sexp, SEXP 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); - arrow::r::input::type src(src_sexp); - arrow::r::input::type dest(dest_sexp); + arrow::r::Input&>::type file_system(file_system_sexp); + arrow::r::Input::type src(src_sexp); + arrow::r::Input::type dest(dest_sexp); fs___FileSystem__Move(file_system, src, dest); return R_NilValue; END_CPP11 @@ -3425,9 +3425,9 @@ extern "C" SEXP _arrow_fs___FileSystem__Move(SEXP file_system_sexp, SEXP src_sex 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); - arrow::r::input::type src(src_sexp); - arrow::r::input::type dest(dest_sexp); + arrow::r::Input&>::type file_system(file_system_sexp); + arrow::r::Input::type src(src_sexp); + arrow::r::Input::type dest(dest_sexp); fs___FileSystem__CopyFile(file_system, src, dest); return R_NilValue; END_CPP11 @@ -3443,8 +3443,8 @@ extern "C" SEXP _arrow_fs___FileSystem__CopyFile(SEXP file_system_sexp, SEXP src 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); - arrow::r::input::type path(path_sexp); + arrow::r::Input&>::type file_system(file_system_sexp); + arrow::r::Input::type path(path_sexp); return cpp11::as_sexp(fs___FileSystem__OpenInputStream(file_system, path)); END_CPP11 } @@ -3459,8 +3459,8 @@ extern "C" SEXP _arrow_fs___FileSystem__OpenInputStream(SEXP file_system_sexp, S 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); - arrow::r::input::type path(path_sexp); + arrow::r::Input&>::type file_system(file_system_sexp); + arrow::r::Input::type path(path_sexp); return cpp11::as_sexp(fs___FileSystem__OpenInputFile(file_system, path)); END_CPP11 } @@ -3475,8 +3475,8 @@ extern "C" SEXP _arrow_fs___FileSystem__OpenInputFile(SEXP file_system_sexp, SEX 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); - arrow::r::input::type path(path_sexp); + arrow::r::Input&>::type file_system(file_system_sexp); + arrow::r::Input::type path(path_sexp); return cpp11::as_sexp(fs___FileSystem__OpenOutputStream(file_system, path)); END_CPP11 } @@ -3491,8 +3491,8 @@ extern "C" SEXP _arrow_fs___FileSystem__OpenOutputStream(SEXP file_system_sexp, 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); - arrow::r::input::type path(path_sexp); + arrow::r::Input&>::type file_system(file_system_sexp); + arrow::r::Input::type path(path_sexp); return cpp11::as_sexp(fs___FileSystem__OpenAppendStream(file_system, path)); END_CPP11 } @@ -3507,7 +3507,7 @@ extern "C" SEXP _arrow_fs___FileSystem__OpenAppendStream(SEXP file_system_sexp, 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); + arrow::r::Input&>::type file_system(file_system_sexp); return cpp11::as_sexp(fs___FileSystem__type_name(file_system)); END_CPP11 } @@ -3536,8 +3536,8 @@ extern "C" SEXP _arrow_fs___LocalFileSystem__create(){ 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); - arrow::r::input&>::type base_fs(base_fs_sexp); + arrow::r::Input::type base_path(base_path_sexp); + arrow::r::Input&>::type base_fs(base_fs_sexp); return cpp11::as_sexp(fs___SubTreeFileSystem__create(base_path, base_fs)); END_CPP11 } @@ -3552,7 +3552,7 @@ extern "C" SEXP _arrow_fs___SubTreeFileSystem__create(SEXP base_path_sexp, SEXP 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); + arrow::r::Input::type path(path_sexp); return cpp11::as_sexp(fs___FileSystemFromUri(path)); END_CPP11 } @@ -3596,8 +3596,8 @@ extern "C" SEXP _arrow_fs___S3FileSystem__create(){ 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); - arrow::r::input::type nbytes(nbytes_sexp); + arrow::r::Input&>::type x(x_sexp); + arrow::r::Input::type nbytes(nbytes_sexp); return cpp11::as_sexp(io___Readable__Read(x, nbytes)); END_CPP11 } @@ -3612,7 +3612,7 @@ extern "C" SEXP _arrow_io___Readable__Read(SEXP x_sexp, SEXP nbytes_sexp){ 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); + arrow::r::Input&>::type x(x_sexp); io___InputStream__Close(x); return R_NilValue; END_CPP11 @@ -3628,7 +3628,7 @@ extern "C" SEXP _arrow_io___InputStream__Close(SEXP x_sexp){ 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); + arrow::r::Input&>::type x(x_sexp); io___OutputStream__Close(x); return R_NilValue; END_CPP11 @@ -3644,7 +3644,7 @@ extern "C" SEXP _arrow_io___OutputStream__Close(SEXP x_sexp){ 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); + arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(io___RandomAccessFile__GetSize(x)); END_CPP11 } @@ -3659,7 +3659,7 @@ extern "C" SEXP _arrow_io___RandomAccessFile__GetSize(SEXP x_sexp){ 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); + arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(io___RandomAccessFile__supports_zero_copy(x)); END_CPP11 } @@ -3674,8 +3674,8 @@ extern "C" SEXP _arrow_io___RandomAccessFile__supports_zero_copy(SEXP x_sexp){ 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); - arrow::r::input::type position(position_sexp); + arrow::r::Input&>::type x(x_sexp); + arrow::r::Input::type position(position_sexp); io___RandomAccessFile__Seek(x, position); return R_NilValue; END_CPP11 @@ -3691,7 +3691,7 @@ extern "C" SEXP _arrow_io___RandomAccessFile__Seek(SEXP x_sexp, SEXP position_se 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); + arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(io___RandomAccessFile__Tell(x)); END_CPP11 } @@ -3706,7 +3706,7 @@ extern "C" SEXP _arrow_io___RandomAccessFile__Tell(SEXP x_sexp){ 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); + arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(io___RandomAccessFile__Read0(x)); END_CPP11 } @@ -3721,9 +3721,9 @@ extern "C" SEXP _arrow_io___RandomAccessFile__Read0(SEXP x_sexp){ 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); - arrow::r::input::type position(position_sexp); - arrow::r::input::type nbytes(nbytes_sexp); + arrow::r::Input&>::type x(x_sexp); + arrow::r::Input::type position(position_sexp); + arrow::r::Input::type nbytes(nbytes_sexp); return cpp11::as_sexp(io___RandomAccessFile__ReadAt(x, position, nbytes)); END_CPP11 } @@ -3738,8 +3738,8 @@ extern "C" SEXP _arrow_io___RandomAccessFile__ReadAt(SEXP x_sexp, SEXP position_ 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); - arrow::r::input::type size(size_sexp); + arrow::r::Input::type path(path_sexp); + arrow::r::Input::type size(size_sexp); return cpp11::as_sexp(io___MemoryMappedFile__Create(path, size)); END_CPP11 } @@ -3754,8 +3754,8 @@ extern "C" SEXP _arrow_io___MemoryMappedFile__Create(SEXP path_sexp, SEXP size_s 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); - arrow::r::input::type mode(mode_sexp); + arrow::r::Input::type path(path_sexp); + arrow::r::Input::type mode(mode_sexp); return cpp11::as_sexp(io___MemoryMappedFile__Open(path, mode)); END_CPP11 } @@ -3770,8 +3770,8 @@ extern "C" SEXP _arrow_io___MemoryMappedFile__Open(SEXP path_sexp, SEXP mode_sex 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); - arrow::r::input::type size(size_sexp); + arrow::r::Input&>::type x(x_sexp); + arrow::r::Input::type size(size_sexp); io___MemoryMappedFile__Resize(x, size); return R_NilValue; END_CPP11 @@ -3787,7 +3787,7 @@ extern "C" SEXP _arrow_io___MemoryMappedFile__Resize(SEXP x_sexp, SEXP size_sexp 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); + arrow::r::Input::type path(path_sexp); return cpp11::as_sexp(io___ReadableFile__Open(path)); END_CPP11 } @@ -3802,7 +3802,7 @@ extern "C" SEXP _arrow_io___ReadableFile__Open(SEXP path_sexp){ 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); + arrow::r::Input&>::type buffer(buffer_sexp); return cpp11::as_sexp(io___BufferReader__initialize(buffer)); END_CPP11 } @@ -3817,8 +3817,8 @@ extern "C" SEXP _arrow_io___BufferReader__initialize(SEXP buffer_sexp){ 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); - arrow::r::input&>::type buf(buf_sexp); + arrow::r::Input&>::type stream(stream_sexp); + arrow::r::Input&>::type buf(buf_sexp); io___Writable__write(stream, buf); return R_NilValue; END_CPP11 @@ -3834,7 +3834,7 @@ extern "C" SEXP _arrow_io___Writable__write(SEXP stream_sexp, SEXP buf_sexp){ 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); + arrow::r::Input&>::type stream(stream_sexp); return cpp11::as_sexp(io___OutputStream__Tell(stream)); END_CPP11 } @@ -3849,7 +3849,7 @@ extern "C" SEXP _arrow_io___OutputStream__Tell(SEXP stream_sexp){ 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); + arrow::r::Input::type path(path_sexp); return cpp11::as_sexp(io___FileOutputStream__Open(path)); END_CPP11 } @@ -3864,7 +3864,7 @@ extern "C" SEXP _arrow_io___FileOutputStream__Open(SEXP path_sexp){ 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); + arrow::r::Input::type initial_capacity(initial_capacity_sexp); return cpp11::as_sexp(io___BufferOutputStream__Create(initial_capacity)); END_CPP11 } @@ -3879,7 +3879,7 @@ extern "C" SEXP _arrow_io___BufferOutputStream__Create(SEXP initial_capacity_sex 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); + arrow::r::Input&>::type stream(stream_sexp); return cpp11::as_sexp(io___BufferOutputStream__capacity(stream)); END_CPP11 } @@ -3894,7 +3894,7 @@ extern "C" SEXP _arrow_io___BufferOutputStream__capacity(SEXP stream_sexp){ 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); + arrow::r::Input&>::type stream(stream_sexp); return cpp11::as_sexp(io___BufferOutputStream__Finish(stream)); END_CPP11 } @@ -3909,7 +3909,7 @@ extern "C" SEXP _arrow_io___BufferOutputStream__Finish(SEXP stream_sexp){ 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); + arrow::r::Input&>::type stream(stream_sexp); return cpp11::as_sexp(io___BufferOutputStream__Tell(stream)); END_CPP11 } @@ -3924,8 +3924,8 @@ extern "C" SEXP _arrow_io___BufferOutputStream__Tell(SEXP stream_sexp){ 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); - arrow::r::input::type bytes(bytes_sexp); + arrow::r::Input&>::type stream(stream_sexp); + arrow::r::Input::type bytes(bytes_sexp); io___BufferOutputStream__Write(stream, bytes); return R_NilValue; END_CPP11 @@ -3941,8 +3941,8 @@ extern "C" SEXP _arrow_io___BufferOutputStream__Write(SEXP stream_sexp, SEXP byt 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); - arrow::r::input::type block_size(block_size_sexp); + arrow::r::Input::type use_threads(use_threads_sexp); + arrow::r::Input::type block_size(block_size_sexp); return cpp11::as_sexp(json___ReadOptions__initialize(use_threads, block_size)); END_CPP11 } @@ -3957,7 +3957,7 @@ extern "C" SEXP _arrow_json___ReadOptions__initialize(SEXP use_threads_sexp, SEX std::shared_ptr json___ParseOptions__initialize(bool newlines_in_values); extern "C" SEXP _arrow_json___ParseOptions__initialize(SEXP newlines_in_values_sexp){ BEGIN_CPP11 - arrow::r::input::type newlines_in_values(newlines_in_values_sexp); + arrow::r::Input::type newlines_in_values(newlines_in_values_sexp); return cpp11::as_sexp(json___ParseOptions__initialize(newlines_in_values)); END_CPP11 } @@ -3972,9 +3972,9 @@ extern "C" SEXP _arrow_json___ParseOptions__initialize(SEXP newlines_in_values_s 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); - arrow::r::input&>::type read_options(read_options_sexp); - arrow::r::input&>::type parse_options(parse_options_sexp); + arrow::r::Input&>::type input(input_sexp); + arrow::r::Input&>::type read_options(read_options_sexp); + arrow::r::Input&>::type parse_options(parse_options_sexp); return cpp11::as_sexp(json___TableReader__Make(input, read_options, parse_options)); END_CPP11 } @@ -3989,7 +3989,7 @@ extern "C" SEXP _arrow_json___TableReader__Make(SEXP input_sexp, SEXP read_optio 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); + arrow::r::Input&>::type table_reader(table_reader_sexp); return cpp11::as_sexp(json___TableReader__Read(table_reader)); END_CPP11 } @@ -4018,7 +4018,7 @@ extern "C" SEXP _arrow_MemoryPool__default(){ int 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); + arrow::r::Input&>::type pool(pool_sexp); return cpp11::as_sexp(MemoryPool__bytes_allocated(pool)); END_CPP11 } @@ -4033,7 +4033,7 @@ extern "C" SEXP _arrow_MemoryPool__bytes_allocated(SEXP pool_sexp){ int 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); + arrow::r::Input&>::type pool(pool_sexp); return cpp11::as_sexp(MemoryPool__max_memory(pool)); END_CPP11 } @@ -4048,7 +4048,7 @@ extern "C" SEXP _arrow_MemoryPool__max_memory(SEXP pool_sexp){ 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); + arrow::r::Input&>::type message(message_sexp); return cpp11::as_sexp(ipc___Message__body_length(message)); END_CPP11 } @@ -4063,7 +4063,7 @@ extern "C" SEXP _arrow_ipc___Message__body_length(SEXP message_sexp){ 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); + arrow::r::Input&>::type message(message_sexp); return cpp11::as_sexp(ipc___Message__metadata(message)); END_CPP11 } @@ -4078,7 +4078,7 @@ extern "C" SEXP _arrow_ipc___Message__metadata(SEXP message_sexp){ 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); + arrow::r::Input&>::type message(message_sexp); return cpp11::as_sexp(ipc___Message__body(message)); END_CPP11 } @@ -4093,7 +4093,7 @@ extern "C" SEXP _arrow_ipc___Message__body(SEXP message_sexp){ 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); + arrow::r::Input&>::type message(message_sexp); return cpp11::as_sexp(ipc___Message__Verify(message)); END_CPP11 } @@ -4108,7 +4108,7 @@ extern "C" SEXP _arrow_ipc___Message__Verify(SEXP message_sexp){ 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); + arrow::r::Input&>::type message(message_sexp); return cpp11::as_sexp(ipc___Message__type(message)); END_CPP11 } @@ -4123,8 +4123,8 @@ extern "C" SEXP _arrow_ipc___Message__type(SEXP message_sexp){ 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); - arrow::r::input&>::type y(y_sexp); + arrow::r::Input&>::type x(x_sexp); + arrow::r::Input&>::type y(y_sexp); return cpp11::as_sexp(ipc___Message__Equals(x, y)); END_CPP11 } @@ -4139,8 +4139,8 @@ extern "C" SEXP _arrow_ipc___Message__Equals(SEXP x_sexp, SEXP y_sexp){ 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); + 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 } @@ -4155,7 +4155,7 @@ extern "C" SEXP _arrow_ipc___ReadRecordBatch__Message__Schema(SEXP message_sexp, 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); + arrow::r::Input&>::type stream(stream_sexp); return cpp11::as_sexp(ipc___ReadSchema_InputStream(stream)); END_CPP11 } @@ -4170,7 +4170,7 @@ extern "C" SEXP _arrow_ipc___ReadSchema_InputStream(SEXP stream_sexp){ 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); + arrow::r::Input&>::type message(message_sexp); return cpp11::as_sexp(ipc___ReadSchema_Message(message)); END_CPP11 } @@ -4185,7 +4185,7 @@ extern "C" SEXP _arrow_ipc___ReadSchema_Message(SEXP message_sexp){ 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); + arrow::r::Input&>::type stream(stream_sexp); return cpp11::as_sexp(ipc___MessageReader__Open(stream)); END_CPP11 } @@ -4200,7 +4200,7 @@ extern "C" SEXP _arrow_ipc___MessageReader__Open(SEXP stream_sexp){ 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); + arrow::r::Input&>::type reader(reader_sexp); return cpp11::as_sexp(ipc___MessageReader__ReadNextMessage(reader)); END_CPP11 } @@ -4215,7 +4215,7 @@ extern "C" SEXP _arrow_ipc___MessageReader__ReadNextMessage(SEXP reader_sexp){ 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); + arrow::r::Input&>::type stream(stream_sexp); return cpp11::as_sexp(ipc___ReadMessage(stream)); END_CPP11 } @@ -4230,7 +4230,7 @@ extern "C" SEXP _arrow_ipc___ReadMessage(SEXP stream_sexp){ 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); + arrow::r::Input::type use_threads(use_threads_sexp); return cpp11::as_sexp(parquet___arrow___ArrowReaderProperties__Make(use_threads)); END_CPP11 } @@ -4245,8 +4245,8 @@ extern "C" SEXP _arrow_parquet___arrow___ArrowReaderProperties__Make(SEXP use_th 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); - arrow::r::input::type use_threads(use_threads_sexp); + arrow::r::Input&>::type properties(properties_sexp); + arrow::r::Input::type use_threads(use_threads_sexp); parquet___arrow___ArrowReaderProperties__set_use_threads(properties, use_threads); return R_NilValue; END_CPP11 @@ -4262,8 +4262,8 @@ extern "C" SEXP _arrow_parquet___arrow___ArrowReaderProperties__set_use_threads( 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); - arrow::r::input::type use_threads(use_threads_sexp); + arrow::r::Input&>::type properties(properties_sexp); + arrow::r::Input::type use_threads(use_threads_sexp); return cpp11::as_sexp(parquet___arrow___ArrowReaderProperties__get_use_threads(properties, use_threads)); END_CPP11 } @@ -4278,8 +4278,8 @@ extern "C" SEXP _arrow_parquet___arrow___ArrowReaderProperties__get_use_threads( 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); - arrow::r::input::type column_index(column_index_sexp); + arrow::r::Input&>::type properties(properties_sexp); + arrow::r::Input::type column_index(column_index_sexp); return cpp11::as_sexp(parquet___arrow___ArrowReaderProperties__get_read_dictionary(properties, column_index)); END_CPP11 } @@ -4294,9 +4294,9 @@ extern "C" SEXP _arrow_parquet___arrow___ArrowReaderProperties__get_read_diction 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); - arrow::r::input::type column_index(column_index_sexp); - arrow::r::input::type read_dict(read_dict_sexp); + arrow::r::Input&>::type properties(properties_sexp); + arrow::r::Input::type column_index(column_index_sexp); + arrow::r::Input::type read_dict(read_dict_sexp); parquet___arrow___ArrowReaderProperties__set_read_dictionary(properties, column_index, read_dict); return R_NilValue; END_CPP11 @@ -4312,8 +4312,8 @@ extern "C" SEXP _arrow_parquet___arrow___ArrowReaderProperties__set_read_diction 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); - arrow::r::input&>::type props(props_sexp); + arrow::r::Input&>::type file(file_sexp); + arrow::r::Input&>::type props(props_sexp); return cpp11::as_sexp(parquet___arrow___FileReader__OpenFile(file, props)); END_CPP11 } @@ -4328,7 +4328,7 @@ extern "C" SEXP _arrow_parquet___arrow___FileReader__OpenFile(SEXP file_sexp, SE 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); + arrow::r::Input&>::type reader(reader_sexp); return cpp11::as_sexp(parquet___arrow___FileReader__ReadTable1(reader)); END_CPP11 } @@ -4343,8 +4343,8 @@ extern "C" SEXP _arrow_parquet___arrow___FileReader__ReadTable1(SEXP reader_sexp 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); - arrow::r::input&>::type column_indices(column_indices_sexp); + arrow::r::Input&>::type reader(reader_sexp); + arrow::r::Input&>::type column_indices(column_indices_sexp); return cpp11::as_sexp(parquet___arrow___FileReader__ReadTable2(reader, column_indices)); END_CPP11 } @@ -4359,7 +4359,7 @@ extern "C" SEXP _arrow_parquet___arrow___FileReader__ReadTable2(SEXP reader_sexp 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); + arrow::r::Input&>::type reader(reader_sexp); return cpp11::as_sexp(parquet___arrow___FileReader__num_rows(reader)); END_CPP11 } @@ -4374,9 +4374,9 @@ extern "C" SEXP _arrow_parquet___arrow___FileReader__num_rows(SEXP reader_sexp){ 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); - arrow::r::input::type use_deprecated_int96_timestamps(use_deprecated_int96_timestamps_sexp); - arrow::r::input::type timestamp_unit(timestamp_unit_sexp); + arrow::r::Input::type allow_truncated_timestamps(allow_truncated_timestamps_sexp); + arrow::r::Input::type use_deprecated_int96_timestamps(use_deprecated_int96_timestamps_sexp); + arrow::r::Input::type timestamp_unit(timestamp_unit_sexp); return cpp11::as_sexp(parquet___ArrowWriterProperties___create(allow_truncated_timestamps, use_deprecated_int96_timestamps, timestamp_unit)); END_CPP11 } @@ -4405,8 +4405,8 @@ extern "C" SEXP _arrow_parquet___WriterProperties___Builder__create(){ 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); - arrow::r::input::type version(version_sexp); + arrow::r::Input&>::type builder(builder_sexp); + arrow::r::Input::type version(version_sexp); parquet___WriterProperties___Builder__version(builder, version); return R_NilValue; END_CPP11 @@ -4422,9 +4422,9 @@ extern "C" SEXP _arrow_parquet___WriterProperties___Builder__version(SEXP builde 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); - arrow::r::input&>::type paths(paths_sexp); - arrow::r::input::type types(types_sexp); + arrow::r::Input&>::type builder(builder_sexp); + arrow::r::Input&>::type paths(paths_sexp); + arrow::r::Input::type types(types_sexp); parquet___ArrowWriterProperties___Builder__set_compressions(builder, paths, types); return R_NilValue; END_CPP11 @@ -4440,9 +4440,9 @@ extern "C" SEXP _arrow_parquet___ArrowWriterProperties___Builder__set_compressio 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); - arrow::r::input&>::type paths(paths_sexp); - arrow::r::input::type levels(levels_sexp); + arrow::r::Input&>::type builder(builder_sexp); + arrow::r::Input&>::type paths(paths_sexp); + arrow::r::Input::type levels(levels_sexp); parquet___ArrowWriterProperties___Builder__set_compression_levels(builder, paths, levels); return R_NilValue; END_CPP11 @@ -4458,9 +4458,9 @@ extern "C" SEXP _arrow_parquet___ArrowWriterProperties___Builder__set_compressio 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); - arrow::r::input&>::type paths(paths_sexp); - arrow::r::input::type use_dictionary(use_dictionary_sexp); + arrow::r::Input&>::type builder(builder_sexp); + arrow::r::Input&>::type paths(paths_sexp); + arrow::r::Input::type use_dictionary(use_dictionary_sexp); parquet___ArrowWriterProperties___Builder__set_use_dictionary(builder, paths, use_dictionary); return R_NilValue; END_CPP11 @@ -4476,9 +4476,9 @@ extern "C" SEXP _arrow_parquet___ArrowWriterProperties___Builder__set_use_dictio 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); - arrow::r::input&>::type paths(paths_sexp); - arrow::r::input::type write_statistics(write_statistics_sexp); + arrow::r::Input&>::type builder(builder_sexp); + arrow::r::Input&>::type paths(paths_sexp); + arrow::r::Input::type write_statistics(write_statistics_sexp); parquet___ArrowWriterProperties___Builder__set_write_statistics(builder, paths, write_statistics); return R_NilValue; END_CPP11 @@ -4494,8 +4494,8 @@ extern "C" SEXP _arrow_parquet___ArrowWriterProperties___Builder__set_write_stat 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); - arrow::r::input::type data_page_size(data_page_size_sexp); + arrow::r::Input&>::type builder(builder_sexp); + arrow::r::Input::type data_page_size(data_page_size_sexp); parquet___ArrowWriterProperties___Builder__data_page_size(builder, data_page_size); return R_NilValue; END_CPP11 @@ -4511,7 +4511,7 @@ extern "C" SEXP _arrow_parquet___ArrowWriterProperties___Builder__data_page_size 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); + arrow::r::Input&>::type builder(builder_sexp); return cpp11::as_sexp(parquet___WriterProperties___Builder__build(builder)); END_CPP11 } @@ -4526,10 +4526,10 @@ extern "C" SEXP _arrow_parquet___WriterProperties___Builder__build(SEXP builder_ 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); - arrow::r::input&>::type sink(sink_sexp); - arrow::r::input&>::type properties(properties_sexp); - arrow::r::input&>::type arrow_properties(arrow_properties_sexp); + arrow::r::Input&>::type schema(schema_sexp); + arrow::r::Input&>::type sink(sink_sexp); + arrow::r::Input&>::type properties(properties_sexp); + arrow::r::Input&>::type arrow_properties(arrow_properties_sexp); return cpp11::as_sexp(parquet___arrow___ParquetFileWriter__Open(schema, sink, properties, arrow_properties)); END_CPP11 } @@ -4544,9 +4544,9 @@ extern "C" SEXP _arrow_parquet___arrow___ParquetFileWriter__Open(SEXP schema_sex 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); - arrow::r::input&>::type table(table_sexp); - arrow::r::input::type chunk_size(chunk_size_sexp); + arrow::r::Input&>::type writer(writer_sexp); + arrow::r::Input&>::type table(table_sexp); + arrow::r::Input::type chunk_size(chunk_size_sexp); parquet___arrow___FileWriter__WriteTable(writer, table, chunk_size); return R_NilValue; END_CPP11 @@ -4562,7 +4562,7 @@ extern "C" SEXP _arrow_parquet___arrow___FileWriter__WriteTable(SEXP writer_sexp 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); + arrow::r::Input&>::type writer(writer_sexp); parquet___arrow___FileWriter__Close(writer); return R_NilValue; END_CPP11 @@ -4578,10 +4578,10 @@ extern "C" SEXP _arrow_parquet___arrow___FileWriter__Close(SEXP writer_sexp){ 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); - arrow::r::input&>::type sink(sink_sexp); - arrow::r::input&>::type properties(properties_sexp); - arrow::r::input&>::type arrow_properties(arrow_properties_sexp); + arrow::r::Input&>::type table(table_sexp); + arrow::r::Input&>::type sink(sink_sexp); + arrow::r::Input&>::type properties(properties_sexp); + arrow::r::Input&>::type arrow_properties(arrow_properties_sexp); parquet___arrow___WriteTable(table, sink, properties, arrow_properties); return R_NilValue; END_CPP11 @@ -4597,7 +4597,7 @@ extern "C" SEXP _arrow_parquet___arrow___WriteTable(SEXP table_sexp, SEXP sink_s 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); + arrow::r::Input&>::type reader(reader_sexp); return cpp11::as_sexp(parquet___arrow___FileReader__GetSchema(reader)); END_CPP11 } @@ -4612,8 +4612,8 @@ extern "C" SEXP _arrow_parquet___arrow___FileReader__GetSchema(SEXP reader_sexp) std::shared_ptr ImportArray(uintptr_t array, uintptr_t schema); extern "C" SEXP _arrow_ImportArray(SEXP array_sexp, SEXP schema_sexp){ BEGIN_CPP11 - arrow::r::input::type array(array_sexp); - arrow::r::input::type schema(schema_sexp); + arrow::r::Input::type array(array_sexp); + arrow::r::Input::type schema(schema_sexp); return cpp11::as_sexp(ImportArray(array, schema)); END_CPP11 } @@ -4628,8 +4628,8 @@ extern "C" SEXP _arrow_ImportArray(SEXP array_sexp, SEXP schema_sexp){ std::shared_ptr ImportRecordBatch(uintptr_t array, uintptr_t schema); extern "C" SEXP _arrow_ImportRecordBatch(SEXP array_sexp, SEXP schema_sexp){ BEGIN_CPP11 - arrow::r::input::type array(array_sexp); - arrow::r::input::type schema(schema_sexp); + arrow::r::Input::type array(array_sexp); + arrow::r::Input::type schema(schema_sexp); return cpp11::as_sexp(ImportRecordBatch(array, schema)); END_CPP11 } @@ -4658,7 +4658,7 @@ extern "C" SEXP _arrow_allocate_arrow_schema(){ void delete_arrow_schema(uintptr_t ptr); extern "C" SEXP _arrow_delete_arrow_schema(SEXP ptr_sexp){ BEGIN_CPP11 - arrow::r::input::type ptr(ptr_sexp); + arrow::r::Input::type ptr(ptr_sexp); delete_arrow_schema(ptr); return R_NilValue; END_CPP11 @@ -4688,7 +4688,7 @@ extern "C" SEXP _arrow_allocate_arrow_array(){ void delete_arrow_array(uintptr_t ptr); extern "C" SEXP _arrow_delete_arrow_array(SEXP ptr_sexp){ BEGIN_CPP11 - arrow::r::input::type ptr(ptr_sexp); + arrow::r::Input::type ptr(ptr_sexp); delete_arrow_array(ptr); return R_NilValue; END_CPP11 @@ -4704,8 +4704,8 @@ extern "C" SEXP _arrow_delete_arrow_array(SEXP ptr_sexp){ void ExportType(const std::shared_ptr& type, uintptr_t ptr); extern "C" SEXP _arrow_ExportType(SEXP type_sexp, SEXP ptr_sexp){ BEGIN_CPP11 - arrow::r::input&>::type type(type_sexp); - arrow::r::input::type ptr(ptr_sexp); + arrow::r::Input&>::type type(type_sexp); + arrow::r::Input::type ptr(ptr_sexp); ExportType(type, ptr); return R_NilValue; END_CPP11 @@ -4721,8 +4721,8 @@ extern "C" SEXP _arrow_ExportType(SEXP type_sexp, SEXP ptr_sexp){ void ExportSchema(const std::shared_ptr& schema, uintptr_t ptr); extern "C" SEXP _arrow_ExportSchema(SEXP schema_sexp, SEXP ptr_sexp){ BEGIN_CPP11 - arrow::r::input&>::type schema(schema_sexp); - arrow::r::input::type ptr(ptr_sexp); + arrow::r::Input&>::type schema(schema_sexp); + arrow::r::Input::type ptr(ptr_sexp); ExportSchema(schema, ptr); return R_NilValue; END_CPP11 @@ -4738,9 +4738,9 @@ extern "C" SEXP _arrow_ExportSchema(SEXP schema_sexp, SEXP ptr_sexp){ void ExportArray(const std::shared_ptr& array, uintptr_t ptr, uintptr_t schema_ptr); extern "C" SEXP _arrow_ExportArray(SEXP array_sexp, SEXP ptr_sexp, SEXP schema_ptr_sexp){ BEGIN_CPP11 - arrow::r::input&>::type array(array_sexp); - arrow::r::input::type ptr(ptr_sexp); - arrow::r::input::type schema_ptr(schema_ptr_sexp); + arrow::r::Input&>::type array(array_sexp); + arrow::r::Input::type ptr(ptr_sexp); + arrow::r::Input::type schema_ptr(schema_ptr_sexp); ExportArray(array, ptr, schema_ptr); return R_NilValue; END_CPP11 @@ -4756,9 +4756,9 @@ extern "C" SEXP _arrow_ExportArray(SEXP array_sexp, SEXP ptr_sexp, SEXP schema_p void ExportRecordBatch(const std::shared_ptr& batch, uintptr_t ptr, uintptr_t schema_ptr); extern "C" SEXP _arrow_ExportRecordBatch(SEXP batch_sexp, SEXP ptr_sexp, SEXP schema_ptr_sexp){ BEGIN_CPP11 - arrow::r::input&>::type batch(batch_sexp); - arrow::r::input::type ptr(ptr_sexp); - arrow::r::input::type schema_ptr(schema_ptr_sexp); + arrow::r::Input&>::type batch(batch_sexp); + arrow::r::Input::type ptr(ptr_sexp); + arrow::r::Input::type schema_ptr(schema_ptr_sexp); ExportRecordBatch(batch, ptr, schema_ptr); return R_NilValue; END_CPP11 @@ -4774,7 +4774,7 @@ extern "C" SEXP _arrow_ExportRecordBatch(SEXP batch_sexp, SEXP ptr_sexp, SEXP sc 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); + arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(RecordBatch__num_columns(x)); END_CPP11 } @@ -4789,7 +4789,7 @@ extern "C" SEXP _arrow_RecordBatch__num_columns(SEXP x_sexp){ 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); + arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(RecordBatch__num_rows(x)); END_CPP11 } @@ -4804,7 +4804,7 @@ extern "C" SEXP _arrow_RecordBatch__num_rows(SEXP x_sexp){ 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); + arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(RecordBatch__schema(x)); END_CPP11 } @@ -4819,8 +4819,8 @@ extern "C" SEXP _arrow_RecordBatch__schema(SEXP x_sexp){ 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); - arrow::r::input::type metadata(metadata_sexp); + arrow::r::Input&>::type x(x_sexp); + arrow::r::Input::type metadata(metadata_sexp); return cpp11::as_sexp(RecordBatch__ReplaceSchemaMetadata(x, metadata)); END_CPP11 } @@ -4835,7 +4835,7 @@ extern "C" SEXP _arrow_RecordBatch__ReplaceSchemaMetadata(SEXP x_sexp, SEXP meta arrow::ArrayVector 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); + arrow::r::Input&>::type batch(batch_sexp); return cpp11::as_sexp(RecordBatch__columns(batch)); END_CPP11 } @@ -4850,8 +4850,8 @@ extern "C" SEXP _arrow_RecordBatch__columns(SEXP batch_sexp){ 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); - arrow::r::input::type i(i_sexp); + arrow::r::Input&>::type batch(batch_sexp); + arrow::r::Input::type i(i_sexp); return cpp11::as_sexp(RecordBatch__column(batch, i)); END_CPP11 } @@ -4866,8 +4866,8 @@ extern "C" SEXP _arrow_RecordBatch__column(SEXP batch_sexp, SEXP i_sexp){ 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); - arrow::r::input::type name(name_sexp); + arrow::r::Input&>::type batch(batch_sexp); + arrow::r::Input::type name(name_sexp); return cpp11::as_sexp(RecordBatch__GetColumnByName(batch, name)); END_CPP11 } @@ -4882,8 +4882,8 @@ extern "C" SEXP _arrow_RecordBatch__GetColumnByName(SEXP batch_sexp, SEXP name_s std::shared_ptr RecordBatch__select(const std::shared_ptr& batch, cpp11::integers indices); extern "C" SEXP _arrow_RecordBatch__select(SEXP batch_sexp, SEXP indices_sexp){ BEGIN_CPP11 - arrow::r::input&>::type batch(batch_sexp); - arrow::r::input::type indices(indices_sexp); + arrow::r::Input&>::type batch(batch_sexp); + arrow::r::Input::type indices(indices_sexp); return cpp11::as_sexp(RecordBatch__select(batch, indices)); END_CPP11 } @@ -4898,9 +4898,9 @@ extern "C" SEXP _arrow_RecordBatch__select(SEXP batch_sexp, SEXP indices_sexp){ 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); - arrow::r::input&>::type other(other_sexp); - arrow::r::input::type check_metadata(check_metadata_sexp); + arrow::r::Input&>::type self(self_sexp); + arrow::r::Input&>::type other(other_sexp); + arrow::r::Input::type check_metadata(check_metadata_sexp); return cpp11::as_sexp(RecordBatch__Equals(self, other, check_metadata)); END_CPP11 } @@ -4915,8 +4915,8 @@ extern "C" SEXP _arrow_RecordBatch__Equals(SEXP self_sexp, SEXP other_sexp, SEXP 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); - arrow::r::input::type i(i_sexp); + arrow::r::Input&>::type batch(batch_sexp); + arrow::r::Input::type i(i_sexp); return cpp11::as_sexp(RecordBatch__RemoveColumn(batch, i)); END_CPP11 } @@ -4931,8 +4931,8 @@ extern "C" SEXP _arrow_RecordBatch__RemoveColumn(SEXP batch_sexp, SEXP i_sexp){ 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); - arrow::r::input::type i(i_sexp); + arrow::r::Input&>::type batch(batch_sexp); + arrow::r::Input::type i(i_sexp); return cpp11::as_sexp(RecordBatch__column_name(batch, i)); END_CPP11 } @@ -4947,7 +4947,7 @@ extern "C" SEXP _arrow_RecordBatch__column_name(SEXP batch_sexp, SEXP i_sexp){ 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); + arrow::r::Input&>::type batch(batch_sexp); return cpp11::as_sexp(RecordBatch__names(batch)); END_CPP11 } @@ -4962,8 +4962,8 @@ extern "C" SEXP _arrow_RecordBatch__names(SEXP batch_sexp){ 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); - arrow::r::input::type offset(offset_sexp); + arrow::r::Input&>::type self(self_sexp); + arrow::r::Input::type offset(offset_sexp); return cpp11::as_sexp(RecordBatch__Slice1(self, offset)); END_CPP11 } @@ -4978,9 +4978,9 @@ extern "C" SEXP _arrow_RecordBatch__Slice1(SEXP self_sexp, SEXP offset_sexp){ 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); - arrow::r::input::type offset(offset_sexp); - arrow::r::input::type length(length_sexp); + arrow::r::Input&>::type self(self_sexp); + arrow::r::Input::type offset(offset_sexp); + arrow::r::Input::type length(length_sexp); return cpp11::as_sexp(RecordBatch__Slice2(self, offset, length)); END_CPP11 } @@ -4995,7 +4995,7 @@ extern "C" SEXP _arrow_RecordBatch__Slice2(SEXP self_sexp, SEXP offset_sexp, SEX 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); + arrow::r::Input&>::type batch(batch_sexp); return cpp11::as_sexp(ipc___SerializeRecordBatch__Raw(batch)); END_CPP11 } @@ -5010,8 +5010,8 @@ extern "C" SEXP _arrow_ipc___SerializeRecordBatch__Raw(SEXP batch_sexp){ 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); - arrow::r::input&>::type schema(schema_sexp); + arrow::r::Input&>::type stream(stream_sexp); + arrow::r::Input&>::type schema(schema_sexp); return cpp11::as_sexp(ipc___ReadRecordBatch__InputStream__Schema(stream, schema)); END_CPP11 } @@ -5026,8 +5026,8 @@ extern "C" SEXP _arrow_ipc___ReadRecordBatch__InputStream__Schema(SEXP stream_se 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); - arrow::r::input::type lst(lst_sexp); + arrow::r::Input::type schema_sxp(schema_sxp_sexp); + arrow::r::Input::type lst(lst_sexp); return cpp11::as_sexp(RecordBatch__from_arrays(schema_sxp, lst)); END_CPP11 } @@ -5042,7 +5042,7 @@ extern "C" SEXP _arrow_RecordBatch__from_arrays(SEXP schema_sxp_sexp, SEXP lst_s 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); + arrow::r::Input&>::type reader(reader_sexp); return cpp11::as_sexp(RecordBatchReader__schema(reader)); END_CPP11 } @@ -5057,7 +5057,7 @@ extern "C" SEXP _arrow_RecordBatchReader__schema(SEXP reader_sexp){ 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); + arrow::r::Input&>::type reader(reader_sexp); return cpp11::as_sexp(RecordBatchReader__ReadNext(reader)); END_CPP11 } @@ -5072,7 +5072,7 @@ extern "C" SEXP _arrow_RecordBatchReader__ReadNext(SEXP reader_sexp){ 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); + arrow::r::Input&>::type stream(stream_sexp); return cpp11::as_sexp(ipc___RecordBatchStreamReader__Open(stream)); END_CPP11 } @@ -5087,7 +5087,7 @@ extern "C" SEXP _arrow_ipc___RecordBatchStreamReader__Open(SEXP stream_sexp){ std::vector> ipc___RecordBatchStreamReader__batches(const std::shared_ptr& reader); extern "C" SEXP _arrow_ipc___RecordBatchStreamReader__batches(SEXP reader_sexp){ BEGIN_CPP11 - arrow::r::input&>::type reader(reader_sexp); + arrow::r::Input&>::type reader(reader_sexp); return cpp11::as_sexp(ipc___RecordBatchStreamReader__batches(reader)); END_CPP11 } @@ -5102,7 +5102,7 @@ extern "C" SEXP _arrow_ipc___RecordBatchStreamReader__batches(SEXP reader_sexp){ 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); + arrow::r::Input&>::type reader(reader_sexp); return cpp11::as_sexp(ipc___RecordBatchFileReader__schema(reader)); END_CPP11 } @@ -5117,7 +5117,7 @@ extern "C" SEXP _arrow_ipc___RecordBatchFileReader__schema(SEXP reader_sexp){ 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); + arrow::r::Input&>::type reader(reader_sexp); return cpp11::as_sexp(ipc___RecordBatchFileReader__num_record_batches(reader)); END_CPP11 } @@ -5132,8 +5132,8 @@ extern "C" SEXP _arrow_ipc___RecordBatchFileReader__num_record_batches(SEXP read 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); - arrow::r::input::type i(i_sexp); + arrow::r::Input&>::type reader(reader_sexp); + arrow::r::Input::type i(i_sexp); return cpp11::as_sexp(ipc___RecordBatchFileReader__ReadRecordBatch(reader, i)); END_CPP11 } @@ -5148,7 +5148,7 @@ extern "C" SEXP _arrow_ipc___RecordBatchFileReader__ReadRecordBatch(SEXP reader_ 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); + arrow::r::Input&>::type file(file_sexp); return cpp11::as_sexp(ipc___RecordBatchFileReader__Open(file)); END_CPP11 } @@ -5163,7 +5163,7 @@ extern "C" SEXP _arrow_ipc___RecordBatchFileReader__Open(SEXP file_sexp){ 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); + arrow::r::Input&>::type reader(reader_sexp); return cpp11::as_sexp(Table__from_RecordBatchFileReader(reader)); END_CPP11 } @@ -5178,7 +5178,7 @@ extern "C" SEXP _arrow_Table__from_RecordBatchFileReader(SEXP reader_sexp){ std::shared_ptr Table__from_RecordBatchStreamReader(const std::shared_ptr& reader); extern "C" SEXP _arrow_Table__from_RecordBatchStreamReader(SEXP reader_sexp){ BEGIN_CPP11 - arrow::r::input&>::type reader(reader_sexp); + arrow::r::Input&>::type reader(reader_sexp); return cpp11::as_sexp(Table__from_RecordBatchStreamReader(reader)); END_CPP11 } @@ -5193,7 +5193,7 @@ extern "C" SEXP _arrow_Table__from_RecordBatchStreamReader(SEXP reader_sexp){ std::vector> 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); + arrow::r::Input&>::type reader(reader_sexp); return cpp11::as_sexp(ipc___RecordBatchFileReader__batches(reader)); END_CPP11 } @@ -5208,8 +5208,8 @@ extern "C" SEXP _arrow_ipc___RecordBatchFileReader__batches(SEXP reader_sexp){ 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); - arrow::r::input&>::type batch(batch_sexp); + arrow::r::Input&>::type batch_writer(batch_writer_sexp); + arrow::r::Input&>::type batch(batch_sexp); ipc___RecordBatchWriter__WriteRecordBatch(batch_writer, batch); return R_NilValue; END_CPP11 @@ -5225,8 +5225,8 @@ extern "C" SEXP _arrow_ipc___RecordBatchWriter__WriteRecordBatch(SEXP batch_writ 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); - arrow::r::input&>::type table(table_sexp); + arrow::r::Input&>::type batch_writer(batch_writer_sexp); + arrow::r::Input&>::type table(table_sexp); ipc___RecordBatchWriter__WriteTable(batch_writer, table); return R_NilValue; END_CPP11 @@ -5242,7 +5242,7 @@ extern "C" SEXP _arrow_ipc___RecordBatchWriter__WriteTable(SEXP batch_writer_sex 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); + arrow::r::Input&>::type batch_writer(batch_writer_sexp); ipc___RecordBatchWriter__Close(batch_writer); return R_NilValue; END_CPP11 @@ -5258,10 +5258,10 @@ extern "C" SEXP _arrow_ipc___RecordBatchWriter__Close(SEXP batch_writer_sexp){ 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); - arrow::r::input&>::type schema(schema_sexp); - arrow::r::input::type use_legacy_format(use_legacy_format_sexp); - arrow::r::input::type metadata_version(metadata_version_sexp); + arrow::r::Input&>::type stream(stream_sexp); + arrow::r::Input&>::type schema(schema_sexp); + arrow::r::Input::type use_legacy_format(use_legacy_format_sexp); + arrow::r::Input::type metadata_version(metadata_version_sexp); return cpp11::as_sexp(ipc___RecordBatchFileWriter__Open(stream, schema, use_legacy_format, metadata_version)); END_CPP11 } @@ -5276,10 +5276,10 @@ extern "C" SEXP _arrow_ipc___RecordBatchFileWriter__Open(SEXP stream_sexp, SEXP 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); - arrow::r::input&>::type schema(schema_sexp); - arrow::r::input::type use_legacy_format(use_legacy_format_sexp); - arrow::r::input::type metadata_version(metadata_version_sexp); + arrow::r::Input&>::type stream(stream_sexp); + arrow::r::Input&>::type schema(schema_sexp); + arrow::r::Input::type use_legacy_format(use_legacy_format_sexp); + arrow::r::Input::type metadata_version(metadata_version_sexp); return cpp11::as_sexp(ipc___RecordBatchStreamWriter__Open(stream, schema, use_legacy_format, metadata_version)); END_CPP11 } @@ -5294,8 +5294,8 @@ extern "C" SEXP _arrow_ipc___RecordBatchStreamWriter__Open(SEXP stream_sexp, SEX 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); - arrow::r::input::type i(i_sexp); + arrow::r::Input&>::type x(x_sexp); + arrow::r::Input::type i(i_sexp); return cpp11::as_sexp(Array__GetScalar(x, i)); END_CPP11 } @@ -5310,7 +5310,7 @@ extern "C" SEXP _arrow_Array__GetScalar(SEXP x_sexp, SEXP i_sexp){ 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); + arrow::r::Input&>::type s(s_sexp); return cpp11::as_sexp(Scalar__ToString(s)); END_CPP11 } @@ -5325,8 +5325,8 @@ extern "C" SEXP _arrow_Scalar__ToString(SEXP s_sexp){ std::shared_ptr Scalar__CastTo(const std::shared_ptr& s, const std::shared_ptr& t); extern "C" SEXP _arrow_Scalar__CastTo(SEXP s_sexp, SEXP t_sexp){ BEGIN_CPP11 - arrow::r::input&>::type s(s_sexp); - arrow::r::input&>::type t(t_sexp); + arrow::r::Input&>::type s(s_sexp); + arrow::r::Input&>::type t(t_sexp); return cpp11::as_sexp(Scalar__CastTo(s, t)); END_CPP11 } @@ -5341,8 +5341,8 @@ extern "C" SEXP _arrow_Scalar__CastTo(SEXP s_sexp, SEXP t_sexp){ 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); - arrow::r::input::type i(i_sexp); + arrow::r::Input&>::type s(s_sexp); + arrow::r::Input::type i(i_sexp); return cpp11::as_sexp(StructScalar__field(s, i)); END_CPP11 } @@ -5357,8 +5357,8 @@ extern "C" SEXP _arrow_StructScalar__field(SEXP s_sexp, SEXP i_sexp){ 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); - arrow::r::input::type name(name_sexp); + arrow::r::Input&>::type s(s_sexp); + arrow::r::Input::type name(name_sexp); return cpp11::as_sexp(StructScalar__GetFieldByName(s, name)); END_CPP11 } @@ -5373,7 +5373,7 @@ extern "C" SEXP _arrow_StructScalar__GetFieldByName(SEXP s_sexp, SEXP name_sexp) 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); + arrow::r::Input&>::type scalar(scalar_sexp); return cpp11::as_sexp(Scalar__as_vector(scalar)); END_CPP11 } @@ -5388,7 +5388,7 @@ extern "C" SEXP _arrow_Scalar__as_vector(SEXP scalar_sexp){ 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); + arrow::r::Input&>::type s(s_sexp); return cpp11::as_sexp(Scalar__is_valid(s)); END_CPP11 } @@ -5403,7 +5403,7 @@ extern "C" SEXP _arrow_Scalar__is_valid(SEXP s_sexp){ 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); + arrow::r::Input&>::type s(s_sexp); return cpp11::as_sexp(Scalar__type(s)); END_CPP11 } @@ -5418,7 +5418,7 @@ extern "C" SEXP _arrow_Scalar__type(SEXP s_sexp){ 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); + arrow::r::Input>&>::type fields(fields_sexp); return cpp11::as_sexp(schema_(fields)); END_CPP11 } @@ -5433,7 +5433,7 @@ extern "C" SEXP _arrow_schema_(SEXP fields_sexp){ 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); + arrow::r::Input&>::type s(s_sexp); return cpp11::as_sexp(Schema__ToString(s)); END_CPP11 } @@ -5448,7 +5448,7 @@ extern "C" SEXP _arrow_Schema__ToString(SEXP s_sexp){ 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); + arrow::r::Input&>::type s(s_sexp); return cpp11::as_sexp(Schema__num_fields(s)); END_CPP11 } @@ -5463,8 +5463,8 @@ extern "C" SEXP _arrow_Schema__num_fields(SEXP s_sexp){ 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); - arrow::r::input::type i(i_sexp); + arrow::r::Input&>::type s(s_sexp); + arrow::r::Input::type i(i_sexp); return cpp11::as_sexp(Schema__field(s, i)); END_CPP11 } @@ -5479,8 +5479,8 @@ extern "C" SEXP _arrow_Schema__field(SEXP s_sexp, SEXP i_sexp){ 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); - arrow::r::input::type x(x_sexp); + arrow::r::Input&>::type s(s_sexp); + arrow::r::Input::type x(x_sexp); return cpp11::as_sexp(Schema__GetFieldByName(s, x)); END_CPP11 } @@ -5495,7 +5495,7 @@ extern "C" SEXP _arrow_Schema__GetFieldByName(SEXP s_sexp, SEXP x_sexp){ std::vector> 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); + arrow::r::Input&>::type schema(schema_sexp); return cpp11::as_sexp(Schema__fields(schema)); END_CPP11 } @@ -5510,7 +5510,7 @@ extern "C" SEXP _arrow_Schema__fields(SEXP schema_sexp){ 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); + arrow::r::Input&>::type schema(schema_sexp); return cpp11::as_sexp(Schema__field_names(schema)); END_CPP11 } @@ -5525,7 +5525,7 @@ extern "C" SEXP _arrow_Schema__field_names(SEXP schema_sexp){ 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); + arrow::r::Input&>::type schema(schema_sexp); return cpp11::as_sexp(Schema__HasMetadata(schema)); END_CPP11 } @@ -5540,7 +5540,7 @@ extern "C" SEXP _arrow_Schema__HasMetadata(SEXP schema_sexp){ 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); + arrow::r::Input&>::type schema(schema_sexp); return cpp11::as_sexp(Schema__metadata(schema)); END_CPP11 } @@ -5555,8 +5555,8 @@ extern "C" SEXP _arrow_Schema__metadata(SEXP schema_sexp){ 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); - arrow::r::input::type metadata(metadata_sexp); + arrow::r::Input&>::type schema(schema_sexp); + arrow::r::Input::type metadata(metadata_sexp); return cpp11::as_sexp(Schema__WithMetadata(schema, metadata)); END_CPP11 } @@ -5571,7 +5571,7 @@ extern "C" SEXP _arrow_Schema__WithMetadata(SEXP schema_sexp, SEXP metadata_sexp 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); + arrow::r::Input&>::type schema(schema_sexp); return cpp11::as_sexp(Schema__serialize(schema)); END_CPP11 } @@ -5586,9 +5586,9 @@ extern "C" SEXP _arrow_Schema__serialize(SEXP schema_sexp){ 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); - arrow::r::input&>::type other(other_sexp); - arrow::r::input::type check_metadata(check_metadata_sexp); + arrow::r::Input&>::type schema(schema_sexp); + arrow::r::Input&>::type other(other_sexp); + arrow::r::Input::type check_metadata(check_metadata_sexp); return cpp11::as_sexp(Schema__Equals(schema, other, check_metadata)); END_CPP11 } @@ -5603,7 +5603,7 @@ extern "C" SEXP _arrow_Schema__Equals(SEXP schema_sexp, SEXP other_sexp, SEXP ch 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); + arrow::r::Input>&>::type schemas(schemas_sexp); return cpp11::as_sexp(arrow__UnifySchemas(schemas)); END_CPP11 } @@ -5618,7 +5618,7 @@ extern "C" SEXP _arrow_arrow__UnifySchemas(SEXP schemas_sexp){ 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); + arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(Table__num_columns(x)); END_CPP11 } @@ -5633,7 +5633,7 @@ extern "C" SEXP _arrow_Table__num_columns(SEXP x_sexp){ 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); + arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(Table__num_rows(x)); END_CPP11 } @@ -5648,7 +5648,7 @@ extern "C" SEXP _arrow_Table__num_rows(SEXP x_sexp){ 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); + arrow::r::Input&>::type x(x_sexp); return cpp11::as_sexp(Table__schema(x)); END_CPP11 } @@ -5663,8 +5663,8 @@ extern "C" SEXP _arrow_Table__schema(SEXP x_sexp){ 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); - arrow::r::input::type metadata(metadata_sexp); + arrow::r::Input&>::type x(x_sexp); + arrow::r::Input::type metadata(metadata_sexp); return cpp11::as_sexp(Table__ReplaceSchemaMetadata(x, metadata)); END_CPP11 } @@ -5679,8 +5679,8 @@ extern "C" SEXP _arrow_Table__ReplaceSchemaMetadata(SEXP x_sexp, SEXP metadata_s 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); - arrow::r::input::type i(i_sexp); + arrow::r::Input&>::type table(table_sexp); + arrow::r::Input::type i(i_sexp); return cpp11::as_sexp(Table__column(table, i)); END_CPP11 } @@ -5695,8 +5695,8 @@ extern "C" SEXP _arrow_Table__column(SEXP table_sexp, SEXP i_sexp){ 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); - arrow::r::input::type i(i_sexp); + arrow::r::Input&>::type table(table_sexp); + arrow::r::Input::type i(i_sexp); return cpp11::as_sexp(Table__field(table, i)); END_CPP11 } @@ -5711,7 +5711,7 @@ extern "C" SEXP _arrow_Table__field(SEXP table_sexp, SEXP i_sexp){ std::vector> 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); + arrow::r::Input&>::type table(table_sexp); return cpp11::as_sexp(Table__columns(table)); END_CPP11 } @@ -5726,7 +5726,7 @@ extern "C" SEXP _arrow_Table__columns(SEXP table_sexp){ 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); + arrow::r::Input&>::type table(table_sexp); return cpp11::as_sexp(Table__ColumnNames(table)); END_CPP11 } @@ -5741,8 +5741,8 @@ extern "C" SEXP _arrow_Table__ColumnNames(SEXP table_sexp){ 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); - arrow::r::input::type offset(offset_sexp); + arrow::r::Input&>::type table(table_sexp); + arrow::r::Input::type offset(offset_sexp); return cpp11::as_sexp(Table__Slice1(table, offset)); END_CPP11 } @@ -5757,9 +5757,9 @@ extern "C" SEXP _arrow_Table__Slice1(SEXP table_sexp, SEXP offset_sexp){ 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); - arrow::r::input::type offset(offset_sexp); - arrow::r::input::type length(length_sexp); + arrow::r::Input&>::type table(table_sexp); + arrow::r::Input::type offset(offset_sexp); + arrow::r::Input::type length(length_sexp); return cpp11::as_sexp(Table__Slice2(table, offset, length)); END_CPP11 } @@ -5774,9 +5774,9 @@ extern "C" SEXP _arrow_Table__Slice2(SEXP table_sexp, SEXP offset_sexp, SEXP len 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); - arrow::r::input&>::type rhs(rhs_sexp); - arrow::r::input::type check_metadata(check_metadata_sexp); + arrow::r::Input&>::type lhs(lhs_sexp); + arrow::r::Input&>::type rhs(rhs_sexp); + arrow::r::Input::type check_metadata(check_metadata_sexp); return cpp11::as_sexp(Table__Equals(lhs, rhs, check_metadata)); END_CPP11 } @@ -5791,7 +5791,7 @@ extern "C" SEXP _arrow_Table__Equals(SEXP lhs_sexp, SEXP rhs_sexp, SEXP check_me 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); + arrow::r::Input&>::type table(table_sexp); return cpp11::as_sexp(Table__Validate(table)); END_CPP11 } @@ -5806,7 +5806,7 @@ extern "C" SEXP _arrow_Table__Validate(SEXP table_sexp){ 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); + arrow::r::Input&>::type table(table_sexp); return cpp11::as_sexp(Table__ValidateFull(table)); END_CPP11 } @@ -5821,8 +5821,8 @@ extern "C" SEXP _arrow_Table__ValidateFull(SEXP table_sexp){ 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); - arrow::r::input::type name(name_sexp); + arrow::r::Input&>::type table(table_sexp); + arrow::r::Input::type name(name_sexp); return cpp11::as_sexp(Table__GetColumnByName(table, name)); END_CPP11 } @@ -5837,8 +5837,8 @@ extern "C" SEXP _arrow_Table__GetColumnByName(SEXP table_sexp, SEXP name_sexp){ std::shared_ptr Table__select(const std::shared_ptr& table, cpp11::integers indices); extern "C" SEXP _arrow_Table__select(SEXP table_sexp, SEXP indices_sexp){ BEGIN_CPP11 - arrow::r::input&>::type table(table_sexp); - arrow::r::input::type indices(indices_sexp); + arrow::r::Input&>::type table(table_sexp); + arrow::r::Input::type indices(indices_sexp); return cpp11::as_sexp(Table__select(table, indices)); END_CPP11 } @@ -5853,7 +5853,7 @@ extern "C" SEXP _arrow_Table__select(SEXP table_sexp, SEXP indices_sexp){ 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); + arrow::r::Input::type lst(lst_sexp); return cpp11::as_sexp(all_record_batches(lst)); END_CPP11 } @@ -5868,8 +5868,8 @@ extern "C" SEXP _arrow_all_record_batches(SEXP lst_sexp){ 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); - arrow::r::input::type schema_sxp(schema_sxp_sexp); + arrow::r::Input>&>::type batches(batches_sexp); + arrow::r::Input::type schema_sxp(schema_sxp_sexp); return cpp11::as_sexp(Table__from_record_batches(batches, schema_sxp)); END_CPP11 } @@ -5884,8 +5884,8 @@ extern "C" SEXP _arrow_Table__from_record_batches(SEXP batches_sexp, SEXP schema std::shared_ptr Table__from_dots(SEXP lst, SEXP schema_sxp); extern "C" SEXP _arrow_Table__from_dots(SEXP lst_sexp, SEXP schema_sxp_sexp){ BEGIN_CPP11 - arrow::r::input::type lst(lst_sexp); - arrow::r::input::type schema_sxp(schema_sxp_sexp); + arrow::r::Input::type lst(lst_sexp); + arrow::r::Input::type schema_sxp(schema_sxp_sexp); return cpp11::as_sexp(Table__from_dots(lst, schema_sxp)); END_CPP11 } @@ -5914,7 +5914,7 @@ extern "C" SEXP _arrow_GetCpuThreadPoolCapacity(){ void SetCpuThreadPoolCapacity(int threads); extern "C" SEXP _arrow_SetCpuThreadPoolCapacity(SEXP threads_sexp){ BEGIN_CPP11 - arrow::r::input::type threads(threads_sexp); + arrow::r::Input::type threads(threads_sexp); SetCpuThreadPoolCapacity(threads); return R_NilValue; END_CPP11 diff --git a/r/src/arrow_cpp11.h b/r/src/arrow_cpp11.h index a738c1c9c25..5521674952f 100644 --- a/r/src/arrow_cpp11.h +++ b/r/src/arrow_cpp11.h @@ -80,43 +80,38 @@ Pointer r6_to_pointer(SEXP self) { R_ExternalPtrAddr(Rf_findVarInFrame(self, arrow::r::symbols::xp))); } -template class SmartPtr> -class ConstRefSmartPtrInput { +// T is either std::shared_ptr or std::unique_ptr +// e.g. T = std::shared_ptr +template +class ExternalPtrInput { public: - using const_reference = const SmartPtr&; - - explicit ConstRefSmartPtrInput(SEXP self) - : ptr(r6_to_pointer*>(self)) {} + explicit ExternalPtrInput(SEXP self) : ptr_(r6_to_pointer(self)) {} - inline operator const_reference() { return *ptr; } + operator const T&() const { return *ptr_; } private: - // this class host - const SmartPtr* ptr; + const T* ptr_; }; -template class SmartPtr> -class ConstRefVectorSmartPtrInput { +template +class VectorExternalPtrInput { public: - using const_reference = const std::vector>&; - - explicit ConstRefVectorSmartPtrInput(SEXP self) : vec() { - R_xlen_t n = XLENGTH(self); - for (R_xlen_t i = 0; i < n; i++) { - vec.push_back(*r6_to_pointer*>(VECTOR_ELT(self, i))); + explicit VectorExternalPtrInput(SEXP self) : vec_(XLENGTH(self)) { + R_xlen_t i = 0; + for (auto& element : vec_) { + element = *r6_to_pointer(VECTOR_ELT(self, i++)); } } - - inline operator const_reference() { return vec; } + operator const std::vector&() const { return vec_; } private: - std::vector> vec; + std::vector vec_; }; template -class default_input { +class DefaultInput { public: - explicit default_input(SEXP from) : from_(from) {} + explicit DefaultInput(SEXP from) : from_(from) {} operator T() const { return cpp11::as_cpp(from_); } @@ -125,9 +120,9 @@ class default_input { }; template -class const_reference_input { +class ConstReferenceInput { public: - explicit const_reference_input(SEXP from) : obj_(cpp11::as_cpp(from)) {} + explicit ConstReferenceInput(SEXP from) : obj_(cpp11::as_cpp(from)) {} using const_reference = const T&; operator const_reference() const { return obj_; } @@ -137,31 +132,28 @@ class const_reference_input { }; template -struct input { - using type = default_input; +struct Input { + using type = DefaultInput; }; template -struct input { - using type = const_reference_input::type>; +struct Input { + using type = ConstReferenceInput::type>; }; template -struct input&> { - using type = ConstRefSmartPtrInput; +struct Input&> { + using type = ExternalPtrInput>; }; template -using default_unique_ptr = std::unique_ptr>; - -template -struct input&> { - using type = ConstRefSmartPtrInput; +struct Input&> { + using type = ExternalPtrInput>; }; template -struct input>&> { - using type = ConstRefVectorSmartPtrInput; +struct Input>&> { + using type = VectorExternalPtrInput>; }; template @@ -219,7 +211,7 @@ using enable_if_shared_ptr = typename std::enable_if< template enable_if_shared_ptr as_cpp(SEXP from) { - return arrow::r::ConstRefSmartPtrInput(from); + return arrow::r::ExternalPtrInput(from); } template From cca34a383ca9af66d816ec2556fb75686a2141d0 Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Mon, 17 Aug 2020 15:11:51 +0200 Subject: [PATCH 40/62] Converter_Dictionary cannot ingest in parallel, and avoid a form of cpp11::warning() that fails locally for some reason --- r/src/array_to_vector.cpp | 7 ++++--- r/tests/testthat/test-Array.R | 3 +-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/r/src/array_to_vector.cpp b/r/src/array_to_vector.cpp index 2298a36075a..272ce2cb59a 100644 --- a/r/src/array_to_vector.cpp +++ b/r/src/array_to_vector.cpp @@ -491,6 +491,8 @@ class Converter_Dictionary : public Converter { return data; } + virtual bool Parallel() const { return false; } + Status Ingest_all_nulls(SEXP data, R_xlen_t start, R_xlen_t n) const { std::fill_n(INTEGER(data) + start, n, NA_INTEGER); return Status::OK(); @@ -584,10 +586,9 @@ class Converter_Dictionary : public Converter { // Alternative: preserve the logical type of the dictionary values // (e.g. if dict is timestamp, return a POSIXt R vector, not factor) if (dictionary_->type_id() != Type::STRING) { - cpp11::warning( - "Coercing dictionary values from type %s to R character factor levels", - dictionary_->type()->ToString().c_str()); + cpp11::warning("Coercing dictionary values to R character factor levels"); } + SEXP vec = PROTECT(ArrayVector__as_vector(dictionary_->length(), dictionary_->type(), {dictionary_})); SEXP strings_vec = PROTECT(Rf_coerceVector(vec, STRSXP)); diff --git a/r/tests/testthat/test-Array.R b/r/tests/testthat/test-Array.R index 075090c1619..d708cb9676f 100644 --- a/r/tests/testthat/test-Array.R +++ b/r/tests/testthat/test-Array.R @@ -726,8 +726,7 @@ test_that("Dictionary array: translate to R when dict isn't string", { expect_identical( as.vector(a), factor(c(3, 2, 2, 3, 1), labels = c("4.5", "3.2", "1.1")) - ), - "Coercing dictionary values from type double to R character factor levels" + ) ) }) From f244547168e1964bceaafbb4be15ce933217409b Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Tue, 18 Aug 2020 10:27:07 +0200 Subject: [PATCH 41/62] added comment for https://github.com/apache/arrow/pull/7819#discussion_r471664878 --- r/src/arrow_cpp11.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/r/src/arrow_cpp11.h b/r/src/arrow_cpp11.h index 5521674952f..b2738d717ec 100644 --- a/r/src/arrow_cpp11.h +++ b/r/src/arrow_cpp11.h @@ -31,6 +31,8 @@ SEXP as_sexp(const std::vector>& vec); } // namespace cpp11 +// TODO: move this include up once we can resolve this issue in cpp11 +// https://github.com/apache/arrow/pull/7819#discussion_r471664878 #include namespace arrow { From 021c2b91a7f406c2916a39910a4aeeed88be8ca7 Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Tue, 18 Aug 2020 10:30:34 +0200 Subject: [PATCH 42/62] using master cpp11 --- r/DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r/DESCRIPTION b/r/DESCRIPTION index 48524fc45da..a215e75f11e 100644 --- a/r/DESCRIPTION +++ b/r/DESCRIPTION @@ -50,7 +50,7 @@ Suggests: testthat, tibble Remotes: - r-lib/cpp11#85 + r-lib/cpp11 Collate: 'enums.R' 'arrow-package.R' From a7d8a91e29882ac0c2d8243dece813c78ab5449c Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Tue, 18 Aug 2020 10:40:05 +0200 Subject: [PATCH 43/62] -W-sign-compare finding --- r/src/arrow_cpp11.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/r/src/arrow_cpp11.h b/r/src/arrow_cpp11.h index b2738d717ec..a3137bb558c 100644 --- a/r/src/arrow_cpp11.h +++ b/r/src/arrow_cpp11.h @@ -161,9 +161,9 @@ struct Input>&> { template Rvector to_r_vector(const std::vector>& x, ToVectorElement&& to_element) { - auto n = x.size(); + R_xlen_t n = x.size(); Rvector out(n); - for (int i = 0; i < n; i++) { + for (R_xlen_t i = 0; i < n; i++) { out[i] = to_element(x[i]); } return out; From dab51154008dac23e2aa286d14ba8b2ffb341e45 Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Tue, 18 Aug 2020 12:13:40 +0200 Subject: [PATCH 44/62] using https://github.com/r-lib/cpp11/pull/97 --- r/DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r/DESCRIPTION b/r/DESCRIPTION index a215e75f11e..1d887f19617 100644 --- a/r/DESCRIPTION +++ b/r/DESCRIPTION @@ -50,7 +50,7 @@ Suggests: testthat, tibble Remotes: - r-lib/cpp11 + r-lib/cpp11#97 Collate: 'enums.R' 'arrow-package.R' From d8eb36557d195a403f800020ff20116d3d457d89 Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Tue, 18 Aug 2020 13:54:21 +0200 Subject: [PATCH 45/62] g++ needs space --- r/src/filesystem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r/src/filesystem.cpp b/r/src/filesystem.cpp index 75c95ef9015..5fd8eb7e165 100644 --- a/r/src/filesystem.cpp +++ b/r/src/filesystem.cpp @@ -223,7 +223,7 @@ std::shared_ptr fs___SubTreeFileSystem__create( // [[arrow::export]] cpp11::writable::list fs___FileSystemFromUri(const std::string& path) { - using cpp11::literals::operator""_nm; + using cpp11::literals::operator"" _nm; std::string out_path; auto file_system = ValueOrStop(fs::FileSystemFromUri(path, &out_path)); From 3f4569749068e9462561343c67fde411d88e703d Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Tue, 18 Aug 2020 15:28:18 +0200 Subject: [PATCH 46/62] one more use of arrow::r::TraverseDots() --- r/src/recordbatch.cpp | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/r/src/recordbatch.cpp b/r/src/recordbatch.cpp index a4e6f9dd571..887628f3a1c 100644 --- a/r/src/recordbatch.cpp +++ b/r/src/recordbatch.cpp @@ -226,31 +226,17 @@ std::shared_ptr RecordBatch__from_arrays__known_schema( // convert lst to a vector of arrow::Array std::vector> arrays(num_fields); - SEXP names = Rf_getAttrib(lst, R_NamesSymbol); - auto fill_array = [&arrays, &schema](int j, SEXP x, SEXP name) { - name = Rf_mkCharCE(Rf_translateCharUTF8(name), CE_UTF8); - if (schema->field(j)->name() != CHAR(name)) { + auto fill_array = [&arrays, &schema](int j, SEXP x, cpp11::r_string name) { + std::string utf8_name = name; + if (schema->field(j)->name() != utf8_name) { cpp11::stop("field at index %d has name '%s' != '%s'", j + 1, - schema->field(j)->name().c_str(), CHAR(name)); + schema->field(j)->name().c_str(), utf8_name.c_str()); } arrays[j] = arrow::r::Array__from_vector(x, schema->field(j)->type(), false); }; - for (R_xlen_t i = 0, j = 0; j < num_fields; i++) { - SEXP name_i = STRING_ELT(names, i); - SEXP x_i = VECTOR_ELT(lst, i); - - if (LENGTH(name_i) == 0) { - SEXP names_x_i = Rf_getAttrib(x_i, R_NamesSymbol); - for (R_xlen_t k = 0; k < XLENGTH(x_i); k++, j++) { - fill_array(j, VECTOR_ELT(x_i, k), STRING_ELT(names_x_i, k)); - } - } else { - fill_array(j, x_i, name_i); - j++; - } - } + arrow::r::TraverseDots(lst, num_fields, fill_array); int64_t num_rows = 0; StopIfNotOk(arrow::r::check_consistent_array_size(arrays, &num_rows)); From 4d4d220f5c7251bcded9658b381297cec2dd1f93 Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Tue, 18 Aug 2020 16:22:44 +0200 Subject: [PATCH 47/62] traverse dots automatically using utf8 (thanks to conversion from r_string to std::string) --- r/src/arrow_types.h | 10 +++++----- r/src/recordbatch.cpp | 7 +++---- r/src/table.cpp | 15 ++++++--------- 3 files changed, 14 insertions(+), 18 deletions(-) diff --git a/r/src/arrow_types.h b/r/src/arrow_types.h index ab1e09230e2..2ea142f5100 100644 --- a/r/src/arrow_types.h +++ b/r/src/arrow_types.h @@ -88,16 +88,16 @@ void validate_index(int i, int len); template void TraverseDots(SEXP dots, int num_fields, Lambda lambda) { - SEXP names = Rf_getAttrib(dots, R_NamesSymbol); + cpp11::strings names = Rf_getAttrib(dots, R_NamesSymbol); for (R_xlen_t i = 0, j = 0; j < num_fields; i++) { - SEXP name_i = STRING_ELT(names, i); + auto name_i = names[i]; SEXP x_i = VECTOR_ELT(dots, i); - if (LENGTH(name_i) == 0) { - SEXP names_x_i = Rf_getAttrib(x_i, R_NamesSymbol); + if (name_i.size() == 0) { + cpp11::strings names_x_i = Rf_getAttrib(x_i, R_NamesSymbol); for (R_xlen_t k = 0; k < XLENGTH(x_i); k++, j++) { - lambda(j, VECTOR_ELT(x_i, k), STRING_ELT(names_x_i, k)); + lambda(j, VECTOR_ELT(x_i, k), names_x_i[k]); } } else { lambda(j, x_i, name_i); diff --git a/r/src/recordbatch.cpp b/r/src/recordbatch.cpp index 887628f3a1c..ec220fb714e 100644 --- a/r/src/recordbatch.cpp +++ b/r/src/recordbatch.cpp @@ -227,11 +227,10 @@ std::shared_ptr RecordBatch__from_arrays__known_schema( // convert lst to a vector of arrow::Array std::vector> arrays(num_fields); - auto fill_array = [&arrays, &schema](int j, SEXP x, cpp11::r_string name) { - std::string utf8_name = name; - if (schema->field(j)->name() != utf8_name) { + auto fill_array = [&arrays, &schema](int j, SEXP x, std::string name) { + if (schema->field(j)->name() != name) { cpp11::stop("field at index %d has name '%s' != '%s'", j + 1, - schema->field(j)->name().c_str(), utf8_name.c_str()); + schema->field(j)->name().c_str(), name.c_str()); } arrays[j] = arrow::r::Array__from_vector(x, schema->field(j)->type(), false); }; diff --git a/r/src/table.cpp b/r/src/table.cpp index 5807cb74ff2..6bc2d83f239 100644 --- a/r/src/table.cpp +++ b/r/src/table.cpp @@ -150,7 +150,7 @@ arrow::Status InferSchemaFromDots(SEXP lst, SEXP schema_sxp, int num_fields, // infer the schema from the `...` std::vector> fields(num_fields); - auto extract_one_field = [&fields](int j, SEXP x, cpp11::r_string name) { + auto extract_one_field = [&fields](int j, SEXP x, std::string name) { if (Rf_inherits(x, "ChunkedArray")) { fields[j] = arrow::field( name, cpp11::as_cpp>(x)->type()); @@ -171,15 +171,14 @@ arrow::Status InferSchemaFromDots(SEXP lst, SEXP schema_sxp, int num_fields, SEXP CollectColumnMetadata(SEXP lst, int num_fields, bool& has_metadata) { // Preallocate for the lambda to fill in - SEXP metadata_columns = PROTECT(Rf_allocVector(VECSXP, num_fields)); - SEXP metadata_columns_names = PROTECT(Rf_allocVector(STRSXP, num_fields)); + cpp11::writable::list metadata_columns(num_fields); + cpp11::writable::strings metadata_columns_names(num_fields); Rf_setAttrib(metadata_columns, R_NamesSymbol, metadata_columns_names); auto extract_one_metadata = [&metadata_columns, &metadata_columns_names, &has_metadata]( - int j, SEXP x, SEXP name) { - // Make sure we're ingesting UTF-8 - name = Rf_mkCharCE(Rf_translateCharUTF8(name), CE_UTF8); - SET_STRING_ELT(metadata_columns_names, j, name); + int j, SEXP x, std::string name) { + metadata_columns_names[j] = name; + // no metadata for arrow R6 objects if (Rf_inherits(x, "ArrowObject")) { return; @@ -254,7 +253,6 @@ SEXP CollectColumnMetadata(SEXP lst, int num_fields, bool& has_metadata) { StopIfNotOk(arrow::r::count_fields(x, &inner_num_fields)); SET_VECTOR_ELT(r_meta, 1, CollectColumnMetadata(x, inner_num_fields, has_metadata)); - UNPROTECT(2); // CollectColumnMetadata adds 2 PROTECTS this_has_metadata = true; } if (this_has_metadata) { @@ -288,7 +286,6 @@ arrow::Status AddMetadataFromDots(SEXP lst, int num_fields, // has_metadata = true; // } SET_VECTOR_ELT(metadata, 1, CollectColumnMetadata(lst, num_fields, has_metadata)); - UNPROTECT(2); // CollectColumnMetadata adds 2 PROTECTS if (has_metadata) { SEXP serialise_call = From 61b0aa5fc6243eb2c473765bd8498f6ac90e4db0 Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Tue, 18 Aug 2020 17:34:33 +0200 Subject: [PATCH 48/62] TraverseDots(cpp11::list dots, ...) - TraverseDotsNoName --- r/src/arrow_types.h | 31 ++++++------------------------- r/src/recordbatch.cpp | 4 ++-- r/src/table.cpp | 5 +++-- 3 files changed, 11 insertions(+), 29 deletions(-) diff --git a/r/src/arrow_types.h b/r/src/arrow_types.h index 2ea142f5100..3f7a6520ce5 100644 --- a/r/src/arrow_types.h +++ b/r/src/arrow_types.h @@ -87,39 +87,20 @@ void validate_slice_length(R_xlen_t length, int64_t available); void validate_index(int i, int len); template -void TraverseDots(SEXP dots, int num_fields, Lambda lambda) { - cpp11::strings names = Rf_getAttrib(dots, R_NamesSymbol); +void TraverseDots(cpp11::list dots, int num_fields, Lambda lambda) { + cpp11::strings names(dots.attr(R_NamesSymbol)); for (R_xlen_t i = 0, j = 0; j < num_fields; i++) { auto name_i = names[i]; - SEXP x_i = VECTOR_ELT(dots, i); if (name_i.size() == 0) { - cpp11::strings names_x_i = Rf_getAttrib(x_i, R_NamesSymbol); + cpp11::list x_i = dots[i]; + cpp11::strings names_x_i(x_i.attr(R_NamesSymbol)); for (R_xlen_t k = 0; k < XLENGTH(x_i); k++, j++) { - lambda(j, VECTOR_ELT(x_i, k), names_x_i[k]); + lambda(j, x_i[k], names_x_i[k]); } } else { - lambda(j, x_i, name_i); - j++; - } - } -} - -template -void TraverseDotsNoName(SEXP dots, int num_fields, Lambda lambda) { - SEXP names = Rf_getAttrib(dots, R_NamesSymbol); - - for (R_xlen_t i = 0, j = 0; j < num_fields; i++) { - SEXP name_i = STRING_ELT(names, i); - SEXP x_i = VECTOR_ELT(dots, i); - - if (LENGTH(name_i) == 0) { - for (R_xlen_t k = 0; k < XLENGTH(x_i); k++, j++) { - lambda(j, VECTOR_ELT(x_i, k)); - } - } else { - lambda(j, x_i); + lambda(j, dots[i], name_i); j++; } } diff --git a/r/src/recordbatch.cpp b/r/src/recordbatch.cpp index ec220fb714e..eb9a615e6c8 100644 --- a/r/src/recordbatch.cpp +++ b/r/src/recordbatch.cpp @@ -248,10 +248,10 @@ namespace r { arrow::Status CollectRecordBatchArrays( SEXP lst, const std::shared_ptr& schema, int num_fields, bool inferred, std::vector>& arrays) { - auto extract_one_array = [&arrays, &schema, inferred](int j, SEXP x) { + auto extract_one_array = [&arrays, &schema, inferred](int j, SEXP x, cpp11::r_string) { arrays[j] = arrow::r::Array__from_vector(x, schema->field(j)->type(), inferred); }; - arrow::r::TraverseDotsNoName(lst, num_fields, extract_one_array); + arrow::r::TraverseDots(lst, num_fields, extract_one_array); return arrow::Status::OK(); } diff --git a/r/src/table.cpp b/r/src/table.cpp index 6bc2d83f239..6a56e8e8f2d 100644 --- a/r/src/table.cpp +++ b/r/src/table.cpp @@ -305,7 +305,8 @@ arrow::Status AddMetadataFromDots(SEXP lst, int num_fields, arrow::Status CollectTableColumns( SEXP lst, const std::shared_ptr& schema, int num_fields, bool inferred, std::vector>& columns) { - auto extract_one_column = [&columns, &schema, inferred](int j, SEXP x) { + auto extract_one_column = [&columns, &schema, inferred](int j, SEXP x, + cpp11::r_string) { if (Rf_inherits(x, "ChunkedArray")) { columns[j] = cpp11::as_cpp>(x); } else if (Rf_inherits(x, "Array")) { @@ -316,7 +317,7 @@ arrow::Status CollectTableColumns( columns[j] = std::make_shared(array); } }; - arrow::r::TraverseDotsNoName(lst, num_fields, extract_one_column); + arrow::r::TraverseDots(lst, num_fields, extract_one_column); return arrow::Status::OK(); } From 2b6ea2b620184ddd0939deb35a0496d18e5ae6e1 Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Tue, 18 Aug 2020 17:45:19 +0200 Subject: [PATCH 49/62] .size() rather than XLENGTH() --- r/src/arrow_types.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/r/src/arrow_types.h b/r/src/arrow_types.h index 3f7a6520ce5..7d9ab113a51 100644 --- a/r/src/arrow_types.h +++ b/r/src/arrow_types.h @@ -96,7 +96,8 @@ void TraverseDots(cpp11::list dots, int num_fields, Lambda lambda) { if (name_i.size() == 0) { cpp11::list x_i = dots[i]; cpp11::strings names_x_i(x_i.attr(R_NamesSymbol)); - for (R_xlen_t k = 0; k < XLENGTH(x_i); k++, j++) { + R_xlen_t n_i = x_i.size(); + for (R_xlen_t k = 0; k < n_i; k++, j++) { lambda(j, x_i[k], names_x_i[k]); } } else { From 6cdb4f3eed219e698bbfb096043d712d577add49 Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Wed, 19 Aug 2020 10:29:44 +0200 Subject: [PATCH 50/62] avoid conversion to utf8 when not needed --- r/src/array_from_vector.cpp | 61 +++++++++++++++++++------------------ r/src/arrow_cpp11.h | 38 +++++++++++++++++++++++ 2 files changed, 69 insertions(+), 30 deletions(-) diff --git a/r/src/array_from_vector.cpp b/r/src/array_from_vector.cpp index 4674da014fd..5b6843f6ece 100644 --- a/r/src/array_from_vector.cpp +++ b/r/src/array_from_vector.cpp @@ -1247,32 +1247,30 @@ std::shared_ptr InferArrowTypeFromVector(SEXP x) { template <> std::shared_ptr InferArrowTypeFromVector(SEXP x) { - // See how big the character vector is - R_xlen_t n = XLENGTH(x); - int64_t size = 0; - for (R_xlen_t i = 0; i < n; i++) { - SEXP string_i = STRING_ELT(x, i); - if (string_i != NA_STRING) { - size += XLENGTH(Rf_mkCharCE(Rf_translateCharUTF8(string_i), CE_UTF8)); - } - if (size > arrow::kBinaryMemoryLimit) { - // Exceeds 2GB capacity of utf8 type, so use large - return large_utf8(); + return cpp11::unwind_protect([&] { + R_xlen_t n = XLENGTH(x); + + int64_t size = 0; + + for (R_xlen_t i = 0; i < n; i++) { + size += arrow::r::unsafe::r_string_size(STRING_ELT(x, i)); + if (size > arrow::kBinaryMemoryLimit) { + // Exceeds 2GB capacity of utf8 type, so use large + return large_utf8(); + } } - } - return utf8(); + return utf8(); + }); } -static inline std::shared_ptr InferArrowTypeFromDataFrame(SEXP x) { - R_xlen_t n = XLENGTH(x); - SEXP names = Rf_getAttrib(x, R_NamesSymbol); +static inline std::shared_ptr InferArrowTypeFromDataFrame( + cpp11::list x) { + R_xlen_t n = x.size(); + cpp11::strings names(x.attr(R_NamesSymbol)); std::vector> fields(n); for (R_xlen_t i = 0; i < n; i++) { - // Make sure we're ingesting UTF-8 - const auto* field_name = - CHAR(Rf_mkCharCE(Rf_translateCharUTF8(STRING_ELT(names, i)), CE_UTF8)); - fields[i] = arrow::field(field_name, InferArrowType(VECTOR_ELT(x, i))); + fields[i] = arrow::field(names[i], InferArrowType(x[i])); } return arrow::struct_(std::move(fields)); } @@ -1447,18 +1445,21 @@ arrow::Status CheckCompatibleStruct(SEXP obj, // the columns themselves are not checked against the // types of the fields, because Array__from_vector will error // when not compatible. - SEXP names = Rf_getAttrib(obj, R_NamesSymbol); - SEXP name_i; - for (int i = 0; i < num_fields; i++) { - name_i = Rf_mkCharCE(Rf_translateCharUTF8(STRING_ELT(names, i)), CE_UTF8); - if (type->field(i)->name() != CHAR(name_i)) { - return Status::RError("Field name in position ", i, " (", type->field(i)->name(), - ") does not match the name of the column of the data frame (", - CHAR(name_i), ")"); + cpp11::strings names = Rf_getAttrib(obj, R_NamesSymbol); + + return cpp11::unwind_protect([&] { + for (int i = 0; i < num_fields; i++) { + const char* name_i = arrow::r::unsafe::utf8_string(names[i]); + auto field_name = type->field(i)->name(); + if (field_name != name_i) { + return Status::RError( + "Field name in position ", i, " (", field_name, + ") does not match the name of the column of the data frame (", name_i, ")"); + } } - } - return Status::OK(); + return Status::OK(); + }); } std::shared_ptr Array__from_vector( diff --git a/r/src/arrow_cpp11.h b/r/src/arrow_cpp11.h index a3137bb558c..58cc04b7b4d 100644 --- a/r/src/arrow_cpp11.h +++ b/r/src/arrow_cpp11.h @@ -15,6 +15,7 @@ // specific language governing permissions and limitations // under the License. +#include // for strlen #include #include #include @@ -35,8 +36,45 @@ SEXP as_sexp(const std::vector>& vec); // https://github.com/apache/arrow/pull/7819#discussion_r471664878 #include +// borrowed from enc package +// because R does not make these macros available (i.e. from Defn.h) +#define UTF8_MASK (1 << 3) +#define ASCII_MASK (1 << 6) + +#define IS_ASCII(x) (LEVELS(x) & ASCII_MASK) +#define IS_UTF8(x) (LEVELS(x) & UTF8_MASK) + namespace arrow { namespace r { + +// functions that need to be called from an unwind_protect() +namespace unsafe { + +inline SEXP utf8_r_string(SEXP s) { + if (!IS_UTF8(s) && !IS_ASCII(s)) { + s = Rf_mkCharCE(Rf_translateCharUTF8(s), CE_UTF8); + } + return s; +} + +inline const char* utf8_string(SEXP s) { + if (!IS_UTF8(s) && !IS_ASCII(s)) { + return Rf_translateCharUTF8(s); + } else { + return CHAR(s); + } +} + +inline R_xlen_t r_string_size(SEXP s) { + if (!IS_UTF8(s) && !IS_ASCII(s)) { + return strlen(Rf_translateCharUTF8(s)); + } else { + return XLENGTH(s); + } +} + +} // namespace unsafe + struct symbols { static SEXP units; static SEXP tzone; From c5bf26897a26126a75d91a1c4415346f6e0727d5 Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Wed, 19 Aug 2020 14:28:31 +0200 Subject: [PATCH 51/62] Doing conversions upftont, so using UnsafeAppend --- r/src/array_from_vector.cpp | 18 ++++++++---------- r/src/arrow_cpp11.h | 28 ++++++++++++++++++---------- 2 files changed, 26 insertions(+), 20 deletions(-) diff --git a/r/src/array_from_vector.cpp b/r/src/array_from_vector.cpp index 5b6843f6ece..915bdca99b3 100644 --- a/r/src/array_from_vector.cpp +++ b/r/src/array_from_vector.cpp @@ -1076,25 +1076,23 @@ class StringVectorConverter : public VectorConverter { ARROW_RETURN_IF(TYPEOF(obj) != STRSXP, Status::RError("Expecting a character vector")); - cpp11::strings s(obj); + cpp11::strings s(arrow::r::utf8_strings(obj)); RETURN_NOT_OK(typed_builder_->Reserve(s.size())); - // note: the total length is calculated without utf8 - // conversion, so see this more as a hint rather than - // the actual total length - int64_t total_length_hint = 0; + // we know all the R strings are utf8 already, so we can get + // a definite size and then use UnsafeAppend*() + int64_t total_length = 0; for (cpp11::r_string si : s) { - total_length_hint += cpp11::is_na(si) ? 0 : si.size(); + total_length += cpp11::is_na(si) ? 0 : si.size(); } - RETURN_NOT_OK(typed_builder_->ReserveData(total_length_hint)); + RETURN_NOT_OK(typed_builder_->ReserveData(total_length)); // append for (cpp11::r_string si : s) { if (si == NA_STRING) { - RETURN_NOT_OK(typed_builder_->AppendNull()); + typed_builder_->UnsafeAppendNull(); } else { - // converting the r_string to a std::string enforces utf-8 - RETURN_NOT_OK(typed_builder_->Append(std::string(si))); + typed_builder_->UnsafeAppend(CHAR(si), si.size()); } } diff --git a/r/src/arrow_cpp11.h b/r/src/arrow_cpp11.h index 58cc04b7b4d..3b24a077402 100644 --- a/r/src/arrow_cpp11.h +++ b/r/src/arrow_cpp11.h @@ -50,13 +50,6 @@ namespace r { // functions that need to be called from an unwind_protect() namespace unsafe { -inline SEXP utf8_r_string(SEXP s) { - if (!IS_UTF8(s) && !IS_ASCII(s)) { - s = Rf_mkCharCE(Rf_translateCharUTF8(s), CE_UTF8); - } - return s; -} - inline const char* utf8_string(SEXP s) { if (!IS_UTF8(s) && !IS_ASCII(s)) { return Rf_translateCharUTF8(s); @@ -66,15 +59,30 @@ inline const char* utf8_string(SEXP s) { } inline R_xlen_t r_string_size(SEXP s) { - if (!IS_UTF8(s) && !IS_ASCII(s)) { - return strlen(Rf_translateCharUTF8(s)); - } else { + if (s == NA_STRING) { + return 0; + } else if (IS_ASCII(s) || IS_UTF8(s)) { return XLENGTH(s); + } else { + return strlen(Rf_translateCharUTF8(s)); } } } // namespace unsafe +inline SEXP utf8_strings(SEXP x) { + return cpp11::unwind_protect([x] { + R_xlen_t n = XLENGTH(x); + for (R_xlen_t i = 0; i < n; i++) { + SEXP s = STRING_ELT(x, i); + if (s != NA_STRING && !IS_UTF8(s) && !IS_ASCII(s)) { + SET_STRING_ELT(x, i, Rf_mkCharCE(Rf_translateCharUTF8(s), CE_UTF8)); + } + } + return x; + }); +} + struct symbols { static SEXP units; static SEXP tzone; From d6146c03d5cf54bceebbf2f44d462264f53fae0e Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Wed, 19 Aug 2020 14:41:38 +0200 Subject: [PATCH 52/62] Buffer only parameterized by vector type --- r/src/array_from_vector.cpp | 4 ++-- r/src/arrow_types.h | 2 +- r/src/buffer.cpp | 6 +++--- r/src/recordbatch.cpp | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/r/src/array_from_vector.cpp b/r/src/array_from_vector.cpp index 915bdca99b3..ed3df89b242 100644 --- a/r/src/array_from_vector.cpp +++ b/r/src/array_from_vector.cpp @@ -1360,8 +1360,8 @@ std::shared_ptr MakeSimpleArray(SEXP x) { auto n = vec.size(); auto p_vec_start = reinterpret_cast(DATAPTR(vec)); auto p_vec_end = p_vec_start + n; - std::vector> buffers{ - nullptr, std::make_shared>(vec)}; + std::vector> buffers{nullptr, + std::make_shared>(vec)}; int null_count = 0; diff --git a/r/src/arrow_types.h b/r/src/arrow_types.h index 7d9ab113a51..865c933a32e 100644 --- a/r/src/arrow_types.h +++ b/r/src/arrow_types.h @@ -65,7 +65,7 @@ void inspect(SEXP obj); // the integer64 sentinel constexpr int64_t NA_INT64 = std::numeric_limits::min(); -template +template class RBuffer : public MutableBuffer { public: explicit RBuffer(RVector vec) diff --git a/r/src/buffer.cpp b/r/src/buffer.cpp index 4609d66bb38..8e4ff3928cd 100644 --- a/r/src/buffer.cpp +++ b/r/src/buffer.cpp @@ -43,11 +43,11 @@ int64_t Buffer__size(const std::shared_ptr& buffer) { std::shared_ptr r___RBuffer__initialize(SEXP x) { switch (TYPEOF(x)) { case RAWSXP: - return std::make_shared>(x); + return std::make_shared>(x); case REALSXP: - return std::make_shared>(x); + return std::make_shared>(x); case INTSXP: - return std::make_shared>(x); + return std::make_shared>(x); // until cpp11 has a CPLXSXP vector // case CPLXSXP: // return std::make_shared>(x); diff --git a/r/src/recordbatch.cpp b/r/src/recordbatch.cpp index eb9a615e6c8..3ad5ae485ad 100644 --- a/r/src/recordbatch.cpp +++ b/r/src/recordbatch.cpp @@ -153,7 +153,7 @@ cpp11::raws ipc___SerializeRecordBatch__Raw( cpp11::writable::raws out(size); // serialize into the bytes of the raw vector - auto buffer = std::make_shared>(out); + auto buffer = std::make_shared>(out); arrow::io::FixedSizeBufferWriter stream(buffer); StopIfNotOk(arrow::ipc::SerializeRecordBatch( *batch, arrow::ipc::IpcWriteOptions::Defaults(), &stream)); From 06c52f08616efdfb2794847f1f5d3bb1a3a01a26 Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Wed, 19 Aug 2020 14:58:52 +0200 Subject: [PATCH 53/62] re-add ability to create a Buffer from an R complex vector --- r/src/arrow_cpp11.h | 15 +++++++++++++++ r/src/buffer.cpp | 5 ++--- r/tests/testthat/test-buffer.R | 1 - 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/r/src/arrow_cpp11.h b/r/src/arrow_cpp11.h index 3b24a077402..aae1caa1fc3 100644 --- a/r/src/arrow_cpp11.h +++ b/r/src/arrow_cpp11.h @@ -47,6 +47,21 @@ SEXP as_sexp(const std::vector>& vec); namespace arrow { namespace r { +// until cpp11 has a similar class +class complexs { + public: + using value_type = Rcomplex; + + complexs(SEXP x) : data_(x) {} + + inline R_xlen_t size() const { return XLENGTH(data_); } + + inline operator SEXP() const { return data_; } + + private: + cpp11::sexp data_; +}; + // functions that need to be called from an unwind_protect() namespace unsafe { diff --git a/r/src/buffer.cpp b/r/src/buffer.cpp index 8e4ff3928cd..9196dc902aa 100644 --- a/r/src/buffer.cpp +++ b/r/src/buffer.cpp @@ -48,9 +48,8 @@ std::shared_ptr r___RBuffer__initialize(SEXP x) { return std::make_shared>(x); case INTSXP: return std::make_shared>(x); - // until cpp11 has a CPLXSXP vector - // case CPLXSXP: - // return std::make_shared>(x); + case CPLXSXP: + return std::make_shared>(x); default: break; } diff --git a/r/tests/testthat/test-buffer.R b/r/tests/testthat/test-buffer.R index ab96c59db73..c19f61196ee 100644 --- a/r/tests/testthat/test-buffer.R +++ b/r/tests/testthat/test-buffer.R @@ -39,7 +39,6 @@ test_that("Buffer can be created from numeric vector", { }) test_that("Buffer can be created from complex vector", { - skip("until cpp11 has a complex vector class") vec <- complex(3) buf <- buffer(vec) expect_is(buf, "Buffer") From a78f3c3ec4cdf53547e0f73dcbec543e26772c94 Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Wed, 19 Aug 2020 15:52:32 +0200 Subject: [PATCH 54/62] marking ctor explicit --- r/src/arrow_cpp11.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r/src/arrow_cpp11.h b/r/src/arrow_cpp11.h index aae1caa1fc3..5f6d0435038 100644 --- a/r/src/arrow_cpp11.h +++ b/r/src/arrow_cpp11.h @@ -52,7 +52,7 @@ class complexs { public: using value_type = Rcomplex; - complexs(SEXP x) : data_(x) {} + explicit complexs(SEXP x) : data_(x) {} inline R_xlen_t size() const { return XLENGTH(data_); } From f7d1baa573c238f129048d63b90ebbb8b8846728 Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Wed, 19 Aug 2020 16:18:27 +0200 Subject: [PATCH 55/62] explicitly make a complexs vector --- r/src/buffer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/r/src/buffer.cpp b/r/src/buffer.cpp index 9196dc902aa..2814677343d 100644 --- a/r/src/buffer.cpp +++ b/r/src/buffer.cpp @@ -49,7 +49,8 @@ std::shared_ptr r___RBuffer__initialize(SEXP x) { case INTSXP: return std::make_shared>(x); case CPLXSXP: - return std::make_shared>(x); + return std::make_shared>( + arrow::r::complexs(x)); default: break; } From 7eabb637b594a70cf23c9c85ca02de87c004e330 Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Thu, 20 Aug 2020 14:40:26 +0200 Subject: [PATCH 56/62] work around cpp11 converting uintptr_t to int where Rcpp did convert to double. --- r/R/arrowExports.R | 8 +++--- r/src/arrowExports.cpp | 56 +++++++++++++++++++++--------------------- r/src/arrow_cpp11.h | 17 +++++++++++++ r/src/arrow_types.h | 1 + r/src/py-to-r.cpp | 54 +++++++++++++++++++--------------------- 5 files changed, 75 insertions(+), 61 deletions(-) diff --git a/r/R/arrowExports.R b/r/R/arrowExports.R index df627a6a7c8..45983a3390a 100644 --- a/r/R/arrowExports.R +++ b/r/R/arrowExports.R @@ -1212,12 +1212,12 @@ ExportSchema <- function(schema, ptr){ invisible(.Call(`_arrow_ExportSchema` , schema, ptr)) } -ExportArray <- function(array, ptr, schema_ptr){ - invisible(.Call(`_arrow_ExportArray` , array, ptr, schema_ptr)) +ExportArray <- function(array, array_ptr, schema_ptr){ + invisible(.Call(`_arrow_ExportArray` , array, array_ptr, schema_ptr)) } -ExportRecordBatch <- function(batch, ptr, schema_ptr){ - invisible(.Call(`_arrow_ExportRecordBatch` , batch, ptr, schema_ptr)) +ExportRecordBatch <- function(batch, array_ptr, schema_ptr){ + invisible(.Call(`_arrow_ExportRecordBatch` , batch, array_ptr, schema_ptr)) } RecordBatch__num_columns <- function(x){ diff --git a/r/src/arrowExports.cpp b/r/src/arrowExports.cpp index ef8dbaaf45b..96d096e1616 100644 --- a/r/src/arrowExports.cpp +++ b/r/src/arrowExports.cpp @@ -4609,11 +4609,11 @@ extern "C" SEXP _arrow_parquet___arrow___FileReader__GetSchema(SEXP reader_sexp) // py-to-r.cpp #if defined(ARROW_R_WITH_ARROW) -std::shared_ptr ImportArray(uintptr_t array, uintptr_t schema); +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); - arrow::r::Input::type schema(schema_sexp); + arrow::r::Input>::type array(array_sexp); + arrow::r::Input>::type schema(schema_sexp); return cpp11::as_sexp(ImportArray(array, schema)); END_CPP11 } @@ -4625,11 +4625,11 @@ extern "C" SEXP _arrow_ImportArray(SEXP array_sexp, SEXP schema_sexp){ // py-to-r.cpp #if defined(ARROW_R_WITH_ARROW) -std::shared_ptr ImportRecordBatch(uintptr_t array, uintptr_t schema); +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); - arrow::r::Input::type schema(schema_sexp); + arrow::r::Input>::type array(array_sexp); + arrow::r::Input>::type schema(schema_sexp); return cpp11::as_sexp(ImportRecordBatch(array, schema)); END_CPP11 } @@ -4641,7 +4641,7 @@ extern "C" SEXP _arrow_ImportRecordBatch(SEXP array_sexp, SEXP schema_sexp){ // py-to-r.cpp #if defined(ARROW_R_WITH_ARROW) -uintptr_t allocate_arrow_schema(); +arrow::r::Pointer allocate_arrow_schema(); extern "C" SEXP _arrow_allocate_arrow_schema(){ BEGIN_CPP11 return cpp11::as_sexp(allocate_arrow_schema()); @@ -4655,10 +4655,10 @@ extern "C" SEXP _arrow_allocate_arrow_schema(){ // py-to-r.cpp #if defined(ARROW_R_WITH_ARROW) -void delete_arrow_schema(uintptr_t ptr); +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); + arrow::r::Input>::type ptr(ptr_sexp); delete_arrow_schema(ptr); return R_NilValue; END_CPP11 @@ -4671,7 +4671,7 @@ extern "C" SEXP _arrow_delete_arrow_schema(SEXP ptr_sexp){ // py-to-r.cpp #if defined(ARROW_R_WITH_ARROW) -uintptr_t allocate_arrow_array(); +arrow::r::Pointer allocate_arrow_array(); extern "C" SEXP _arrow_allocate_arrow_array(){ BEGIN_CPP11 return cpp11::as_sexp(allocate_arrow_array()); @@ -4685,10 +4685,10 @@ extern "C" SEXP _arrow_allocate_arrow_array(){ // py-to-r.cpp #if defined(ARROW_R_WITH_ARROW) -void delete_arrow_array(uintptr_t ptr); +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); + arrow::r::Input>::type ptr(ptr_sexp); delete_arrow_array(ptr); return R_NilValue; END_CPP11 @@ -4701,11 +4701,11 @@ extern "C" SEXP _arrow_delete_arrow_array(SEXP ptr_sexp){ // py-to-r.cpp #if defined(ARROW_R_WITH_ARROW) -void ExportType(const std::shared_ptr& type, uintptr_t ptr); +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); - arrow::r::Input::type ptr(ptr_sexp); + arrow::r::Input>::type ptr(ptr_sexp); ExportType(type, ptr); return R_NilValue; END_CPP11 @@ -4718,11 +4718,11 @@ extern "C" SEXP _arrow_ExportType(SEXP type_sexp, SEXP ptr_sexp){ // py-to-r.cpp #if defined(ARROW_R_WITH_ARROW) -void ExportSchema(const std::shared_ptr& schema, uintptr_t ptr); +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); - arrow::r::Input::type ptr(ptr_sexp); + arrow::r::Input>::type ptr(ptr_sexp); ExportSchema(schema, ptr); return R_NilValue; END_CPP11 @@ -4735,36 +4735,36 @@ extern "C" SEXP _arrow_ExportSchema(SEXP schema_sexp, SEXP ptr_sexp){ // py-to-r.cpp #if defined(ARROW_R_WITH_ARROW) -void ExportArray(const std::shared_ptr& array, uintptr_t ptr, uintptr_t schema_ptr); -extern "C" SEXP _arrow_ExportArray(SEXP array_sexp, SEXP ptr_sexp, SEXP schema_ptr_sexp){ +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); - arrow::r::Input::type ptr(ptr_sexp); - arrow::r::Input::type schema_ptr(schema_ptr_sexp); - ExportArray(array, ptr, schema_ptr); + arrow::r::Input>::type array_ptr(array_ptr_sexp); + arrow::r::Input>::type schema_ptr(schema_ptr_sexp); + ExportArray(array, array_ptr, schema_ptr); return R_NilValue; END_CPP11 } #else -extern "C" SEXP _arrow_ExportArray(SEXP array_sexp, SEXP ptr_sexp, SEXP schema_ptr_sexp){ +extern "C" SEXP _arrow_ExportArray(SEXP array_sexp, SEXP array_ptr_sexp, SEXP schema_ptr_sexp){ Rf_error("Cannot call ExportArray(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif // py-to-r.cpp #if defined(ARROW_R_WITH_ARROW) -void ExportRecordBatch(const std::shared_ptr& batch, uintptr_t ptr, uintptr_t schema_ptr); -extern "C" SEXP _arrow_ExportRecordBatch(SEXP batch_sexp, SEXP ptr_sexp, SEXP schema_ptr_sexp){ +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); - arrow::r::Input::type ptr(ptr_sexp); - arrow::r::Input::type schema_ptr(schema_ptr_sexp); - ExportRecordBatch(batch, ptr, schema_ptr); + arrow::r::Input>::type array_ptr(array_ptr_sexp); + arrow::r::Input>::type schema_ptr(schema_ptr_sexp); + ExportRecordBatch(batch, array_ptr, schema_ptr); return R_NilValue; END_CPP11 } #else -extern "C" SEXP _arrow_ExportRecordBatch(SEXP batch_sexp, SEXP ptr_sexp, SEXP schema_ptr_sexp){ +extern "C" SEXP _arrow_ExportRecordBatch(SEXP batch_sexp, SEXP array_ptr_sexp, SEXP schema_ptr_sexp){ Rf_error("Cannot call ExportRecordBatch(). Please use arrow::install_arrow() to install required runtime libraries. "); } #endif diff --git a/r/src/arrow_cpp11.h b/r/src/arrow_cpp11.h index 5f6d0435038..a59003229b9 100644 --- a/r/src/arrow_cpp11.h +++ b/r/src/arrow_cpp11.h @@ -47,6 +47,23 @@ SEXP as_sexp(const std::vector>& vec); namespace arrow { namespace r { +template +struct Pointer { + Pointer() : ptr_(new T()) {} + explicit Pointer(SEXP x) + : ptr_(reinterpret_cast(static_cast(REAL(x)[0]))) {} + + inline operator SEXP() const { + return Rf_ScalarReal(static_cast(reinterpret_cast(ptr_))); + } + + inline operator T*() const { return ptr_; } + + inline void finalize() { delete ptr_; } + + T* ptr_; +}; + // until cpp11 has a similar class class complexs { public: diff --git a/r/src/arrow_types.h b/r/src/arrow_types.h index 865c933a32e..6e664ff5e5a 100644 --- a/r/src/arrow_types.h +++ b/r/src/arrow_types.h @@ -24,6 +24,7 @@ #if defined(ARROW_R_WITH_ARROW) #include // for RBuffer definition below +#include #include #include diff --git a/r/src/py-to-r.cpp b/r/src/py-to-r.cpp index 91b5ebc617d..d2ff13bc2f2 100644 --- a/r/src/py-to-r.cpp +++ b/r/src/py-to-r.cpp @@ -18,60 +18,56 @@ #include "./arrow_types.h" #if defined(ARROW_R_WITH_ARROW) -#include // [[arrow::export]] -std::shared_ptr ImportArray(uintptr_t array, uintptr_t schema) { - return ValueOrStop(arrow::ImportArray(reinterpret_cast(array), - reinterpret_cast(schema))); +std::shared_ptr ImportArray(arrow::r::Pointer array, + arrow::r::Pointer schema) { + return ValueOrStop(arrow::ImportArray(array, schema)); } // [[arrow::export]] -std::shared_ptr ImportRecordBatch(uintptr_t array, uintptr_t schema) { - return ValueOrStop( - arrow::ImportRecordBatch(reinterpret_cast(array), - reinterpret_cast(schema))); +std::shared_ptr ImportRecordBatch( + arrow::r::Pointer array, + arrow::r::Pointer schema) { + return ValueOrStop(arrow::ImportRecordBatch(array, schema)); } // [[arrow::export]] -uintptr_t allocate_arrow_schema() { return reinterpret_cast(new ArrowSchema); } +arrow::r::Pointer allocate_arrow_schema() { return {}; } // [[arrow::export]] -void delete_arrow_schema(uintptr_t ptr) { - delete reinterpret_cast(ptr); -} +void delete_arrow_schema(arrow::r::Pointer ptr) { ptr.finalize(); } // [[arrow::export]] -uintptr_t allocate_arrow_array() { return reinterpret_cast(new ArrowArray); } +arrow::r::Pointer allocate_arrow_array() { return {}; } // [[arrow::export]] -void delete_arrow_array(uintptr_t ptr) { - delete reinterpret_cast(ptr); -} +void delete_arrow_array(arrow::r::Pointer ptr) { ptr.finalize(); } // [[arrow::export]] -void ExportType(const std::shared_ptr& type, uintptr_t ptr) { - StopIfNotOk(arrow::ExportType(*type, reinterpret_cast(ptr))); +void ExportType(const std::shared_ptr& type, + arrow::r::Pointer ptr) { + StopIfNotOk(arrow::ExportType(*type, ptr)); } // [[arrow::export]] -void ExportSchema(const std::shared_ptr& schema, uintptr_t ptr) { - StopIfNotOk(arrow::ExportSchema(*schema, reinterpret_cast(ptr))); +void ExportSchema(const std::shared_ptr& schema, + arrow::r::Pointer ptr) { + StopIfNotOk(arrow::ExportSchema(*schema, ptr)); } // [[arrow::export]] -void ExportArray(const std::shared_ptr& array, uintptr_t ptr, - uintptr_t schema_ptr) { - StopIfNotOk(arrow::ExportArray(*array, reinterpret_cast(ptr), - reinterpret_cast(schema_ptr))); +void ExportArray(const std::shared_ptr& array, + arrow::r::Pointer array_ptr, + arrow::r::Pointer schema_ptr) { + StopIfNotOk(arrow::ExportArray(*array, array_ptr, schema_ptr)); } // [[arrow::export]] -void ExportRecordBatch(const std::shared_ptr& batch, uintptr_t ptr, - uintptr_t schema_ptr) { - StopIfNotOk( - arrow::ExportRecordBatch(*batch, reinterpret_cast(ptr), - reinterpret_cast(schema_ptr))); +void ExportRecordBatch(const std::shared_ptr& batch, + arrow::r::Pointer array_ptr, + arrow::r::Pointer schema_ptr) { + StopIfNotOk(arrow::ExportRecordBatch(*batch, array_ptr, schema_ptr)); } #endif From e2669cce128f8d2851fea59cc7239b4595b6947e Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Thu, 20 Aug 2020 15:24:24 +0200 Subject: [PATCH 57/62] no longer skip python tests --- r/tests/testthat/test-python.R | 2 -- 1 file changed, 2 deletions(-) diff --git a/r/tests/testthat/test-python.R b/r/tests/testthat/test-python.R index cac0b2959ff..df910169052 100644 --- a/r/tests/testthat/test-python.R +++ b/r/tests/testthat/test-python.R @@ -17,8 +17,6 @@ context("To/from Python") -skip("for now") - test_that("install_pyarrow", { skip_on_cran() skip_if_not_dev_mode() From 9ed0846e630a0eb99f147a9514863763c76e3bf8 Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Thu, 20 Aug 2020 15:24:30 +0200 Subject: [PATCH 58/62] https://github.com/r-lib/cpp11/pull/97 was merged --- r/DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r/DESCRIPTION b/r/DESCRIPTION index 1d887f19617..a215e75f11e 100644 --- a/r/DESCRIPTION +++ b/r/DESCRIPTION @@ -50,7 +50,7 @@ Suggests: testthat, tibble Remotes: - r-lib/cpp11#97 + r-lib/cpp11 Collate: 'enums.R' 'arrow-package.R' From 1ea6b99455fc0090dda6f987c0df624c3b949409 Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Thu, 20 Aug 2020 16:19:02 +0200 Subject: [PATCH 59/62] vendor cpp11 --- r/DESCRIPTION | 4 - r/inst/include/cpp11.hpp | 25 + r/inst/include/cpp11/R.hpp | 49 ++ r/inst/include/cpp11/altrep.hpp | 44 + r/inst/include/cpp11/as.hpp | 339 ++++++++ r/inst/include/cpp11/attribute_proxy.hpp | 50 ++ r/inst/include/cpp11/data_frame.hpp | 102 +++ r/inst/include/cpp11/declarations.hpp | 53 ++ r/inst/include/cpp11/doubles.hpp | 136 +++ r/inst/include/cpp11/environment.hpp | 75 ++ r/inst/include/cpp11/external_pointer.hpp | 165 ++++ r/inst/include/cpp11/function.hpp | 78 ++ r/inst/include/cpp11/integers.hpp | 142 ++++ r/inst/include/cpp11/list.hpp | 138 +++ r/inst/include/cpp11/list_of.hpp | 53 ++ r/inst/include/cpp11/logicals.hpp | 140 +++ r/inst/include/cpp11/matrix.hpp | 111 +++ r/inst/include/cpp11/named_arg.hpp | 51 ++ r/inst/include/cpp11/protect.hpp | 286 +++++++ r/inst/include/cpp11/r_string.hpp | 92 ++ r/inst/include/cpp11/r_vector.hpp | 986 ++++++++++++++++++++++ r/inst/include/cpp11/raws.hpp | 148 ++++ r/inst/include/cpp11/sexp.hpp | 79 ++ r/inst/include/cpp11/strings.hpp | 187 ++++ 24 files changed, 3529 insertions(+), 4 deletions(-) create mode 100644 r/inst/include/cpp11.hpp create mode 100644 r/inst/include/cpp11/R.hpp create mode 100644 r/inst/include/cpp11/altrep.hpp create mode 100644 r/inst/include/cpp11/as.hpp create mode 100644 r/inst/include/cpp11/attribute_proxy.hpp create mode 100644 r/inst/include/cpp11/data_frame.hpp create mode 100644 r/inst/include/cpp11/declarations.hpp create mode 100644 r/inst/include/cpp11/doubles.hpp create mode 100644 r/inst/include/cpp11/environment.hpp create mode 100644 r/inst/include/cpp11/external_pointer.hpp create mode 100644 r/inst/include/cpp11/function.hpp create mode 100644 r/inst/include/cpp11/integers.hpp create mode 100644 r/inst/include/cpp11/list.hpp create mode 100644 r/inst/include/cpp11/list_of.hpp create mode 100644 r/inst/include/cpp11/logicals.hpp create mode 100644 r/inst/include/cpp11/matrix.hpp create mode 100644 r/inst/include/cpp11/named_arg.hpp create mode 100644 r/inst/include/cpp11/protect.hpp create mode 100644 r/inst/include/cpp11/r_string.hpp create mode 100644 r/inst/include/cpp11/r_vector.hpp create mode 100644 r/inst/include/cpp11/raws.hpp create mode 100644 r/inst/include/cpp11/sexp.hpp create mode 100644 r/inst/include/cpp11/strings.hpp diff --git a/r/DESCRIPTION b/r/DESCRIPTION index a215e75f11e..9ef496d4027 100644 --- a/r/DESCRIPTION +++ b/r/DESCRIPTION @@ -23,8 +23,6 @@ Language: en-US LazyData: true SystemRequirements: C++11 Biarch: true -LinkingTo: - cpp11 Imports: assertthat, bit64, @@ -49,8 +47,6 @@ Suggests: rmarkdown, testthat, tibble -Remotes: - r-lib/cpp11 Collate: 'enums.R' 'arrow-package.R' diff --git a/r/inst/include/cpp11.hpp b/r/inst/include/cpp11.hpp new file mode 100644 index 00000000000..defa6c1b952 --- /dev/null +++ b/r/inst/include/cpp11.hpp @@ -0,0 +1,25 @@ +// cpp11 version: 0.2.1.9000 +// vendored on: 2020-08-20 +#pragma once + +#include "cpp11/R.hpp" +#include "cpp11/altrep.hpp" +#include "cpp11/as.hpp" +#include "cpp11/attribute_proxy.hpp" +#include "cpp11/data_frame.hpp" +#include "cpp11/doubles.hpp" +#include "cpp11/environment.hpp" +#include "cpp11/external_pointer.hpp" +#include "cpp11/function.hpp" +#include "cpp11/integers.hpp" +#include "cpp11/list.hpp" +#include "cpp11/list_of.hpp" +#include "cpp11/logicals.hpp" +#include "cpp11/matrix.hpp" +#include "cpp11/named_arg.hpp" +#include "cpp11/protect.hpp" +#include "cpp11/r_string.hpp" +#include "cpp11/r_vector.hpp" +#include "cpp11/raws.hpp" +#include "cpp11/sexp.hpp" +#include "cpp11/strings.hpp" diff --git a/r/inst/include/cpp11/R.hpp b/r/inst/include/cpp11/R.hpp new file mode 100644 index 00000000000..16fd77fbd6b --- /dev/null +++ b/r/inst/include/cpp11/R.hpp @@ -0,0 +1,49 @@ +// cpp11 version: 0.2.1.9000 +// vendored on: 2020-08-20 +#pragma once + +#include + +#include "R_ext/Arith.h" + +#undef FALSE +#undef TRUE +#undef NA_LOGICAL + +extern "C" { +typedef enum { + FALSE = 0, + TRUE = 1, + NA_LOGICAL = std::numeric_limits::min() +} Rboolean; +} + +#define R_EXT_BOOLEAN_H_ + +#define R_NO_REMAP +#define STRICT_R_HEADERS +#include "Rinternals.h" +#undef STRICT_R_HEADERS +#undef R_NO_REMAP + +// clang-format off +#ifdef __clang__ +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wattributes" +#endif + +#ifdef __GNUC__ +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wattributes" +#endif +// clang-format on + +#include "cpp11/altrep.hpp" + +namespace cpp11 { +namespace literals { + +constexpr R_xlen_t operator"" _xl(unsigned long long int value) { return value; } + +} // namespace literals +} // namespace cpp11 diff --git a/r/inst/include/cpp11/altrep.hpp b/r/inst/include/cpp11/altrep.hpp new file mode 100644 index 00000000000..99bc249d2fa --- /dev/null +++ b/r/inst/include/cpp11/altrep.hpp @@ -0,0 +1,44 @@ +// cpp11 version: 0.2.1.9000 +// vendored on: 2020-08-20 +#pragma once + +#include "Rversion.h" + +#if defined(R_VERSION) && R_VERSION >= R_Version(3, 5, 0) +#define HAS_ALTREP +#endif + +#ifndef HAS_ALTREP + +#define ALTREP(x) false + +#define REAL_ELT(x, i) REAL(x)[i] +#define INTEGER_ELT(x, i) INTEGER(x)[i] +#define LOGICAL_ELT(x, i) LOGICAL(x)[i] +#define RAW_ELT(x, i) RAW(x)[i] + +#define SET_REAL_ELT(x, i, val) REAL(x)[i] = val +#define SET_INTEGER_ELT(x, i, val) INTEGER(x)[i] = val +#define SET_LOGICAL_ELT(x, i, val) LOGICAL(x)[i] = val +#define SET_RAW_ELT(x, i, val) RAW(x)[i] = val + +#define REAL_GET_REGION(...) \ + do { \ + } while (false) + +#define INTEGER_GET_REGION(...) \ + do { \ + } while (false) +#endif + +#if !defined HAS_ALTREP || (defined(R_VERSION) && R_VERSION < R_Version(3, 6, 0)) + +#define LOGICAL_GET_REGION(...) \ + do { \ + } while (false) + +#define RAW_GET_REGION(...) \ + do { \ + } while (false) + +#endif diff --git a/r/inst/include/cpp11/as.hpp b/r/inst/include/cpp11/as.hpp new file mode 100644 index 00000000000..b8934a3711f --- /dev/null +++ b/r/inst/include/cpp11/as.hpp @@ -0,0 +1,339 @@ +// cpp11 version: 0.2.1.9000 +// vendored on: 2020-08-20 +#pragma once + +#include // for modf +#include // for initializer_list +#include // for std::shared_ptr, std::weak_ptr, std::unique_ptr +#include // for string, basic_string +#include // for decay, enable_if, is_same, is_convertible + +#include "cpp11/R.hpp" // for SEXP, SEXPREC, Rf_xlength, R_xlen_t +#include "cpp11/protect.hpp" // for stop, protect, safe, protect::function + +namespace cpp11 { + +template +using enable_if_t = typename std::enable_if::type; + +template +using decay_t = typename std::decay::type; + +template +struct is_smart_ptr : std::false_type {}; + +template +struct is_smart_ptr> : std::true_type {}; + +template +struct is_smart_ptr> : std::true_type {}; + +template +struct is_smart_ptr> : std::true_type {}; + +template +using enable_if_constructible_from_sexp = + enable_if_t< + !is_smart_ptr::value && // workaround for gcc 4.8 + std::is_class::value && std::is_constructible::value, + R + >; + +template +using enable_if_is_sexp = enable_if_t::value, R>; + +template +using enable_if_convertible_to_sexp = enable_if_t::value, R>; + +template +using disable_if_convertible_to_sexp = + enable_if_t::value, R>; + +template +using enable_if_integral = + enable_if_t::value && !std::is_same::value && + !std::is_same::value, + R>; + +template +using enable_if_floating_point = + typename std::enable_if::value, R>::type; + +template +using enable_if_enum = enable_if_t::value, R>; + +template +using enable_if_bool = enable_if_t::value, R>; + +template +using enable_if_char = enable_if_t::value, R>; + +template +using enable_if_std_string = enable_if_t::value, R>; + +template +using enable_if_c_string = enable_if_t::value, R>; + +// https://stackoverflow.com/a/1521682/2055486 +// +inline bool is_convertable_without_loss_to_integer(double value) { + double int_part; + return std::modf(value, &int_part) == 0.0; +} + +template +enable_if_constructible_from_sexp as_cpp(SEXP from) { + return T(from); +} + +template +enable_if_is_sexp as_cpp(SEXP from) { + return from; +} + +template +enable_if_integral as_cpp(SEXP from) { + if (Rf_isInteger(from)) { + if (Rf_xlength(from) == 1) { + return INTEGER_ELT(from, 0); + } + } else if (Rf_isReal(from)) { + if (Rf_xlength(from) == 1) { + if (ISNA(REAL_ELT(from, 0))) { + return NA_INTEGER; + } + double value = REAL_ELT(from, 0); + if (is_convertable_without_loss_to_integer(value)) { + return value; + } + } + } else if (Rf_isLogical(from)) { + if (Rf_xlength(from) == 1) { + if (LOGICAL_ELT(from, 0) == NA_LOGICAL) { + return NA_INTEGER; + } + } + } + + stop("Expected single integer value"); +} + +template +enable_if_enum as_cpp(SEXP from) { + if (Rf_isInteger(from)) { + using underlying_type = typename std::underlying_type::type; + using int_type = typename std::conditional::value, + int, // as_cpp would trigger + // undesired string conversions + underlying_type>::type; + return static_cast(as_cpp(from)); + } + + stop("Expected single integer value"); +} + +template +enable_if_bool as_cpp(SEXP from) { + if (Rf_isLogical(from)) { + if (Rf_xlength(from) == 1) { + return LOGICAL_ELT(from, 0) == 1; + } + } + + stop("Expected single logical value"); +} + +template +enable_if_floating_point as_cpp(SEXP from) { + if (Rf_isReal(from)) { + if (Rf_xlength(from) == 1) { + return REAL_ELT(from, 0); + } + } + // All 32 bit integers can be coerced to doubles, so we just convert them. + if (Rf_isInteger(from)) { + if (Rf_xlength(from) == 1) { + if (INTEGER_ELT(from, 0) == NA_INTEGER) { + return NA_REAL; + } + return INTEGER_ELT(from, 0); + } + } + + // Also allow NA values + if (Rf_isLogical(from)) { + if (Rf_xlength(from) == 1) { + if (LOGICAL_ELT(from, 0) == NA_LOGICAL) { + return NA_REAL; + } + } + } + + stop("Expected single double value"); +} + +template +enable_if_char as_cpp(SEXP from) { + if (Rf_isString(from)) { + if (Rf_xlength(from) == 1) { + return unwind_protect([&] { return Rf_translateCharUTF8(STRING_ELT(from, 0))[0]; }); + } + } + + stop("Expected string vector of length 1"); +} + +template +enable_if_c_string as_cpp(SEXP from) { + if (Rf_isString(from)) { + if (Rf_xlength(from) == 1) { + // TODO: use vmaxget / vmaxset here? + return {unwind_protect([&] { return Rf_translateCharUTF8(STRING_ELT(from, 0)); })}; + } + } + + stop("Expected string vector of length 1"); +} + +template +enable_if_std_string as_cpp(SEXP from) { + return {as_cpp(from)}; +} + +/// Temporary workaround for compatibility with cpp11 0.1.0 +template +enable_if_t, T>::value, decay_t> as_cpp(SEXP from) { + return as_cpp>(from); +} + +template +enable_if_integral as_sexp(T from) { + return safe[Rf_ScalarInteger](from); +} + +template +enable_if_floating_point as_sexp(T from) { + return safe[Rf_ScalarReal](from); +} + +template +enable_if_bool as_sexp(T from) { + return safe[Rf_ScalarLogical](from); +} + +template +enable_if_c_string as_sexp(T from) { + return unwind_protect([&] { return Rf_ScalarString(Rf_mkCharCE(from, CE_UTF8)); }); +} + +template +enable_if_std_string as_sexp(const T& from) { + return as_sexp(from.c_str()); +} + +template > +enable_if_integral as_sexp(const Container& from) { + R_xlen_t size = from.size(); + SEXP data = safe[Rf_allocVector](INTSXP, size); + + auto it = from.begin(); + int* data_p = INTEGER(data); + for (R_xlen_t i = 0; i < size; ++i, ++it) { + data_p[i] = *it; + } + return data; +} + +inline SEXP as_sexp(std::initializer_list from) { + return as_sexp>(from); +} + +template > +enable_if_floating_point as_sexp(const Container& from) { + R_xlen_t size = from.size(); + SEXP data = safe[Rf_allocVector](REALSXP, size); + + auto it = from.begin(); + double* data_p = REAL(data); + for (R_xlen_t i = 0; i < size; ++i, ++it) { + data_p[i] = *it; + } + return data; +} + +inline SEXP as_sexp(std::initializer_list from) { + return as_sexp>(from); +} + +template > +enable_if_bool as_sexp(const Container& from) { + R_xlen_t size = from.size(); + SEXP data = safe[Rf_allocVector](LGLSXP, size); + + auto it = from.begin(); + int* data_p = LOGICAL(data); + for (R_xlen_t i = 0; i < size; ++i, ++it) { + data_p[i] = *it; + } + return data; +} + +inline SEXP as_sexp(std::initializer_list from) { + return as_sexp>(from); +} + +namespace detail { +template +SEXP as_sexp_strings(const Container& from, AsCstring&& c_str) { + R_xlen_t size = from.size(); + + SEXP data; + try { + data = PROTECT(safe[Rf_allocVector](STRSXP, size)); + + auto it = from.begin(); + for (R_xlen_t i = 0; i < size; ++i, ++it) { + SET_STRING_ELT(data, i, safe[Rf_mkCharCE](c_str(*it), CE_UTF8)); + } + } catch (const unwind_exception& e) { + UNPROTECT(1); + throw e; + } + + UNPROTECT(1); + return data; +} +} // namespace detail + +class r_string; + +template +using disable_if_r_string = enable_if_t::value, R>; + +template > +enable_if_t::value && + !std::is_convertible::value, + SEXP> +as_sexp(const Container& from) { + return detail::as_sexp_strings(from, [](const std::string& s) { return s.c_str(); }); +} + +template +enable_if_c_string as_sexp(const Container& from) { + return detail::as_sexp_strings(from, [](const char* s) { return s; }); +} + +inline SEXP as_sexp(std::initializer_list from) { + return as_sexp>(from); +} + +template > +enable_if_convertible_to_sexp as_sexp(const T& from) { + return from; +} + +} // namespace cpp11 diff --git a/r/inst/include/cpp11/attribute_proxy.hpp b/r/inst/include/cpp11/attribute_proxy.hpp new file mode 100644 index 00000000000..4c6f3b16ccb --- /dev/null +++ b/r/inst/include/cpp11/attribute_proxy.hpp @@ -0,0 +1,50 @@ +// cpp11 version: 0.2.1.9000 +// vendored on: 2020-08-20 +#pragma once + +#include // for initializer_list +#include // for string, basic_string + +#include "cpp11/R.hpp" // for SEXP, SEXPREC, Rf_install, PROTECT, Rf_... +#include "cpp11/as.hpp" // for as_sexp +#include "cpp11/protect.hpp" // for protect, safe, protect::function + +namespace cpp11 { + +class sexp; + +template +class attribute_proxy { + private: + const T& parent_; + SEXP symbol_; + + public: + attribute_proxy(const T& parent, const char* index) + : parent_(parent), symbol_(safe[Rf_install](index)) {} + + attribute_proxy(const T& parent, const std::string& index) + : parent_(parent), symbol_(safe[Rf_install](index.c_str())) {} + + attribute_proxy(const T& parent, SEXP index) : parent_(parent), symbol_(index) {} + + template + attribute_proxy& operator=(C rhs) { + SEXP value = PROTECT(as_sexp(rhs)); + Rf_setAttrib(parent_.data(), symbol_, value); + UNPROTECT(1); + return *this; + } + + template + attribute_proxy& operator=(std::initializer_list rhs) { + SEXP value = PROTECT(as_sexp(rhs)); + Rf_setAttrib(parent_.data(), symbol_, value); + UNPROTECT(1); + return *this; + } + + operator SEXP() const { return safe[Rf_getAttrib](parent_.data(), symbol_); } +}; + +} // namespace cpp11 diff --git a/r/inst/include/cpp11/data_frame.hpp b/r/inst/include/cpp11/data_frame.hpp new file mode 100644 index 00000000000..a5317ebda37 --- /dev/null +++ b/r/inst/include/cpp11/data_frame.hpp @@ -0,0 +1,102 @@ +// cpp11 version: 0.2.1.9000 +// vendored on: 2020-08-20 +#pragma once + +#include // for abs +#include +#include // for initializer_list +#include // for string, basic_string +#include // for move + +#include "R_ext/Arith.h" // for NA_INTEGER +#include "cpp11/R.hpp" // for Rf_xlength, SEXP, SEXPREC, INTEGER +#include "cpp11/attribute_proxy.hpp" // for attribute_proxy +#include "cpp11/list.hpp" // for list, r_vector<>::r_vector, r_v... +#include "cpp11/r_vector.hpp" // for r_vector + +namespace cpp11 { + +class named_arg; +namespace writable { +class data_frame; +} // namespace writable + +class data_frame : public list { + using list::list; + + friend class writable::data_frame; + + /* we cannot use Rf_getAttrib because it has a special case for c(NA, -n) and creates + * the full vector */ + static SEXP get_attrib0(SEXP x, SEXP sym) { + for (SEXP attr = ATTRIB(x); attr != R_NilValue; attr = CDR(attr)) { + if (TAG(attr) == sym) { + return CAR(attr); + } + } + + return R_NilValue; + } + + static int calc_nrow(SEXP x) { + auto nms = get_attrib0(x, R_RowNamesSymbol); + bool has_short_rownames = + (Rf_isInteger(nms) && Rf_xlength(nms) == 2 && INTEGER(nms)[0] == NA_INTEGER); + if (has_short_rownames) { + return abs(INTEGER(nms)[1]); + } + + if (!Rf_isNull(nms)) { + return Rf_xlength(nms); + } + + if (Rf_xlength(x) == 0) { + return 0; + } + + return Rf_xlength(VECTOR_ELT(x, 0)); + } + + public: + /* Adapted from + * https://github.com/wch/r-source/blob/f2a0dfab3e26fb42b8b296fcba40cbdbdbec767d/src/main/attrib.c#L198-L207 + */ + R_xlen_t nrow() const { return calc_nrow(*this); } + R_xlen_t ncol() const { return size(); } +}; + +namespace writable { +class data_frame : public cpp11::data_frame { + private: + writable::list set_data_frame_attributes(writable::list&& x) { + x.attr(R_RowNamesSymbol) = {NA_INTEGER, -static_cast(calc_nrow(x))}; + x.attr(R_ClassSymbol) = "data.frame"; + return std::move(x); + } + + public: + data_frame(const SEXP data) : cpp11::data_frame(set_data_frame_attributes(data)) {} + data_frame(const SEXP data, bool is_altrep) + : cpp11::data_frame(set_data_frame_attributes(data), is_altrep) {} + data_frame(std::initializer_list il) + : cpp11::data_frame(set_data_frame_attributes(writable::list(il))) {} + data_frame(std::initializer_list il) + : cpp11::data_frame(set_data_frame_attributes(writable::list(il))) {} + + using cpp11::data_frame::ncol; + using cpp11::data_frame::nrow; + + attribute_proxy attr(const char* name) const { return {*this, name}; } + + attribute_proxy attr(const std::string& name) const { + return {*this, name.c_str()}; + } + + attribute_proxy attr(SEXP name) const { return {*this, name}; } + + attribute_proxy names() const { return {*this, R_NamesSymbol}; } +}; + +} // namespace writable + +} // namespace cpp11 diff --git a/r/inst/include/cpp11/declarations.hpp b/r/inst/include/cpp11/declarations.hpp new file mode 100644 index 00000000000..9d2190c90e9 --- /dev/null +++ b/r/inst/include/cpp11/declarations.hpp @@ -0,0 +1,53 @@ +// cpp11 version: 0.2.1.9000 +// vendored on: 2020-08-20 +#pragma once + +#include +#include +#include + +#ifndef CPP11_PARTIAL +#include "cpp11.hpp" +using namespace cpp11; +namespace writable = cpp11::writable; +#endif + +#include + +namespace cpp11 { +template +T& unmove(T&& t) { + return t; +} +} // namespace cpp11 + +#ifdef HAS_UNWIND_PROTECT +#define CPP11_UNWIND R_ContinueUnwind(err); +#else +#define CPP11_UNWIND \ + do { \ + } while (false); +#endif + +#define BEGIN_CPP11 \ + SEXP err = R_NilValue; \ + const size_t ERROR_SIZE = 8192; \ + char buf[ERROR_SIZE] = ""; \ + try { +#define END_CPP11 \ + } \ + catch (cpp11::unwind_exception & e) { \ + err = e.token; \ + } \ + catch (std::exception & e) { \ + strncpy(buf, e.what(), ERROR_SIZE - 1); \ + } \ + catch (...) { \ + strncpy(buf, "C++ error (unknown cause)", ERROR_SIZE - 1); \ + } \ + if (buf[0] != '\0') { \ + Rf_error("%s", buf); \ + } else if (err != R_NilValue) { \ + CPP11_UNWIND \ + } \ + return R_NilValue; diff --git a/r/inst/include/cpp11/doubles.hpp b/r/inst/include/cpp11/doubles.hpp new file mode 100644 index 00000000000..5f2f7f447e8 --- /dev/null +++ b/r/inst/include/cpp11/doubles.hpp @@ -0,0 +1,136 @@ +// cpp11 version: 0.2.1.9000 +// vendored on: 2020-08-20 +#pragma once + +#include // for min +#include // for array +#include // for initializer_list + +#include "R_ext/Arith.h" // for ISNA +#include "cpp11/R.hpp" // for SEXP, SEXPREC, Rf_allocVector, REAL +#include "cpp11/as.hpp" // for as_sexp +#include "cpp11/named_arg.hpp" // for named_arg +#include "cpp11/protect.hpp" // for SEXP, SEXPREC, REAL_ELT, R_Preserve... +#include "cpp11/r_vector.hpp" // for vector, vector<>::proxy, vector<>::... +#include "cpp11/sexp.hpp" // for sexp +// Specializations for doubles + +namespace cpp11 { + +template <> +inline SEXP r_vector::valid_type(SEXP data) { + if (TYPEOF(data) != REALSXP) { + throw type_error(REALSXP, TYPEOF(data)); + } + return data; +} + +template <> +inline double r_vector::operator[](const R_xlen_t pos) const { + // NOPROTECT: likely too costly to unwind protect every elt + return is_altrep_ ? REAL_ELT(data_, pos) : data_p_[pos]; +} + +template <> +inline double* r_vector::get_p(bool is_altrep, SEXP data) { + if (is_altrep) { + return nullptr; + } else { + return REAL(data); + } +} + +template <> +inline void r_vector::const_iterator::fill_buf(R_xlen_t pos) { + length_ = std::min(64_xl, data_->size() - pos); + REAL_GET_REGION(data_->data_, pos, length_, buf_.data()); + block_start_ = pos; +} + +typedef r_vector doubles; + +namespace writable { + +template <> +inline typename r_vector::proxy& r_vector::proxy::operator=( + const double& rhs) { + if (is_altrep_) { + // NOPROTECT: likely too costly to unwind protect every set elt + SET_REAL_ELT(data_, index_, rhs); + } else { + *p_ = rhs; + } + return *this; +} + +template <> +inline r_vector::proxy::operator double() const { + if (p_ == nullptr) { + // NOPROTECT: likely too costly to unwind protect every elt + return REAL_ELT(data_, index_); + } else { + return *p_; + } +} + +template <> +inline r_vector::r_vector(std::initializer_list il) + : cpp11::r_vector(as_sexp(il)), capacity_(il.size()) {} + +template <> +inline r_vector::r_vector(std::initializer_list il) + : cpp11::r_vector(safe[Rf_allocVector](REALSXP, il.size())), + capacity_(il.size()) { + protect_ = protect_sexp(data_); + int n_protected = 0; + + try { + unwind_protect([&] { + Rf_setAttrib(data_, R_NamesSymbol, Rf_allocVector(STRSXP, capacity_)); + SEXP names = PROTECT(Rf_getAttrib(data_, R_NamesSymbol)); + ++n_protected; + auto it = il.begin(); + for (R_xlen_t i = 0; i < capacity_; ++i, ++it) { + data_p_[i] = REAL_ELT(it->value(), 0); + SET_STRING_ELT(names, i, Rf_mkCharCE(it->name(), CE_UTF8)); + } + UNPROTECT(n_protected); + }); + } catch (const unwind_exception& e) { + release_protect(protect_); + UNPROTECT(n_protected); + throw e; + } +} + +template <> +inline void r_vector::reserve(R_xlen_t new_capacity) { + data_ = data_ == R_NilValue ? safe[Rf_allocVector](REALSXP, new_capacity) + : safe[Rf_xlengthgets](data_, new_capacity); + SEXP old_protect = protect_; + protect_ = protect_sexp(data_); + release_protect(old_protect); + + data_p_ = REAL(data_); + capacity_ = new_capacity; +} + +template <> +inline void r_vector::push_back(double value) { + while (length_ >= capacity_) { + reserve(capacity_ == 0 ? 1 : capacity_ *= 2); + } + if (is_altrep_) { + SET_REAL_ELT(data_, length_, value); + } else { + data_p_[length_] = value; + } + ++length_; +} + +typedef r_vector doubles; + +} // namespace writable + +inline bool is_na(double x) { return ISNA(x); } +} // namespace cpp11 diff --git a/r/inst/include/cpp11/environment.hpp b/r/inst/include/cpp11/environment.hpp new file mode 100644 index 00000000000..ec6ab6e9d56 --- /dev/null +++ b/r/inst/include/cpp11/environment.hpp @@ -0,0 +1,75 @@ +// cpp11 version: 0.2.1.9000 +// vendored on: 2020-08-20 +#pragma once + +#include // for string, basic_string + +#include "Rversion.h" // for R_VERSION, R_Version +#include "cpp11/R.hpp" // for SEXP, SEXPREC, Rf_install, Rf_findVarIn... +#include "cpp11/as.hpp" // for as_sexp +#include "cpp11/protect.hpp" // for protect, protect::function, safe, unwin... +#include "cpp11/sexp.hpp" // for sexp + +#if R_VERSION >= R_Version(4, 0, 0) +#define HAS_REMOVE_VAR_FROM_FRAME +#endif + +#ifndef HAS_REMOVE_VAR_FROM_FRAME +#include "cpp11/function.hpp" +#endif + +namespace cpp11 { + +class environment { + private: + sexp env_; + + class proxy { + SEXP parent_; + SEXP name_; + + public: + proxy(SEXP parent, SEXP name) : parent_(parent), name_(name) {} + + template + proxy& operator=(T value) { + safe[Rf_defineVar](name_, as_sexp(value), parent_); + return *this; + } + operator SEXP() const { return safe[Rf_findVarInFrame3](parent_, name_, TRUE); }; + operator sexp() const { return SEXP(); }; + }; + + public: + environment(SEXP env) : env_(env) {} + proxy operator[](SEXP name) const { return {env_, name}; } + proxy operator[](const char* name) const { return operator[](safe[Rf_install](name)); } + proxy operator[](const std::string& name) const { return operator[](name.c_str()); } + + bool exists(SEXP name) const { + SEXP res = safe[Rf_findVarInFrame3](env_, name, FALSE); + return res != R_UnboundValue; + } + bool exists(const char* name) const { return exists(safe[Rf_install](name)); } + + bool exists(const std::string& name) const { return exists(name.c_str()); } + + void remove(SEXP name) { + PROTECT(name); +#ifdef HAS_REMOVE_VAR_FROM_FRAME + R_removeVarFromFrame(name, env_); +#else + auto remove = package("base")["remove"]; + remove(name, "envir"_nm = env_); +#endif + UNPROTECT(1); + } + + void remove(const char* name) { remove(safe[Rf_install](name)); } + + R_xlen_t size() const { return Rf_xlength(env_); } + + operator SEXP() const { return env_; } +}; + +} // namespace cpp11 diff --git a/r/inst/include/cpp11/external_pointer.hpp b/r/inst/include/cpp11/external_pointer.hpp new file mode 100644 index 00000000000..ab8f11a6770 --- /dev/null +++ b/r/inst/include/cpp11/external_pointer.hpp @@ -0,0 +1,165 @@ +// cpp11 version: 0.2.1.9000 +// vendored on: 2020-08-20 +#pragma once + +#include // for nullptr_t, NULL +#include // for bad_weak_ptr +#include // for add_lvalue_reference + +#include "cpp11/R.hpp" // for SEXP, SEXPREC, TYPEOF, R_NilValue, R_C... +#include "cpp11/protect.hpp" // for protect, safe, protect::function +#include "cpp11/r_vector.hpp" // for type_error +#include "cpp11/sexp.hpp" // for sexp + +namespace cpp11 { + +template +void default_deleter(T* obj) { + delete obj; +} + +template > +class external_pointer { + private: + sexp data_ = R_NilValue; + + static SEXP valid_type(SEXP data) { + if (TYPEOF(data) != EXTPTRSXP) { + throw type_error(EXTPTRSXP, TYPEOF(data)); + } + + return data; + } + + static void r_deleter(SEXP p) { + if (TYPEOF(p) != EXTPTRSXP) return; + + T* ptr = static_cast(R_ExternalPtrAddr(p)); + + if (ptr == NULL) { + return; + } + + R_ClearExternalPtr(p); + + Deleter(ptr); + } + + public: + using pointer = T*; + + external_pointer() noexcept {} + external_pointer(std::nullptr_t) noexcept {} + + external_pointer(SEXP data) : data_(valid_type(data)) {} + + external_pointer(pointer p, bool use_deleter = true, bool finalize_on_exit = true) + : data_(safe[R_MakeExternalPtr]((void*)p, R_NilValue, R_NilValue)) { + if (use_deleter) { + R_RegisterCFinalizerEx(data_, r_deleter, static_cast(finalize_on_exit)); + } + } + + external_pointer(const external_pointer& rhs) { + data_ = safe[Rf_shallow_duplicate](rhs.data_); + } + + external_pointer(external_pointer&& rhs) { reset(rhs.release()); } + + external_pointer& operator=(external_pointer&& rhs) noexcept { reset(rhs.release()); } + + external_pointer& operator=(std::nullptr_t) noexcept { reset(); }; + + operator SEXP() const noexcept { return data_; } + + pointer get() const noexcept { + pointer addr = static_cast(R_ExternalPtrAddr(data_)); + if (addr == nullptr) { + return nullptr; + } + return addr; + } + + typename std::add_lvalue_reference::type operator*() { + pointer addr = get(); + if (addr == nullptr) { + throw std::bad_weak_ptr(); + } + return *get(); + } + + pointer operator->() const { + pointer addr = get(); + if (addr == nullptr) { + throw std::bad_weak_ptr(); + } + return get(); + } + + pointer release() noexcept { + if (get() == nullptr) { + return nullptr; + } + pointer ptr = get(); + R_ClearExternalPtr(data_); + + return ptr; + } + + void reset(pointer ptr = pointer()) { + SEXP old_data = data_; + data_ = safe[R_MakeExternalPtr]((void*)ptr, R_NilValue, R_NilValue); + r_deleter(old_data); + } + + void swap(external_pointer& other) noexcept { + SEXP tmp = other.data_; + other.data_ = data_; + data_ = tmp; + } + + operator bool() noexcept { return data_ != nullptr; } +}; + +template +void swap(external_pointer& lhs, external_pointer& rhs) noexcept { + lhs.swap(rhs); +} + +template +bool operator==(const external_pointer& x, + const external_pointer& y) { + return x.data_ == y.data_; +} + +template +bool operator!=(const external_pointer& x, + const external_pointer& y) { + return x.data_ != y.data_; +} + +template +bool operator<(const external_pointer& x, + const external_pointer& y) { + return x.data_ < y.data_; +} + +template +bool operator<=(const external_pointer& x, + const external_pointer& y) { + return x.data_ <= y.data_; +} + +template +bool operator>(const external_pointer& x, + const external_pointer& y) { + return x.data_ > y.data_; +} + +template +bool operator>=(const external_pointer& x, + const external_pointer& y) { + return x.data_ >= y.data_; +} + +} // namespace cpp11 diff --git a/r/inst/include/cpp11/function.hpp b/r/inst/include/cpp11/function.hpp new file mode 100644 index 00000000000..b0951cb87dc --- /dev/null +++ b/r/inst/include/cpp11/function.hpp @@ -0,0 +1,78 @@ +// cpp11 version: 0.2.1.9000 +// vendored on: 2020-08-20 +#pragma once + +#include // for strcmp + +#include // for string, basic_string +#include // for forward + +#include "cpp11/R.hpp" // for SEXP, SEXPREC, CDR, Rf_install, SETCAR +#include "cpp11/as.hpp" // for as_sexp +#include "cpp11/named_arg.hpp" // for named_arg +#include "cpp11/protect.hpp" // for protect, protect::function, safe +#include "cpp11/sexp.hpp" // for sexp + +namespace cpp11 { + +class function { + public: + function(SEXP data) : data_(data) {} + + template + sexp operator()(Args&&... args) const { + // Size of the arguments plus one for the function name itself + R_xlen_t num_args = sizeof...(args) + 1; + + sexp call(safe[Rf_allocVector](LANGSXP, num_args)); + + construct_call(call, data_, std::forward(args)...); + + return safe[Rf_eval](call, R_GlobalEnv); + } + + private: + SEXP data_; + + template + SEXP construct_call(SEXP val, const named_arg& arg, Args&&... args) const { + SETCAR(val, arg.value()); + SET_TAG(val, safe[Rf_install](arg.name())); + val = CDR(val); + return construct_call(val, std::forward(args)...); + } + + // Construct the call recursively, each iteration adds an Arg to the pairlist. + // We need + template + SEXP construct_call(SEXP val, const T& arg, Args&&... args) const { + SETCAR(val, as_sexp(arg)); + val = CDR(val); + return construct_call(val, std::forward(args)...); + } + + // Base case, just return + SEXP construct_call(SEXP val) const { return val; } +}; + +class package { + public: + package(const char* name) : data_(get_namespace(name)) {} + package(const std::string& name) : data_(get_namespace(name.c_str())) {} + function operator[](const char* name) { + return safe[Rf_findFun](safe[Rf_install](name), data_); + } + function operator[](const std::string& name) { return operator[](name.c_str()); } + + private: + static SEXP get_namespace(const char* name) { + if (strcmp(name, "base") == 0) { + return R_BaseEnv; + } + sexp name_sexp = safe[Rf_install](name); + return safe[Rf_findVarInFrame](R_NamespaceRegistry, name_sexp); + } + + SEXP data_; +}; +} // namespace cpp11 diff --git a/r/inst/include/cpp11/integers.hpp b/r/inst/include/cpp11/integers.hpp new file mode 100644 index 00000000000..fc6b63d05e4 --- /dev/null +++ b/r/inst/include/cpp11/integers.hpp @@ -0,0 +1,142 @@ +// cpp11 version: 0.2.1.9000 +// vendored on: 2020-08-20 +#pragma once + +#include // for min +#include // for array +#include // for initializer_list + +#include "R_ext/Arith.h" // for NA_INTEGER +#include "cpp11/R.hpp" // for SEXP, SEXPREC, Rf_allocVector +#include "cpp11/as.hpp" // for as_sexp +#include "cpp11/attribute_proxy.hpp" // for attribute_proxy +#include "cpp11/named_arg.hpp" // for named_arg +#include "cpp11/protect.hpp" // for protect_sexp, release_protect +#include "cpp11/r_vector.hpp" // for r_vector, r_vector<>::proxy +#include "cpp11/sexp.hpp" // for sexp + +// Specializations for integers + +namespace cpp11 { + +template <> +inline SEXP r_vector::valid_type(SEXP data) { + if (TYPEOF(data) != INTSXP) { + throw type_error(INTSXP, TYPEOF(data)); + } + return data; +} + +template <> +inline int r_vector::operator[](const R_xlen_t pos) const { + // NOPROTECT: likely too costly to unwind protect every elt + return is_altrep_ ? INTEGER_ELT(data_, pos) : data_p_[pos]; +} + +template <> +inline int* r_vector::get_p(bool is_altrep, SEXP data) { + if (is_altrep) { + return nullptr; + } else { + return INTEGER(data); + } +} + +template <> +inline void r_vector::const_iterator::fill_buf(R_xlen_t pos) { + length_ = std::min(64_xl, data_->size() - pos); + unwind_protect([&] { INTEGER_GET_REGION(data_->data_, pos, length_, buf_.data()); }); + block_start_ = pos; +} + +typedef r_vector integers; + +namespace writable { + +template <> +inline typename r_vector::proxy& r_vector::proxy::operator=(const int& rhs) { + if (is_altrep_) { + // NOPROTECT: likely too costly to unwind protect every set elt + SET_INTEGER_ELT(data_, index_, rhs); + } else { + *p_ = rhs; + } + return *this; +} + +template <> +inline r_vector::proxy::operator int() const { + if (p_ == nullptr) { + // NOPROTECT: likely too costly to unwind protect every elt + return INTEGER_ELT(data_, index_); + } else { + return *p_; + } +} + +template <> +inline r_vector::r_vector(std::initializer_list il) + : cpp11::r_vector(as_sexp(il)), capacity_(il.size()) {} + +template <> +inline void r_vector::reserve(R_xlen_t new_capacity) { + data_ = data_ == R_NilValue ? safe[Rf_allocVector](INTSXP, new_capacity) + : safe[Rf_xlengthgets](data_, new_capacity); + SEXP old_protect = protect_; + + // Protect the new data + protect_ = protect_sexp(data_); + + // Release the old protection; + release_protect(old_protect); + + data_p_ = INTEGER(data_); + capacity_ = new_capacity; +} + +template <> +inline r_vector::r_vector(std::initializer_list il) + : cpp11::r_vector(safe[Rf_allocVector](INTSXP, il.size())), + capacity_(il.size()) { + protect_ = protect_sexp(data_); + int n_protected = 0; + + try { + unwind_protect([&] { + Rf_setAttrib(data_, R_NamesSymbol, Rf_allocVector(STRSXP, capacity_)); + SEXP names = PROTECT(Rf_getAttrib(data_, R_NamesSymbol)); + ++n_protected; + auto it = il.begin(); + for (R_xlen_t i = 0; i < capacity_; ++i, ++it) { + data_p_[i] = INTEGER_ELT(it->value(), 0); + SET_STRING_ELT(names, i, Rf_mkCharCE(it->name(), CE_UTF8)); + } + UNPROTECT(n_protected); + }); + } catch (const unwind_exception& e) { + release_protect(protect_); + UNPROTECT(n_protected); + throw e; + } +} + +template <> +inline void r_vector::push_back(int value) { + while (length_ >= capacity_) { + reserve(capacity_ == 0 ? 1 : capacity_ *= 2); + } + if (is_altrep_) { + // NOPROTECT: likely too costly to unwind protect every elt + SET_INTEGER_ELT(data_, length_, value); + } else { + data_p_[length_] = value; + } + ++length_; +} + +typedef r_vector integers; + +} // namespace writable + +inline bool is_na(int x) { return x == NA_INTEGER; } +} // namespace cpp11 diff --git a/r/inst/include/cpp11/list.hpp b/r/inst/include/cpp11/list.hpp new file mode 100644 index 00000000000..5500f7779b6 --- /dev/null +++ b/r/inst/include/cpp11/list.hpp @@ -0,0 +1,138 @@ +// cpp11 version: 0.2.1.9000 +// vendored on: 2020-08-20 +#pragma once + +#include // for initializer_list + +#include "cpp11/R.hpp" // for SEXP, SEXPREC, SET_VECTOR_ELT +#include "cpp11/attribute_proxy.hpp" // for attribute_proxy +#include "cpp11/named_arg.hpp" // for named_arg +#include "cpp11/protect.hpp" // for protect_sexp, release_protect +#include "cpp11/r_string.hpp" // for r_string +#include "cpp11/r_vector.hpp" // for r_vector, r_vector<>::proxy +#include "cpp11/sexp.hpp" // for sexp + +// Specializations for list + +namespace cpp11 { + +template <> +inline SEXP r_vector::valid_type(SEXP data) { + if (TYPEOF(data) != VECSXP) { + throw type_error(VECSXP, TYPEOF(data)); + } + return data; +} + +template <> +inline SEXP r_vector::operator[](const R_xlen_t pos) const { + return VECTOR_ELT(data_, pos); +} + +template <> +inline SEXP r_vector::operator[](const r_string& name) const { + SEXP names = this->names(); + R_xlen_t size = Rf_xlength(names); + + for (R_xlen_t pos = 0; pos < size; ++pos) { + auto cur = Rf_translateCharUTF8(STRING_ELT(names, pos)); + if (name == cur) { + return operator[](pos); + } + } + return R_NilValue; +} + +template <> +inline SEXP* r_vector::get_p(bool, SEXP) { + return nullptr; +} + +template <> +inline void r_vector::const_iterator::fill_buf(R_xlen_t) { + return; +} + +template <> +inline SEXP r_vector::const_iterator::operator*() { + return VECTOR_ELT(data_->data(), pos_); +} + +typedef r_vector list; + +namespace writable { + +template <> +inline typename r_vector::proxy& r_vector::proxy::operator=(const SEXP& rhs) { + SET_VECTOR_ELT(data_, index_, rhs); + return *this; +} + +template <> +inline r_vector::proxy::operator SEXP() const { + return VECTOR_ELT(data_, index_); +} + +template <> +inline r_vector::r_vector(std::initializer_list il) + : cpp11::r_vector(safe[Rf_allocVector](VECSXP, il.size())), + capacity_(il.size()) { + protect_ = protect_sexp(data_); + auto it = il.begin(); + for (R_xlen_t i = 0; i < capacity_; ++i, ++it) { + SET_VECTOR_ELT(data_, i, *it); + } +} + +template <> +inline r_vector::r_vector(std::initializer_list il) + : cpp11::r_vector(safe[Rf_allocVector](VECSXP, il.size())), + capacity_(il.size()) { + protect_ = protect_sexp(data_); + int n_protected = 0; + + try { + unwind_protect([&] { + Rf_setAttrib(data_, R_NamesSymbol, Rf_allocVector(STRSXP, capacity_)); + SEXP names = PROTECT(Rf_getAttrib(data_, R_NamesSymbol)); + ++n_protected; + auto it = il.begin(); + for (R_xlen_t i = 0; i < capacity_; ++i, ++it) { + SET_VECTOR_ELT(data_, i, it->value()); + SET_STRING_ELT(names, i, Rf_mkCharCE(it->name(), CE_UTF8)); + } + UNPROTECT(n_protected); + }); + } catch (const unwind_exception& e) { + release_protect(protect_); + UNPROTECT(n_protected); + throw e; + } +} + +template <> +inline void r_vector::reserve(R_xlen_t new_capacity) { + data_ = data_ == R_NilValue ? safe[Rf_allocVector](VECSXP, new_capacity) + : safe[Rf_xlengthgets](data_, new_capacity); + + SEXP old_protect = protect_; + protect_ = protect_sexp(data_); + release_protect(old_protect); + + capacity_ = new_capacity; +} + +template <> +inline void r_vector::push_back(SEXP value) { + while (length_ >= capacity_) { + reserve(capacity_ == 0 ? 1 : capacity_ *= 2); + } + SET_VECTOR_ELT(data_, length_, value); + ++length_; +} + +typedef r_vector list; + +} // namespace writable + +} // namespace cpp11 diff --git a/r/inst/include/cpp11/list_of.hpp b/r/inst/include/cpp11/list_of.hpp new file mode 100644 index 00000000000..5f77a9345cb --- /dev/null +++ b/r/inst/include/cpp11/list_of.hpp @@ -0,0 +1,53 @@ +// cpp11 version: 0.2.1.9000 +// vendored on: 2020-08-20 +#pragma once + +#include // for string, basic_string + +#include "cpp11/R.hpp" // for R_xlen_t, SEXP, SEXPREC, LONG_VECTOR_SUPPORT +#include "cpp11/list.hpp" // for list + +namespace cpp11 { + +template +class list_of : public list { + public: + list_of(const list& data) : list(data) {} + +#ifdef LONG_VECTOR_SUPPORT + T operator[](int pos) { return operator[](static_cast(pos)); } +#endif + + T operator[](R_xlen_t pos) { return list::operator[](pos); } + + T operator[](const char* pos) { return list::operator[](pos); } + + T operator[](const std::string& pos) { return list::operator[](pos.c_str()); } +}; + +namespace writable { +template +class list_of : public writable::list { + public: + list_of(const list& data) : writable::list(data) {} + list_of(R_xlen_t n) : writable::list(n) {} + +#ifdef LONG_VECTOR_SUPPORT + T operator[](int pos) { return operator[](static_cast(pos)); } +#endif + + T operator[](R_xlen_t pos) { + return static_cast(writable::list::operator[](pos)); + } + + T operator[](const char* pos) { + return static_cast(writable::list::operator[](pos)); + } + + T operator[](const std::string& pos) { + return static_cast(writable::list::operator[](pos.c_str())); + } +}; +} // namespace writable + +} // namespace cpp11 diff --git a/r/inst/include/cpp11/logicals.hpp b/r/inst/include/cpp11/logicals.hpp new file mode 100644 index 00000000000..85fbde51d6b --- /dev/null +++ b/r/inst/include/cpp11/logicals.hpp @@ -0,0 +1,140 @@ +// cpp11 version: 0.2.1.9000 +// vendored on: 2020-08-20 +#pragma once + +#include // for min +#include // for array +#include // for initializer_list + +#include "cpp11/R.hpp" // for Rboolean, SEXP, SEXPREC, Rf_all... +#include "cpp11/attribute_proxy.hpp" // for attribute_proxy +#include "cpp11/named_arg.hpp" // for named_arg +#include "cpp11/protect.hpp" // for protect_sexp, release_protect +#include "cpp11/r_vector.hpp" // for r_vector, r_vector<>::proxy +#include "cpp11/sexp.hpp" // for sexp + +// Specializations for logicals + +namespace cpp11 { + +template <> +inline SEXP r_vector::valid_type(SEXP data) { + if (TYPEOF(data) != LGLSXP) { + throw type_error(LGLSXP, TYPEOF(data)); + } + return data; +} + +template <> +inline Rboolean r_vector::operator[](const R_xlen_t pos) const { + return is_altrep_ ? static_cast(LOGICAL_ELT(data_, pos)) : data_p_[pos]; +} + +template <> +inline Rboolean* r_vector::get_p(bool is_altrep, SEXP data) { + if (is_altrep) { + return nullptr; + } else { + return reinterpret_cast(LOGICAL(data)); + } +} + +template <> +inline void r_vector::const_iterator::fill_buf(R_xlen_t pos) { + length_ = std::min(64_xl, data_->size() - pos); + LOGICAL_GET_REGION(data_->data_, pos, length_, reinterpret_cast(buf_.data())); + block_start_ = pos; +} + +typedef r_vector logicals; + +namespace writable { + +template <> +inline typename r_vector::proxy& r_vector::proxy::operator=( + const Rboolean& rhs) { + if (is_altrep_) { + SET_LOGICAL_ELT(data_, index_, rhs); + } else { + *p_ = rhs; + } + return *this; +} + +template <> +inline r_vector::proxy::operator Rboolean() const { + if (p_ == nullptr) { + return static_cast(LOGICAL_ELT(data_, index_)); + } else { + return *p_; + } +} + +template <> +inline r_vector::r_vector(std::initializer_list il) + : cpp11::r_vector(Rf_allocVector(LGLSXP, il.size())), capacity_(il.size()) { + protect_ = protect_sexp(data_); + auto it = il.begin(); + for (R_xlen_t i = 0; i < capacity_; ++i, ++it) { + SET_LOGICAL_ELT(data_, i, *it); + } +} + +template <> +inline r_vector::r_vector(std::initializer_list il) + : cpp11::r_vector(safe[Rf_allocVector](LGLSXP, il.size())), + capacity_(il.size()) { + protect_ = protect_sexp(data_); + int n_protected = 0; + + try { + unwind_protect([&] { + Rf_setAttrib(data_, R_NamesSymbol, Rf_allocVector(STRSXP, capacity_)); + SEXP names = PROTECT(Rf_getAttrib(data_, R_NamesSymbol)); + ++n_protected; + auto it = il.begin(); + for (R_xlen_t i = 0; i < capacity_; ++i, ++it) { + data_p_[i] = static_cast(LOGICAL_ELT(it->value(), 0)); + SET_STRING_ELT(names, i, Rf_mkCharCE(it->name(), CE_UTF8)); + } + UNPROTECT(n_protected); + }); + } catch (const unwind_exception& e) { + release_protect(protect_); + UNPROTECT(n_protected); + throw e; + } +} + +template <> +inline void r_vector::reserve(R_xlen_t new_capacity) { + data_ = data_ == R_NilValue ? safe[Rf_allocVector](LGLSXP, new_capacity) + : safe[Rf_xlengthgets](data_, new_capacity); + SEXP old_protect = protect_; + protect_ = protect_sexp(data_); + + release_protect(old_protect); + + data_p_ = reinterpret_cast(LOGICAL(data_)); + capacity_ = new_capacity; +} + +template <> +inline void r_vector::push_back(Rboolean value) { + while (length_ >= capacity_) { + reserve(capacity_ == 0 ? 1 : capacity_ *= 2); + } + if (is_altrep_) { + SET_LOGICAL_ELT(data_, length_, value); + } else { + data_p_[length_] = value; + } + ++length_; +} + +typedef r_vector logicals; + +} // namespace writable + +inline bool is_na(Rboolean x) { return x == NA_LOGICAL; } +} // namespace cpp11 diff --git a/r/inst/include/cpp11/matrix.hpp b/r/inst/include/cpp11/matrix.hpp new file mode 100644 index 00000000000..0a99943ec8e --- /dev/null +++ b/r/inst/include/cpp11/matrix.hpp @@ -0,0 +1,111 @@ +// cpp11 version: 0.2.1.9000 +// vendored on: 2020-08-20 +#pragma once + +#include // for string + +#include "cpp11/R.hpp" // for SEXP, SEXPREC, R_xlen_t, Rboolean, INT... +#include "cpp11/r_string.hpp" // for r_string +#include "cpp11/r_vector.hpp" // for r_vector +#include "cpp11/sexp.hpp" // for sexp + +namespace cpp11 { +template +class matrix { + private: + V vector_; + int nrow_; + + public: + class row { + private: + matrix& parent_; + int row_; + + public: + row(matrix& parent, R_xlen_t row) : parent_(parent), row_(row) {} + T operator[](const int pos) { return parent_.vector_[row_ + (pos * parent_.nrow_)]; } + + class iterator { + private: + row& row_; + int pos_; + + public: + iterator(row& row, R_xlen_t pos) : row_(row), pos_(pos) {} + iterator begin() const { return row_.parent_.vector_iterator(&this, 0); } + iterator end() const { return iterator(&this, row_.size()); } + inline iterator& operator++() { + ++pos_; + return *this; + } + bool operator!=(const iterator& rhs) { + return !(pos_ == rhs.pos_ && row_.row_ == rhs.row_.row_); + } + T operator*() const { return row_[pos_]; }; + }; + + iterator begin() { return iterator(*this, 0); } + iterator end() { return iterator(*this, size()); } + R_xlen_t size() const { return parent_.vector_.size() / parent_.nrow_; } + bool operator!=(const row& rhs) { return row_ != rhs.row_; } + row& operator++() { + ++row_; + return *this; + } + row& operator*() { return *this; } + }; + friend row; + + public: + matrix(SEXP data) : vector_(data), nrow_(INTEGER_ELT(vector_.attr("dim"), 0)) {} + + template + matrix(const cpp11::matrix& rhs) : vector_(rhs), nrow_(rhs.nrow()) {} + + matrix(int nrow, int ncol) : vector_(R_xlen_t(nrow * ncol)), nrow_(nrow) { + vector_.attr("dim") = {nrow, ncol}; + } + + int nrow() const { return nrow_; } + + int ncol() const { return size() / nrow_; } + + SEXP data() const { return vector_.data(); } + + R_xlen_t size() const { return vector_.size(); } + + operator SEXP() const { return SEXP(vector_); } + + // operator sexp() { return sexp(vector_); } + + sexp attr(const char* name) const { return SEXP(vector_.attr(name)); } + + sexp attr(const std::string& name) const { return SEXP(vector_.attr(name)); } + + sexp attr(SEXP name) const { return SEXP(vector_.attr(name)); } + + r_vector names() const { return SEXP(vector_.names()); } + + row operator[](const int pos) { return {*this, pos}; } + + T operator()(int row, int col) { return vector_[row + (col * nrow_)]; } + + row begin() { return {*this, 0}; } + row end() { return {*this, nrow_}; } +}; + +using doubles_matrix = matrix, double>; +using integers_matrix = matrix, int>; +using logicals_matrix = matrix, Rboolean>; +using strings_matrix = matrix, r_string>; + +namespace writable { +using doubles_matrix = matrix, r_vector::proxy>; +using integers_matrix = matrix, r_vector::proxy>; +using logicals_matrix = matrix, r_vector::proxy>; +using strings_matrix = matrix, r_vector::proxy>; +} // namespace writable + +// TODO: Add tests for Matrix class +} // namespace cpp11 diff --git a/r/inst/include/cpp11/named_arg.hpp b/r/inst/include/cpp11/named_arg.hpp new file mode 100644 index 00000000000..fd6b4c13785 --- /dev/null +++ b/r/inst/include/cpp11/named_arg.hpp @@ -0,0 +1,51 @@ +// cpp11 version: 0.2.1.9000 +// vendored on: 2020-08-20 +#pragma once + +#include // for size_t + +#include // for initializer_list + +#include "cpp11/R.hpp" // for SEXP, SEXPREC, literals +#include "cpp11/as.hpp" // for as_sexp + +namespace cpp11 { +class named_arg { + public: + constexpr explicit named_arg(const char* name) : name_(name), value_(nullptr) {} + named_arg& operator=(std::initializer_list il) { + value_ = as_sexp(il); + return *this; + } + + template + named_arg& operator=(T rhs) { + value_ = as_sexp(rhs); + return *this; + } + + template + named_arg& operator=(std::initializer_list rhs) { + value_ = as_sexp(rhs); + return *this; + } + + const char* name() const { return name_; } + SEXP value() const { return value_; } + + private: + const char* name_; + SEXP value_; +}; + +namespace literals { + +constexpr named_arg operator"" _nm(const char* name, std::size_t) { + return named_arg(name); +} + +} // namespace literals + +using namespace literals; + +} // namespace cpp11 diff --git a/r/inst/include/cpp11/protect.hpp b/r/inst/include/cpp11/protect.hpp new file mode 100644 index 00000000000..21a18a8e347 --- /dev/null +++ b/r/inst/include/cpp11/protect.hpp @@ -0,0 +1,286 @@ +// cpp11 version: 0.2.1.9000 +// vendored on: 2020-08-20 +#pragma once + +#include // for longjmp, setjmp, jmp_buf +#include // for exception +#include // for std::runtime_error +#include // for string, basic_string +#include // for tuple, make_tuple + +// NB: cpp11/R.hpp must precede R_ext includes so our definition of Rboolean is used +#include "cpp11/R.hpp" // for SEXP, SEXPREC, CDR, R_NilValue, CAR, R_Pres... + +#include "R_ext/Error.h" // for Rf_error, Rf_warning +#include "R_ext/Print.h" // for REprintf +#include "R_ext/Utils.h" // for R_CheckUserInterrupt +#include "Rversion.h" // for R_VERSION, R_Version + +#if defined(R_VERSION) && R_VERSION >= R_Version(3, 5, 0) +#define HAS_UNWIND_PROTECT +#endif + +namespace cpp11 { +class unwind_exception : public std::exception { + public: + SEXP token; + unwind_exception(SEXP token_) : token(token_) {} +}; + +static SEXP preserve(SEXP obj) { + PROTECT(obj); + R_PreserveObject(obj); + UNPROTECT(1); + return obj; +} + +static SEXP protect_list = preserve(Rf_cons(R_NilValue, R_NilValue)); + +inline SEXP protect_sexp(SEXP obj) { + if (obj == R_NilValue) { + return R_NilValue; + } +#ifdef CPP11_USE_PRESERVE_OBJECT + R_PreserveObject(obj); + return obj; +#endif + PROTECT(obj); + + // Add a new cell that points to the previous end. + SEXP cell = PROTECT(Rf_cons(protect_list, CDR(protect_list))); + SET_TAG(cell, obj); + + SETCDR(protect_list, cell); + if (CDR(cell) != R_NilValue) { + SETCAR(CDR(cell), cell); + } + + UNPROTECT(2); + + return cell; +} + +inline void print_protect() { + SEXP head = protect_list; + while (head != R_NilValue) { + REprintf("%x CAR: %x CDR: %x TAG: %x\n", head, CAR(head), CDR(head), TAG(head)); + head = CDR(head); + } + REprintf("---\n"); +} + +/* This is currently unused, but client packages could use it to free leaked resources in + * older R versions if needed */ +inline void release_existing_protections() { +#if !defined(CPP11_USE_PRESERVE_OBJECT) + SEXP first = CDR(protect_list); + if (first != R_NilValue) { + SETCAR(first, R_NilValue); + SETCDR(protect_list, R_NilValue); + } +#endif +} + +inline void release_protect(SEXP protect) { + if (protect == R_NilValue) { + return; + } +#ifdef CPP11_USE_PRESERVE_OBJECT + R_ReleaseObject(protect); + return; +#endif + + SEXP before = CAR(protect); + SEXP after = CDR(protect); + + if (before == R_NilValue && after == R_NilValue) { + Rf_error("should never happen"); + } + + SETCDR(before, after); + if (after != R_NilValue) { + SETCAR(after, before); + } +} + +#ifdef HAS_UNWIND_PROTECT + +/// Unwind Protection from C longjmp's, like those used in R error handling +/// +/// @param code The code to which needs to be protected, as a nullary callable +template ()()), SEXP>::value>::type> +SEXP unwind_protect(Fun&& code) { + static SEXP token = [] { + SEXP res = R_MakeUnwindCont(); + R_PreserveObject(res); + return res; + }(); + + std::jmp_buf jmpbuf; + if (setjmp(jmpbuf)) { + throw unwind_exception(token); + } + + return R_UnwindProtect( + [](void* data) -> SEXP { + auto callback = static_cast(data); + return static_cast(*callback)(); + }, + &code, + [](void* jmpbuf, Rboolean jump) { + if (jump) { + // We need to first jump back into the C++ stacks because you can't safely throw + // exceptions from C stack frames. + longjmp(*static_cast(jmpbuf), 1); + } + }, + &jmpbuf, token); +} + +template ()()), void>::value>::type> +void unwind_protect(Fun&& code) { + (void)unwind_protect([&] { + std::forward(code)(); + return R_NilValue; + }); +} + +template ()())> +typename std::enable_if::value && !std::is_same::value, + R>::type +unwind_protect(Fun&& code) { + R out; + (void)unwind_protect([&] { + out = std::forward(code)(); + return R_NilValue; + }); + return out; +} + +#else +// Don't do anything if we don't have unwind protect. This will leak C++ resources, +// including those held by cpp11 objects, but the other alternatives are also not great. +template +decltype(std::declval()()) unwind_protect(Fun&& code) { + return std::forward(code)(); +} +#endif + +namespace detail { + +template +struct index_sequence { + using type = index_sequence; +}; + +template +struct appended_sequence; + +template +struct appended_sequence, J> : index_sequence {}; + +template +struct make_index_sequence + : appended_sequence::type, N - 1> {}; + +template <> +struct make_index_sequence<0> : index_sequence<> {}; + +template +decltype(std::declval()(std::declval()...)) apply( + F&& f, std::tuple&& a, const index_sequence&) { + return std::forward(f)(std::get(std::move(a))...); +} + +template +decltype(std::declval()(std::declval()...)) apply(F&& f, + std::tuple&& a) { + return apply(std::forward(f), std::move(a), make_index_sequence{}); +} + +// overload to silence a compiler warning that the (empty) tuple parameter is set but +// unused +template +decltype(std::declval()()) apply(F&& f, std::tuple<>&&) { + return std::forward(f)(); +} + +template +struct closure { + decltype(std::declval()(std::declval()...)) operator()() && { + return apply(ptr_, std::move(arefs_)); + } + F* ptr_; + std::tuple arefs_; +}; + +} // namespace detail + +struct protect { + template + struct function { + template + decltype(std::declval()(std::declval()...)) operator()(A&&... a) const { + // workaround to support gcc4.8, which can't capture a parameter pack + return unwind_protect( + detail::closure{ptr_, std::forward_as_tuple(std::forward(a)...)}); + } + + F* ptr_; + }; + + /// May not be applied to a function bearing attributes, which interfere with linkage on + /// some compilers; use an appropriately attributed alternative. (For example, Rf_error + /// bears the [[noreturn]] attribute and must be protected with safe.noreturn rather + /// than safe.operator[]). + template + constexpr function operator[](F* raw) const { + return {raw}; + } + + template + struct noreturn_function { + template + void operator() [[noreturn]] (A&&... a) const { + // workaround to support gcc4.8, which can't capture a parameter pack + unwind_protect( + detail::closure{ptr_, std::forward_as_tuple(std::forward(a)...)}); + // Compiler hint to allow [[noreturn]] attribute; this is never executed since + // the above call will not return. + throw std::runtime_error("[[noreturn]]"); + } + F* ptr_; + }; + + template + constexpr noreturn_function noreturn(F* raw) const { + return {raw}; + } +}; +constexpr struct protect safe = {}; + +inline void check_user_interrupt() { safe[R_CheckUserInterrupt](); } + +template +void stop [[noreturn]] (const char* fmt, Args... args) { + safe.noreturn(Rf_error)(fmt, args...); +} + +template +void stop [[noreturn]] (const std::string& fmt, Args... args) { + safe.noreturn(Rf_error)(fmt.c_str(), args...); +} + +template +void warning(const char* fmt, Args... args) { + safe[Rf_warning](fmt, args...); +} + +template +void warning(const std::string& fmt, Args... args) { + safe[Rf_warning](fmt.c_str(), args...); +} + +} // namespace cpp11 diff --git a/r/inst/include/cpp11/r_string.hpp b/r/inst/include/cpp11/r_string.hpp new file mode 100644 index 00000000000..954976ddc07 --- /dev/null +++ b/r/inst/include/cpp11/r_string.hpp @@ -0,0 +1,92 @@ +// cpp11 version: 0.2.1.9000 +// vendored on: 2020-08-20 +#pragma once + +#include // for string, basic_string, operator== +#include // for is_convertible, enable_if + +#include "R_ext/Memory.h" // for vmaxget, vmaxset +#include "cpp11/R.hpp" // for SEXP, SEXPREC, Rf_mkCharCE, Rf_translat... +#include "cpp11/as.hpp" // for as_sexp +#include "cpp11/protect.hpp" // for unwind_protect, protect, protect::function +#include "cpp11/sexp.hpp" // for sexp +namespace cpp11 { + +class r_string { + public: + r_string() = default; + r_string(SEXP data) : data_(data) {} + r_string(const char* data) : data_(safe[Rf_mkCharCE](data, CE_UTF8)) {} + r_string(const std::string& data) : data_(safe[Rf_mkCharCE](data.c_str(), CE_UTF8)) {} + + operator SEXP() const { return data_; } + operator sexp() const { return data_; } + operator std::string() const { + std::string res; + res.reserve(size()); + + void* vmax = vmaxget(); + unwind_protect([&] { res.assign(Rf_translateCharUTF8(data_)); }); + vmaxset(vmax); + + return res; + } + + bool operator==(const r_string& rhs) const { return data_.data() == rhs.data_.data(); } + + bool operator==(const SEXP rhs) const { return data_.data() == rhs; } + + bool operator==(const char* rhs) const { + return static_cast(*this) == rhs; + } + + bool operator==(const std::string& rhs) const { + return static_cast(*this) == rhs; + } + + R_xlen_t size() const { return Rf_xlength(data_); } + + private: + sexp data_ = R_NilValue; +}; + +inline SEXP as_sexp(std::initializer_list il) { + R_xlen_t size = il.size(); + + sexp data; + unwind_protect([&] { + data = Rf_allocVector(STRSXP, size); + auto it = il.begin(); + for (R_xlen_t i = 0; i < size; ++i, ++it) { + if (*it == NA_STRING) { + SET_STRING_ELT(data, i, *it); + } else { + SET_STRING_ELT(data, i, Rf_mkCharCE(Rf_translateCharUTF8(*it), CE_UTF8)); + } + } + }); + return data; +} + +inline bool is_na(const r_string& x) { return x == NA_STRING; } + +template +using enable_if_r_string = enable_if_t::value, R>; + +template +enable_if_r_string as_sexp(T from) { + r_string str(from); + sexp res; + unwind_protect([&] { + res = Rf_allocVector(STRSXP, 1); + + if (str == NA_STRING) { + SET_STRING_ELT(res, 0, str); + } else { + SET_STRING_ELT(res, 0, Rf_mkCharCE(Rf_translateCharUTF8(str), CE_UTF8)); + } + }); + + return res; +} +} // namespace cpp11 diff --git a/r/inst/include/cpp11/r_vector.hpp b/r/inst/include/cpp11/r_vector.hpp new file mode 100644 index 00000000000..7ac480d0d72 --- /dev/null +++ b/r/inst/include/cpp11/r_vector.hpp @@ -0,0 +1,986 @@ +// cpp11 version: 0.2.1.9000 +// vendored on: 2020-08-20 +#pragma once + +#include // for ptrdiff_t, size_t + +#include // for max +#include // for array +#include // for snprintf +#include // for exception +#include // for initializer_list +#include // for forward_iterator_tag, random_ac... +#include // for out_of_range +#include // for string, basic_string +#include // for decay, is_same, enable_if, is_c... +#include // for declval + +#include "cpp11/R.hpp" // for R_xlen_t, SEXP, SEXPREC, Rf_xle... +#include "cpp11/attribute_proxy.hpp" // for attribute_proxy +#include "cpp11/protect.hpp" // for protect_sexp, release_protect +#include "cpp11/r_string.hpp" // for r_string +#include "cpp11/sexp.hpp" // for sexp + +namespace cpp11 { + +using namespace cpp11::literals; + +class type_error : public std::exception { + public: + type_error(int expected, int actual) : expected_(expected), actual_(actual) {} + virtual const char* what() const noexcept { + snprintf(str_, 64, "Invalid input type, expected '%s' actual '%s'", + Rf_type2char(expected_), Rf_type2char(actual_)); + return str_; + } + + private: + int expected_; + int actual_; + mutable char str_[64]; +}; + +// Forward Declarations +class named_arg; + +namespace writable { +template +class r_vector; +} // namespace writable + +// Declarations +template +class r_vector { + public: + typedef ptrdiff_t difference_type; + typedef size_t size_type; + typedef T value_type; + typedef T* pointer; + typedef T& reference; + + r_vector() = default; + + r_vector(SEXP data); + + r_vector(SEXP data, bool is_altrep); + +#ifdef LONG_VECTOR_SUPPORT + T operator[](const int pos) const; + T at(const int pos) const; +#endif + T operator[](const R_xlen_t pos) const; + T operator[](const size_type pos) const; + T operator[](const r_string& name) const; + + T at(const R_xlen_t pos) const; + T at(const size_type pos) const; + T at(const r_string& name) const; + + bool contains(const r_string& name) const; + + r_vector& operator=(const r_vector& rhs) { + SEXP old_protect = protect_; + + data_ = rhs.data_; + protect_ = protect_sexp(data_); + is_altrep_ = rhs.is_altrep_; + data_p_ = rhs.data_p_; + length_ = rhs.length_; + + release_protect(old_protect); + + return *this; + }; + + r_vector(const r_vector& rhs) { + SEXP old_protect = protect_; + + data_ = rhs.data_; + protect_ = protect_sexp(data_); + is_altrep_ = rhs.is_altrep_; + data_p_ = rhs.data_p_; + length_ = rhs.length_; + + release_protect(old_protect); + }; + + bool is_altrep() const; + + R_xlen_t size() const; + + operator SEXP() const; + + operator sexp() const; + + /// Provide access to the underlying data, mainly for interface + /// compatibility with std::vector + SEXP data() const; + + sexp attr(const char* name) const { + return SEXP(attribute_proxy>(*this, name)); + } + + sexp attr(const std::string& name) const { + return SEXP(attribute_proxy>(*this, name.c_str())); + } + + sexp attr(SEXP name) const { return SEXP(attribute_proxy>(*this, name)); } + + r_vector names() const { + SEXP nms = SEXP(attribute_proxy>(*this, R_NamesSymbol)); + if (nms == R_NilValue) { + return r_vector(); + } + + return nms; + } + + class const_iterator { + public: + using difference_type = ptrdiff_t; + using value_type = T; + using pointer = T*; + using reference = T&; + using iterator_category = std::random_access_iterator_tag; + + const_iterator(const r_vector* data, R_xlen_t pos); + + inline const_iterator& operator+(R_xlen_t pos); + inline ptrdiff_t operator-(const const_iterator& other) const; + + inline const_iterator& operator++(); + inline const_iterator& operator--(); + + inline const_iterator& operator+=(R_xlen_t pos); + inline const_iterator& operator-=(R_xlen_t pos); + + inline bool operator!=(const const_iterator& other) const; + inline bool operator==(const const_iterator& other) const; + + inline T operator*(); + + friend class writable::r_vector::iterator; + + private: + const r_vector* data_; + void fill_buf(R_xlen_t pos); + + R_xlen_t pos_; + std::array buf_; + R_xlen_t block_start_ = 0; + R_xlen_t length_ = 0; + }; + + public: + const_iterator begin() const; + const_iterator end() const; + + const_iterator cbegin() const; + const_iterator cend() const; + + const_iterator find(const r_string& name) const; + + ~r_vector() { release_protect(protect_); } + + private: + SEXP data_ = R_NilValue; + SEXP protect_ = R_NilValue; + bool is_altrep_ = false; + T* data_p_ = nullptr; + R_xlen_t length_ = 0; + + static T* get_p(bool is_altrep, SEXP data); + + static SEXP valid_type(SEXP data); + + friend class writable::r_vector; +}; + +namespace writable { + +template +using has_begin_fun = std::decay()))>; + +/// Read/write access to new or copied r_vectors +template +class r_vector : public cpp11::r_vector { + private: + SEXP protect_ = R_NilValue; + + // These are necessary because type names are not directly accessible in + // template inheritance + using cpp11::r_vector::data_; + using cpp11::r_vector::data_p_; + using cpp11::r_vector::is_altrep_; + using cpp11::r_vector::length_; + + R_xlen_t capacity_ = 0; + + public: + class proxy { + private: + const SEXP data_; + const R_xlen_t index_; + T* const p_; + bool is_altrep_; + + public: + proxy(SEXP data, const R_xlen_t index, T* const p, bool is_altrep); + + proxy& operator=(const T& rhs); + proxy& operator+=(const T& rhs); + proxy& operator-=(const T& rhs); + proxy& operator*=(const T& rhs); + proxy& operator/=(const T& rhs); + proxy& operator++(int); + proxy& operator--(int); + + void operator++(); + void operator--(); + + operator T() const; + }; + + typedef ptrdiff_t difference_type; + typedef size_t size_type; + typedef proxy value_type; + typedef proxy* pointer; + typedef proxy& reference; + + class iterator : public cpp11::r_vector::const_iterator { + private: + const r_vector& data_; + using cpp11::r_vector::const_iterator::block_start_; + using cpp11::r_vector::const_iterator::pos_; + using cpp11::r_vector::const_iterator::buf_; + using cpp11::r_vector::const_iterator::length_; + using cpp11::r_vector::const_iterator::fill_buf; + + public: + using difference_type = ptrdiff_t; + using value_type = proxy; + using pointer = proxy*; + using reference = proxy&; + using iterator_category = std::forward_iterator_tag; + + iterator(const r_vector& data, R_xlen_t pos); + + inline iterator& operator++(); + + inline proxy operator*(); + + using cpp11::r_vector::const_iterator::operator!=; + + inline iterator& operator+(R_xlen_t rhs); + }; + + r_vector() = default; + r_vector(const SEXP& data); + r_vector(SEXP&& data); + r_vector(const SEXP& data, bool is_altrep); + r_vector(SEXP&& data, bool is_altrep); + r_vector(std::initializer_list il); + r_vector(std::initializer_list il); + r_vector(std::initializer_list il); + r_vector(std::initializer_list il); + + template + r_vector(Iter first, Iter last); + + template > + r_vector(const V& obj); + + r_vector(const R_xlen_t size); + + ~r_vector(); + + r_vector(const r_vector& rhs); + r_vector(r_vector&& rhs); + + r_vector(const cpp11::r_vector& rhs); + + r_vector& operator=(const r_vector& rhs); + r_vector& operator=(r_vector&& rhs); + +#ifdef LONG_VECTOR_SUPPORT + proxy operator[](const int pos) const; + proxy at(const int pos) const; +#endif + proxy operator[](const R_xlen_t pos) const; + proxy operator[](const size_type pos) const; + proxy operator[](const r_string& name) const; + + proxy at(const R_xlen_t pos) const; + proxy at(const size_type pos) const; + proxy at(const r_string& name) const; + + void push_back(T value); + void push_back(const named_arg& value); + void pop_back(); + + void resize(R_xlen_t count); + + void reserve(R_xlen_t new_capacity); + + iterator insert(R_xlen_t pos, T value); + iterator erase(R_xlen_t pos); + + void clear(); + + iterator begin() const; + iterator end() const; + + using cpp11::r_vector::cbegin; + using cpp11::r_vector::cend; + using cpp11::r_vector::size; + + iterator find(const r_string& name) const; + + attribute_proxy> attr(const char* name) const { + return attribute_proxy>(*this, name); + } + + attribute_proxy> attr(const std::string& name) const { + return attribute_proxy>(*this, name.c_str()); + } + + attribute_proxy> attr(SEXP name) const { + return attribute_proxy>(*this, name); + } + + attribute_proxy> names() const { + return attribute_proxy>(*this, R_NamesSymbol); + } + + operator SEXP() const; +}; +} // namespace writable + +// Implementations below + +template +inline r_vector::r_vector(const SEXP data) + : data_(valid_type(data)), + protect_(protect_sexp(data)), + is_altrep_(ALTREP(data)), + data_p_(get_p(ALTREP(data), data)), + length_(Rf_xlength(data)) {} + +template +inline r_vector::r_vector(const SEXP data, bool is_altrep) + : data_(valid_type(data)), + protect_(protect_sexp(data)), + is_altrep_(is_altrep), + data_p_(get_p(is_altrep, data)), + length_(Rf_xlength(data)) {} + +template +inline bool r_vector::is_altrep() const { + return is_altrep_; +} + +template +inline R_xlen_t r_vector::size() const { + return length_; +} + +template +inline r_vector::operator SEXP() const { + return data_; +} + +template +inline r_vector::operator sexp() const { + return data_; +} + +/// Provide access to the underlying data, mainly for interface +/// compatibility with std::vector +template +inline SEXP r_vector::data() const { + return data_; +} + +template +inline typename r_vector::const_iterator r_vector::begin() const { + return const_iterator(this, 0); +} + +template +inline typename r_vector::const_iterator r_vector::end() const { + return const_iterator(this, length_); +} + +template +inline typename r_vector::const_iterator r_vector::cbegin() const { + return const_iterator(this, 0); +} + +template +inline typename r_vector::const_iterator r_vector::cend() const { + return const_iterator(this, length_); +} + +template +r_vector::const_iterator::const_iterator(const r_vector* data, R_xlen_t pos) + : data_(data), pos_(pos), buf_() { + if (data_->is_altrep()) { + fill_buf(pos); + } +} + +template +inline typename r_vector::const_iterator& r_vector::const_iterator::operator++() { + ++pos_; + if (data_->is_altrep() && pos_ >= block_start_ + length_) { + fill_buf(pos_); + } + return *this; +} + +template +inline typename r_vector::const_iterator& r_vector::const_iterator::operator--() { + --pos_; + if (data_->is_altrep() && pos_ > 0 && pos_ < block_start_) { + fill_buf(std::max(0_xl, pos_ - 64)); + } + return *this; +} + +template +inline typename r_vector::const_iterator& r_vector::const_iterator::operator+=( + R_xlen_t i) { + pos_ += i; + if (data_->is_altrep() && pos_ >= block_start_ + length_) { + fill_buf(pos_); + } + return *this; +} + +template +inline typename r_vector::const_iterator& r_vector::const_iterator::operator-=( + R_xlen_t i) { + pos_ -= i; + if (data_->is_altrep() && pos_ >= block_start_ + length_) { + fill_buf(std::max(0_xl, pos_ - 64)); + } + return *this; +} + +template +inline bool r_vector::const_iterator::operator!=( + const r_vector::const_iterator& other) const { + return pos_ != other.pos_; +} + +template +inline bool r_vector::const_iterator::operator==( + const r_vector::const_iterator& other) const { + return pos_ == other.pos_; +} + +template +inline ptrdiff_t r_vector::const_iterator::operator-( + const r_vector::const_iterator& other) const { + return pos_ - other.pos_; +} + +template +inline typename r_vector::const_iterator& r_vector::const_iterator::operator+( + R_xlen_t rhs) { + pos_ += rhs; + if (data_->is_altrep() && pos_ >= block_start_ + length_) { + fill_buf(pos_); + } + return *this; +} + +template +inline T cpp11::r_vector::at(R_xlen_t pos) const { + if (pos < 0 || pos >= length_) { + throw std::out_of_range("r_vector"); + } + + return operator[](pos); +} + +template +inline T cpp11::r_vector::at(size_type pos) const { + return at(static_cast(pos)); +} + +template +inline T cpp11::r_vector::operator[](const r_string& name) const { + SEXP names = this->names(); + R_xlen_t size = Rf_xlength(names); + + for (R_xlen_t pos = 0; pos < size; ++pos) { + auto cur = Rf_translateCharUTF8(STRING_ELT(names, pos)); + if (name == cur) { + return operator[](pos); + } + } + + throw std::out_of_range("r_vector"); +} + +template +inline bool cpp11::r_vector::contains(const r_string& name) const { + SEXP names = this->names(); + R_xlen_t size = Rf_xlength(names); + + for (R_xlen_t pos = 0; pos < size; ++pos) { + auto cur = Rf_translateCharUTF8(STRING_ELT(names, pos)); + if (name == cur) { + return true; + } + } + + return false; +} + +template +inline typename cpp11::r_vector::const_iterator cpp11::r_vector::find( + const r_string& name) const { + SEXP names = this->names(); + R_xlen_t size = Rf_xlength(names); + + for (R_xlen_t pos = 0; pos < size; ++pos) { + auto cur = Rf_translateCharUTF8(STRING_ELT(names, pos)); + if (name == cur) { + return begin() + pos; + } + } + + return end(); +} + +template +inline T r_vector::const_iterator::operator*() { + if (data_->is_altrep()) { + return buf_[pos_ - block_start_]; + } else { + return data_->data_p_[pos_]; + } +} + +#ifdef LONG_VECTOR_SUPPORT +template +inline T r_vector::operator[](const int pos) const { + return operator[](static_cast(pos)); +} + +template +inline T r_vector::at(const int pos) const { + return at(static_cast(pos)); +} +#endif + +template +inline T r_vector::operator[](size_type pos) const { + return operator[](static_cast(pos)); +} + +namespace writable { + +template +r_vector::proxy::proxy(SEXP data, const R_xlen_t index, T* const p, bool is_altrep) + : data_(data), index_(index), p_(p), is_altrep_(is_altrep) {} + +template +inline typename r_vector::proxy r_vector::iterator::operator*() { + if (data_.is_altrep()) { + return proxy(data_.data(), pos_, &buf_[pos_ - block_start_], true); + } else { + return proxy(data_.data(), pos_, + data_.data_p_ != nullptr ? &data_.data_p_[pos_] : nullptr, false); + } +} + +template +r_vector::iterator::iterator(const r_vector& data, R_xlen_t pos) + : r_vector::const_iterator(&data, pos), data_(data) {} + +template +inline typename r_vector::iterator& r_vector::iterator::operator++() { + ++pos_; + if (data_.is_altrep() && pos_ >= block_start_ + length_) { + fill_buf(pos_); + } + return *this; +} + +template +inline typename r_vector::iterator& r_vector::iterator::operator+(R_xlen_t rhs) { + pos_ += rhs; + if (data_.is_altrep() && pos_ >= block_start_ + length_) { + fill_buf(pos_); + } + return *this; +} + +template +inline typename r_vector::iterator r_vector::begin() const { + return iterator(*this, 0); +} + +template +inline typename r_vector::iterator r_vector::end() const { + return iterator(*this, length_); +} + +template +inline r_vector::r_vector(const SEXP& data) + : cpp11::r_vector(safe[Rf_shallow_duplicate](data)), + protect_(protect_sexp(data_)), + capacity_(length_) {} + +template +inline r_vector::r_vector(const SEXP& data, bool is_altrep) + : cpp11::r_vector(safe[Rf_shallow_duplicate](data), is_altrep), + protect_(protect_sexp(data_)), + capacity_(length_) {} + +template +inline r_vector::r_vector(SEXP&& data) + : cpp11::r_vector(data), protect_(protect_sexp(data_)), capacity_(length_) {} + +template +inline r_vector::r_vector(SEXP&& data, bool is_altrep) + : cpp11::r_vector(data, is_altrep), + protect_(protect_sexp(data_)), + capacity_(length_) {} + +template +template +inline r_vector::r_vector(Iter first, Iter last) : r_vector() { + reserve(last - first); + while (first != last) { + push_back(*first); + ++first; + } +} + +template +template +inline r_vector::r_vector(const V& obj) : r_vector() { + auto first = obj.begin(); + auto last = obj.end(); + reserve(last - first); + while (first != last) { + push_back(*first); + ++first; + } +} + +template +inline r_vector::r_vector(R_xlen_t size) : r_vector() { + resize(size); +} + +template +inline r_vector::~r_vector() { + release_protect(protect_); +} + +#ifdef LONG_VECTOR_SUPPORT +template +inline typename r_vector::proxy r_vector::operator[](const int pos) const { + return operator[](static_cast(pos)); +} + +template +inline typename r_vector::proxy r_vector::at(const int pos) const { + return at(static_cast(pos)); +} +#endif + +template +inline typename r_vector::proxy r_vector::operator[](const R_xlen_t pos) const { + if (is_altrep_) { + return {data_, pos, nullptr, true}; + } + return {data_, pos, data_p_ != nullptr ? &data_p_[pos] : nullptr, false}; +} + +template +inline typename r_vector::proxy r_vector::operator[](size_type pos) const { + return operator[](static_cast(pos)); +} + +template +inline typename r_vector::proxy r_vector::at(const R_xlen_t pos) const { + if (pos < 0 || pos >= length_) { + throw std::out_of_range("r_vector"); + } + return operator[](static_cast(pos)); +} + +template +inline typename r_vector::proxy r_vector::at(size_type pos) const { + return at(static_cast(pos)); +} + +template +inline typename r_vector::proxy r_vector::operator[](const r_string& name) const { + SEXP names = PROTECT(this->names()); + R_xlen_t size = Rf_xlength(names); + + for (R_xlen_t pos = 0; pos < size; ++pos) { + auto cur = Rf_translateCharUTF8(STRING_ELT(names, pos)); + if (name == cur) { + UNPROTECT(1); + return operator[](pos); + } + } + + UNPROTECT(1); + throw std::out_of_range("r_vector"); +} + +template +inline typename r_vector::proxy r_vector::at(const r_string& name) const { + return operator[](name); +} + +template +inline typename r_vector::iterator r_vector::find(const r_string& name) const { + SEXP names = PROTECT(this->names()); + R_xlen_t size = Rf_xlength(names); + + for (R_xlen_t pos = 0; pos < size; ++pos) { + auto cur = Rf_translateCharUTF8(STRING_ELT(names, pos)); + if (name == cur) { + UNPROTECT(1); + return begin() + pos; + } + } + + UNPROTECT(1); + return end(); +} + +template +inline r_vector::r_vector(const r_vector& rhs) + : cpp11::r_vector(safe[Rf_shallow_duplicate](rhs)), + protect_(protect_sexp(data_)), + capacity_(rhs.capacity_) {} + +template +inline r_vector::r_vector(r_vector&& rhs) + : cpp11::r_vector(rhs), protect_(protect_sexp(data_)), capacity_(rhs.capacity_) { + rhs.data_ = R_NilValue; + rhs.protect_ = R_NilValue; +} + +template +inline r_vector::r_vector(const cpp11::r_vector& rhs) + : cpp11::r_vector(safe[Rf_shallow_duplicate](rhs)), + protect_(protect_sexp(data_)), + capacity_(rhs.length_) {} + +// We don't release the old object until the end in case we throw an exception +// during the duplicate. +template +inline r_vector& r_vector::operator=(const r_vector& rhs) { + if (data_ == rhs.data_) { + return *this; + } + + cpp11::r_vector::operator=(rhs); + + auto old_protect = protect_; + + data_ = safe[Rf_shallow_duplicate](rhs.data_); + protect_ = protect_sexp(data_); + + release_protect(old_protect); + + capacity_ = rhs.capacity_; + + return *this; +} + +template +inline r_vector& r_vector::operator=(r_vector&& rhs) { + if (data_ == rhs.data_) { + return *this; + } + + cpp11::r_vector::operator=(rhs); + + SEXP old_protect = protect_; + + data_ = rhs.data_; + protect_ = protect_sexp(data_); + + release_protect(old_protect); + + capacity_ = rhs.capacity_; + + rhs.data_ = R_NilValue; + rhs.protect_ = R_NilValue; + + return *this; +} + +template +inline void r_vector::pop_back() { + --length_; +} + +template +inline void r_vector::resize(R_xlen_t count) { + reserve(count); + length_ = count; +} + +template +inline typename r_vector::iterator r_vector::insert(R_xlen_t pos, T value) { + push_back(value); + + R_xlen_t i = length_ - 1; + while (i > pos) { + operator[](i) = (T) operator[](i - 1); + --i; + }; + operator[](pos) = value; + + return begin() + pos; +} + +template +inline typename r_vector::iterator r_vector::erase(R_xlen_t pos) { + R_xlen_t i = pos; + while (i < length_ - 1) { + operator[](i) = (T) operator[](i + 1); + ++i; + } + pop_back(); + + return begin() + pos; +} + +template +inline void r_vector::clear() { + length_ = 0; +} + +template +inline r_vector::operator SEXP() const { + if (length_ < capacity_) { + SETLENGTH(data_, length_); + } + return data_; +} + +template +inline typename r_vector::proxy& r_vector::proxy::operator+=(const T& rhs) { + operator=(static_cast(*this) + rhs); + return *this; +} + +template +inline typename r_vector::proxy& r_vector::proxy::operator-=(const T& rhs) { + operator=(static_cast(*this) - rhs); + return *this; +} + +template +inline typename r_vector::proxy& r_vector::proxy::operator*=(const T& rhs) { + operator=(static_cast(*this) * rhs); + return *this; +} + +template +inline typename r_vector::proxy& r_vector::proxy::operator/=(const T& rhs) { + operator=(static_cast(*this) / rhs); + return *this; +} + +template +inline typename r_vector::proxy& r_vector::proxy::operator++(int) { + operator=(static_cast(*this) + 1); + return *this; +} + +template +inline typename r_vector::proxy& r_vector::proxy::operator--(int) { + operator=(static_cast(*this) - 1); + return *this; +} + +template +inline void r_vector::proxy::operator--() { + operator=(static_cast(*this) - 1); +} + +template +inline void r_vector::proxy::operator++() { + operator=(static_cast(*this) + 1); +} + +} // namespace writable + +// TODO: is there a better condition we could use, e.g. assert something true +// rather than three things false? +template +using is_container_but_not_sexp_or_string = typename std::enable_if< + !std::is_constructible::value && + !std::is_same::type, std::string>::value && + !std::is_same::type, std::string>::value, + typename std::decay::type>::type; + +template ::type::value_type> +// typename T = typename C::value_type> +is_container_but_not_sexp_or_string as_cpp(SEXP from) { + auto obj = cpp11::r_vector(from); + return {obj.begin(), obj.end()}; +} + +// TODO: could we make this generalize outside of std::string? +template +using is_vector_of_strings = typename std::enable_if< + std::is_same::type, std::string>::value, + typename std::decay::type>::type; + +template ::type::value_type> +// typename T = typename C::value_type> +is_vector_of_strings as_cpp(SEXP from) { + auto obj = cpp11::r_vector(from); + typename std::decay::type res; + auto it = obj.begin(); + while (it != obj.end()) { + r_string s = *it; + res.emplace_back(static_cast(s)); + ++it; + } + return res; +} + +template +bool operator==(const r_vector& lhs, const r_vector& rhs) { + if (lhs.size() != rhs.size()) { + return false; + } + + auto lhs_it = lhs.begin(); + auto rhs_it = rhs.begin(); + + auto end = lhs.end(); + while (lhs_it != end) { + if (!(*lhs_it == *rhs_it)) { + return false; + } + ++lhs_it; + ++rhs_it; + } + return true; +} + +template +bool operator!=(const r_vector& lhs, const r_vector& rhs) { + return !(lhs == rhs); +} + +} // namespace cpp11 diff --git a/r/inst/include/cpp11/raws.hpp b/r/inst/include/cpp11/raws.hpp new file mode 100644 index 00000000000..e3a38394e02 --- /dev/null +++ b/r/inst/include/cpp11/raws.hpp @@ -0,0 +1,148 @@ +// cpp11 version: 0.2.1.9000 +// vendored on: 2020-08-20 +#pragma once + +#include // for min +#include // for array +#include // for uint8_t +#include // for initializer_list + +#include "cpp11/R.hpp" // for RAW, SEXP, SEXPREC, Rf_allocVector +#include "cpp11/attribute_proxy.hpp" // for attribute_proxy +#include "cpp11/named_arg.hpp" // for named_arg +#include "cpp11/protect.hpp" // for protect_sexp, release_protect +#include "cpp11/r_vector.hpp" // for r_vector, r_vector<>::proxy +#include "cpp11/sexp.hpp" // for sexp + +// Specializations for raws + +namespace cpp11 { + +template <> +inline SEXP r_vector::valid_type(SEXP data) { + if (TYPEOF(data) != RAWSXP) { + throw type_error(RAWSXP, TYPEOF(data)); + } + return data; +} + +template <> +inline uint8_t r_vector::operator[](const R_xlen_t pos) const { + // NOPROTECT: likely too costly to unwind protect every elt + return is_altrep_ ? RAW_ELT(data_, pos) : data_p_[pos]; +} + +template <> +inline uint8_t* r_vector::get_p(bool is_altrep, SEXP data) { + if (is_altrep) { + return nullptr; + } else { + return reinterpret_cast(RAW(data)); + } +} + +template <> +inline void r_vector::const_iterator::fill_buf(R_xlen_t pos) { + using namespace cpp11::literals; + length_ = std::min(64_xl, data_->size() - pos); + unwind_protect( + [&] { RAW_GET_REGION(data_->data_, pos, length_, (uint8_t*)buf_.data()); }); + block_start_ = pos; +} + +typedef r_vector raws; + +namespace writable { + +template <> +inline typename r_vector::proxy& r_vector::proxy::operator=( + const uint8_t& rhs) { + if (is_altrep_) { + // NOPROTECT: likely too costly to unwind protect every set elt + RAW(data_)[index_] = rhs; + } else { + *p_ = rhs; + } + return *this; +} + +template <> +inline r_vector::proxy::operator uint8_t() const { + if (p_ == nullptr) { + // NOPROTECT: likely too costly to unwind protect every elt + return RAW(data_)[index_]; + } else { + return *p_; + } +} + +template <> +inline r_vector::r_vector(std::initializer_list il) + : cpp11::r_vector(safe[Rf_allocVector](RAWSXP, il.size())), + capacity_(il.size()) { + protect_ = protect_sexp(data_); + auto it = il.begin(); + for (R_xlen_t i = 0; i < capacity_; ++i, ++it) { + data_p_[i] = *it; + } +} + +template <> +inline r_vector::r_vector(std::initializer_list il) + : cpp11::r_vector(safe[Rf_allocVector](RAWSXP, il.size())), + capacity_(il.size()) { + protect_ = protect_sexp(data_); + int n_protected = 0; + + try { + unwind_protect([&] { + Rf_setAttrib(data_, R_NamesSymbol, Rf_allocVector(STRSXP, capacity_)); + SEXP names = PROTECT(Rf_getAttrib(data_, R_NamesSymbol)); + ++n_protected; + + auto it = il.begin(); + for (R_xlen_t i = 0; i < capacity_; ++i, ++it) { + data_p_[i] = RAW_ELT(it->value(), 0); + SET_STRING_ELT(names, i, Rf_mkCharCE(it->name(), CE_UTF8)); + } + UNPROTECT(n_protected); + }); + } catch (const unwind_exception& e) { + release_protect(protect_); + UNPROTECT(n_protected); + throw e; + } +} + +template <> +inline void r_vector::reserve(R_xlen_t new_capacity) { + data_ = data_ == R_NilValue ? safe[Rf_allocVector](RAWSXP, new_capacity) + : safe[Rf_xlengthgets](data_, new_capacity); + + SEXP old_protect = protect_; + protect_ = protect_sexp(data_); + release_protect(old_protect); + + data_p_ = reinterpret_cast(RAW(data_)); + capacity_ = new_capacity; +} + +template <> +inline void r_vector::push_back(uint8_t value) { + while (length_ >= capacity_) { + reserve(capacity_ == 0 ? 1 : capacity_ *= 2); + } + if (is_altrep_) { + // NOPROTECT: likely too costly to unwind protect every elt + RAW(data_)[length_] = value; + } else { + data_p_[length_] = value; + } + ++length_; +} + +typedef r_vector raws; + +} // namespace writable + +} // namespace cpp11 diff --git a/r/inst/include/cpp11/sexp.hpp b/r/inst/include/cpp11/sexp.hpp new file mode 100644 index 00000000000..4c1ef58c097 --- /dev/null +++ b/r/inst/include/cpp11/sexp.hpp @@ -0,0 +1,79 @@ +// cpp11 version: 0.2.1.9000 +// vendored on: 2020-08-20 +#pragma once + +#include // for size_t + +#include // for string, basic_string + +#include "cpp11/R.hpp" // for SEXP, SEXPREC, REAL_ELT, R_NilV... +#include "cpp11/attribute_proxy.hpp" // for attribute_proxy +#include "cpp11/protect.hpp" // for protect_sexp, release_protect + +namespace cpp11 { + +/// Converting to SEXP +class sexp { + private: + SEXP data_ = R_NilValue; + SEXP protect_ = R_NilValue; + + public: + sexp() = default; + sexp(SEXP data) : data_(data), protect_(protect_sexp(data_)) { + // REprintf("created %x %x : %i\n", data_, protect_, protect_head_size()); + } + sexp(const sexp& rhs) { + data_ = rhs.data_; + protect_ = protect_sexp(data_); + // REprintf("copied %x new protect %x : %i\n", rhs.data_, protect_, + // protect_head_size()); + } + sexp(sexp&& rhs) { + data_ = rhs.data_; + protect_ = rhs.protect_; + + rhs.data_ = R_NilValue; + rhs.protect_ = R_NilValue; + + // REprintf("moved %x : %i\n", rhs.data_, protect_head_size()); + } + sexp& operator=(const sexp& rhs) { + data_ = rhs.data_; + protect_ = protect_sexp(data_); + // REprintf("assigned %x : %i\n", rhs.data_, protect_head_size()); + return *this; + } + + // void swap(sexp& rhs) { + // sexp tmp(rhs); + // rhs = *this; + //*this = tmp; + //} + + ~sexp() { release_protect(protect_); } + + attribute_proxy attr(const char* name) const { + return attribute_proxy(*this, name); + } + + attribute_proxy attr(const std::string& name) const { + return attribute_proxy(*this, name.c_str()); + } + + attribute_proxy attr(SEXP name) const { + return attribute_proxy(*this, name); + } + + attribute_proxy names() const { + return attribute_proxy(*this, R_NamesSymbol); + } + + operator SEXP() const { return data_; } + operator double() const { return REAL_ELT(data_, 0); } + operator size_t() const { return REAL_ELT(data_, 0); } + operator bool() const { return LOGICAL_ELT(data_, 0); } + SEXP data() const { return data_; } +}; + +} // namespace cpp11 diff --git a/r/inst/include/cpp11/strings.hpp b/r/inst/include/cpp11/strings.hpp new file mode 100644 index 00000000000..e54e9296992 --- /dev/null +++ b/r/inst/include/cpp11/strings.hpp @@ -0,0 +1,187 @@ +// cpp11 version: 0.2.1.9000 +// vendored on: 2020-08-20 +#pragma once + +#include // for initializer_list +#include // for string, basic_string + +#include "cpp11/R.hpp" // for SEXP, TYPEOF, SEXPREC, SET_STRI... +#include "cpp11/as.hpp" // for as_sexp +#include "cpp11/attribute_proxy.hpp" // for attribute_proxy +#include "cpp11/named_arg.hpp" // for named_arg +#include "cpp11/protect.hpp" // for protect_sexp, unwind_protect +#include "cpp11/r_string.hpp" // for r_string +#include "cpp11/r_vector.hpp" // for r_vector, r_vector<>::proxy +#include "cpp11/sexp.hpp" // for sexp + +// Specializations for strings + +namespace cpp11 { + +template <> +inline SEXP r_vector::valid_type(SEXP data) { + if (TYPEOF(data) != STRSXP) { + throw type_error(STRSXP, TYPEOF(data)); + } + return data; +} + +template <> +inline r_string r_vector::operator[](const R_xlen_t pos) const { + // NOPROTECT: likely too costly to unwind protect every elt + return STRING_ELT(data_, pos); +} + +template <> +inline r_string* r_vector::get_p(bool, SEXP) { + return nullptr; +} + +template <> +inline void r_vector::const_iterator::fill_buf(R_xlen_t) { + return; +} + +template <> +inline r_string r_vector::const_iterator::operator*() { + return STRING_ELT(data_->data(), pos_); +} + +typedef r_vector strings; + +namespace writable { + +template <> +inline typename r_vector::proxy& r_vector::proxy::operator=( + const r_string& rhs) { + unwind_protect([&] { SET_STRING_ELT(data_, index_, rhs); }); + return *this; +} + +template <> +inline r_vector::proxy::operator r_string() const { + // NOPROTECT: likely too costly to unwind protect every elt + return STRING_ELT(data_, index_); +} + +inline bool operator==(const r_vector::proxy& lhs, r_string rhs) { + return static_cast(lhs).operator==(static_cast(rhs).c_str()); +} + +inline SEXP alloc_or_copy(const SEXP data) { + switch (TYPEOF(data)) { + case CHARSXP: + return cpp11::r_vector(safe[Rf_allocVector](STRSXP, 1)); + case STRSXP: + return safe[Rf_shallow_duplicate](data); + default: + throw type_error(STRSXP, TYPEOF(data)); + } +} + +inline SEXP alloc_if_charsxp(const SEXP data) { + switch (TYPEOF(data)) { + case CHARSXP: + return cpp11::r_vector(safe[Rf_allocVector](STRSXP, 1)); + case STRSXP: + return data; + default: + throw type_error(STRSXP, TYPEOF(data)); + } +} + +template <> +inline r_vector::r_vector(const SEXP& data) + : cpp11::r_vector(alloc_or_copy(data)), + protect_(protect_sexp(data_)), + capacity_(length_) { + if (TYPEOF(data) == CHARSXP) { + SET_STRING_ELT(data_, 0, data); + } +} + +template <> +inline r_vector::r_vector(SEXP&& data) + : cpp11::r_vector(alloc_if_charsxp(data)), + protect_(protect_sexp(data_)), + capacity_(length_) { + if (TYPEOF(data) == CHARSXP) { + SET_STRING_ELT(data_, 0, data); + } +} + +template <> +inline r_vector::r_vector(std::initializer_list il) + : cpp11::r_vector(as_sexp(il)), capacity_(il.size()) {} + +template <> +inline r_vector::r_vector(std::initializer_list il) + : cpp11::r_vector(as_sexp(il)), capacity_(il.size()) {} + +template <> +inline r_vector::r_vector(std::initializer_list il) + : cpp11::r_vector(as_sexp(il)), capacity_(il.size()) {} + +template <> +inline r_vector::r_vector(std::initializer_list il) + : cpp11::r_vector(safe[Rf_allocVector](STRSXP, il.size())), + capacity_(il.size()) { + protect_ = protect_sexp(data_); + int n_protected = 0; + + try { + unwind_protect([&] { + Rf_setAttrib(data_, R_NamesSymbol, Rf_allocVector(STRSXP, capacity_)); + SEXP names = PROTECT(Rf_getAttrib(data_, R_NamesSymbol)); + ++n_protected; + auto it = il.begin(); + for (R_xlen_t i = 0; i < capacity_; ++i, ++it) { + SET_STRING_ELT(data_, i, STRING_ELT(it->value(), 0)); + SET_STRING_ELT(names, i, Rf_mkCharCE(it->name(), CE_UTF8)); + } + UNPROTECT(n_protected); + }); + } catch (const unwind_exception& e) { + release_protect(protect_); + UNPROTECT(n_protected); + throw e; + } +} + +template <> +inline void r_vector::reserve(R_xlen_t new_capacity) { + data_ = data_ == R_NilValue ? safe[Rf_allocVector](STRSXP, new_capacity) + : safe[Rf_xlengthgets](data_, new_capacity); + + SEXP old_protect = protect_; + protect_ = protect_sexp(data_); + release_protect(old_protect); + + capacity_ = new_capacity; +} + +template <> +inline void r_vector::push_back(r_string value) { + while (length_ >= capacity_) { + reserve(capacity_ == 0 ? 1 : capacity_ *= 2); + } + unwind_protect([&] { SET_STRING_ELT(data_, length_, value); }); + ++length_; +} + +typedef r_vector strings; + +template +inline void r_vector::push_back(const named_arg& value) { + push_back(value.value()); + if (Rf_xlength(names()) == 0) { + cpp11::writable::strings new_nms(size()); + names() = new_nms; + } + cpp11::writable::strings nms(names()); + nms[size() - 1] = value.name(); +} + +} // namespace writable + +} // namespace cpp11 From 701e35e264f6aca9f8f4d59f1531518cca8e5268 Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Thu, 20 Aug 2020 16:27:21 +0200 Subject: [PATCH 60/62] ignore vendored cpp11 files --- dev/release/rat_exclude_files.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dev/release/rat_exclude_files.txt b/dev/release/rat_exclude_files.txt index 94ae48e992a..81e2b1aeadf 100644 --- a/dev/release/rat_exclude_files.txt +++ b/dev/release/rat_exclude_files.txt @@ -248,6 +248,8 @@ r/man/*.Rd r/cran-comments.md r/vignettes/*.Rmd r/tests/testthat/test-*.txt +r/inst/include/cpp11.hpp +r/inst/include/cpp11/*.hpp .gitattributes ruby/red-arrow/.yardopts rust/arrow/test/data/*.csv From 9a993cc4e4dc521ef92fa7364323ea7e1310187f Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Thu, 20 Aug 2020 16:41:33 +0200 Subject: [PATCH 61/62] LinkingTo: self --- r/src/Makevars.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r/src/Makevars.in b/r/src/Makevars.in index 9a9191dca86..ec61ef89af9 100644 --- a/r/src/Makevars.in +++ b/r/src/Makevars.in @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. -PKG_CPPFLAGS=@cflags@ +PKG_CPPFLAGS=@cflags@ -I../inst/include/ # `-fvisibility=hidden` does not play well with UBSAN: # https://bugs.llvm.org/show_bug.cgi?id=39191 # https://www.mail-archive.com/gcc-bugs@gcc.gnu.org/msg534862.html From bb0371b4d340effc8b26e60a1cf8c779d8c4f5b3 Mon Sep 17 00:00:00 2001 From: Neal Richardson Date: Mon, 24 Aug 2020 16:21:15 -0700 Subject: [PATCH 62/62] :newspaper: and python test tweak --- r/NEWS.md | 4 ++++ r/tests/testthat/test-python.R | 2 ++ 2 files changed, 6 insertions(+) diff --git a/r/NEWS.md b/r/NEWS.md index 86e15a2d1f4..ca668a7c158 100644 --- a/r/NEWS.md +++ b/r/NEWS.md @@ -35,6 +35,10 @@ * S3 support is now enabled in binary macOS and Windows (Rtools40 only, i.e. R >= 4.0) packages +## Other improvements + +* `arrow` now depends on [`cpp11`](https://cpp11.r-lib.org/), which brings more robust UTF-8 handling and faster compilation + # arrow 1.0.1 ## Bug fixes diff --git a/r/tests/testthat/test-python.R b/r/tests/testthat/test-python.R index df910169052..6184f69c923 100644 --- a/r/tests/testthat/test-python.R +++ b/r/tests/testthat/test-python.R @@ -25,6 +25,8 @@ test_that("install_pyarrow", { # Bail out if virtualenv isn't available skip_if(inherits(venv, "try-error")) expect_error(install_pyarrow("arrow-test", nightly = TRUE), NA) + # Set this up for the following tests + reticulate::use_virtualenv("arrow-test") }) test_that("Array from Python", {