From 6af6955acd50b4d72269e5fe7644711ba2f0eaa9 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Mon, 18 Jul 2022 09:28:08 -0300 Subject: [PATCH 01/39] backport improvements from UDFs PR --- r/src/safe-call-into-r-impl.cpp | 14 +++++++++++++ r/src/safe-call-into-r.h | 35 ++++++++++++++++++++++++++++++++- 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/r/src/safe-call-into-r-impl.cpp b/r/src/safe-call-into-r-impl.cpp index 6b3ebc9fccb..2c7bd77fb6d 100644 --- a/r/src/safe-call-into-r-impl.cpp +++ b/r/src/safe-call-into-r-impl.cpp @@ -29,6 +29,20 @@ MainRThread& GetMainRThread() { // [[arrow::export]] void InitializeMainRThread() { GetMainRThread().Initialize(); } +bool CanRunWithCapturedR() { +#if defined(HAS_UNWIND_PROTECT) + static int on_old_windows = -1; + if (on_old_windows == -1) { + cpp11::function on_old_windows_fun = cpp11::package("arrow")["on_old_windows"]; + on_old_windows = on_old_windows_fun(); + } + + return !on_old_windows; +#else + return false; +#endif +} + // [[arrow::export]] bool CanRunWithCapturedR() { #if defined(HAS_UNWIND_PROTECT) diff --git a/r/src/safe-call-into-r.h b/r/src/safe-call-into-r.h index 5e24a3892b1..a2cb7c4f6b5 100644 --- a/r/src/safe-call-into-r.h +++ b/r/src/safe-call-into-r.h @@ -216,4 +216,37 @@ static inline arrow::Status RunWithCapturedRIfPossibleVoid( return arrow::Status::OK(); } -#endif +// Performs an Arrow call (e.g., run an exec plan) in such a way that background threads +// can use SafeCallIntoR(). This version is useful for Arrow calls that do not already +// return a Future<>(). If it is not possible to use RunWithCapturedR() (i.e., +// CanRunWithCapturedR() returns false), this will run make_arrow_call on the main +// R thread (which will cause background threads that try to SafeCallIntoR() to +// error). +template +arrow::Result RunWithCapturedRIfPossible( + std::function()> make_arrow_call) { + if (CanRunWithCapturedR()) { + // Note that the use of the io_context here is arbitrary (i.e. we could use + // any construct that launches a background thread). + const auto& io_context = arrow::io::default_io_context(); + return RunWithCapturedR([&]() { + return DeferNotOk(io_context.executor()->Submit(std::move(make_arrow_call))); + }); + } else { + return make_arrow_call(); + } +} + +// Like RunWithCapturedRIfPossible<>() but for arrow calls that don't return +// a Result. +static inline arrow::Status RunWithCapturedRIfPossibleVoid( + std::function make_arrow_call) { + auto result = RunWithCapturedRIfPossible([&]() -> arrow::Result { + ARROW_RETURN_NOT_OK(make_arrow_call()); + return true; + }); + ARROW_RETURN_NOT_OK(result); + return arrow::Status::OK(); +} + +#endif \ No newline at end of file From a3d25678837bc1a33d20ec2f631b68c3094bb256 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Mon, 18 Jul 2022 11:43:46 -0300 Subject: [PATCH 02/39] maybe basic signal handling overriding --- r/src/safe-call-into-r-impl.cpp | 40 ++++++++++++++++++++++++++++++++ r/src/safe-call-into-r.h | 41 +++++++++++++++++++++++++++++++-- 2 files changed, 79 insertions(+), 2 deletions(-) diff --git a/r/src/safe-call-into-r-impl.cpp b/r/src/safe-call-into-r-impl.cpp index 2c7bd77fb6d..ce0025dbc42 100644 --- a/r/src/safe-call-into-r-impl.cpp +++ b/r/src/safe-call-into-r-impl.cpp @@ -18,9 +18,17 @@ #include "./arrow_types.h" #include "./safe-call-into-r.h" +#include #include #include +// for SignalInterruptCondition() +#ifdef _WIN32 +#include +#else +#include +#endif + MainRThread& GetMainRThread() { static MainRThread main_r_thread; return main_r_thread; @@ -43,6 +51,38 @@ bool CanRunWithCapturedR() { #endif } +void SignalInterruptCondition() { +#ifdef _WIN32 + UserBreak = 1; + R_CheckUserInterrupt(); +#else + Rf_onintr(); +#endif +} + +void OverridingSignalHandler(int sig) { + auto main_r_thread = GetMainRThread(); + + if (!main_r_thread.IsExecutingSafeCallIntoR() && !main_r_thread.HasError() && + sig == SIGINT) { + main_r_thread.SetError(arrow::Status::Cancelled("User interrupt")); + } else { + main_r_thread.CallPreviousSignalHandler(sig); + } +} + +void MainRThread::SetOverrideInterruptSignal(bool enabled) { + bool was_enabled = IsOverridingInterruptSignal(); + if (enabled && !was_enabled) { + // enable override + previous_signal_handler_ = signal(SIGINT, &OverridingSignalHandler); + } else if (!enabled && was_enabled) { + // disable override + signal(SIGINT, previous_signal_handler_); + previous_signal_handler_ = nullptr; + } +} + // [[arrow::export]] bool CanRunWithCapturedR() { #if defined(HAS_UNWIND_PROTECT) diff --git a/r/src/safe-call-into-r.h b/r/src/safe-call-into-r.h index a2cb7c4f6b5..e33ecdfa5be 100644 --- a/r/src/safe-call-into-r.h +++ b/r/src/safe-call-into-r.h @@ -35,6 +35,8 @@ // because only one of these can exist at any given time. bool CanRunWithCapturedR(); +extern "C" void OverridingSignalHandler(int sig); + // The MainRThread class keeps track of the thread on which it is safe // to call the R API to facilitate its safe use (or erroring // if it is not safe). The MainRThread singleton can be accessed from @@ -43,7 +45,11 @@ bool CanRunWithCapturedR(); // SafeCallIntoR([&]() { ... }). class MainRThread { public: - MainRThread() : initialized_(false), executor_(nullptr) {} + MainRThread() + : initialized_(false), + executor_(nullptr), + executing_safe_call_into_r_(false), + previous_signal_handler_(nullptr) {} // Call this method from the R thread (e.g., on package load) // to save an internal copy of the thread id. @@ -61,6 +67,11 @@ class MainRThread { // Check if a SafeCallIntoR call is able to execute bool CanExecuteSafeCallIntoR() { return IsMainThread() || executor_ != nullptr; } + void SetExecutingSafeCallIntoR(bool executing) { + executing_safe_call_into_r_ = executing; + } + bool IsExecutingSafeCallIntoR() { return executing_safe_call_into_r_; } + // The Executor that is running on the main R thread, if it exists arrow::internal::Executor*& Executor() { return executor_; } @@ -75,23 +86,46 @@ class MainRThread { // Check if there is a saved error bool HasError() { return !status_.ok(); } - // Throw a cpp11::unwind_exception() if + // Throw an exception if there was an error executing on the main + // thread. void ClearError() { arrow::Status maybe_error_status = status_; ResetError(); arrow::StopIfNotOk(maybe_error_status); } + void SetOverrideInterruptSignal(bool enabled); + + bool IsOverridingInterruptSignal() { return previous_signal_handler_ != nullptr; } + + void CallPreviousSignalHandler(int sig) { previous_signal_handler_(sig); } + private: bool initialized_; std::thread::id thread_id_; arrow::Status status_; arrow::internal::Executor* executor_; + bool executing_safe_call_into_r_; + void (*previous_signal_handler_)(int); }; // Retrieve the MainRThread singleton MainRThread& GetMainRThread(); +class SafeCallIntoRContext { + public: + SafeCallIntoRContext() { GetMainRThread().SetExecutingSafeCallIntoR(true); } + + ~SafeCallIntoRContext() { GetMainRThread().SetExecutingSafeCallIntoR(false); } +}; + +class RunWithCapturedRContext { + public: + RunWithCapturedRContext() { GetMainRThread().SetOverrideInterruptSignal(true); } + + ~RunWithCapturedRContext() { GetMainRThread().SetOverrideInterruptSignal(false); } +}; + // Call into R and return a C++ object. Note that you can't return // a SEXP (use cpp11::as_cpp to convert it to a C++ type inside // `fun`). @@ -103,6 +137,7 @@ arrow::Future SafeCallIntoRAsync(std::function(void)> fun, // If we're on the main thread, run the task immediately and let // the cpp11::unwind_exception be thrown since it will be caught // at the top level. + SafeCallIntoRContext context; return fun(); } else if (main_r_thread.CanExecuteSafeCallIntoR()) { // If we are not on the main thread and have an Executor, @@ -119,6 +154,7 @@ arrow::Future SafeCallIntoRAsync(std::function(void)> fun, } try { + SafeCallIntoRContext context; return fun(); } catch (cpp11::unwind_exception& e) { // Here we save the token and set the main R thread to an error state @@ -169,6 +205,7 @@ arrow::Result RunWithCapturedR(std::function()> make_arrow_c return arrow::Status::AlreadyExists("Attempt to use more than one R Executor()"); } + RunWithCapturedRContext context; GetMainRThread().ResetError(); arrow::Result result = arrow::internal::SerialExecutor::RunInSerialExecutor( From dfc551c5497288907422a2c511e24a433981756c Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Mon, 18 Jul 2022 12:00:13 -0300 Subject: [PATCH 03/39] maybe use signal handler api from arrow? --- r/src/safe-call-into-r-impl.cpp | 6 ++++++ r/src/safe-call-into-r.h | 13 ++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/r/src/safe-call-into-r-impl.cpp b/r/src/safe-call-into-r-impl.cpp index ce0025dbc42..0ac3928460e 100644 --- a/r/src/safe-call-into-r-impl.cpp +++ b/r/src/safe-call-into-r-impl.cpp @@ -65,6 +65,7 @@ void OverridingSignalHandler(int sig) { if (!main_r_thread.IsExecutingSafeCallIntoR() && !main_r_thread.HasError() && sig == SIGINT) { + main_r_thread.RequestStopFromSignal(sig); main_r_thread.SetError(arrow::Status::Cancelled("User interrupt")); } else { main_r_thread.CallPreviousSignalHandler(sig); @@ -76,10 +77,15 @@ void MainRThread::SetOverrideInterruptSignal(bool enabled) { if (enabled && !was_enabled) { // enable override previous_signal_handler_ = signal(SIGINT, &OverridingSignalHandler); + stop_source_ = arrow::ValueOrStop(arrow::SetSignalStopSource()); + arrow::StopIfNotOk(arrow::RegisterCancellingSignalHandler({SIGINT})); } else if (!enabled && was_enabled) { // disable override signal(SIGINT, previous_signal_handler_); previous_signal_handler_ = nullptr; + arrow::UnregisterCancellingSignalHandler(); + arrow::ResetSignalStopSource(); + stop_source_ = nullptr; } } diff --git a/r/src/safe-call-into-r.h b/r/src/safe-call-into-r.h index e33ecdfa5be..1c76890f7eb 100644 --- a/r/src/safe-call-into-r.h +++ b/r/src/safe-call-into-r.h @@ -21,6 +21,7 @@ #include "./arrow_types.h" #include +#include #include #include @@ -49,7 +50,8 @@ class MainRThread { : initialized_(false), executor_(nullptr), executing_safe_call_into_r_(false), - previous_signal_handler_(nullptr) {} + previous_signal_handler_(nullptr), + stop_source_(nullptr) {} // Call this method from the R thread (e.g., on package load) // to save an internal copy of the thread id. @@ -100,6 +102,12 @@ class MainRThread { void CallPreviousSignalHandler(int sig) { previous_signal_handler_(sig); } + void RequestStopFromSignal(int sig) { + if (stop_source_ != nullptr) { + stop_source_->RequestStopFromSignal(sig); + } + } + private: bool initialized_; std::thread::id thread_id_; @@ -107,6 +115,7 @@ class MainRThread { arrow::internal::Executor* executor_; bool executing_safe_call_into_r_; void (*previous_signal_handler_)(int); + arrow::StopSource* stop_source_; }; // Retrieve the MainRThread singleton @@ -115,14 +124,12 @@ MainRThread& GetMainRThread(); class SafeCallIntoRContext { public: SafeCallIntoRContext() { GetMainRThread().SetExecutingSafeCallIntoR(true); } - ~SafeCallIntoRContext() { GetMainRThread().SetExecutingSafeCallIntoR(false); } }; class RunWithCapturedRContext { public: RunWithCapturedRContext() { GetMainRThread().SetOverrideInterruptSignal(true); } - ~RunWithCapturedRContext() { GetMainRThread().SetOverrideInterruptSignal(false); } }; From 6dfb517be1f446853c5fdb38fded0cdf1893a0c9 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Mon, 18 Jul 2022 12:16:53 -0300 Subject: [PATCH 04/39] newline at end of file --- r/src/safe-call-into-r.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/r/src/safe-call-into-r.h b/r/src/safe-call-into-r.h index 1c76890f7eb..7f8287ba631 100644 --- a/r/src/safe-call-into-r.h +++ b/r/src/safe-call-into-r.h @@ -290,7 +290,7 @@ static inline arrow::Status RunWithCapturedRIfPossibleVoid( return true; }); ARROW_RETURN_NOT_OK(result); - return arrow::Status::OK(); + return result.ok(); } -#endif \ No newline at end of file +#endif From 77bf53d48e95efbea5ad710a37556ee9a6f8a536 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Wed, 20 Jul 2022 23:36:38 -0300 Subject: [PATCH 05/39] maybe do the whole stop token thing properly --- r/NAMESPACE | 1 + r/R/io.R | 14 + r/man/arrow_cancellable.Rd | 17 + r/src/arrowExports.cpp | 1017 +++++++++++++++---------------- r/src/csv.cpp | 9 +- r/src/filesystem.cpp | 10 +- r/src/safe-call-into-r-impl.cpp | 35 +- r/src/safe-call-into-r.h | 84 +-- 8 files changed, 605 insertions(+), 582 deletions(-) create mode 100644 r/man/arrow_cancellable.Rd diff --git a/r/NAMESPACE b/r/NAMESPACE index 49db309b8e8..2fa96c353e8 100644 --- a/r/NAMESPACE +++ b/r/NAMESPACE @@ -256,6 +256,7 @@ export(Type) export(UnionDataset) export(all_of) export(arrow_available) +export(arrow_cancellable) export(arrow_info) export(arrow_table) export(arrow_with_dataset) diff --git a/r/R/io.R b/r/R/io.R index fc664ed386a..d7af52d0441 100644 --- a/r/R/io.R +++ b/r/R/io.R @@ -317,3 +317,17 @@ detect_compression <- function(path) { "uncompressed" ) } + +#' Run Arrow code with the ability to cancel +#' +#' @param expr An expression to evaluate with cancellation +#' +#' @return The value of `expr` +#' @export +arrow_cancellable <- function(expr) { + if (InitializeStopSource()) { + on.exit(DeinitializeStopSource()) + } + + force(expr) +} diff --git a/r/man/arrow_cancellable.Rd b/r/man/arrow_cancellable.Rd new file mode 100644 index 00000000000..efe7a6a4227 --- /dev/null +++ b/r/man/arrow_cancellable.Rd @@ -0,0 +1,17 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/io.R +\name{arrow_cancellable} +\alias{arrow_cancellable} +\title{Run Arrow code with the ability to cancel} +\usage{ +arrow_cancellable(expr) +} +\arguments{ +\item{expr}{An expression to evaluate with cancellation} +} +\value{ +The value of \code{expr} +} +\description{ +Run Arrow code with the ability to cancel +} diff --git a/r/src/arrowExports.cpp b/r/src/arrowExports.cpp index 26ec6e3d9b1..409bf50282f 100644 --- a/r/src/arrowExports.cpp +++ b/r/src/arrowExports.cpp @@ -5202,517 +5202,512 @@ static const R_CallMethodDef CallEntries[] = { { "_s3_available", (DL_FUNC)& _s3_available, 0 }, { "_gcs_available", (DL_FUNC)& _gcs_available, 0 }, { "_json_available", (DL_FUNC)& _json_available, 0 }, - { "_arrow_test_SET_STRING_ELT", (DL_FUNC) &_arrow_test_SET_STRING_ELT, 1}, - { "_arrow_is_arrow_altrep", (DL_FUNC) &_arrow_is_arrow_altrep, 1}, - { "_arrow_Array__Slice1", (DL_FUNC) &_arrow_Array__Slice1, 2}, - { "_arrow_Array__Slice2", (DL_FUNC) &_arrow_Array__Slice2, 3}, - { "_arrow_Array__IsNull", (DL_FUNC) &_arrow_Array__IsNull, 2}, - { "_arrow_Array__IsValid", (DL_FUNC) &_arrow_Array__IsValid, 2}, - { "_arrow_Array__length", (DL_FUNC) &_arrow_Array__length, 1}, - { "_arrow_Array__offset", (DL_FUNC) &_arrow_Array__offset, 1}, - { "_arrow_Array__null_count", (DL_FUNC) &_arrow_Array__null_count, 1}, - { "_arrow_Array__type", (DL_FUNC) &_arrow_Array__type, 1}, - { "_arrow_Array__ToString", (DL_FUNC) &_arrow_Array__ToString, 1}, - { "_arrow_Array__type_id", (DL_FUNC) &_arrow_Array__type_id, 1}, - { "_arrow_Array__Equals", (DL_FUNC) &_arrow_Array__Equals, 2}, - { "_arrow_Array__ApproxEquals", (DL_FUNC) &_arrow_Array__ApproxEquals, 2}, - { "_arrow_Array__Diff", (DL_FUNC) &_arrow_Array__Diff, 2}, - { "_arrow_Array__data", (DL_FUNC) &_arrow_Array__data, 1}, - { "_arrow_Array__RangeEquals", (DL_FUNC) &_arrow_Array__RangeEquals, 5}, - { "_arrow_Array__View", (DL_FUNC) &_arrow_Array__View, 2}, - { "_arrow_Array__Validate", (DL_FUNC) &_arrow_Array__Validate, 1}, - { "_arrow_DictionaryArray__indices", (DL_FUNC) &_arrow_DictionaryArray__indices, 1}, - { "_arrow_DictionaryArray__dictionary", (DL_FUNC) &_arrow_DictionaryArray__dictionary, 1}, - { "_arrow_StructArray__field", (DL_FUNC) &_arrow_StructArray__field, 2}, - { "_arrow_StructArray__GetFieldByName", (DL_FUNC) &_arrow_StructArray__GetFieldByName, 2}, - { "_arrow_StructArray__Flatten", (DL_FUNC) &_arrow_StructArray__Flatten, 1}, - { "_arrow_ListArray__value_type", (DL_FUNC) &_arrow_ListArray__value_type, 1}, - { "_arrow_LargeListArray__value_type", (DL_FUNC) &_arrow_LargeListArray__value_type, 1}, - { "_arrow_ListArray__values", (DL_FUNC) &_arrow_ListArray__values, 1}, - { "_arrow_LargeListArray__values", (DL_FUNC) &_arrow_LargeListArray__values, 1}, - { "_arrow_ListArray__value_length", (DL_FUNC) &_arrow_ListArray__value_length, 2}, - { "_arrow_LargeListArray__value_length", (DL_FUNC) &_arrow_LargeListArray__value_length, 2}, - { "_arrow_FixedSizeListArray__value_length", (DL_FUNC) &_arrow_FixedSizeListArray__value_length, 2}, - { "_arrow_ListArray__value_offset", (DL_FUNC) &_arrow_ListArray__value_offset, 2}, - { "_arrow_LargeListArray__value_offset", (DL_FUNC) &_arrow_LargeListArray__value_offset, 2}, - { "_arrow_FixedSizeListArray__value_offset", (DL_FUNC) &_arrow_FixedSizeListArray__value_offset, 2}, - { "_arrow_ListArray__raw_value_offsets", (DL_FUNC) &_arrow_ListArray__raw_value_offsets, 1}, - { "_arrow_LargeListArray__raw_value_offsets", (DL_FUNC) &_arrow_LargeListArray__raw_value_offsets, 1}, - { "_arrow_MapArray__keys", (DL_FUNC) &_arrow_MapArray__keys, 1}, - { "_arrow_MapArray__items", (DL_FUNC) &_arrow_MapArray__items, 1}, - { "_arrow_MapArray__keys_nested", (DL_FUNC) &_arrow_MapArray__keys_nested, 1}, - { "_arrow_MapArray__items_nested", (DL_FUNC) &_arrow_MapArray__items_nested, 1}, - { "_arrow_Array__Same", (DL_FUNC) &_arrow_Array__Same, 2}, - { "_arrow_Array__ReferencedBufferSize", (DL_FUNC) &_arrow_Array__ReferencedBufferSize, 1}, - { "_arrow_arrow__Concatenate", (DL_FUNC) &_arrow_arrow__Concatenate, 1}, - { "_arrow_Array__as_vector", (DL_FUNC) &_arrow_Array__as_vector, 1}, - { "_arrow_ChunkedArray__as_vector", (DL_FUNC) &_arrow_ChunkedArray__as_vector, 2}, - { "_arrow_RecordBatch__to_dataframe", (DL_FUNC) &_arrow_RecordBatch__to_dataframe, 2}, - { "_arrow_Table__to_dataframe", (DL_FUNC) &_arrow_Table__to_dataframe, 2}, - { "_arrow_ArrayData__get_type", (DL_FUNC) &_arrow_ArrayData__get_type, 1}, - { "_arrow_ArrayData__get_length", (DL_FUNC) &_arrow_ArrayData__get_length, 1}, - { "_arrow_ArrayData__get_null_count", (DL_FUNC) &_arrow_ArrayData__get_null_count, 1}, - { "_arrow_ArrayData__get_offset", (DL_FUNC) &_arrow_ArrayData__get_offset, 1}, - { "_arrow_ArrayData__buffers", (DL_FUNC) &_arrow_ArrayData__buffers, 1}, - { "_arrow_external_pointer_addr_double", (DL_FUNC) &_arrow_external_pointer_addr_double, 1}, - { "_arrow_external_pointer_addr_character", (DL_FUNC) &_arrow_external_pointer_addr_character, 1}, - { "_arrow_external_pointer_addr_integer64", (DL_FUNC) &_arrow_external_pointer_addr_integer64, 1}, - { "_arrow_external_pointer_addr_raw", (DL_FUNC) &_arrow_external_pointer_addr_raw, 1}, - { "_arrow_allocate_arrow_schema", (DL_FUNC) &_arrow_allocate_arrow_schema, 0}, - { "_arrow_delete_arrow_schema", (DL_FUNC) &_arrow_delete_arrow_schema, 1}, - { "_arrow_allocate_arrow_array", (DL_FUNC) &_arrow_allocate_arrow_array, 0}, - { "_arrow_delete_arrow_array", (DL_FUNC) &_arrow_delete_arrow_array, 1}, - { "_arrow_allocate_arrow_array_stream", (DL_FUNC) &_arrow_allocate_arrow_array_stream, 0}, - { "_arrow_delete_arrow_array_stream", (DL_FUNC) &_arrow_delete_arrow_array_stream, 1}, - { "_arrow_ImportArray", (DL_FUNC) &_arrow_ImportArray, 2}, - { "_arrow_ImportRecordBatch", (DL_FUNC) &_arrow_ImportRecordBatch, 2}, - { "_arrow_ImportSchema", (DL_FUNC) &_arrow_ImportSchema, 1}, - { "_arrow_ImportField", (DL_FUNC) &_arrow_ImportField, 1}, - { "_arrow_ImportType", (DL_FUNC) &_arrow_ImportType, 1}, - { "_arrow_ImportRecordBatchReader", (DL_FUNC) &_arrow_ImportRecordBatchReader, 1}, - { "_arrow_ExportType", (DL_FUNC) &_arrow_ExportType, 2}, - { "_arrow_ExportField", (DL_FUNC) &_arrow_ExportField, 2}, - { "_arrow_ExportSchema", (DL_FUNC) &_arrow_ExportSchema, 2}, - { "_arrow_ExportArray", (DL_FUNC) &_arrow_ExportArray, 3}, - { "_arrow_ExportRecordBatch", (DL_FUNC) &_arrow_ExportRecordBatch, 3}, - { "_arrow_ExportRecordBatchReader", (DL_FUNC) &_arrow_ExportRecordBatchReader, 2}, - { "_arrow_Buffer__is_mutable", (DL_FUNC) &_arrow_Buffer__is_mutable, 1}, - { "_arrow_Buffer__ZeroPadding", (DL_FUNC) &_arrow_Buffer__ZeroPadding, 1}, - { "_arrow_Buffer__capacity", (DL_FUNC) &_arrow_Buffer__capacity, 1}, - { "_arrow_Buffer__size", (DL_FUNC) &_arrow_Buffer__size, 1}, - { "_arrow_r___RBuffer__initialize", (DL_FUNC) &_arrow_r___RBuffer__initialize, 1}, - { "_arrow_Buffer__data", (DL_FUNC) &_arrow_Buffer__data, 1}, - { "_arrow_Buffer__Equals", (DL_FUNC) &_arrow_Buffer__Equals, 2}, - { "_arrow_ChunkedArray__length", (DL_FUNC) &_arrow_ChunkedArray__length, 1}, - { "_arrow_ChunkedArray__null_count", (DL_FUNC) &_arrow_ChunkedArray__null_count, 1}, - { "_arrow_ChunkedArray__num_chunks", (DL_FUNC) &_arrow_ChunkedArray__num_chunks, 1}, - { "_arrow_ChunkedArray__chunk", (DL_FUNC) &_arrow_ChunkedArray__chunk, 2}, - { "_arrow_ChunkedArray__chunks", (DL_FUNC) &_arrow_ChunkedArray__chunks, 1}, - { "_arrow_ChunkedArray__type", (DL_FUNC) &_arrow_ChunkedArray__type, 1}, - { "_arrow_ChunkedArray__Slice1", (DL_FUNC) &_arrow_ChunkedArray__Slice1, 2}, - { "_arrow_ChunkedArray__Slice2", (DL_FUNC) &_arrow_ChunkedArray__Slice2, 3}, - { "_arrow_ChunkedArray__View", (DL_FUNC) &_arrow_ChunkedArray__View, 2}, - { "_arrow_ChunkedArray__Validate", (DL_FUNC) &_arrow_ChunkedArray__Validate, 1}, - { "_arrow_ChunkedArray__Equals", (DL_FUNC) &_arrow_ChunkedArray__Equals, 2}, - { "_arrow_ChunkedArray__ToString", (DL_FUNC) &_arrow_ChunkedArray__ToString, 1}, - { "_arrow_ChunkedArray__from_list", (DL_FUNC) &_arrow_ChunkedArray__from_list, 2}, - { "_arrow_ChunkedArray__ReferencedBufferSize", (DL_FUNC) &_arrow_ChunkedArray__ReferencedBufferSize, 1}, - { "_arrow_util___Codec__Create", (DL_FUNC) &_arrow_util___Codec__Create, 2}, - { "_arrow_util___Codec__name", (DL_FUNC) &_arrow_util___Codec__name, 1}, - { "_arrow_util___Codec__IsAvailable", (DL_FUNC) &_arrow_util___Codec__IsAvailable, 1}, - { "_arrow_io___CompressedOutputStream__Make", (DL_FUNC) &_arrow_io___CompressedOutputStream__Make, 2}, - { "_arrow_io___CompressedInputStream__Make", (DL_FUNC) &_arrow_io___CompressedInputStream__Make, 2}, - { "_arrow_ExecPlan_create", (DL_FUNC) &_arrow_ExecPlan_create, 1}, - { "_arrow_ExecPlanReader__batches", (DL_FUNC) &_arrow_ExecPlanReader__batches, 1}, - { "_arrow_Table__from_ExecPlanReader", (DL_FUNC) &_arrow_Table__from_ExecPlanReader, 1}, - { "_arrow_ExecPlanReader__Plan", (DL_FUNC) &_arrow_ExecPlanReader__Plan, 1}, - { "_arrow_ExecPlanReader__PlanStatus", (DL_FUNC) &_arrow_ExecPlanReader__PlanStatus, 1}, - { "_arrow_ExecPlan_run", (DL_FUNC) &_arrow_ExecPlan_run, 5}, - { "_arrow_ExecPlan_ToString", (DL_FUNC) &_arrow_ExecPlan_ToString, 1}, - { "_arrow_ExecNode_output_schema", (DL_FUNC) &_arrow_ExecNode_output_schema, 1}, - { "_arrow_ExecNode_Scan", (DL_FUNC) &_arrow_ExecNode_Scan, 4}, - { "_arrow_ExecPlan_Write", (DL_FUNC) &_arrow_ExecPlan_Write, 14}, - { "_arrow_ExecNode_Filter", (DL_FUNC) &_arrow_ExecNode_Filter, 2}, - { "_arrow_ExecNode_Project", (DL_FUNC) &_arrow_ExecNode_Project, 3}, - { "_arrow_ExecNode_Aggregate", (DL_FUNC) &_arrow_ExecNode_Aggregate, 3}, - { "_arrow_ExecNode_Join", (DL_FUNC) &_arrow_ExecNode_Join, 9}, - { "_arrow_ExecNode_Union", (DL_FUNC) &_arrow_ExecNode_Union, 2}, - { "_arrow_ExecNode_SourceNode", (DL_FUNC) &_arrow_ExecNode_SourceNode, 2}, - { "_arrow_ExecNode_TableSourceNode", (DL_FUNC) &_arrow_ExecNode_TableSourceNode, 2}, - { "_arrow_substrait__internal__SubstraitToJSON", (DL_FUNC) &_arrow_substrait__internal__SubstraitToJSON, 1}, - { "_arrow_substrait__internal__SubstraitFromJSON", (DL_FUNC) &_arrow_substrait__internal__SubstraitFromJSON, 1}, - { "_arrow_ExecPlan_run_substrait", (DL_FUNC) &_arrow_ExecPlan_run_substrait, 2}, - { "_arrow_RecordBatch__cast", (DL_FUNC) &_arrow_RecordBatch__cast, 3}, - { "_arrow_Table__cast", (DL_FUNC) &_arrow_Table__cast, 3}, - { "_arrow_compute__CallFunction", (DL_FUNC) &_arrow_compute__CallFunction, 3}, - { "_arrow_compute__GetFunctionNames", (DL_FUNC) &_arrow_compute__GetFunctionNames, 0}, - { "_arrow_RegisterScalarUDF", (DL_FUNC) &_arrow_RegisterScalarUDF, 2}, - { "_arrow_build_info", (DL_FUNC) &_arrow_build_info, 0}, - { "_arrow_runtime_info", (DL_FUNC) &_arrow_runtime_info, 0}, - { "_arrow_set_timezone_database", (DL_FUNC) &_arrow_set_timezone_database, 1}, - { "_arrow_csv___WriteOptions__initialize", (DL_FUNC) &_arrow_csv___WriteOptions__initialize, 1}, - { "_arrow_csv___ReadOptions__initialize", (DL_FUNC) &_arrow_csv___ReadOptions__initialize, 1}, - { "_arrow_csv___ParseOptions__initialize", (DL_FUNC) &_arrow_csv___ParseOptions__initialize, 1}, - { "_arrow_csv___ReadOptions__column_names", (DL_FUNC) &_arrow_csv___ReadOptions__column_names, 1}, - { "_arrow_csv___ConvertOptions__initialize", (DL_FUNC) &_arrow_csv___ConvertOptions__initialize, 1}, - { "_arrow_csv___TableReader__Make", (DL_FUNC) &_arrow_csv___TableReader__Make, 4}, - { "_arrow_csv___TableReader__Read", (DL_FUNC) &_arrow_csv___TableReader__Read, 1}, - { "_arrow_TimestampParser__kind", (DL_FUNC) &_arrow_TimestampParser__kind, 1}, - { "_arrow_TimestampParser__format", (DL_FUNC) &_arrow_TimestampParser__format, 1}, - { "_arrow_TimestampParser__MakeStrptime", (DL_FUNC) &_arrow_TimestampParser__MakeStrptime, 1}, - { "_arrow_TimestampParser__MakeISO8601", (DL_FUNC) &_arrow_TimestampParser__MakeISO8601, 0}, - { "_arrow_csv___WriteCSV__Table", (DL_FUNC) &_arrow_csv___WriteCSV__Table, 3}, - { "_arrow_csv___WriteCSV__RecordBatch", (DL_FUNC) &_arrow_csv___WriteCSV__RecordBatch, 3}, - { "_arrow_csv___WriteCSV__RecordBatchReader", (DL_FUNC) &_arrow_csv___WriteCSV__RecordBatchReader, 3}, - { "_arrow_dataset___Dataset__NewScan", (DL_FUNC) &_arrow_dataset___Dataset__NewScan, 1}, - { "_arrow_dataset___Dataset__schema", (DL_FUNC) &_arrow_dataset___Dataset__schema, 1}, - { "_arrow_dataset___Dataset__type_name", (DL_FUNC) &_arrow_dataset___Dataset__type_name, 1}, - { "_arrow_dataset___Dataset__ReplaceSchema", (DL_FUNC) &_arrow_dataset___Dataset__ReplaceSchema, 2}, - { "_arrow_dataset___UnionDataset__create", (DL_FUNC) &_arrow_dataset___UnionDataset__create, 2}, - { "_arrow_dataset___InMemoryDataset__create", (DL_FUNC) &_arrow_dataset___InMemoryDataset__create, 1}, - { "_arrow_dataset___UnionDataset__children", (DL_FUNC) &_arrow_dataset___UnionDataset__children, 1}, - { "_arrow_dataset___FileSystemDataset__format", (DL_FUNC) &_arrow_dataset___FileSystemDataset__format, 1}, - { "_arrow_dataset___FileSystemDataset__filesystem", (DL_FUNC) &_arrow_dataset___FileSystemDataset__filesystem, 1}, - { "_arrow_dataset___FileSystemDataset__files", (DL_FUNC) &_arrow_dataset___FileSystemDataset__files, 1}, - { "_arrow_dataset___DatasetFactory__Finish1", (DL_FUNC) &_arrow_dataset___DatasetFactory__Finish1, 2}, - { "_arrow_dataset___DatasetFactory__Finish2", (DL_FUNC) &_arrow_dataset___DatasetFactory__Finish2, 2}, - { "_arrow_dataset___DatasetFactory__Inspect", (DL_FUNC) &_arrow_dataset___DatasetFactory__Inspect, 2}, - { "_arrow_dataset___UnionDatasetFactory__Make", (DL_FUNC) &_arrow_dataset___UnionDatasetFactory__Make, 1}, - { "_arrow_dataset___FileSystemDatasetFactory__Make", (DL_FUNC) &_arrow_dataset___FileSystemDatasetFactory__Make, 4}, - { "_arrow_dataset___FileSystemDatasetFactory__MakePaths", (DL_FUNC) &_arrow_dataset___FileSystemDatasetFactory__MakePaths, 4}, - { "_arrow_dataset___FileFormat__type_name", (DL_FUNC) &_arrow_dataset___FileFormat__type_name, 1}, - { "_arrow_dataset___FileFormat__DefaultWriteOptions", (DL_FUNC) &_arrow_dataset___FileFormat__DefaultWriteOptions, 1}, - { "_arrow_dataset___ParquetFileFormat__Make", (DL_FUNC) &_arrow_dataset___ParquetFileFormat__Make, 2}, - { "_arrow_dataset___FileWriteOptions__type_name", (DL_FUNC) &_arrow_dataset___FileWriteOptions__type_name, 1}, - { "_arrow_dataset___ParquetFileWriteOptions__update", (DL_FUNC) &_arrow_dataset___ParquetFileWriteOptions__update, 3}, - { "_arrow_dataset___IpcFileWriteOptions__update2", (DL_FUNC) &_arrow_dataset___IpcFileWriteOptions__update2, 4}, - { "_arrow_dataset___IpcFileWriteOptions__update1", (DL_FUNC) &_arrow_dataset___IpcFileWriteOptions__update1, 3}, - { "_arrow_dataset___CsvFileWriteOptions__update", (DL_FUNC) &_arrow_dataset___CsvFileWriteOptions__update, 2}, - { "_arrow_dataset___IpcFileFormat__Make", (DL_FUNC) &_arrow_dataset___IpcFileFormat__Make, 0}, - { "_arrow_dataset___CsvFileFormat__Make", (DL_FUNC) &_arrow_dataset___CsvFileFormat__Make, 3}, - { "_arrow_dataset___FragmentScanOptions__type_name", (DL_FUNC) &_arrow_dataset___FragmentScanOptions__type_name, 1}, - { "_arrow_dataset___CsvFragmentScanOptions__Make", (DL_FUNC) &_arrow_dataset___CsvFragmentScanOptions__Make, 2}, - { "_arrow_dataset___ParquetFragmentScanOptions__Make", (DL_FUNC) &_arrow_dataset___ParquetFragmentScanOptions__Make, 3}, - { "_arrow_dataset___DirectoryPartitioning", (DL_FUNC) &_arrow_dataset___DirectoryPartitioning, 2}, - { "_arrow_dataset___DirectoryPartitioning__MakeFactory", (DL_FUNC) &_arrow_dataset___DirectoryPartitioning__MakeFactory, 2}, - { "_arrow_dataset___HivePartitioning", (DL_FUNC) &_arrow_dataset___HivePartitioning, 3}, - { "_arrow_dataset___HivePartitioning__MakeFactory", (DL_FUNC) &_arrow_dataset___HivePartitioning__MakeFactory, 2}, - { "_arrow_dataset___PartitioningFactory__Inspect", (DL_FUNC) &_arrow_dataset___PartitioningFactory__Inspect, 2}, - { "_arrow_dataset___PartitioningFactory__Finish", (DL_FUNC) &_arrow_dataset___PartitioningFactory__Finish, 2}, - { "_arrow_dataset___PartitioningFactory__type_name", (DL_FUNC) &_arrow_dataset___PartitioningFactory__type_name, 1}, - { "_arrow_dataset___ScannerBuilder__ProjectNames", (DL_FUNC) &_arrow_dataset___ScannerBuilder__ProjectNames, 2}, - { "_arrow_dataset___ScannerBuilder__ProjectExprs", (DL_FUNC) &_arrow_dataset___ScannerBuilder__ProjectExprs, 3}, - { "_arrow_dataset___ScannerBuilder__Filter", (DL_FUNC) &_arrow_dataset___ScannerBuilder__Filter, 2}, - { "_arrow_dataset___ScannerBuilder__UseThreads", (DL_FUNC) &_arrow_dataset___ScannerBuilder__UseThreads, 2}, - { "_arrow_dataset___ScannerBuilder__BatchSize", (DL_FUNC) &_arrow_dataset___ScannerBuilder__BatchSize, 2}, - { "_arrow_dataset___ScannerBuilder__FragmentScanOptions", (DL_FUNC) &_arrow_dataset___ScannerBuilder__FragmentScanOptions, 2}, - { "_arrow_dataset___ScannerBuilder__schema", (DL_FUNC) &_arrow_dataset___ScannerBuilder__schema, 1}, - { "_arrow_dataset___ScannerBuilder__Finish", (DL_FUNC) &_arrow_dataset___ScannerBuilder__Finish, 1}, - { "_arrow_dataset___ScannerBuilder__FromRecordBatchReader", (DL_FUNC) &_arrow_dataset___ScannerBuilder__FromRecordBatchReader, 1}, - { "_arrow_dataset___Scanner__ToTable", (DL_FUNC) &_arrow_dataset___Scanner__ToTable, 1}, - { "_arrow_dataset___Scanner__ScanBatches", (DL_FUNC) &_arrow_dataset___Scanner__ScanBatches, 1}, - { "_arrow_dataset___Scanner__ToRecordBatchReader", (DL_FUNC) &_arrow_dataset___Scanner__ToRecordBatchReader, 1}, - { "_arrow_dataset___Scanner__head", (DL_FUNC) &_arrow_dataset___Scanner__head, 2}, - { "_arrow_dataset___Scanner__schema", (DL_FUNC) &_arrow_dataset___Scanner__schema, 1}, - { "_arrow_dataset___Scanner__TakeRows", (DL_FUNC) &_arrow_dataset___Scanner__TakeRows, 2}, - { "_arrow_dataset___Scanner__CountRows", (DL_FUNC) &_arrow_dataset___Scanner__CountRows, 1}, - { "_arrow_Int8__initialize", (DL_FUNC) &_arrow_Int8__initialize, 0}, - { "_arrow_Int16__initialize", (DL_FUNC) &_arrow_Int16__initialize, 0}, - { "_arrow_Int32__initialize", (DL_FUNC) &_arrow_Int32__initialize, 0}, - { "_arrow_Int64__initialize", (DL_FUNC) &_arrow_Int64__initialize, 0}, - { "_arrow_UInt8__initialize", (DL_FUNC) &_arrow_UInt8__initialize, 0}, - { "_arrow_UInt16__initialize", (DL_FUNC) &_arrow_UInt16__initialize, 0}, - { "_arrow_UInt32__initialize", (DL_FUNC) &_arrow_UInt32__initialize, 0}, - { "_arrow_UInt64__initialize", (DL_FUNC) &_arrow_UInt64__initialize, 0}, - { "_arrow_Float16__initialize", (DL_FUNC) &_arrow_Float16__initialize, 0}, - { "_arrow_Float32__initialize", (DL_FUNC) &_arrow_Float32__initialize, 0}, - { "_arrow_Float64__initialize", (DL_FUNC) &_arrow_Float64__initialize, 0}, - { "_arrow_Boolean__initialize", (DL_FUNC) &_arrow_Boolean__initialize, 0}, - { "_arrow_Utf8__initialize", (DL_FUNC) &_arrow_Utf8__initialize, 0}, - { "_arrow_LargeUtf8__initialize", (DL_FUNC) &_arrow_LargeUtf8__initialize, 0}, - { "_arrow_Binary__initialize", (DL_FUNC) &_arrow_Binary__initialize, 0}, - { "_arrow_LargeBinary__initialize", (DL_FUNC) &_arrow_LargeBinary__initialize, 0}, - { "_arrow_Date32__initialize", (DL_FUNC) &_arrow_Date32__initialize, 0}, - { "_arrow_Date64__initialize", (DL_FUNC) &_arrow_Date64__initialize, 0}, - { "_arrow_Null__initialize", (DL_FUNC) &_arrow_Null__initialize, 0}, - { "_arrow_Decimal128Type__initialize", (DL_FUNC) &_arrow_Decimal128Type__initialize, 2}, - { "_arrow_Decimal256Type__initialize", (DL_FUNC) &_arrow_Decimal256Type__initialize, 2}, - { "_arrow_DayTimeInterval__initialize", (DL_FUNC) &_arrow_DayTimeInterval__initialize, 0}, - { "_arrow_FixedSizeBinary__initialize", (DL_FUNC) &_arrow_FixedSizeBinary__initialize, 1}, - { "_arrow_FixedSizeBinary__byte_width", (DL_FUNC) &_arrow_FixedSizeBinary__byte_width, 1}, - { "_arrow_Timestamp__initialize", (DL_FUNC) &_arrow_Timestamp__initialize, 2}, - { "_arrow_Time32__initialize", (DL_FUNC) &_arrow_Time32__initialize, 1}, - { "_arrow_Time64__initialize", (DL_FUNC) &_arrow_Time64__initialize, 1}, - { "_arrow_Duration__initialize", (DL_FUNC) &_arrow_Duration__initialize, 1}, - { "_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_map__", (DL_FUNC) &_arrow_map__, 3}, - { "_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}, - { "_arrow_DataType__num_fields", (DL_FUNC) &_arrow_DataType__num_fields, 1}, - { "_arrow_DataType__fields", (DL_FUNC) &_arrow_DataType__fields, 1}, - { "_arrow_DataType__id", (DL_FUNC) &_arrow_DataType__id, 1}, - { "_arrow_ListType__ToString", (DL_FUNC) &_arrow_ListType__ToString, 1}, - { "_arrow_FixedWidthType__bit_width", (DL_FUNC) &_arrow_FixedWidthType__bit_width, 1}, - { "_arrow_DateType__unit", (DL_FUNC) &_arrow_DateType__unit, 1}, - { "_arrow_TimeType__unit", (DL_FUNC) &_arrow_TimeType__unit, 1}, - { "_arrow_DurationType__unit", (DL_FUNC) &_arrow_DurationType__unit, 1}, - { "_arrow_DecimalType__precision", (DL_FUNC) &_arrow_DecimalType__precision, 1}, - { "_arrow_DecimalType__scale", (DL_FUNC) &_arrow_DecimalType__scale, 1}, - { "_arrow_TimestampType__timezone", (DL_FUNC) &_arrow_TimestampType__timezone, 1}, - { "_arrow_TimestampType__unit", (DL_FUNC) &_arrow_TimestampType__unit, 1}, - { "_arrow_DictionaryType__initialize", (DL_FUNC) &_arrow_DictionaryType__initialize, 3}, - { "_arrow_DictionaryType__index_type", (DL_FUNC) &_arrow_DictionaryType__index_type, 1}, - { "_arrow_DictionaryType__value_type", (DL_FUNC) &_arrow_DictionaryType__value_type, 1}, - { "_arrow_DictionaryType__name", (DL_FUNC) &_arrow_DictionaryType__name, 1}, - { "_arrow_DictionaryType__ordered", (DL_FUNC) &_arrow_DictionaryType__ordered, 1}, - { "_arrow_StructType__GetFieldByName", (DL_FUNC) &_arrow_StructType__GetFieldByName, 2}, - { "_arrow_StructType__GetFieldIndex", (DL_FUNC) &_arrow_StructType__GetFieldIndex, 2}, - { "_arrow_StructType__field_names", (DL_FUNC) &_arrow_StructType__field_names, 1}, - { "_arrow_ListType__value_field", (DL_FUNC) &_arrow_ListType__value_field, 1}, - { "_arrow_ListType__value_type", (DL_FUNC) &_arrow_ListType__value_type, 1}, - { "_arrow_LargeListType__value_field", (DL_FUNC) &_arrow_LargeListType__value_field, 1}, - { "_arrow_LargeListType__value_type", (DL_FUNC) &_arrow_LargeListType__value_type, 1}, - { "_arrow_FixedSizeListType__value_field", (DL_FUNC) &_arrow_FixedSizeListType__value_field, 1}, - { "_arrow_FixedSizeListType__value_type", (DL_FUNC) &_arrow_FixedSizeListType__value_type, 1}, - { "_arrow_FixedSizeListType__list_size", (DL_FUNC) &_arrow_FixedSizeListType__list_size, 1}, - { "_arrow_MapType__key_field", (DL_FUNC) &_arrow_MapType__key_field, 1}, - { "_arrow_MapType__item_field", (DL_FUNC) &_arrow_MapType__item_field, 1}, - { "_arrow_MapType__key_type", (DL_FUNC) &_arrow_MapType__key_type, 1}, - { "_arrow_MapType__item_type", (DL_FUNC) &_arrow_MapType__item_type, 1}, - { "_arrow_MapType__keys_sorted", (DL_FUNC) &_arrow_MapType__keys_sorted, 1}, - { "_arrow_compute___expr__equals", (DL_FUNC) &_arrow_compute___expr__equals, 2}, - { "_arrow_compute___expr__call", (DL_FUNC) &_arrow_compute___expr__call, 3}, - { "_arrow_field_names_in_expression", (DL_FUNC) &_arrow_field_names_in_expression, 1}, - { "_arrow_compute___expr__get_field_ref_name", (DL_FUNC) &_arrow_compute___expr__get_field_ref_name, 1}, - { "_arrow_compute___expr__field_ref", (DL_FUNC) &_arrow_compute___expr__field_ref, 1}, - { "_arrow_compute___expr__scalar", (DL_FUNC) &_arrow_compute___expr__scalar, 1}, - { "_arrow_compute___expr__ToString", (DL_FUNC) &_arrow_compute___expr__ToString, 1}, - { "_arrow_compute___expr__type", (DL_FUNC) &_arrow_compute___expr__type, 2}, - { "_arrow_compute___expr__type_id", (DL_FUNC) &_arrow_compute___expr__type_id, 2}, - { "_arrow_ExtensionType__initialize", (DL_FUNC) &_arrow_ExtensionType__initialize, 4}, - { "_arrow_ExtensionType__extension_name", (DL_FUNC) &_arrow_ExtensionType__extension_name, 1}, - { "_arrow_ExtensionType__Serialize", (DL_FUNC) &_arrow_ExtensionType__Serialize, 1}, - { "_arrow_ExtensionType__storage_type", (DL_FUNC) &_arrow_ExtensionType__storage_type, 1}, - { "_arrow_ExtensionType__MakeArray", (DL_FUNC) &_arrow_ExtensionType__MakeArray, 2}, - { "_arrow_ExtensionType__r6_class", (DL_FUNC) &_arrow_ExtensionType__r6_class, 1}, - { "_arrow_ExtensionArray__storage", (DL_FUNC) &_arrow_ExtensionArray__storage, 1}, - { "_arrow_arrow__RegisterRExtensionType", (DL_FUNC) &_arrow_arrow__RegisterRExtensionType, 1}, - { "_arrow_arrow__UnregisterRExtensionType", (DL_FUNC) &_arrow_arrow__UnregisterRExtensionType, 1}, - { "_arrow_ipc___WriteFeather__Table", (DL_FUNC) &_arrow_ipc___WriteFeather__Table, 6}, - { "_arrow_ipc___feather___Reader__version", (DL_FUNC) &_arrow_ipc___feather___Reader__version, 1}, - { "_arrow_ipc___feather___Reader__Read", (DL_FUNC) &_arrow_ipc___feather___Reader__Read, 2}, - { "_arrow_ipc___feather___Reader__Open", (DL_FUNC) &_arrow_ipc___feather___Reader__Open, 1}, - { "_arrow_ipc___feather___Reader__schema", (DL_FUNC) &_arrow_ipc___feather___Reader__schema, 1}, - { "_arrow_Field__initialize", (DL_FUNC) &_arrow_Field__initialize, 3}, - { "_arrow_Field__ToString", (DL_FUNC) &_arrow_Field__ToString, 1}, - { "_arrow_Field__name", (DL_FUNC) &_arrow_Field__name, 1}, - { "_arrow_Field__Equals", (DL_FUNC) &_arrow_Field__Equals, 2}, - { "_arrow_Field__nullable", (DL_FUNC) &_arrow_Field__nullable, 1}, - { "_arrow_Field__type", (DL_FUNC) &_arrow_Field__type, 1}, - { "_arrow_fs___FileInfo__type", (DL_FUNC) &_arrow_fs___FileInfo__type, 1}, - { "_arrow_fs___FileInfo__set_type", (DL_FUNC) &_arrow_fs___FileInfo__set_type, 2}, - { "_arrow_fs___FileInfo__path", (DL_FUNC) &_arrow_fs___FileInfo__path, 1}, - { "_arrow_fs___FileInfo__set_path", (DL_FUNC) &_arrow_fs___FileInfo__set_path, 2}, - { "_arrow_fs___FileInfo__size", (DL_FUNC) &_arrow_fs___FileInfo__size, 1}, - { "_arrow_fs___FileInfo__set_size", (DL_FUNC) &_arrow_fs___FileInfo__set_size, 2}, - { "_arrow_fs___FileInfo__base_name", (DL_FUNC) &_arrow_fs___FileInfo__base_name, 1}, - { "_arrow_fs___FileInfo__extension", (DL_FUNC) &_arrow_fs___FileInfo__extension, 1}, - { "_arrow_fs___FileInfo__mtime", (DL_FUNC) &_arrow_fs___FileInfo__mtime, 1}, - { "_arrow_fs___FileInfo__set_mtime", (DL_FUNC) &_arrow_fs___FileInfo__set_mtime, 2}, - { "_arrow_fs___FileSelector__base_dir", (DL_FUNC) &_arrow_fs___FileSelector__base_dir, 1}, - { "_arrow_fs___FileSelector__allow_not_found", (DL_FUNC) &_arrow_fs___FileSelector__allow_not_found, 1}, - { "_arrow_fs___FileSelector__recursive", (DL_FUNC) &_arrow_fs___FileSelector__recursive, 1}, - { "_arrow_fs___FileSelector__create", (DL_FUNC) &_arrow_fs___FileSelector__create, 3}, - { "_arrow_fs___FileSystem__GetTargetInfos_Paths", (DL_FUNC) &_arrow_fs___FileSystem__GetTargetInfos_Paths, 2}, - { "_arrow_fs___FileSystem__GetTargetInfos_FileSelector", (DL_FUNC) &_arrow_fs___FileSystem__GetTargetInfos_FileSelector, 2}, - { "_arrow_fs___FileSystem__CreateDir", (DL_FUNC) &_arrow_fs___FileSystem__CreateDir, 3}, - { "_arrow_fs___FileSystem__DeleteDir", (DL_FUNC) &_arrow_fs___FileSystem__DeleteDir, 2}, - { "_arrow_fs___FileSystem__DeleteDirContents", (DL_FUNC) &_arrow_fs___FileSystem__DeleteDirContents, 2}, - { "_arrow_fs___FileSystem__DeleteFile", (DL_FUNC) &_arrow_fs___FileSystem__DeleteFile, 2}, - { "_arrow_fs___FileSystem__DeleteFiles", (DL_FUNC) &_arrow_fs___FileSystem__DeleteFiles, 2}, - { "_arrow_fs___FileSystem__Move", (DL_FUNC) &_arrow_fs___FileSystem__Move, 3}, - { "_arrow_fs___FileSystem__CopyFile", (DL_FUNC) &_arrow_fs___FileSystem__CopyFile, 3}, - { "_arrow_fs___FileSystem__OpenInputStream", (DL_FUNC) &_arrow_fs___FileSystem__OpenInputStream, 2}, - { "_arrow_fs___FileSystem__OpenInputFile", (DL_FUNC) &_arrow_fs___FileSystem__OpenInputFile, 2}, - { "_arrow_fs___FileSystem__OpenOutputStream", (DL_FUNC) &_arrow_fs___FileSystem__OpenOutputStream, 2}, - { "_arrow_fs___FileSystem__OpenAppendStream", (DL_FUNC) &_arrow_fs___FileSystem__OpenAppendStream, 2}, - { "_arrow_fs___FileSystem__type_name", (DL_FUNC) &_arrow_fs___FileSystem__type_name, 1}, - { "_arrow_fs___LocalFileSystem__create", (DL_FUNC) &_arrow_fs___LocalFileSystem__create, 0}, - { "_arrow_fs___SubTreeFileSystem__create", (DL_FUNC) &_arrow_fs___SubTreeFileSystem__create, 2}, - { "_arrow_fs___SubTreeFileSystem__base_fs", (DL_FUNC) &_arrow_fs___SubTreeFileSystem__base_fs, 1}, - { "_arrow_fs___SubTreeFileSystem__base_path", (DL_FUNC) &_arrow_fs___SubTreeFileSystem__base_path, 1}, - { "_arrow_fs___FileSystemFromUri", (DL_FUNC) &_arrow_fs___FileSystemFromUri, 1}, - { "_arrow_fs___CopyFiles", (DL_FUNC) &_arrow_fs___CopyFiles, 6}, - { "_arrow_fs___S3FileSystem__create", (DL_FUNC) &_arrow_fs___S3FileSystem__create, 15}, - { "_arrow_fs___S3FileSystem__region", (DL_FUNC) &_arrow_fs___S3FileSystem__region, 1}, - { "_arrow_fs___GcsFileSystem__Make", (DL_FUNC) &_arrow_fs___GcsFileSystem__Make, 2}, - { "_arrow_io___Readable__Read", (DL_FUNC) &_arrow_io___Readable__Read, 2}, - { "_arrow_io___InputStream__Close", (DL_FUNC) &_arrow_io___InputStream__Close, 1}, - { "_arrow_io___OutputStream__Close", (DL_FUNC) &_arrow_io___OutputStream__Close, 1}, - { "_arrow_io___RandomAccessFile__GetSize", (DL_FUNC) &_arrow_io___RandomAccessFile__GetSize, 1}, - { "_arrow_io___RandomAccessFile__supports_zero_copy", (DL_FUNC) &_arrow_io___RandomAccessFile__supports_zero_copy, 1}, - { "_arrow_io___RandomAccessFile__Seek", (DL_FUNC) &_arrow_io___RandomAccessFile__Seek, 2}, - { "_arrow_io___RandomAccessFile__Tell", (DL_FUNC) &_arrow_io___RandomAccessFile__Tell, 1}, - { "_arrow_io___RandomAccessFile__Read0", (DL_FUNC) &_arrow_io___RandomAccessFile__Read0, 1}, - { "_arrow_io___RandomAccessFile__ReadAt", (DL_FUNC) &_arrow_io___RandomAccessFile__ReadAt, 3}, - { "_arrow_io___RandomAccessFile__ReadMetadata", (DL_FUNC) &_arrow_io___RandomAccessFile__ReadMetadata, 1}, - { "_arrow_io___MemoryMappedFile__Create", (DL_FUNC) &_arrow_io___MemoryMappedFile__Create, 2}, - { "_arrow_io___MemoryMappedFile__Open", (DL_FUNC) &_arrow_io___MemoryMappedFile__Open, 2}, - { "_arrow_io___MemoryMappedFile__Resize", (DL_FUNC) &_arrow_io___MemoryMappedFile__Resize, 2}, - { "_arrow_io___ReadableFile__Open", (DL_FUNC) &_arrow_io___ReadableFile__Open, 1}, - { "_arrow_io___BufferReader__initialize", (DL_FUNC) &_arrow_io___BufferReader__initialize, 1}, - { "_arrow_io___Writable__write", (DL_FUNC) &_arrow_io___Writable__write, 2}, - { "_arrow_io___OutputStream__Tell", (DL_FUNC) &_arrow_io___OutputStream__Tell, 1}, - { "_arrow_io___FileOutputStream__Open", (DL_FUNC) &_arrow_io___FileOutputStream__Open, 1}, - { "_arrow_io___BufferOutputStream__Create", (DL_FUNC) &_arrow_io___BufferOutputStream__Create, 1}, - { "_arrow_io___BufferOutputStream__capacity", (DL_FUNC) &_arrow_io___BufferOutputStream__capacity, 1}, - { "_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_MakeRConnectionInputStream", (DL_FUNC) &_arrow_MakeRConnectionInputStream, 1}, - { "_arrow_MakeRConnectionOutputStream", (DL_FUNC) &_arrow_MakeRConnectionOutputStream, 1}, - { "_arrow_MakeRConnectionRandomAccessFile", (DL_FUNC) &_arrow_MakeRConnectionRandomAccessFile, 1}, - { "_arrow_MakeReencodeInputStream", (DL_FUNC) &_arrow_MakeReencodeInputStream, 2}, - { "_arrow_json___ReadOptions__initialize", (DL_FUNC) &_arrow_json___ReadOptions__initialize, 2}, - { "_arrow_json___ParseOptions__initialize1", (DL_FUNC) &_arrow_json___ParseOptions__initialize1, 1}, - { "_arrow_json___ParseOptions__initialize2", (DL_FUNC) &_arrow_json___ParseOptions__initialize2, 2}, - { "_arrow_json___TableReader__Make", (DL_FUNC) &_arrow_json___TableReader__Make, 3}, - { "_arrow_json___TableReader__Read", (DL_FUNC) &_arrow_json___TableReader__Read, 1}, - { "_arrow_MemoryPool__default", (DL_FUNC) &_arrow_MemoryPool__default, 0}, - { "_arrow_MemoryPool__bytes_allocated", (DL_FUNC) &_arrow_MemoryPool__bytes_allocated, 1}, - { "_arrow_MemoryPool__max_memory", (DL_FUNC) &_arrow_MemoryPool__max_memory, 1}, - { "_arrow_MemoryPool__backend_name", (DL_FUNC) &_arrow_MemoryPool__backend_name, 1}, - { "_arrow_supported_memory_backends", (DL_FUNC) &_arrow_supported_memory_backends, 0}, - { "_arrow_ipc___Message__body_length", (DL_FUNC) &_arrow_ipc___Message__body_length, 1}, - { "_arrow_ipc___Message__metadata", (DL_FUNC) &_arrow_ipc___Message__metadata, 1}, - { "_arrow_ipc___Message__body", (DL_FUNC) &_arrow_ipc___Message__body, 1}, - { "_arrow_ipc___Message__Verify", (DL_FUNC) &_arrow_ipc___Message__Verify, 1}, - { "_arrow_ipc___Message__type", (DL_FUNC) &_arrow_ipc___Message__type, 1}, - { "_arrow_ipc___Message__Equals", (DL_FUNC) &_arrow_ipc___Message__Equals, 2}, - { "_arrow_ipc___ReadRecordBatch__Message__Schema", (DL_FUNC) &_arrow_ipc___ReadRecordBatch__Message__Schema, 2}, - { "_arrow_ipc___ReadSchema_InputStream", (DL_FUNC) &_arrow_ipc___ReadSchema_InputStream, 1}, - { "_arrow_ipc___ReadSchema_Message", (DL_FUNC) &_arrow_ipc___ReadSchema_Message, 1}, - { "_arrow_ipc___MessageReader__Open", (DL_FUNC) &_arrow_ipc___MessageReader__Open, 1}, - { "_arrow_ipc___MessageReader__ReadNextMessage", (DL_FUNC) &_arrow_ipc___MessageReader__ReadNextMessage, 1}, - { "_arrow_ipc___ReadMessage", (DL_FUNC) &_arrow_ipc___ReadMessage, 1}, - { "_arrow_parquet___arrow___ArrowReaderProperties__Make", (DL_FUNC) &_arrow_parquet___arrow___ArrowReaderProperties__Make, 1}, - { "_arrow_parquet___arrow___ArrowReaderProperties__set_use_threads", (DL_FUNC) &_arrow_parquet___arrow___ArrowReaderProperties__set_use_threads, 2}, - { "_arrow_parquet___arrow___ArrowReaderProperties__get_use_threads", (DL_FUNC) &_arrow_parquet___arrow___ArrowReaderProperties__get_use_threads, 2}, - { "_arrow_parquet___arrow___ArrowReaderProperties__get_read_dictionary", (DL_FUNC) &_arrow_parquet___arrow___ArrowReaderProperties__get_read_dictionary, 2}, - { "_arrow_parquet___arrow___ArrowReaderProperties__set_read_dictionary", (DL_FUNC) &_arrow_parquet___arrow___ArrowReaderProperties__set_read_dictionary, 3}, - { "_arrow_parquet___arrow___ArrowReaderProperties__set_coerce_int96_timestamp_unit", (DL_FUNC) &_arrow_parquet___arrow___ArrowReaderProperties__set_coerce_int96_timestamp_unit, 2}, - { "_arrow_parquet___arrow___ArrowReaderProperties__get_coerce_int96_timestamp_unit", (DL_FUNC) &_arrow_parquet___arrow___ArrowReaderProperties__get_coerce_int96_timestamp_unit, 1}, - { "_arrow_parquet___arrow___FileReader__OpenFile", (DL_FUNC) &_arrow_parquet___arrow___FileReader__OpenFile, 2}, - { "_arrow_parquet___arrow___FileReader__ReadTable1", (DL_FUNC) &_arrow_parquet___arrow___FileReader__ReadTable1, 1}, - { "_arrow_parquet___arrow___FileReader__ReadTable2", (DL_FUNC) &_arrow_parquet___arrow___FileReader__ReadTable2, 2}, - { "_arrow_parquet___arrow___FileReader__ReadRowGroup1", (DL_FUNC) &_arrow_parquet___arrow___FileReader__ReadRowGroup1, 2}, - { "_arrow_parquet___arrow___FileReader__ReadRowGroup2", (DL_FUNC) &_arrow_parquet___arrow___FileReader__ReadRowGroup2, 3}, - { "_arrow_parquet___arrow___FileReader__ReadRowGroups1", (DL_FUNC) &_arrow_parquet___arrow___FileReader__ReadRowGroups1, 2}, - { "_arrow_parquet___arrow___FileReader__ReadRowGroups2", (DL_FUNC) &_arrow_parquet___arrow___FileReader__ReadRowGroups2, 3}, - { "_arrow_parquet___arrow___FileReader__num_rows", (DL_FUNC) &_arrow_parquet___arrow___FileReader__num_rows, 1}, - { "_arrow_parquet___arrow___FileReader__num_columns", (DL_FUNC) &_arrow_parquet___arrow___FileReader__num_columns, 1}, - { "_arrow_parquet___arrow___FileReader__num_row_groups", (DL_FUNC) &_arrow_parquet___arrow___FileReader__num_row_groups, 1}, - { "_arrow_parquet___arrow___FileReader__ReadColumn", (DL_FUNC) &_arrow_parquet___arrow___FileReader__ReadColumn, 2}, - { "_arrow_parquet___ArrowWriterProperties___create", (DL_FUNC) &_arrow_parquet___ArrowWriterProperties___create, 3}, - { "_arrow_parquet___WriterProperties___Builder__create", (DL_FUNC) &_arrow_parquet___WriterProperties___Builder__create, 0}, - { "_arrow_parquet___WriterProperties___Builder__version", (DL_FUNC) &_arrow_parquet___WriterProperties___Builder__version, 2}, - { "_arrow_parquet___ArrowWriterProperties___Builder__set_compressions", (DL_FUNC) &_arrow_parquet___ArrowWriterProperties___Builder__set_compressions, 3}, - { "_arrow_parquet___ArrowWriterProperties___Builder__set_compression_levels", (DL_FUNC) &_arrow_parquet___ArrowWriterProperties___Builder__set_compression_levels, 3}, - { "_arrow_parquet___ArrowWriterProperties___Builder__set_use_dictionary", (DL_FUNC) &_arrow_parquet___ArrowWriterProperties___Builder__set_use_dictionary, 3}, - { "_arrow_parquet___ArrowWriterProperties___Builder__set_write_statistics", (DL_FUNC) &_arrow_parquet___ArrowWriterProperties___Builder__set_write_statistics, 3}, - { "_arrow_parquet___ArrowWriterProperties___Builder__data_page_size", (DL_FUNC) &_arrow_parquet___ArrowWriterProperties___Builder__data_page_size, 2}, - { "_arrow_parquet___WriterProperties___Builder__build", (DL_FUNC) &_arrow_parquet___WriterProperties___Builder__build, 1}, - { "_arrow_parquet___arrow___ParquetFileWriter__Open", (DL_FUNC) &_arrow_parquet___arrow___ParquetFileWriter__Open, 4}, - { "_arrow_parquet___arrow___FileWriter__WriteTable", (DL_FUNC) &_arrow_parquet___arrow___FileWriter__WriteTable, 3}, - { "_arrow_parquet___arrow___FileWriter__Close", (DL_FUNC) &_arrow_parquet___arrow___FileWriter__Close, 1}, - { "_arrow_parquet___arrow___WriteTable", (DL_FUNC) &_arrow_parquet___arrow___WriteTable, 4}, - { "_arrow_parquet___arrow___FileReader__GetSchema", (DL_FUNC) &_arrow_parquet___arrow___FileReader__GetSchema, 1}, - { "_arrow_Table__from_dots", (DL_FUNC) &_arrow_Table__from_dots, 3}, - { "_arrow_vec_to_Array", (DL_FUNC) &_arrow_vec_to_Array, 2}, - { "_arrow_DictionaryArray__FromArrays", (DL_FUNC) &_arrow_DictionaryArray__FromArrays, 3}, - { "_arrow_RecordBatch__num_columns", (DL_FUNC) &_arrow_RecordBatch__num_columns, 1}, - { "_arrow_RecordBatch__num_rows", (DL_FUNC) &_arrow_RecordBatch__num_rows, 1}, - { "_arrow_RecordBatch__schema", (DL_FUNC) &_arrow_RecordBatch__schema, 1}, - { "_arrow_RecordBatch__RenameColumns", (DL_FUNC) &_arrow_RecordBatch__RenameColumns, 2}, - { "_arrow_RecordBatch__ReplaceSchemaMetadata", (DL_FUNC) &_arrow_RecordBatch__ReplaceSchemaMetadata, 2}, - { "_arrow_RecordBatch__columns", (DL_FUNC) &_arrow_RecordBatch__columns, 1}, - { "_arrow_RecordBatch__column", (DL_FUNC) &_arrow_RecordBatch__column, 2}, - { "_arrow_RecordBatch__GetColumnByName", (DL_FUNC) &_arrow_RecordBatch__GetColumnByName, 2}, - { "_arrow_RecordBatch__SelectColumns", (DL_FUNC) &_arrow_RecordBatch__SelectColumns, 2}, - { "_arrow_RecordBatch__Equals", (DL_FUNC) &_arrow_RecordBatch__Equals, 3}, - { "_arrow_RecordBatch__AddColumn", (DL_FUNC) &_arrow_RecordBatch__AddColumn, 4}, - { "_arrow_RecordBatch__SetColumn", (DL_FUNC) &_arrow_RecordBatch__SetColumn, 4}, - { "_arrow_RecordBatch__RemoveColumn", (DL_FUNC) &_arrow_RecordBatch__RemoveColumn, 2}, - { "_arrow_RecordBatch__column_name", (DL_FUNC) &_arrow_RecordBatch__column_name, 2}, - { "_arrow_RecordBatch__names", (DL_FUNC) &_arrow_RecordBatch__names, 1}, - { "_arrow_RecordBatch__Slice1", (DL_FUNC) &_arrow_RecordBatch__Slice1, 2}, - { "_arrow_RecordBatch__Slice2", (DL_FUNC) &_arrow_RecordBatch__Slice2, 3}, - { "_arrow_ipc___SerializeRecordBatch__Raw", (DL_FUNC) &_arrow_ipc___SerializeRecordBatch__Raw, 1}, - { "_arrow_ipc___ReadRecordBatch__InputStream__Schema", (DL_FUNC) &_arrow_ipc___ReadRecordBatch__InputStream__Schema, 2}, - { "_arrow_RecordBatch__from_arrays", (DL_FUNC) &_arrow_RecordBatch__from_arrays, 2}, - { "_arrow_RecordBatch__ReferencedBufferSize", (DL_FUNC) &_arrow_RecordBatch__ReferencedBufferSize, 1}, - { "_arrow_RecordBatchReader__schema", (DL_FUNC) &_arrow_RecordBatchReader__schema, 1}, - { "_arrow_RecordBatchReader__Close", (DL_FUNC) &_arrow_RecordBatchReader__Close, 1}, - { "_arrow_RecordBatchReader__ReadNext", (DL_FUNC) &_arrow_RecordBatchReader__ReadNext, 1}, - { "_arrow_RecordBatchReader__batches", (DL_FUNC) &_arrow_RecordBatchReader__batches, 1}, - { "_arrow_RecordBatchReader__from_batches", (DL_FUNC) &_arrow_RecordBatchReader__from_batches, 2}, - { "_arrow_RecordBatchReader__from_function", (DL_FUNC) &_arrow_RecordBatchReader__from_function, 2}, - { "_arrow_RecordBatchReader__from_Table", (DL_FUNC) &_arrow_RecordBatchReader__from_Table, 1}, - { "_arrow_Table__from_RecordBatchReader", (DL_FUNC) &_arrow_Table__from_RecordBatchReader, 1}, - { "_arrow_RecordBatchReader__Head", (DL_FUNC) &_arrow_RecordBatchReader__Head, 2}, - { "_arrow_ipc___RecordBatchStreamReader__Open", (DL_FUNC) &_arrow_ipc___RecordBatchStreamReader__Open, 1}, - { "_arrow_ipc___RecordBatchFileReader__schema", (DL_FUNC) &_arrow_ipc___RecordBatchFileReader__schema, 1}, - { "_arrow_ipc___RecordBatchFileReader__num_record_batches", (DL_FUNC) &_arrow_ipc___RecordBatchFileReader__num_record_batches, 1}, - { "_arrow_ipc___RecordBatchFileReader__ReadRecordBatch", (DL_FUNC) &_arrow_ipc___RecordBatchFileReader__ReadRecordBatch, 2}, - { "_arrow_ipc___RecordBatchFileReader__Open", (DL_FUNC) &_arrow_ipc___RecordBatchFileReader__Open, 1}, - { "_arrow_Table__from_RecordBatchFileReader", (DL_FUNC) &_arrow_Table__from_RecordBatchFileReader, 1}, - { "_arrow_ipc___RecordBatchFileReader__batches", (DL_FUNC) &_arrow_ipc___RecordBatchFileReader__batches, 1}, - { "_arrow_ipc___RecordBatchWriter__WriteRecordBatch", (DL_FUNC) &_arrow_ipc___RecordBatchWriter__WriteRecordBatch, 2}, - { "_arrow_ipc___RecordBatchWriter__WriteTable", (DL_FUNC) &_arrow_ipc___RecordBatchWriter__WriteTable, 2}, - { "_arrow_ipc___RecordBatchWriter__Close", (DL_FUNC) &_arrow_ipc___RecordBatchWriter__Close, 1}, - { "_arrow_ipc___RecordBatchFileWriter__Open", (DL_FUNC) &_arrow_ipc___RecordBatchFileWriter__Open, 4}, - { "_arrow_ipc___RecordBatchStreamWriter__Open", (DL_FUNC) &_arrow_ipc___RecordBatchStreamWriter__Open, 4}, - { "_arrow_InitializeMainRThread", (DL_FUNC) &_arrow_InitializeMainRThread, 0}, - { "_arrow_CanRunWithCapturedR", (DL_FUNC) &_arrow_CanRunWithCapturedR, 0}, - { "_arrow_TestSafeCallIntoR", (DL_FUNC) &_arrow_TestSafeCallIntoR, 2}, - { "_arrow_Array__GetScalar", (DL_FUNC) &_arrow_Array__GetScalar, 2}, - { "_arrow_Scalar__ToString", (DL_FUNC) &_arrow_Scalar__ToString, 1}, - { "_arrow_StructScalar__field", (DL_FUNC) &_arrow_StructScalar__field, 2}, - { "_arrow_StructScalar__GetFieldByName", (DL_FUNC) &_arrow_StructScalar__GetFieldByName, 2}, - { "_arrow_Scalar__as_vector", (DL_FUNC) &_arrow_Scalar__as_vector, 1}, - { "_arrow_MakeArrayFromScalar", (DL_FUNC) &_arrow_MakeArrayFromScalar, 2}, - { "_arrow_Scalar__is_valid", (DL_FUNC) &_arrow_Scalar__is_valid, 1}, - { "_arrow_Scalar__type", (DL_FUNC) &_arrow_Scalar__type, 1}, - { "_arrow_Scalar__Equals", (DL_FUNC) &_arrow_Scalar__Equals, 2}, - { "_arrow_Scalar__ApproxEquals", (DL_FUNC) &_arrow_Scalar__ApproxEquals, 2}, - { "_arrow_schema_", (DL_FUNC) &_arrow_schema_, 1}, - { "_arrow_Schema__ToString", (DL_FUNC) &_arrow_Schema__ToString, 1}, - { "_arrow_Schema__num_fields", (DL_FUNC) &_arrow_Schema__num_fields, 1}, - { "_arrow_Schema__field", (DL_FUNC) &_arrow_Schema__field, 2}, - { "_arrow_Schema__AddField", (DL_FUNC) &_arrow_Schema__AddField, 3}, - { "_arrow_Schema__SetField", (DL_FUNC) &_arrow_Schema__SetField, 3}, - { "_arrow_Schema__RemoveField", (DL_FUNC) &_arrow_Schema__RemoveField, 2}, - { "_arrow_Schema__GetFieldByName", (DL_FUNC) &_arrow_Schema__GetFieldByName, 2}, - { "_arrow_Schema__fields", (DL_FUNC) &_arrow_Schema__fields, 1}, - { "_arrow_Schema__field_names", (DL_FUNC) &_arrow_Schema__field_names, 1}, - { "_arrow_Schema__HasMetadata", (DL_FUNC) &_arrow_Schema__HasMetadata, 1}, - { "_arrow_Schema__metadata", (DL_FUNC) &_arrow_Schema__metadata, 1}, - { "_arrow_Schema__WithMetadata", (DL_FUNC) &_arrow_Schema__WithMetadata, 2}, - { "_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__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}, - { "_arrow_Table__ReplaceSchemaMetadata", (DL_FUNC) &_arrow_Table__ReplaceSchemaMetadata, 2}, - { "_arrow_Table__column", (DL_FUNC) &_arrow_Table__column, 2}, - { "_arrow_Table__field", (DL_FUNC) &_arrow_Table__field, 2}, - { "_arrow_Table__columns", (DL_FUNC) &_arrow_Table__columns, 1}, - { "_arrow_Table__ColumnNames", (DL_FUNC) &_arrow_Table__ColumnNames, 1}, - { "_arrow_Table__RenameColumns", (DL_FUNC) &_arrow_Table__RenameColumns, 2}, - { "_arrow_Table__Slice1", (DL_FUNC) &_arrow_Table__Slice1, 2}, - { "_arrow_Table__Slice2", (DL_FUNC) &_arrow_Table__Slice2, 3}, - { "_arrow_Table__Equals", (DL_FUNC) &_arrow_Table__Equals, 3}, - { "_arrow_Table__Validate", (DL_FUNC) &_arrow_Table__Validate, 1}, - { "_arrow_Table__ValidateFull", (DL_FUNC) &_arrow_Table__ValidateFull, 1}, - { "_arrow_Table__GetColumnByName", (DL_FUNC) &_arrow_Table__GetColumnByName, 2}, - { "_arrow_Table__RemoveColumn", (DL_FUNC) &_arrow_Table__RemoveColumn, 2}, - { "_arrow_Table__AddColumn", (DL_FUNC) &_arrow_Table__AddColumn, 4}, - { "_arrow_Table__SetColumn", (DL_FUNC) &_arrow_Table__SetColumn, 4}, - { "_arrow_Table__SelectColumns", (DL_FUNC) &_arrow_Table__SelectColumns, 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__ReferencedBufferSize", (DL_FUNC) &_arrow_Table__ReferencedBufferSize, 1}, - { "_arrow_Table__ConcatenateTables", (DL_FUNC) &_arrow_Table__ConcatenateTables, 2}, - { "_arrow_GetCpuThreadPoolCapacity", (DL_FUNC) &_arrow_GetCpuThreadPoolCapacity, 0}, - { "_arrow_SetCpuThreadPoolCapacity", (DL_FUNC) &_arrow_SetCpuThreadPoolCapacity, 1}, - { "_arrow_GetIOThreadPoolCapacity", (DL_FUNC) &_arrow_GetIOThreadPoolCapacity, 0}, - { "_arrow_SetIOThreadPoolCapacity", (DL_FUNC) &_arrow_SetIOThreadPoolCapacity, 1}, - { "_arrow_Array__infer_type", (DL_FUNC) &_arrow_Array__infer_type, 1}, + { "_arrow_test_SET_STRING_ELT", (DL_FUNC) &_arrow_test_SET_STRING_ELT, 1}, + { "_arrow_is_arrow_altrep", (DL_FUNC) &_arrow_is_arrow_altrep, 1}, + { "_arrow_Array__Slice1", (DL_FUNC) &_arrow_Array__Slice1, 2}, + { "_arrow_Array__Slice2", (DL_FUNC) &_arrow_Array__Slice2, 3}, + { "_arrow_Array__IsNull", (DL_FUNC) &_arrow_Array__IsNull, 2}, + { "_arrow_Array__IsValid", (DL_FUNC) &_arrow_Array__IsValid, 2}, + { "_arrow_Array__length", (DL_FUNC) &_arrow_Array__length, 1}, + { "_arrow_Array__offset", (DL_FUNC) &_arrow_Array__offset, 1}, + { "_arrow_Array__null_count", (DL_FUNC) &_arrow_Array__null_count, 1}, + { "_arrow_Array__type", (DL_FUNC) &_arrow_Array__type, 1}, + { "_arrow_Array__ToString", (DL_FUNC) &_arrow_Array__ToString, 1}, + { "_arrow_Array__type_id", (DL_FUNC) &_arrow_Array__type_id, 1}, + { "_arrow_Array__Equals", (DL_FUNC) &_arrow_Array__Equals, 2}, + { "_arrow_Array__ApproxEquals", (DL_FUNC) &_arrow_Array__ApproxEquals, 2}, + { "_arrow_Array__Diff", (DL_FUNC) &_arrow_Array__Diff, 2}, + { "_arrow_Array__data", (DL_FUNC) &_arrow_Array__data, 1}, + { "_arrow_Array__RangeEquals", (DL_FUNC) &_arrow_Array__RangeEquals, 5}, + { "_arrow_Array__View", (DL_FUNC) &_arrow_Array__View, 2}, + { "_arrow_Array__Validate", (DL_FUNC) &_arrow_Array__Validate, 1}, + { "_arrow_DictionaryArray__indices", (DL_FUNC) &_arrow_DictionaryArray__indices, 1}, + { "_arrow_DictionaryArray__dictionary", (DL_FUNC) &_arrow_DictionaryArray__dictionary, 1}, + { "_arrow_StructArray__field", (DL_FUNC) &_arrow_StructArray__field, 2}, + { "_arrow_StructArray__GetFieldByName", (DL_FUNC) &_arrow_StructArray__GetFieldByName, 2}, + { "_arrow_StructArray__Flatten", (DL_FUNC) &_arrow_StructArray__Flatten, 1}, + { "_arrow_ListArray__value_type", (DL_FUNC) &_arrow_ListArray__value_type, 1}, + { "_arrow_LargeListArray__value_type", (DL_FUNC) &_arrow_LargeListArray__value_type, 1}, + { "_arrow_ListArray__values", (DL_FUNC) &_arrow_ListArray__values, 1}, + { "_arrow_LargeListArray__values", (DL_FUNC) &_arrow_LargeListArray__values, 1}, + { "_arrow_ListArray__value_length", (DL_FUNC) &_arrow_ListArray__value_length, 2}, + { "_arrow_LargeListArray__value_length", (DL_FUNC) &_arrow_LargeListArray__value_length, 2}, + { "_arrow_FixedSizeListArray__value_length", (DL_FUNC) &_arrow_FixedSizeListArray__value_length, 2}, + { "_arrow_ListArray__value_offset", (DL_FUNC) &_arrow_ListArray__value_offset, 2}, + { "_arrow_LargeListArray__value_offset", (DL_FUNC) &_arrow_LargeListArray__value_offset, 2}, + { "_arrow_FixedSizeListArray__value_offset", (DL_FUNC) &_arrow_FixedSizeListArray__value_offset, 2}, + { "_arrow_ListArray__raw_value_offsets", (DL_FUNC) &_arrow_ListArray__raw_value_offsets, 1}, + { "_arrow_LargeListArray__raw_value_offsets", (DL_FUNC) &_arrow_LargeListArray__raw_value_offsets, 1}, + { "_arrow_MapArray__keys", (DL_FUNC) &_arrow_MapArray__keys, 1}, + { "_arrow_MapArray__items", (DL_FUNC) &_arrow_MapArray__items, 1}, + { "_arrow_MapArray__keys_nested", (DL_FUNC) &_arrow_MapArray__keys_nested, 1}, + { "_arrow_MapArray__items_nested", (DL_FUNC) &_arrow_MapArray__items_nested, 1}, + { "_arrow_Array__Same", (DL_FUNC) &_arrow_Array__Same, 2}, + { "_arrow_Array__ReferencedBufferSize", (DL_FUNC) &_arrow_Array__ReferencedBufferSize, 1}, + { "_arrow_arrow__Concatenate", (DL_FUNC) &_arrow_arrow__Concatenate, 1}, + { "_arrow_Array__as_vector", (DL_FUNC) &_arrow_Array__as_vector, 1}, + { "_arrow_ChunkedArray__as_vector", (DL_FUNC) &_arrow_ChunkedArray__as_vector, 2}, + { "_arrow_RecordBatch__to_dataframe", (DL_FUNC) &_arrow_RecordBatch__to_dataframe, 2}, + { "_arrow_Table__to_dataframe", (DL_FUNC) &_arrow_Table__to_dataframe, 2}, + { "_arrow_ArrayData__get_type", (DL_FUNC) &_arrow_ArrayData__get_type, 1}, + { "_arrow_ArrayData__get_length", (DL_FUNC) &_arrow_ArrayData__get_length, 1}, + { "_arrow_ArrayData__get_null_count", (DL_FUNC) &_arrow_ArrayData__get_null_count, 1}, + { "_arrow_ArrayData__get_offset", (DL_FUNC) &_arrow_ArrayData__get_offset, 1}, + { "_arrow_ArrayData__buffers", (DL_FUNC) &_arrow_ArrayData__buffers, 1}, + { "_arrow_external_pointer_addr_double", (DL_FUNC) &_arrow_external_pointer_addr_double, 1}, + { "_arrow_external_pointer_addr_character", (DL_FUNC) &_arrow_external_pointer_addr_character, 1}, + { "_arrow_external_pointer_addr_integer64", (DL_FUNC) &_arrow_external_pointer_addr_integer64, 1}, + { "_arrow_external_pointer_addr_raw", (DL_FUNC) &_arrow_external_pointer_addr_raw, 1}, + { "_arrow_allocate_arrow_schema", (DL_FUNC) &_arrow_allocate_arrow_schema, 0}, + { "_arrow_delete_arrow_schema", (DL_FUNC) &_arrow_delete_arrow_schema, 1}, + { "_arrow_allocate_arrow_array", (DL_FUNC) &_arrow_allocate_arrow_array, 0}, + { "_arrow_delete_arrow_array", (DL_FUNC) &_arrow_delete_arrow_array, 1}, + { "_arrow_allocate_arrow_array_stream", (DL_FUNC) &_arrow_allocate_arrow_array_stream, 0}, + { "_arrow_delete_arrow_array_stream", (DL_FUNC) &_arrow_delete_arrow_array_stream, 1}, + { "_arrow_ImportArray", (DL_FUNC) &_arrow_ImportArray, 2}, + { "_arrow_ImportRecordBatch", (DL_FUNC) &_arrow_ImportRecordBatch, 2}, + { "_arrow_ImportSchema", (DL_FUNC) &_arrow_ImportSchema, 1}, + { "_arrow_ImportField", (DL_FUNC) &_arrow_ImportField, 1}, + { "_arrow_ImportType", (DL_FUNC) &_arrow_ImportType, 1}, + { "_arrow_ImportRecordBatchReader", (DL_FUNC) &_arrow_ImportRecordBatchReader, 1}, + { "_arrow_ExportType", (DL_FUNC) &_arrow_ExportType, 2}, + { "_arrow_ExportField", (DL_FUNC) &_arrow_ExportField, 2}, + { "_arrow_ExportSchema", (DL_FUNC) &_arrow_ExportSchema, 2}, + { "_arrow_ExportArray", (DL_FUNC) &_arrow_ExportArray, 3}, + { "_arrow_ExportRecordBatch", (DL_FUNC) &_arrow_ExportRecordBatch, 3}, + { "_arrow_ExportRecordBatchReader", (DL_FUNC) &_arrow_ExportRecordBatchReader, 2}, + { "_arrow_Buffer__is_mutable", (DL_FUNC) &_arrow_Buffer__is_mutable, 1}, + { "_arrow_Buffer__ZeroPadding", (DL_FUNC) &_arrow_Buffer__ZeroPadding, 1}, + { "_arrow_Buffer__capacity", (DL_FUNC) &_arrow_Buffer__capacity, 1}, + { "_arrow_Buffer__size", (DL_FUNC) &_arrow_Buffer__size, 1}, + { "_arrow_r___RBuffer__initialize", (DL_FUNC) &_arrow_r___RBuffer__initialize, 1}, + { "_arrow_Buffer__data", (DL_FUNC) &_arrow_Buffer__data, 1}, + { "_arrow_Buffer__Equals", (DL_FUNC) &_arrow_Buffer__Equals, 2}, + { "_arrow_ChunkedArray__length", (DL_FUNC) &_arrow_ChunkedArray__length, 1}, + { "_arrow_ChunkedArray__null_count", (DL_FUNC) &_arrow_ChunkedArray__null_count, 1}, + { "_arrow_ChunkedArray__num_chunks", (DL_FUNC) &_arrow_ChunkedArray__num_chunks, 1}, + { "_arrow_ChunkedArray__chunk", (DL_FUNC) &_arrow_ChunkedArray__chunk, 2}, + { "_arrow_ChunkedArray__chunks", (DL_FUNC) &_arrow_ChunkedArray__chunks, 1}, + { "_arrow_ChunkedArray__type", (DL_FUNC) &_arrow_ChunkedArray__type, 1}, + { "_arrow_ChunkedArray__Slice1", (DL_FUNC) &_arrow_ChunkedArray__Slice1, 2}, + { "_arrow_ChunkedArray__Slice2", (DL_FUNC) &_arrow_ChunkedArray__Slice2, 3}, + { "_arrow_ChunkedArray__View", (DL_FUNC) &_arrow_ChunkedArray__View, 2}, + { "_arrow_ChunkedArray__Validate", (DL_FUNC) &_arrow_ChunkedArray__Validate, 1}, + { "_arrow_ChunkedArray__Equals", (DL_FUNC) &_arrow_ChunkedArray__Equals, 2}, + { "_arrow_ChunkedArray__ToString", (DL_FUNC) &_arrow_ChunkedArray__ToString, 1}, + { "_arrow_ChunkedArray__from_list", (DL_FUNC) &_arrow_ChunkedArray__from_list, 2}, + { "_arrow_ChunkedArray__ReferencedBufferSize", (DL_FUNC) &_arrow_ChunkedArray__ReferencedBufferSize, 1}, + { "_arrow_util___Codec__Create", (DL_FUNC) &_arrow_util___Codec__Create, 2}, + { "_arrow_util___Codec__name", (DL_FUNC) &_arrow_util___Codec__name, 1}, + { "_arrow_util___Codec__IsAvailable", (DL_FUNC) &_arrow_util___Codec__IsAvailable, 1}, + { "_arrow_io___CompressedOutputStream__Make", (DL_FUNC) &_arrow_io___CompressedOutputStream__Make, 2}, + { "_arrow_io___CompressedInputStream__Make", (DL_FUNC) &_arrow_io___CompressedInputStream__Make, 2}, + { "_arrow_ExecPlan_create", (DL_FUNC) &_arrow_ExecPlan_create, 1}, + { "_arrow_ExecPlan_run", (DL_FUNC) &_arrow_ExecPlan_run, 5}, + { "_arrow_ExecPlan_read_table", (DL_FUNC) &_arrow_ExecPlan_read_table, 5}, + { "_arrow_ExecPlan_StopProducing", (DL_FUNC) &_arrow_ExecPlan_StopProducing, 1}, + { "_arrow_ExecNode_output_schema", (DL_FUNC) &_arrow_ExecNode_output_schema, 1}, + { "_arrow_ExecNode_Scan", (DL_FUNC) &_arrow_ExecNode_Scan, 4}, + { "_arrow_ExecPlan_Write", (DL_FUNC) &_arrow_ExecPlan_Write, 14}, + { "_arrow_ExecNode_Filter", (DL_FUNC) &_arrow_ExecNode_Filter, 2}, + { "_arrow_ExecNode_Project", (DL_FUNC) &_arrow_ExecNode_Project, 3}, + { "_arrow_ExecNode_Aggregate", (DL_FUNC) &_arrow_ExecNode_Aggregate, 3}, + { "_arrow_ExecNode_Join", (DL_FUNC) &_arrow_ExecNode_Join, 9}, + { "_arrow_ExecNode_Union", (DL_FUNC) &_arrow_ExecNode_Union, 2}, + { "_arrow_ExecNode_SourceNode", (DL_FUNC) &_arrow_ExecNode_SourceNode, 2}, + { "_arrow_ExecNode_TableSourceNode", (DL_FUNC) &_arrow_ExecNode_TableSourceNode, 2}, + { "_arrow_substrait__internal__SubstraitToJSON", (DL_FUNC) &_arrow_substrait__internal__SubstraitToJSON, 1}, + { "_arrow_substrait__internal__SubstraitFromJSON", (DL_FUNC) &_arrow_substrait__internal__SubstraitFromJSON, 1}, + { "_arrow_ExecPlan_run_substrait", (DL_FUNC) &_arrow_ExecPlan_run_substrait, 2}, + { "_arrow_RecordBatch__cast", (DL_FUNC) &_arrow_RecordBatch__cast, 3}, + { "_arrow_Table__cast", (DL_FUNC) &_arrow_Table__cast, 3}, + { "_arrow_compute__CallFunction", (DL_FUNC) &_arrow_compute__CallFunction, 3}, + { "_arrow_compute__GetFunctionNames", (DL_FUNC) &_arrow_compute__GetFunctionNames, 0}, + { "_arrow_RegisterScalarUDF", (DL_FUNC) &_arrow_RegisterScalarUDF, 2}, + { "_arrow_build_info", (DL_FUNC) &_arrow_build_info, 0}, + { "_arrow_runtime_info", (DL_FUNC) &_arrow_runtime_info, 0}, + { "_arrow_set_timezone_database", (DL_FUNC) &_arrow_set_timezone_database, 1}, + { "_arrow_csv___WriteOptions__initialize", (DL_FUNC) &_arrow_csv___WriteOptions__initialize, 1}, + { "_arrow_csv___ReadOptions__initialize", (DL_FUNC) &_arrow_csv___ReadOptions__initialize, 1}, + { "_arrow_csv___ParseOptions__initialize", (DL_FUNC) &_arrow_csv___ParseOptions__initialize, 1}, + { "_arrow_csv___ReadOptions__column_names", (DL_FUNC) &_arrow_csv___ReadOptions__column_names, 1}, + { "_arrow_csv___ConvertOptions__initialize", (DL_FUNC) &_arrow_csv___ConvertOptions__initialize, 1}, + { "_arrow_csv___TableReader__Make", (DL_FUNC) &_arrow_csv___TableReader__Make, 4}, + { "_arrow_csv___TableReader__Read", (DL_FUNC) &_arrow_csv___TableReader__Read, 1}, + { "_arrow_TimestampParser__kind", (DL_FUNC) &_arrow_TimestampParser__kind, 1}, + { "_arrow_TimestampParser__format", (DL_FUNC) &_arrow_TimestampParser__format, 1}, + { "_arrow_TimestampParser__MakeStrptime", (DL_FUNC) &_arrow_TimestampParser__MakeStrptime, 1}, + { "_arrow_TimestampParser__MakeISO8601", (DL_FUNC) &_arrow_TimestampParser__MakeISO8601, 0}, + { "_arrow_csv___WriteCSV__Table", (DL_FUNC) &_arrow_csv___WriteCSV__Table, 3}, + { "_arrow_csv___WriteCSV__RecordBatch", (DL_FUNC) &_arrow_csv___WriteCSV__RecordBatch, 3}, + { "_arrow_csv___WriteCSV__RecordBatchReader", (DL_FUNC) &_arrow_csv___WriteCSV__RecordBatchReader, 3}, + { "_arrow_dataset___Dataset__NewScan", (DL_FUNC) &_arrow_dataset___Dataset__NewScan, 1}, + { "_arrow_dataset___Dataset__schema", (DL_FUNC) &_arrow_dataset___Dataset__schema, 1}, + { "_arrow_dataset___Dataset__type_name", (DL_FUNC) &_arrow_dataset___Dataset__type_name, 1}, + { "_arrow_dataset___Dataset__ReplaceSchema", (DL_FUNC) &_arrow_dataset___Dataset__ReplaceSchema, 2}, + { "_arrow_dataset___UnionDataset__create", (DL_FUNC) &_arrow_dataset___UnionDataset__create, 2}, + { "_arrow_dataset___InMemoryDataset__create", (DL_FUNC) &_arrow_dataset___InMemoryDataset__create, 1}, + { "_arrow_dataset___UnionDataset__children", (DL_FUNC) &_arrow_dataset___UnionDataset__children, 1}, + { "_arrow_dataset___FileSystemDataset__format", (DL_FUNC) &_arrow_dataset___FileSystemDataset__format, 1}, + { "_arrow_dataset___FileSystemDataset__filesystem", (DL_FUNC) &_arrow_dataset___FileSystemDataset__filesystem, 1}, + { "_arrow_dataset___FileSystemDataset__files", (DL_FUNC) &_arrow_dataset___FileSystemDataset__files, 1}, + { "_arrow_dataset___DatasetFactory__Finish1", (DL_FUNC) &_arrow_dataset___DatasetFactory__Finish1, 2}, + { "_arrow_dataset___DatasetFactory__Finish2", (DL_FUNC) &_arrow_dataset___DatasetFactory__Finish2, 2}, + { "_arrow_dataset___DatasetFactory__Inspect", (DL_FUNC) &_arrow_dataset___DatasetFactory__Inspect, 2}, + { "_arrow_dataset___UnionDatasetFactory__Make", (DL_FUNC) &_arrow_dataset___UnionDatasetFactory__Make, 1}, + { "_arrow_dataset___FileSystemDatasetFactory__Make", (DL_FUNC) &_arrow_dataset___FileSystemDatasetFactory__Make, 4}, + { "_arrow_dataset___FileSystemDatasetFactory__MakePaths", (DL_FUNC) &_arrow_dataset___FileSystemDatasetFactory__MakePaths, 4}, + { "_arrow_dataset___FileFormat__type_name", (DL_FUNC) &_arrow_dataset___FileFormat__type_name, 1}, + { "_arrow_dataset___FileFormat__DefaultWriteOptions", (DL_FUNC) &_arrow_dataset___FileFormat__DefaultWriteOptions, 1}, + { "_arrow_dataset___ParquetFileFormat__Make", (DL_FUNC) &_arrow_dataset___ParquetFileFormat__Make, 2}, + { "_arrow_dataset___FileWriteOptions__type_name", (DL_FUNC) &_arrow_dataset___FileWriteOptions__type_name, 1}, + { "_arrow_dataset___ParquetFileWriteOptions__update", (DL_FUNC) &_arrow_dataset___ParquetFileWriteOptions__update, 3}, + { "_arrow_dataset___IpcFileWriteOptions__update2", (DL_FUNC) &_arrow_dataset___IpcFileWriteOptions__update2, 4}, + { "_arrow_dataset___IpcFileWriteOptions__update1", (DL_FUNC) &_arrow_dataset___IpcFileWriteOptions__update1, 3}, + { "_arrow_dataset___CsvFileWriteOptions__update", (DL_FUNC) &_arrow_dataset___CsvFileWriteOptions__update, 2}, + { "_arrow_dataset___IpcFileFormat__Make", (DL_FUNC) &_arrow_dataset___IpcFileFormat__Make, 0}, + { "_arrow_dataset___CsvFileFormat__Make", (DL_FUNC) &_arrow_dataset___CsvFileFormat__Make, 3}, + { "_arrow_dataset___FragmentScanOptions__type_name", (DL_FUNC) &_arrow_dataset___FragmentScanOptions__type_name, 1}, + { "_arrow_dataset___CsvFragmentScanOptions__Make", (DL_FUNC) &_arrow_dataset___CsvFragmentScanOptions__Make, 2}, + { "_arrow_dataset___ParquetFragmentScanOptions__Make", (DL_FUNC) &_arrow_dataset___ParquetFragmentScanOptions__Make, 3}, + { "_arrow_dataset___DirectoryPartitioning", (DL_FUNC) &_arrow_dataset___DirectoryPartitioning, 2}, + { "_arrow_dataset___DirectoryPartitioning__MakeFactory", (DL_FUNC) &_arrow_dataset___DirectoryPartitioning__MakeFactory, 2}, + { "_arrow_dataset___HivePartitioning", (DL_FUNC) &_arrow_dataset___HivePartitioning, 3}, + { "_arrow_dataset___HivePartitioning__MakeFactory", (DL_FUNC) &_arrow_dataset___HivePartitioning__MakeFactory, 2}, + { "_arrow_dataset___PartitioningFactory__Inspect", (DL_FUNC) &_arrow_dataset___PartitioningFactory__Inspect, 2}, + { "_arrow_dataset___PartitioningFactory__Finish", (DL_FUNC) &_arrow_dataset___PartitioningFactory__Finish, 2}, + { "_arrow_dataset___PartitioningFactory__type_name", (DL_FUNC) &_arrow_dataset___PartitioningFactory__type_name, 1}, + { "_arrow_dataset___ScannerBuilder__ProjectNames", (DL_FUNC) &_arrow_dataset___ScannerBuilder__ProjectNames, 2}, + { "_arrow_dataset___ScannerBuilder__ProjectExprs", (DL_FUNC) &_arrow_dataset___ScannerBuilder__ProjectExprs, 3}, + { "_arrow_dataset___ScannerBuilder__Filter", (DL_FUNC) &_arrow_dataset___ScannerBuilder__Filter, 2}, + { "_arrow_dataset___ScannerBuilder__UseThreads", (DL_FUNC) &_arrow_dataset___ScannerBuilder__UseThreads, 2}, + { "_arrow_dataset___ScannerBuilder__BatchSize", (DL_FUNC) &_arrow_dataset___ScannerBuilder__BatchSize, 2}, + { "_arrow_dataset___ScannerBuilder__FragmentScanOptions", (DL_FUNC) &_arrow_dataset___ScannerBuilder__FragmentScanOptions, 2}, + { "_arrow_dataset___ScannerBuilder__schema", (DL_FUNC) &_arrow_dataset___ScannerBuilder__schema, 1}, + { "_arrow_dataset___ScannerBuilder__Finish", (DL_FUNC) &_arrow_dataset___ScannerBuilder__Finish, 1}, + { "_arrow_dataset___ScannerBuilder__FromRecordBatchReader", (DL_FUNC) &_arrow_dataset___ScannerBuilder__FromRecordBatchReader, 1}, + { "_arrow_dataset___Scanner__ToTable", (DL_FUNC) &_arrow_dataset___Scanner__ToTable, 1}, + { "_arrow_dataset___Scanner__ScanBatches", (DL_FUNC) &_arrow_dataset___Scanner__ScanBatches, 1}, + { "_arrow_dataset___Scanner__ToRecordBatchReader", (DL_FUNC) &_arrow_dataset___Scanner__ToRecordBatchReader, 1}, + { "_arrow_dataset___Scanner__head", (DL_FUNC) &_arrow_dataset___Scanner__head, 2}, + { "_arrow_dataset___Scanner__schema", (DL_FUNC) &_arrow_dataset___Scanner__schema, 1}, + { "_arrow_dataset___Scanner__TakeRows", (DL_FUNC) &_arrow_dataset___Scanner__TakeRows, 2}, + { "_arrow_dataset___Scanner__CountRows", (DL_FUNC) &_arrow_dataset___Scanner__CountRows, 1}, + { "_arrow_Int8__initialize", (DL_FUNC) &_arrow_Int8__initialize, 0}, + { "_arrow_Int16__initialize", (DL_FUNC) &_arrow_Int16__initialize, 0}, + { "_arrow_Int32__initialize", (DL_FUNC) &_arrow_Int32__initialize, 0}, + { "_arrow_Int64__initialize", (DL_FUNC) &_arrow_Int64__initialize, 0}, + { "_arrow_UInt8__initialize", (DL_FUNC) &_arrow_UInt8__initialize, 0}, + { "_arrow_UInt16__initialize", (DL_FUNC) &_arrow_UInt16__initialize, 0}, + { "_arrow_UInt32__initialize", (DL_FUNC) &_arrow_UInt32__initialize, 0}, + { "_arrow_UInt64__initialize", (DL_FUNC) &_arrow_UInt64__initialize, 0}, + { "_arrow_Float16__initialize", (DL_FUNC) &_arrow_Float16__initialize, 0}, + { "_arrow_Float32__initialize", (DL_FUNC) &_arrow_Float32__initialize, 0}, + { "_arrow_Float64__initialize", (DL_FUNC) &_arrow_Float64__initialize, 0}, + { "_arrow_Boolean__initialize", (DL_FUNC) &_arrow_Boolean__initialize, 0}, + { "_arrow_Utf8__initialize", (DL_FUNC) &_arrow_Utf8__initialize, 0}, + { "_arrow_LargeUtf8__initialize", (DL_FUNC) &_arrow_LargeUtf8__initialize, 0}, + { "_arrow_Binary__initialize", (DL_FUNC) &_arrow_Binary__initialize, 0}, + { "_arrow_LargeBinary__initialize", (DL_FUNC) &_arrow_LargeBinary__initialize, 0}, + { "_arrow_Date32__initialize", (DL_FUNC) &_arrow_Date32__initialize, 0}, + { "_arrow_Date64__initialize", (DL_FUNC) &_arrow_Date64__initialize, 0}, + { "_arrow_Null__initialize", (DL_FUNC) &_arrow_Null__initialize, 0}, + { "_arrow_Decimal128Type__initialize", (DL_FUNC) &_arrow_Decimal128Type__initialize, 2}, + { "_arrow_Decimal256Type__initialize", (DL_FUNC) &_arrow_Decimal256Type__initialize, 2}, + { "_arrow_DayTimeInterval__initialize", (DL_FUNC) &_arrow_DayTimeInterval__initialize, 0}, + { "_arrow_FixedSizeBinary__initialize", (DL_FUNC) &_arrow_FixedSizeBinary__initialize, 1}, + { "_arrow_FixedSizeBinary__byte_width", (DL_FUNC) &_arrow_FixedSizeBinary__byte_width, 1}, + { "_arrow_Timestamp__initialize", (DL_FUNC) &_arrow_Timestamp__initialize, 2}, + { "_arrow_Time32__initialize", (DL_FUNC) &_arrow_Time32__initialize, 1}, + { "_arrow_Time64__initialize", (DL_FUNC) &_arrow_Time64__initialize, 1}, + { "_arrow_Duration__initialize", (DL_FUNC) &_arrow_Duration__initialize, 1}, + { "_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_map__", (DL_FUNC) &_arrow_map__, 3}, + { "_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}, + { "_arrow_DataType__num_fields", (DL_FUNC) &_arrow_DataType__num_fields, 1}, + { "_arrow_DataType__fields", (DL_FUNC) &_arrow_DataType__fields, 1}, + { "_arrow_DataType__id", (DL_FUNC) &_arrow_DataType__id, 1}, + { "_arrow_ListType__ToString", (DL_FUNC) &_arrow_ListType__ToString, 1}, + { "_arrow_FixedWidthType__bit_width", (DL_FUNC) &_arrow_FixedWidthType__bit_width, 1}, + { "_arrow_DateType__unit", (DL_FUNC) &_arrow_DateType__unit, 1}, + { "_arrow_TimeType__unit", (DL_FUNC) &_arrow_TimeType__unit, 1}, + { "_arrow_DurationType__unit", (DL_FUNC) &_arrow_DurationType__unit, 1}, + { "_arrow_DecimalType__precision", (DL_FUNC) &_arrow_DecimalType__precision, 1}, + { "_arrow_DecimalType__scale", (DL_FUNC) &_arrow_DecimalType__scale, 1}, + { "_arrow_TimestampType__timezone", (DL_FUNC) &_arrow_TimestampType__timezone, 1}, + { "_arrow_TimestampType__unit", (DL_FUNC) &_arrow_TimestampType__unit, 1}, + { "_arrow_DictionaryType__initialize", (DL_FUNC) &_arrow_DictionaryType__initialize, 3}, + { "_arrow_DictionaryType__index_type", (DL_FUNC) &_arrow_DictionaryType__index_type, 1}, + { "_arrow_DictionaryType__value_type", (DL_FUNC) &_arrow_DictionaryType__value_type, 1}, + { "_arrow_DictionaryType__name", (DL_FUNC) &_arrow_DictionaryType__name, 1}, + { "_arrow_DictionaryType__ordered", (DL_FUNC) &_arrow_DictionaryType__ordered, 1}, + { "_arrow_StructType__GetFieldByName", (DL_FUNC) &_arrow_StructType__GetFieldByName, 2}, + { "_arrow_StructType__GetFieldIndex", (DL_FUNC) &_arrow_StructType__GetFieldIndex, 2}, + { "_arrow_StructType__field_names", (DL_FUNC) &_arrow_StructType__field_names, 1}, + { "_arrow_ListType__value_field", (DL_FUNC) &_arrow_ListType__value_field, 1}, + { "_arrow_ListType__value_type", (DL_FUNC) &_arrow_ListType__value_type, 1}, + { "_arrow_LargeListType__value_field", (DL_FUNC) &_arrow_LargeListType__value_field, 1}, + { "_arrow_LargeListType__value_type", (DL_FUNC) &_arrow_LargeListType__value_type, 1}, + { "_arrow_FixedSizeListType__value_field", (DL_FUNC) &_arrow_FixedSizeListType__value_field, 1}, + { "_arrow_FixedSizeListType__value_type", (DL_FUNC) &_arrow_FixedSizeListType__value_type, 1}, + { "_arrow_FixedSizeListType__list_size", (DL_FUNC) &_arrow_FixedSizeListType__list_size, 1}, + { "_arrow_MapType__key_field", (DL_FUNC) &_arrow_MapType__key_field, 1}, + { "_arrow_MapType__item_field", (DL_FUNC) &_arrow_MapType__item_field, 1}, + { "_arrow_MapType__key_type", (DL_FUNC) &_arrow_MapType__key_type, 1}, + { "_arrow_MapType__item_type", (DL_FUNC) &_arrow_MapType__item_type, 1}, + { "_arrow_MapType__keys_sorted", (DL_FUNC) &_arrow_MapType__keys_sorted, 1}, + { "_arrow_compute___expr__equals", (DL_FUNC) &_arrow_compute___expr__equals, 2}, + { "_arrow_compute___expr__call", (DL_FUNC) &_arrow_compute___expr__call, 3}, + { "_arrow_field_names_in_expression", (DL_FUNC) &_arrow_field_names_in_expression, 1}, + { "_arrow_compute___expr__get_field_ref_name", (DL_FUNC) &_arrow_compute___expr__get_field_ref_name, 1}, + { "_arrow_compute___expr__field_ref", (DL_FUNC) &_arrow_compute___expr__field_ref, 1}, + { "_arrow_compute___expr__scalar", (DL_FUNC) &_arrow_compute___expr__scalar, 1}, + { "_arrow_compute___expr__ToString", (DL_FUNC) &_arrow_compute___expr__ToString, 1}, + { "_arrow_compute___expr__type", (DL_FUNC) &_arrow_compute___expr__type, 2}, + { "_arrow_compute___expr__type_id", (DL_FUNC) &_arrow_compute___expr__type_id, 2}, + { "_arrow_ExtensionType__initialize", (DL_FUNC) &_arrow_ExtensionType__initialize, 4}, + { "_arrow_ExtensionType__extension_name", (DL_FUNC) &_arrow_ExtensionType__extension_name, 1}, + { "_arrow_ExtensionType__Serialize", (DL_FUNC) &_arrow_ExtensionType__Serialize, 1}, + { "_arrow_ExtensionType__storage_type", (DL_FUNC) &_arrow_ExtensionType__storage_type, 1}, + { "_arrow_ExtensionType__MakeArray", (DL_FUNC) &_arrow_ExtensionType__MakeArray, 2}, + { "_arrow_ExtensionType__r6_class", (DL_FUNC) &_arrow_ExtensionType__r6_class, 1}, + { "_arrow_ExtensionArray__storage", (DL_FUNC) &_arrow_ExtensionArray__storage, 1}, + { "_arrow_arrow__RegisterRExtensionType", (DL_FUNC) &_arrow_arrow__RegisterRExtensionType, 1}, + { "_arrow_arrow__UnregisterRExtensionType", (DL_FUNC) &_arrow_arrow__UnregisterRExtensionType, 1}, + { "_arrow_ipc___WriteFeather__Table", (DL_FUNC) &_arrow_ipc___WriteFeather__Table, 6}, + { "_arrow_ipc___feather___Reader__version", (DL_FUNC) &_arrow_ipc___feather___Reader__version, 1}, + { "_arrow_ipc___feather___Reader__Read", (DL_FUNC) &_arrow_ipc___feather___Reader__Read, 2}, + { "_arrow_ipc___feather___Reader__Open", (DL_FUNC) &_arrow_ipc___feather___Reader__Open, 1}, + { "_arrow_ipc___feather___Reader__schema", (DL_FUNC) &_arrow_ipc___feather___Reader__schema, 1}, + { "_arrow_Field__initialize", (DL_FUNC) &_arrow_Field__initialize, 3}, + { "_arrow_Field__ToString", (DL_FUNC) &_arrow_Field__ToString, 1}, + { "_arrow_Field__name", (DL_FUNC) &_arrow_Field__name, 1}, + { "_arrow_Field__Equals", (DL_FUNC) &_arrow_Field__Equals, 2}, + { "_arrow_Field__nullable", (DL_FUNC) &_arrow_Field__nullable, 1}, + { "_arrow_Field__type", (DL_FUNC) &_arrow_Field__type, 1}, + { "_arrow_fs___FileInfo__type", (DL_FUNC) &_arrow_fs___FileInfo__type, 1}, + { "_arrow_fs___FileInfo__set_type", (DL_FUNC) &_arrow_fs___FileInfo__set_type, 2}, + { "_arrow_fs___FileInfo__path", (DL_FUNC) &_arrow_fs___FileInfo__path, 1}, + { "_arrow_fs___FileInfo__set_path", (DL_FUNC) &_arrow_fs___FileInfo__set_path, 2}, + { "_arrow_fs___FileInfo__size", (DL_FUNC) &_arrow_fs___FileInfo__size, 1}, + { "_arrow_fs___FileInfo__set_size", (DL_FUNC) &_arrow_fs___FileInfo__set_size, 2}, + { "_arrow_fs___FileInfo__base_name", (DL_FUNC) &_arrow_fs___FileInfo__base_name, 1}, + { "_arrow_fs___FileInfo__extension", (DL_FUNC) &_arrow_fs___FileInfo__extension, 1}, + { "_arrow_fs___FileInfo__mtime", (DL_FUNC) &_arrow_fs___FileInfo__mtime, 1}, + { "_arrow_fs___FileInfo__set_mtime", (DL_FUNC) &_arrow_fs___FileInfo__set_mtime, 2}, + { "_arrow_fs___FileSelector__base_dir", (DL_FUNC) &_arrow_fs___FileSelector__base_dir, 1}, + { "_arrow_fs___FileSelector__allow_not_found", (DL_FUNC) &_arrow_fs___FileSelector__allow_not_found, 1}, + { "_arrow_fs___FileSelector__recursive", (DL_FUNC) &_arrow_fs___FileSelector__recursive, 1}, + { "_arrow_fs___FileSelector__create", (DL_FUNC) &_arrow_fs___FileSelector__create, 3}, + { "_arrow_fs___FileSystem__GetTargetInfos_Paths", (DL_FUNC) &_arrow_fs___FileSystem__GetTargetInfos_Paths, 2}, + { "_arrow_fs___FileSystem__GetTargetInfos_FileSelector", (DL_FUNC) &_arrow_fs___FileSystem__GetTargetInfos_FileSelector, 2}, + { "_arrow_fs___FileSystem__CreateDir", (DL_FUNC) &_arrow_fs___FileSystem__CreateDir, 3}, + { "_arrow_fs___FileSystem__DeleteDir", (DL_FUNC) &_arrow_fs___FileSystem__DeleteDir, 2}, + { "_arrow_fs___FileSystem__DeleteDirContents", (DL_FUNC) &_arrow_fs___FileSystem__DeleteDirContents, 2}, + { "_arrow_fs___FileSystem__DeleteFile", (DL_FUNC) &_arrow_fs___FileSystem__DeleteFile, 2}, + { "_arrow_fs___FileSystem__DeleteFiles", (DL_FUNC) &_arrow_fs___FileSystem__DeleteFiles, 2}, + { "_arrow_fs___FileSystem__Move", (DL_FUNC) &_arrow_fs___FileSystem__Move, 3}, + { "_arrow_fs___FileSystem__CopyFile", (DL_FUNC) &_arrow_fs___FileSystem__CopyFile, 3}, + { "_arrow_fs___FileSystem__OpenInputStream", (DL_FUNC) &_arrow_fs___FileSystem__OpenInputStream, 2}, + { "_arrow_fs___FileSystem__OpenInputFile", (DL_FUNC) &_arrow_fs___FileSystem__OpenInputFile, 2}, + { "_arrow_fs___FileSystem__OpenOutputStream", (DL_FUNC) &_arrow_fs___FileSystem__OpenOutputStream, 2}, + { "_arrow_fs___FileSystem__OpenAppendStream", (DL_FUNC) &_arrow_fs___FileSystem__OpenAppendStream, 2}, + { "_arrow_fs___FileSystem__type_name", (DL_FUNC) &_arrow_fs___FileSystem__type_name, 1}, + { "_arrow_fs___LocalFileSystem__create", (DL_FUNC) &_arrow_fs___LocalFileSystem__create, 0}, + { "_arrow_fs___SubTreeFileSystem__create", (DL_FUNC) &_arrow_fs___SubTreeFileSystem__create, 2}, + { "_arrow_fs___SubTreeFileSystem__base_fs", (DL_FUNC) &_arrow_fs___SubTreeFileSystem__base_fs, 1}, + { "_arrow_fs___SubTreeFileSystem__base_path", (DL_FUNC) &_arrow_fs___SubTreeFileSystem__base_path, 1}, + { "_arrow_fs___FileSystemFromUri", (DL_FUNC) &_arrow_fs___FileSystemFromUri, 1}, + { "_arrow_fs___CopyFiles", (DL_FUNC) &_arrow_fs___CopyFiles, 6}, + { "_arrow_fs___S3FileSystem__create", (DL_FUNC) &_arrow_fs___S3FileSystem__create, 15}, + { "_arrow_fs___S3FileSystem__region", (DL_FUNC) &_arrow_fs___S3FileSystem__region, 1}, + { "_arrow_fs___GcsFileSystem__Make", (DL_FUNC) &_arrow_fs___GcsFileSystem__Make, 2}, + { "_arrow_io___Readable__Read", (DL_FUNC) &_arrow_io___Readable__Read, 2}, + { "_arrow_io___InputStream__Close", (DL_FUNC) &_arrow_io___InputStream__Close, 1}, + { "_arrow_io___OutputStream__Close", (DL_FUNC) &_arrow_io___OutputStream__Close, 1}, + { "_arrow_io___RandomAccessFile__GetSize", (DL_FUNC) &_arrow_io___RandomAccessFile__GetSize, 1}, + { "_arrow_io___RandomAccessFile__supports_zero_copy", (DL_FUNC) &_arrow_io___RandomAccessFile__supports_zero_copy, 1}, + { "_arrow_io___RandomAccessFile__Seek", (DL_FUNC) &_arrow_io___RandomAccessFile__Seek, 2}, + { "_arrow_io___RandomAccessFile__Tell", (DL_FUNC) &_arrow_io___RandomAccessFile__Tell, 1}, + { "_arrow_io___RandomAccessFile__Read0", (DL_FUNC) &_arrow_io___RandomAccessFile__Read0, 1}, + { "_arrow_io___RandomAccessFile__ReadAt", (DL_FUNC) &_arrow_io___RandomAccessFile__ReadAt, 3}, + { "_arrow_io___RandomAccessFile__ReadMetadata", (DL_FUNC) &_arrow_io___RandomAccessFile__ReadMetadata, 1}, + { "_arrow_io___MemoryMappedFile__Create", (DL_FUNC) &_arrow_io___MemoryMappedFile__Create, 2}, + { "_arrow_io___MemoryMappedFile__Open", (DL_FUNC) &_arrow_io___MemoryMappedFile__Open, 2}, + { "_arrow_io___MemoryMappedFile__Resize", (DL_FUNC) &_arrow_io___MemoryMappedFile__Resize, 2}, + { "_arrow_io___ReadableFile__Open", (DL_FUNC) &_arrow_io___ReadableFile__Open, 1}, + { "_arrow_io___BufferReader__initialize", (DL_FUNC) &_arrow_io___BufferReader__initialize, 1}, + { "_arrow_io___Writable__write", (DL_FUNC) &_arrow_io___Writable__write, 2}, + { "_arrow_io___OutputStream__Tell", (DL_FUNC) &_arrow_io___OutputStream__Tell, 1}, + { "_arrow_io___FileOutputStream__Open", (DL_FUNC) &_arrow_io___FileOutputStream__Open, 1}, + { "_arrow_io___BufferOutputStream__Create", (DL_FUNC) &_arrow_io___BufferOutputStream__Create, 1}, + { "_arrow_io___BufferOutputStream__capacity", (DL_FUNC) &_arrow_io___BufferOutputStream__capacity, 1}, + { "_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_MakeRConnectionInputStream", (DL_FUNC) &_arrow_MakeRConnectionInputStream, 1}, + { "_arrow_MakeRConnectionOutputStream", (DL_FUNC) &_arrow_MakeRConnectionOutputStream, 1}, + { "_arrow_MakeRConnectionRandomAccessFile", (DL_FUNC) &_arrow_MakeRConnectionRandomAccessFile, 1}, + { "_arrow_MakeReencodeInputStream", (DL_FUNC) &_arrow_MakeReencodeInputStream, 2}, + { "_arrow_json___ReadOptions__initialize", (DL_FUNC) &_arrow_json___ReadOptions__initialize, 2}, + { "_arrow_json___ParseOptions__initialize1", (DL_FUNC) &_arrow_json___ParseOptions__initialize1, 1}, + { "_arrow_json___ParseOptions__initialize2", (DL_FUNC) &_arrow_json___ParseOptions__initialize2, 2}, + { "_arrow_json___TableReader__Make", (DL_FUNC) &_arrow_json___TableReader__Make, 3}, + { "_arrow_json___TableReader__Read", (DL_FUNC) &_arrow_json___TableReader__Read, 1}, + { "_arrow_MemoryPool__default", (DL_FUNC) &_arrow_MemoryPool__default, 0}, + { "_arrow_MemoryPool__bytes_allocated", (DL_FUNC) &_arrow_MemoryPool__bytes_allocated, 1}, + { "_arrow_MemoryPool__max_memory", (DL_FUNC) &_arrow_MemoryPool__max_memory, 1}, + { "_arrow_MemoryPool__backend_name", (DL_FUNC) &_arrow_MemoryPool__backend_name, 1}, + { "_arrow_supported_memory_backends", (DL_FUNC) &_arrow_supported_memory_backends, 0}, + { "_arrow_ipc___Message__body_length", (DL_FUNC) &_arrow_ipc___Message__body_length, 1}, + { "_arrow_ipc___Message__metadata", (DL_FUNC) &_arrow_ipc___Message__metadata, 1}, + { "_arrow_ipc___Message__body", (DL_FUNC) &_arrow_ipc___Message__body, 1}, + { "_arrow_ipc___Message__Verify", (DL_FUNC) &_arrow_ipc___Message__Verify, 1}, + { "_arrow_ipc___Message__type", (DL_FUNC) &_arrow_ipc___Message__type, 1}, + { "_arrow_ipc___Message__Equals", (DL_FUNC) &_arrow_ipc___Message__Equals, 2}, + { "_arrow_ipc___ReadRecordBatch__Message__Schema", (DL_FUNC) &_arrow_ipc___ReadRecordBatch__Message__Schema, 2}, + { "_arrow_ipc___ReadSchema_InputStream", (DL_FUNC) &_arrow_ipc___ReadSchema_InputStream, 1}, + { "_arrow_ipc___ReadSchema_Message", (DL_FUNC) &_arrow_ipc___ReadSchema_Message, 1}, + { "_arrow_ipc___MessageReader__Open", (DL_FUNC) &_arrow_ipc___MessageReader__Open, 1}, + { "_arrow_ipc___MessageReader__ReadNextMessage", (DL_FUNC) &_arrow_ipc___MessageReader__ReadNextMessage, 1}, + { "_arrow_ipc___ReadMessage", (DL_FUNC) &_arrow_ipc___ReadMessage, 1}, + { "_arrow_parquet___arrow___ArrowReaderProperties__Make", (DL_FUNC) &_arrow_parquet___arrow___ArrowReaderProperties__Make, 1}, + { "_arrow_parquet___arrow___ArrowReaderProperties__set_use_threads", (DL_FUNC) &_arrow_parquet___arrow___ArrowReaderProperties__set_use_threads, 2}, + { "_arrow_parquet___arrow___ArrowReaderProperties__get_use_threads", (DL_FUNC) &_arrow_parquet___arrow___ArrowReaderProperties__get_use_threads, 2}, + { "_arrow_parquet___arrow___ArrowReaderProperties__get_read_dictionary", (DL_FUNC) &_arrow_parquet___arrow___ArrowReaderProperties__get_read_dictionary, 2}, + { "_arrow_parquet___arrow___ArrowReaderProperties__set_read_dictionary", (DL_FUNC) &_arrow_parquet___arrow___ArrowReaderProperties__set_read_dictionary, 3}, + { "_arrow_parquet___arrow___ArrowReaderProperties__set_coerce_int96_timestamp_unit", (DL_FUNC) &_arrow_parquet___arrow___ArrowReaderProperties__set_coerce_int96_timestamp_unit, 2}, + { "_arrow_parquet___arrow___ArrowReaderProperties__get_coerce_int96_timestamp_unit", (DL_FUNC) &_arrow_parquet___arrow___ArrowReaderProperties__get_coerce_int96_timestamp_unit, 1}, + { "_arrow_parquet___arrow___FileReader__OpenFile", (DL_FUNC) &_arrow_parquet___arrow___FileReader__OpenFile, 2}, + { "_arrow_parquet___arrow___FileReader__ReadTable1", (DL_FUNC) &_arrow_parquet___arrow___FileReader__ReadTable1, 1}, + { "_arrow_parquet___arrow___FileReader__ReadTable2", (DL_FUNC) &_arrow_parquet___arrow___FileReader__ReadTable2, 2}, + { "_arrow_parquet___arrow___FileReader__ReadRowGroup1", (DL_FUNC) &_arrow_parquet___arrow___FileReader__ReadRowGroup1, 2}, + { "_arrow_parquet___arrow___FileReader__ReadRowGroup2", (DL_FUNC) &_arrow_parquet___arrow___FileReader__ReadRowGroup2, 3}, + { "_arrow_parquet___arrow___FileReader__ReadRowGroups1", (DL_FUNC) &_arrow_parquet___arrow___FileReader__ReadRowGroups1, 2}, + { "_arrow_parquet___arrow___FileReader__ReadRowGroups2", (DL_FUNC) &_arrow_parquet___arrow___FileReader__ReadRowGroups2, 3}, + { "_arrow_parquet___arrow___FileReader__num_rows", (DL_FUNC) &_arrow_parquet___arrow___FileReader__num_rows, 1}, + { "_arrow_parquet___arrow___FileReader__num_columns", (DL_FUNC) &_arrow_parquet___arrow___FileReader__num_columns, 1}, + { "_arrow_parquet___arrow___FileReader__num_row_groups", (DL_FUNC) &_arrow_parquet___arrow___FileReader__num_row_groups, 1}, + { "_arrow_parquet___arrow___FileReader__ReadColumn", (DL_FUNC) &_arrow_parquet___arrow___FileReader__ReadColumn, 2}, + { "_arrow_parquet___ArrowWriterProperties___create", (DL_FUNC) &_arrow_parquet___ArrowWriterProperties___create, 3}, + { "_arrow_parquet___WriterProperties___Builder__create", (DL_FUNC) &_arrow_parquet___WriterProperties___Builder__create, 0}, + { "_arrow_parquet___WriterProperties___Builder__version", (DL_FUNC) &_arrow_parquet___WriterProperties___Builder__version, 2}, + { "_arrow_parquet___ArrowWriterProperties___Builder__set_compressions", (DL_FUNC) &_arrow_parquet___ArrowWriterProperties___Builder__set_compressions, 3}, + { "_arrow_parquet___ArrowWriterProperties___Builder__set_compression_levels", (DL_FUNC) &_arrow_parquet___ArrowWriterProperties___Builder__set_compression_levels, 3}, + { "_arrow_parquet___ArrowWriterProperties___Builder__set_use_dictionary", (DL_FUNC) &_arrow_parquet___ArrowWriterProperties___Builder__set_use_dictionary, 3}, + { "_arrow_parquet___ArrowWriterProperties___Builder__set_write_statistics", (DL_FUNC) &_arrow_parquet___ArrowWriterProperties___Builder__set_write_statistics, 3}, + { "_arrow_parquet___ArrowWriterProperties___Builder__data_page_size", (DL_FUNC) &_arrow_parquet___ArrowWriterProperties___Builder__data_page_size, 2}, + { "_arrow_parquet___WriterProperties___Builder__build", (DL_FUNC) &_arrow_parquet___WriterProperties___Builder__build, 1}, + { "_arrow_parquet___arrow___ParquetFileWriter__Open", (DL_FUNC) &_arrow_parquet___arrow___ParquetFileWriter__Open, 4}, + { "_arrow_parquet___arrow___FileWriter__WriteTable", (DL_FUNC) &_arrow_parquet___arrow___FileWriter__WriteTable, 3}, + { "_arrow_parquet___arrow___FileWriter__Close", (DL_FUNC) &_arrow_parquet___arrow___FileWriter__Close, 1}, + { "_arrow_parquet___arrow___WriteTable", (DL_FUNC) &_arrow_parquet___arrow___WriteTable, 4}, + { "_arrow_parquet___arrow___FileReader__GetSchema", (DL_FUNC) &_arrow_parquet___arrow___FileReader__GetSchema, 1}, + { "_arrow_Table__from_dots", (DL_FUNC) &_arrow_Table__from_dots, 3}, + { "_arrow_vec_to_Array", (DL_FUNC) &_arrow_vec_to_Array, 2}, + { "_arrow_DictionaryArray__FromArrays", (DL_FUNC) &_arrow_DictionaryArray__FromArrays, 3}, + { "_arrow_RecordBatch__num_columns", (DL_FUNC) &_arrow_RecordBatch__num_columns, 1}, + { "_arrow_RecordBatch__num_rows", (DL_FUNC) &_arrow_RecordBatch__num_rows, 1}, + { "_arrow_RecordBatch__schema", (DL_FUNC) &_arrow_RecordBatch__schema, 1}, + { "_arrow_RecordBatch__RenameColumns", (DL_FUNC) &_arrow_RecordBatch__RenameColumns, 2}, + { "_arrow_RecordBatch__ReplaceSchemaMetadata", (DL_FUNC) &_arrow_RecordBatch__ReplaceSchemaMetadata, 2}, + { "_arrow_RecordBatch__columns", (DL_FUNC) &_arrow_RecordBatch__columns, 1}, + { "_arrow_RecordBatch__column", (DL_FUNC) &_arrow_RecordBatch__column, 2}, + { "_arrow_RecordBatch__GetColumnByName", (DL_FUNC) &_arrow_RecordBatch__GetColumnByName, 2}, + { "_arrow_RecordBatch__SelectColumns", (DL_FUNC) &_arrow_RecordBatch__SelectColumns, 2}, + { "_arrow_RecordBatch__Equals", (DL_FUNC) &_arrow_RecordBatch__Equals, 3}, + { "_arrow_RecordBatch__AddColumn", (DL_FUNC) &_arrow_RecordBatch__AddColumn, 4}, + { "_arrow_RecordBatch__SetColumn", (DL_FUNC) &_arrow_RecordBatch__SetColumn, 4}, + { "_arrow_RecordBatch__RemoveColumn", (DL_FUNC) &_arrow_RecordBatch__RemoveColumn, 2}, + { "_arrow_RecordBatch__column_name", (DL_FUNC) &_arrow_RecordBatch__column_name, 2}, + { "_arrow_RecordBatch__names", (DL_FUNC) &_arrow_RecordBatch__names, 1}, + { "_arrow_RecordBatch__Slice1", (DL_FUNC) &_arrow_RecordBatch__Slice1, 2}, + { "_arrow_RecordBatch__Slice2", (DL_FUNC) &_arrow_RecordBatch__Slice2, 3}, + { "_arrow_ipc___SerializeRecordBatch__Raw", (DL_FUNC) &_arrow_ipc___SerializeRecordBatch__Raw, 1}, + { "_arrow_ipc___ReadRecordBatch__InputStream__Schema", (DL_FUNC) &_arrow_ipc___ReadRecordBatch__InputStream__Schema, 2}, + { "_arrow_RecordBatch__from_arrays", (DL_FUNC) &_arrow_RecordBatch__from_arrays, 2}, + { "_arrow_RecordBatch__ReferencedBufferSize", (DL_FUNC) &_arrow_RecordBatch__ReferencedBufferSize, 1}, + { "_arrow_RecordBatchReader__schema", (DL_FUNC) &_arrow_RecordBatchReader__schema, 1}, + { "_arrow_RecordBatchReader__ReadNext", (DL_FUNC) &_arrow_RecordBatchReader__ReadNext, 1}, + { "_arrow_RecordBatchReader__batches", (DL_FUNC) &_arrow_RecordBatchReader__batches, 1}, + { "_arrow_RecordBatchReader__from_batches", (DL_FUNC) &_arrow_RecordBatchReader__from_batches, 2}, + { "_arrow_RecordBatchReader__from_Table", (DL_FUNC) &_arrow_RecordBatchReader__from_Table, 1}, + { "_arrow_Table__from_RecordBatchReader", (DL_FUNC) &_arrow_Table__from_RecordBatchReader, 1}, + { "_arrow_RecordBatchReader__Head", (DL_FUNC) &_arrow_RecordBatchReader__Head, 2}, + { "_arrow_ipc___RecordBatchStreamReader__Open", (DL_FUNC) &_arrow_ipc___RecordBatchStreamReader__Open, 1}, + { "_arrow_ipc___RecordBatchFileReader__schema", (DL_FUNC) &_arrow_ipc___RecordBatchFileReader__schema, 1}, + { "_arrow_ipc___RecordBatchFileReader__num_record_batches", (DL_FUNC) &_arrow_ipc___RecordBatchFileReader__num_record_batches, 1}, + { "_arrow_ipc___RecordBatchFileReader__ReadRecordBatch", (DL_FUNC) &_arrow_ipc___RecordBatchFileReader__ReadRecordBatch, 2}, + { "_arrow_ipc___RecordBatchFileReader__Open", (DL_FUNC) &_arrow_ipc___RecordBatchFileReader__Open, 1}, + { "_arrow_Table__from_RecordBatchFileReader", (DL_FUNC) &_arrow_Table__from_RecordBatchFileReader, 1}, + { "_arrow_ipc___RecordBatchFileReader__batches", (DL_FUNC) &_arrow_ipc___RecordBatchFileReader__batches, 1}, + { "_arrow_ipc___RecordBatchWriter__WriteRecordBatch", (DL_FUNC) &_arrow_ipc___RecordBatchWriter__WriteRecordBatch, 2}, + { "_arrow_ipc___RecordBatchWriter__WriteTable", (DL_FUNC) &_arrow_ipc___RecordBatchWriter__WriteTable, 2}, + { "_arrow_ipc___RecordBatchWriter__Close", (DL_FUNC) &_arrow_ipc___RecordBatchWriter__Close, 1}, + { "_arrow_ipc___RecordBatchFileWriter__Open", (DL_FUNC) &_arrow_ipc___RecordBatchFileWriter__Open, 4}, + { "_arrow_ipc___RecordBatchStreamWriter__Open", (DL_FUNC) &_arrow_ipc___RecordBatchStreamWriter__Open, 4}, + { "_arrow_InitializeMainRThread", (DL_FUNC) &_arrow_InitializeMainRThread, 0}, + { "_arrow_CanRunWithCapturedR", (DL_FUNC) &_arrow_CanRunWithCapturedR, 0}, + { "_arrow_TestSafeCallIntoR", (DL_FUNC) &_arrow_TestSafeCallIntoR, 2}, + { "_arrow_Array__GetScalar", (DL_FUNC) &_arrow_Array__GetScalar, 2}, + { "_arrow_Scalar__ToString", (DL_FUNC) &_arrow_Scalar__ToString, 1}, + { "_arrow_StructScalar__field", (DL_FUNC) &_arrow_StructScalar__field, 2}, + { "_arrow_StructScalar__GetFieldByName", (DL_FUNC) &_arrow_StructScalar__GetFieldByName, 2}, + { "_arrow_Scalar__as_vector", (DL_FUNC) &_arrow_Scalar__as_vector, 1}, + { "_arrow_MakeArrayFromScalar", (DL_FUNC) &_arrow_MakeArrayFromScalar, 2}, + { "_arrow_Scalar__is_valid", (DL_FUNC) &_arrow_Scalar__is_valid, 1}, + { "_arrow_Scalar__type", (DL_FUNC) &_arrow_Scalar__type, 1}, + { "_arrow_Scalar__Equals", (DL_FUNC) &_arrow_Scalar__Equals, 2}, + { "_arrow_Scalar__ApproxEquals", (DL_FUNC) &_arrow_Scalar__ApproxEquals, 2}, + { "_arrow_schema_", (DL_FUNC) &_arrow_schema_, 1}, + { "_arrow_Schema__ToString", (DL_FUNC) &_arrow_Schema__ToString, 1}, + { "_arrow_Schema__num_fields", (DL_FUNC) &_arrow_Schema__num_fields, 1}, + { "_arrow_Schema__field", (DL_FUNC) &_arrow_Schema__field, 2}, + { "_arrow_Schema__AddField", (DL_FUNC) &_arrow_Schema__AddField, 3}, + { "_arrow_Schema__SetField", (DL_FUNC) &_arrow_Schema__SetField, 3}, + { "_arrow_Schema__RemoveField", (DL_FUNC) &_arrow_Schema__RemoveField, 2}, + { "_arrow_Schema__GetFieldByName", (DL_FUNC) &_arrow_Schema__GetFieldByName, 2}, + { "_arrow_Schema__fields", (DL_FUNC) &_arrow_Schema__fields, 1}, + { "_arrow_Schema__field_names", (DL_FUNC) &_arrow_Schema__field_names, 1}, + { "_arrow_Schema__HasMetadata", (DL_FUNC) &_arrow_Schema__HasMetadata, 1}, + { "_arrow_Schema__metadata", (DL_FUNC) &_arrow_Schema__metadata, 1}, + { "_arrow_Schema__WithMetadata", (DL_FUNC) &_arrow_Schema__WithMetadata, 2}, + { "_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__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}, + { "_arrow_Table__ReplaceSchemaMetadata", (DL_FUNC) &_arrow_Table__ReplaceSchemaMetadata, 2}, + { "_arrow_Table__column", (DL_FUNC) &_arrow_Table__column, 2}, + { "_arrow_Table__field", (DL_FUNC) &_arrow_Table__field, 2}, + { "_arrow_Table__columns", (DL_FUNC) &_arrow_Table__columns, 1}, + { "_arrow_Table__ColumnNames", (DL_FUNC) &_arrow_Table__ColumnNames, 1}, + { "_arrow_Table__RenameColumns", (DL_FUNC) &_arrow_Table__RenameColumns, 2}, + { "_arrow_Table__Slice1", (DL_FUNC) &_arrow_Table__Slice1, 2}, + { "_arrow_Table__Slice2", (DL_FUNC) &_arrow_Table__Slice2, 3}, + { "_arrow_Table__Equals", (DL_FUNC) &_arrow_Table__Equals, 3}, + { "_arrow_Table__Validate", (DL_FUNC) &_arrow_Table__Validate, 1}, + { "_arrow_Table__ValidateFull", (DL_FUNC) &_arrow_Table__ValidateFull, 1}, + { "_arrow_Table__GetColumnByName", (DL_FUNC) &_arrow_Table__GetColumnByName, 2}, + { "_arrow_Table__RemoveColumn", (DL_FUNC) &_arrow_Table__RemoveColumn, 2}, + { "_arrow_Table__AddColumn", (DL_FUNC) &_arrow_Table__AddColumn, 4}, + { "_arrow_Table__SetColumn", (DL_FUNC) &_arrow_Table__SetColumn, 4}, + { "_arrow_Table__SelectColumns", (DL_FUNC) &_arrow_Table__SelectColumns, 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__ReferencedBufferSize", (DL_FUNC) &_arrow_Table__ReferencedBufferSize, 1}, + { "_arrow_Table__ConcatenateTables", (DL_FUNC) &_arrow_Table__ConcatenateTables, 2}, + { "_arrow_GetCpuThreadPoolCapacity", (DL_FUNC) &_arrow_GetCpuThreadPoolCapacity, 0}, + { "_arrow_SetCpuThreadPoolCapacity", (DL_FUNC) &_arrow_SetCpuThreadPoolCapacity, 1}, + { "_arrow_GetIOThreadPoolCapacity", (DL_FUNC) &_arrow_GetIOThreadPoolCapacity, 0}, + { "_arrow_SetIOThreadPoolCapacity", (DL_FUNC) &_arrow_SetIOThreadPoolCapacity, 1}, + { "_arrow_Array__infer_type", (DL_FUNC) &_arrow_Array__infer_type, 1}, {NULL, NULL, 0} }; extern "C" void R_init_arrow(DllInfo* dll){ diff --git a/r/src/csv.cpp b/r/src/csv.cpp index 7ce55feb5fe..5b6da390496 100644 --- a/r/src/csv.cpp +++ b/r/src/csv.cpp @@ -31,7 +31,8 @@ std::shared_ptr csv___WriteOptions__initialize( std::make_shared(arrow::csv::WriteOptions::Defaults()); res->include_header = cpp11::as_cpp(options["include_header"]); res->batch_size = cpp11::as_cpp(options["batch_size"]); - res->io_context = arrow::io::IOContext(gc_memory_pool()); + res->io_context = + arrow::io::IOContext(gc_memory_pool(), GetMainRThread().GetStopToken()); return res; } @@ -154,9 +155,9 @@ std::shared_ptr csv___TableReader__Make( const std::shared_ptr& read_options, const std::shared_ptr& parse_options, const std::shared_ptr& convert_options) { - return ValueOrStop(arrow::csv::TableReader::Make(arrow::io::IOContext(gc_memory_pool()), - input, *read_options, *parse_options, - *convert_options)); + return ValueOrStop(arrow::csv::TableReader::Make( + arrow::io::IOContext(gc_memory_pool(), GetMainRThread().GetStopToken()), input, + *read_options, *parse_options, *convert_options)); } // [[arrow::export]] diff --git a/r/src/filesystem.cpp b/r/src/filesystem.cpp index f6c5499bd3d..e2699745bdc 100644 --- a/r/src/filesystem.cpp +++ b/r/src/filesystem.cpp @@ -16,6 +16,7 @@ // under the License. #include "./arrow_types.h" +#include "./safe-call-into-r.h" #include #include @@ -239,7 +240,8 @@ std::string fs___FileSystem__type_name( // [[arrow::export]] std::shared_ptr fs___LocalFileSystem__create() { // Affects OpenInputFile/OpenInputStream - auto io_context = arrow::io::IOContext(gc_memory_pool()); + auto io_context = + arrow::io::IOContext(gc_memory_pool(), GetMainRThread().GetStopToken()); return std::make_shared(io_context); } @@ -334,7 +336,8 @@ std::shared_ptr fs___S3FileSystem__create( s3_opts.allow_bucket_creation = allow_bucket_creation; s3_opts.allow_bucket_deletion = allow_bucket_deletion; - auto io_context = arrow::io::IOContext(gc_memory_pool()); + auto io_context = + arrow::io::IOContext(gc_memory_pool(), GetMainRThread().GetStopToken()); return ValueOrStop(fs::S3FileSystem::Make(s3_opts, io_context)); } @@ -412,7 +415,8 @@ std::shared_ptr fs___GcsFileSystem__Make(bool anonymous, gcs_opts.default_metadata = strings_to_kvm(options["default_metadata"]); } - auto io_context = arrow::io::IOContext(gc_memory_pool()); + auto io_context = + arrow::io::IOContext(gc_memory_pool(), GetMainRThread().GetStopToken()); // TODO(ARROW-16884): update when this returns Result return fs::GcsFileSystem::Make(gcs_opts, io_context); } diff --git a/r/src/safe-call-into-r-impl.cpp b/r/src/safe-call-into-r-impl.cpp index 0ac3928460e..7e9fd826b78 100644 --- a/r/src/safe-call-into-r-impl.cpp +++ b/r/src/safe-call-into-r-impl.cpp @@ -37,6 +37,12 @@ MainRThread& GetMainRThread() { // [[arrow::export]] void InitializeMainRThread() { GetMainRThread().Initialize(); } +// [[arrow::export]] +bool InitializeStopSource() { return GetMainRThread().SetSignalStopSource().ok(); } + +// [[arrow::export]] +void DeinitializeStopSource() { GetMainRThread().ResetSignalStopSource(); } + bool CanRunWithCapturedR() { #if defined(HAS_UNWIND_PROTECT) static int on_old_windows = -1; @@ -60,35 +66,6 @@ void SignalInterruptCondition() { #endif } -void OverridingSignalHandler(int sig) { - auto main_r_thread = GetMainRThread(); - - if (!main_r_thread.IsExecutingSafeCallIntoR() && !main_r_thread.HasError() && - sig == SIGINT) { - main_r_thread.RequestStopFromSignal(sig); - main_r_thread.SetError(arrow::Status::Cancelled("User interrupt")); - } else { - main_r_thread.CallPreviousSignalHandler(sig); - } -} - -void MainRThread::SetOverrideInterruptSignal(bool enabled) { - bool was_enabled = IsOverridingInterruptSignal(); - if (enabled && !was_enabled) { - // enable override - previous_signal_handler_ = signal(SIGINT, &OverridingSignalHandler); - stop_source_ = arrow::ValueOrStop(arrow::SetSignalStopSource()); - arrow::StopIfNotOk(arrow::RegisterCancellingSignalHandler({SIGINT})); - } else if (!enabled && was_enabled) { - // disable override - signal(SIGINT, previous_signal_handler_); - previous_signal_handler_ = nullptr; - arrow::UnregisterCancellingSignalHandler(); - arrow::ResetSignalStopSource(); - stop_source_ = nullptr; - } -} - // [[arrow::export]] bool CanRunWithCapturedR() { #if defined(HAS_UNWIND_PROTECT) diff --git a/r/src/safe-call-into-r.h b/r/src/safe-call-into-r.h index 7f8287ba631..7a9dc8a9783 100644 --- a/r/src/safe-call-into-r.h +++ b/r/src/safe-call-into-r.h @@ -46,12 +46,7 @@ extern "C" void OverridingSignalHandler(int sig); // SafeCallIntoR([&]() { ... }). class MainRThread { public: - MainRThread() - : initialized_(false), - executor_(nullptr), - executing_safe_call_into_r_(false), - previous_signal_handler_(nullptr), - stop_source_(nullptr) {} + MainRThread() : initialized_(false), executor_(nullptr), stop_source_(nullptr) {} // Call this method from the R thread (e.g., on package load) // to save an internal copy of the thread id. @@ -66,13 +61,30 @@ class MainRThread { // Check if the current thread is the main R thread bool IsMainThread() { return initialized_ && std::this_thread::get_id() == thread_id_; } - // Check if a SafeCallIntoR call is able to execute - bool CanExecuteSafeCallIntoR() { return IsMainThread() || executor_ != nullptr; } + arrow::Status SetSignalStopSource() { + auto source = arrow::SetSignalStopSource(); + ARROW_RETURN_NOT_OK(source); + stop_source_ = source.ValueUnsafe(); + return arrow::Status::OK(); + } + + bool HasStopSource() { return stop_source_ != nullptr; } - void SetExecutingSafeCallIntoR(bool executing) { - executing_safe_call_into_r_ = executing; + void ResetSignalStopSource() { + stop_source_ = nullptr; + arrow::ResetSignalStopSource(); } - bool IsExecutingSafeCallIntoR() { return executing_safe_call_into_r_; } + + arrow::StopToken GetStopToken() { + if (stop_source_ != nullptr) { + return stop_source_->token(); + } else { + return arrow::StopToken::Unstoppable(); + } + } + + // Check if a SafeCallIntoR call is able to execute + bool CanExecuteSafeCallIntoR() { return IsMainThread() || executor_ != nullptr; } // The Executor that is running on the main R thread, if it exists arrow::internal::Executor*& Executor() { return executor_; } @@ -96,25 +108,11 @@ class MainRThread { arrow::StopIfNotOk(maybe_error_status); } - void SetOverrideInterruptSignal(bool enabled); - - bool IsOverridingInterruptSignal() { return previous_signal_handler_ != nullptr; } - - void CallPreviousSignalHandler(int sig) { previous_signal_handler_(sig); } - - void RequestStopFromSignal(int sig) { - if (stop_source_ != nullptr) { - stop_source_->RequestStopFromSignal(sig); - } - } - private: bool initialized_; std::thread::id thread_id_; arrow::Status status_; arrow::internal::Executor* executor_; - bool executing_safe_call_into_r_; - void (*previous_signal_handler_)(int); arrow::StopSource* stop_source_; }; @@ -123,14 +121,30 @@ MainRThread& GetMainRThread(); class SafeCallIntoRContext { public: - SafeCallIntoRContext() { GetMainRThread().SetExecutingSafeCallIntoR(true); } - ~SafeCallIntoRContext() { GetMainRThread().SetExecutingSafeCallIntoR(false); } + SafeCallIntoRContext() { + if (!GetMainRThread().IsMainThread() && GetMainRThread().HasStopSource()) { + arrow::UnregisterCancellingSignalHandler(); + } + } + + ~SafeCallIntoRContext() { + if (!GetMainRThread().IsMainThread() && GetMainRThread().HasStopSource()) { + arrow::Status result = arrow::RegisterCancellingSignalHandler({SIGINT}); + if (!result.ok()) { + GetMainRThread().SetError(result); + } + } + } }; class RunWithCapturedRContext { public: - RunWithCapturedRContext() { GetMainRThread().SetOverrideInterruptSignal(true); } - ~RunWithCapturedRContext() { GetMainRThread().SetOverrideInterruptSignal(false); } + arrow::Status Init() { + RETURN_NOT_OK(arrow::RegisterCancellingSignalHandler({SIGINT})); + return arrow::Status::OK(); + } + + ~RunWithCapturedRContext() { arrow::UnregisterCancellingSignalHandler(); } }; // Call into R and return a C++ object. Note that you can't return @@ -151,13 +165,13 @@ arrow::Future SafeCallIntoRAsync(std::function(void)> fun, // use it to run the task on the main R thread. We can't throw // a cpp11::unwind_exception here, so we need to propagate it back // to RunWithCapturedR through the MainRThread singleton. - return DeferNotOk(main_r_thread.Executor()->Submit([fun, reason]() { + return DeferNotOk(main_r_thread.Executor()->Submit([fun, + reason]() -> arrow::Result { // This occurs when some other R code that was previously scheduled to run // has errored, in which case we skip execution and let the original // error surface. if (GetMainRThread().HasError()) { - return arrow::Result( - arrow::Status::Cancelled("Previous R code execution error (", reason, ")")); + return arrow::Status::Cancelled("Previous R code execution error (", reason, ")"); } try { @@ -171,8 +185,7 @@ arrow::Future SafeCallIntoRAsync(std::function(void)> fun, // main_r_thread.ClearError() will get called before this value can be // returned and will StopIfNotOk(). We don't save the error token here // to ensure that it will only get thrown once. - return arrow::Result( - arrow::Status::UnknownError("R code execution error (", reason, ")")); + return arrow::Status::UnknownError("R code execution error (", reason, ")"); } })); } else { @@ -213,6 +226,7 @@ arrow::Result RunWithCapturedR(std::function()> make_arrow_c } RunWithCapturedRContext context; + ARROW_RETURN_NOT_OK(context.Init()); GetMainRThread().ResetError(); arrow::Result result = arrow::internal::SerialExecutor::RunInSerialExecutor( @@ -290,7 +304,7 @@ static inline arrow::Status RunWithCapturedRIfPossibleVoid( return true; }); ARROW_RETURN_NOT_OK(result); - return result.ok(); + return result.status(); } #endif From adf990711ad6faa772df0d9f2fc3d3ab05f1dbc4 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Wed, 20 Jul 2022 23:42:49 -0300 Subject: [PATCH 06/39] remove trash, fix registering signal handler when there is no stop source --- r/src/safe-call-into-r-impl.cpp | 16 ---------------- r/src/safe-call-into-r.h | 11 +++++++++-- 2 files changed, 9 insertions(+), 18 deletions(-) diff --git a/r/src/safe-call-into-r-impl.cpp b/r/src/safe-call-into-r-impl.cpp index 7e9fd826b78..c36422d211a 100644 --- a/r/src/safe-call-into-r-impl.cpp +++ b/r/src/safe-call-into-r-impl.cpp @@ -22,13 +22,6 @@ #include #include -// for SignalInterruptCondition() -#ifdef _WIN32 -#include -#else -#include -#endif - MainRThread& GetMainRThread() { static MainRThread main_r_thread; return main_r_thread; @@ -57,15 +50,6 @@ bool CanRunWithCapturedR() { #endif } -void SignalInterruptCondition() { -#ifdef _WIN32 - UserBreak = 1; - R_CheckUserInterrupt(); -#else - Rf_onintr(); -#endif -} - // [[arrow::export]] bool CanRunWithCapturedR() { #if defined(HAS_UNWIND_PROTECT) diff --git a/r/src/safe-call-into-r.h b/r/src/safe-call-into-r.h index 7a9dc8a9783..ff8f12c5cee 100644 --- a/r/src/safe-call-into-r.h +++ b/r/src/safe-call-into-r.h @@ -140,11 +140,18 @@ class SafeCallIntoRContext { class RunWithCapturedRContext { public: arrow::Status Init() { - RETURN_NOT_OK(arrow::RegisterCancellingSignalHandler({SIGINT})); + if (GetMainRThread().HasStopSource()) { + RETURN_NOT_OK(arrow::RegisterCancellingSignalHandler({SIGINT})); + } + return arrow::Status::OK(); } - ~RunWithCapturedRContext() { arrow::UnregisterCancellingSignalHandler(); } + ~RunWithCapturedRContext() { + if (GetMainRThread().HasStopSource()) { + arrow::UnregisterCancellingSignalHandler(); + } + } }; // Call into R and return a C++ object. Note that you can't return From 4a73042a98b9d231965af360ba8953eb86c75e0f Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Wed, 20 Jul 2022 23:46:18 -0300 Subject: [PATCH 07/39] pkgdown --- r/_pkgdown.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/r/_pkgdown.yml b/r/_pkgdown.yml index 70bd7ac518c..f58192c8bca 100644 --- a/r/_pkgdown.yml +++ b/r/_pkgdown.yml @@ -139,6 +139,7 @@ reference: - write_to_raw - write_parquet - write_csv_arrow + - arrow_cancellable - title: C++ reader/writer interface contents: - ParquetFileReader From 89c9ae829408830a24b457d480d835142e5a51f8 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Thu, 21 Jul 2022 08:47:00 -0300 Subject: [PATCH 08/39] don't rely on transitive include for SIGINT --- r/src/safe-call-into-r.h | 1 + 1 file changed, 1 insertion(+) diff --git a/r/src/safe-call-into-r.h b/r/src/safe-call-into-r.h index ff8f12c5cee..923fae3f6bd 100644 --- a/r/src/safe-call-into-r.h +++ b/r/src/safe-call-into-r.h @@ -25,6 +25,7 @@ #include #include +#include #include #include From 8157472bdd2244596e813b1bc69034d4fa097797 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Thu, 21 Jul 2022 09:12:07 -0300 Subject: [PATCH 09/39] nix the need for arrow_cancellable() --- r/NAMESPACE | 1 - r/R/io.R | 14 -------------- r/man/arrow_cancellable.Rd | 17 ----------------- r/src/safe-call-into-r-impl.cpp | 6 ------ r/src/safe-call-into-r.h | 31 ++++++++++++------------------- 5 files changed, 12 insertions(+), 57 deletions(-) delete mode 100644 r/man/arrow_cancellable.Rd diff --git a/r/NAMESPACE b/r/NAMESPACE index 2fa96c353e8..49db309b8e8 100644 --- a/r/NAMESPACE +++ b/r/NAMESPACE @@ -256,7 +256,6 @@ export(Type) export(UnionDataset) export(all_of) export(arrow_available) -export(arrow_cancellable) export(arrow_info) export(arrow_table) export(arrow_with_dataset) diff --git a/r/R/io.R b/r/R/io.R index d7af52d0441..fc664ed386a 100644 --- a/r/R/io.R +++ b/r/R/io.R @@ -317,17 +317,3 @@ detect_compression <- function(path) { "uncompressed" ) } - -#' Run Arrow code with the ability to cancel -#' -#' @param expr An expression to evaluate with cancellation -#' -#' @return The value of `expr` -#' @export -arrow_cancellable <- function(expr) { - if (InitializeStopSource()) { - on.exit(DeinitializeStopSource()) - } - - force(expr) -} diff --git a/r/man/arrow_cancellable.Rd b/r/man/arrow_cancellable.Rd deleted file mode 100644 index efe7a6a4227..00000000000 --- a/r/man/arrow_cancellable.Rd +++ /dev/null @@ -1,17 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/io.R -\name{arrow_cancellable} -\alias{arrow_cancellable} -\title{Run Arrow code with the ability to cancel} -\usage{ -arrow_cancellable(expr) -} -\arguments{ -\item{expr}{An expression to evaluate with cancellation} -} -\value{ -The value of \code{expr} -} -\description{ -Run Arrow code with the ability to cancel -} diff --git a/r/src/safe-call-into-r-impl.cpp b/r/src/safe-call-into-r-impl.cpp index c36422d211a..24299fdf34d 100644 --- a/r/src/safe-call-into-r-impl.cpp +++ b/r/src/safe-call-into-r-impl.cpp @@ -30,12 +30,6 @@ MainRThread& GetMainRThread() { // [[arrow::export]] void InitializeMainRThread() { GetMainRThread().Initialize(); } -// [[arrow::export]] -bool InitializeStopSource() { return GetMainRThread().SetSignalStopSource().ok(); } - -// [[arrow::export]] -void DeinitializeStopSource() { GetMainRThread().ResetSignalStopSource(); } - bool CanRunWithCapturedR() { #if defined(HAS_UNWIND_PROTECT) static int on_old_windows = -1; diff --git a/r/src/safe-call-into-r.h b/r/src/safe-call-into-r.h index 923fae3f6bd..433dc5148c7 100644 --- a/r/src/safe-call-into-r.h +++ b/r/src/safe-call-into-r.h @@ -55,6 +55,8 @@ class MainRThread { thread_id_ = std::this_thread::get_id(); initialized_ = true; ResetError(); + arrow::ResetSignalStopSource(); + stop_source_ = arrow::ValueOrStop(arrow::SetSignalStopSource()); } bool IsInitialized() { return initialized_; } @@ -62,28 +64,16 @@ class MainRThread { // Check if the current thread is the main R thread bool IsMainThread() { return initialized_ && std::this_thread::get_id() == thread_id_; } - arrow::Status SetSignalStopSource() { - auto source = arrow::SetSignalStopSource(); - ARROW_RETURN_NOT_OK(source); - stop_source_ = source.ValueUnsafe(); - return arrow::Status::OK(); - } - - bool HasStopSource() { return stop_source_ != nullptr; } - - void ResetSignalStopSource() { - stop_source_ = nullptr; - arrow::ResetSignalStopSource(); - } - arrow::StopToken GetStopToken() { - if (stop_source_ != nullptr) { + if (SignalStopSourceEnabled()) { return stop_source_->token(); } else { return arrow::StopToken::Unstoppable(); } } + bool SignalStopSourceEnabled() { return stop_source_ != nullptr; } + // Check if a SafeCallIntoR call is able to execute bool CanExecuteSafeCallIntoR() { return IsMainThread() || executor_ != nullptr; } @@ -104,6 +94,9 @@ class MainRThread { // Throw an exception if there was an error executing on the main // thread. void ClearError() { + if (SignalStopSourceEnabled()) { + stop_source_->Reset(); + } arrow::Status maybe_error_status = status_; ResetError(); arrow::StopIfNotOk(maybe_error_status); @@ -123,13 +116,13 @@ MainRThread& GetMainRThread(); class SafeCallIntoRContext { public: SafeCallIntoRContext() { - if (!GetMainRThread().IsMainThread() && GetMainRThread().HasStopSource()) { + if (!GetMainRThread().IsMainThread() && GetMainRThread().SignalStopSourceEnabled()) { arrow::UnregisterCancellingSignalHandler(); } } ~SafeCallIntoRContext() { - if (!GetMainRThread().IsMainThread() && GetMainRThread().HasStopSource()) { + if (!GetMainRThread().IsMainThread() && GetMainRThread().SignalStopSourceEnabled()) { arrow::Status result = arrow::RegisterCancellingSignalHandler({SIGINT}); if (!result.ok()) { GetMainRThread().SetError(result); @@ -141,7 +134,7 @@ class SafeCallIntoRContext { class RunWithCapturedRContext { public: arrow::Status Init() { - if (GetMainRThread().HasStopSource()) { + if (GetMainRThread().SignalStopSourceEnabled()) { RETURN_NOT_OK(arrow::RegisterCancellingSignalHandler({SIGINT})); } @@ -149,7 +142,7 @@ class RunWithCapturedRContext { } ~RunWithCapturedRContext() { - if (GetMainRThread().HasStopSource()) { + if (GetMainRThread().SignalStopSourceEnabled()) { arrow::UnregisterCancellingSignalHandler(); } } From e7aa84913884048a908ee97a9c25c86b57b907b1 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Thu, 21 Jul 2022 12:14:45 -0300 Subject: [PATCH 10/39] revert new pkgdown page --- r/_pkgdown.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/r/_pkgdown.yml b/r/_pkgdown.yml index f58192c8bca..70bd7ac518c 100644 --- a/r/_pkgdown.yml +++ b/r/_pkgdown.yml @@ -139,7 +139,6 @@ reference: - write_to_raw - write_parquet - write_csv_arrow - - arrow_cancellable - title: C++ reader/writer interface contents: - ParquetFileReader From 2a54856bc6c02c77529d88d31c1cf1cd00e247b7 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Thu, 21 Jul 2022 12:02:33 -0300 Subject: [PATCH 11/39] Update r/src/safe-call-into-r.h Co-authored-by: Antoine Pitrou --- r/src/safe-call-into-r.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/r/src/safe-call-into-r.h b/r/src/safe-call-into-r.h index 433dc5148c7..1d341c2ff3e 100644 --- a/r/src/safe-call-into-r.h +++ b/r/src/safe-call-into-r.h @@ -271,8 +271,7 @@ static inline arrow::Status RunWithCapturedRIfPossibleVoid( ARROW_RETURN_NOT_OK(make_arrow_call()); return true; }); - ARROW_RETURN_NOT_OK(result); - return arrow::Status::OK(); + return result.status(); } // Performs an Arrow call (e.g., run an exec plan) in such a way that background threads From 4eda9c2f629f2506fd88079ddb6cf10fdbdbdc3d Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Thu, 21 Jul 2022 12:19:04 -0300 Subject: [PATCH 12/39] more idiomatic storage of MainRThread singleton, better name for ClearError() --- r/src/csv.cpp | 6 ++--- r/src/extension-impl.cpp | 2 +- r/src/filesystem.cpp | 6 ++--- r/src/safe-call-into-r-impl.cpp | 4 +-- r/src/safe-call-into-r.h | 43 ++++++++++++++++++--------------- 5 files changed, 32 insertions(+), 29 deletions(-) diff --git a/r/src/csv.cpp b/r/src/csv.cpp index 5b6da390496..4c67d77eeca 100644 --- a/r/src/csv.cpp +++ b/r/src/csv.cpp @@ -32,7 +32,7 @@ std::shared_ptr csv___WriteOptions__initialize( res->include_header = cpp11::as_cpp(options["include_header"]); res->batch_size = cpp11::as_cpp(options["batch_size"]); res->io_context = - arrow::io::IOContext(gc_memory_pool(), GetMainRThread().GetStopToken()); + arrow::io::IOContext(gc_memory_pool(), MainRThread::GetInstance().GetStopToken()); return res; } @@ -156,8 +156,8 @@ std::shared_ptr csv___TableReader__Make( const std::shared_ptr& parse_options, const std::shared_ptr& convert_options) { return ValueOrStop(arrow::csv::TableReader::Make( - arrow::io::IOContext(gc_memory_pool(), GetMainRThread().GetStopToken()), input, - *read_options, *parse_options, *convert_options)); + arrow::io::IOContext(gc_memory_pool(), MainRThread::GetInstance().GetStopToken()), + input, *read_options, *parse_options, *convert_options)); } // [[arrow::export]] diff --git a/r/src/extension-impl.cpp b/r/src/extension-impl.cpp index e6efcf36479..a13b252b283 100644 --- a/r/src/extension-impl.cpp +++ b/r/src/extension-impl.cpp @@ -80,7 +80,7 @@ arrow::Result> RExtensionType::Deserialize( // an event loop from wherever this *might* be called is high and hard to // predict. As a compromise, just create the instance when it is safe to // do so. - if (GetMainRThread().IsMainThread()) { + if (MainRThread::GetInstance().IsMainThread()) { r6_instance(); } diff --git a/r/src/filesystem.cpp b/r/src/filesystem.cpp index e2699745bdc..259ef41c9f5 100644 --- a/r/src/filesystem.cpp +++ b/r/src/filesystem.cpp @@ -241,7 +241,7 @@ std::string fs___FileSystem__type_name( std::shared_ptr fs___LocalFileSystem__create() { // Affects OpenInputFile/OpenInputStream auto io_context = - arrow::io::IOContext(gc_memory_pool(), GetMainRThread().GetStopToken()); + arrow::io::IOContext(gc_memory_pool(), MainRThread::GetInstance().GetStopToken()); return std::make_shared(io_context); } @@ -337,7 +337,7 @@ std::shared_ptr fs___S3FileSystem__create( s3_opts.allow_bucket_deletion = allow_bucket_deletion; auto io_context = - arrow::io::IOContext(gc_memory_pool(), GetMainRThread().GetStopToken()); + arrow::io::IOContext(gc_memory_pool(), MainRThread::GetInstance().GetStopToken()); return ValueOrStop(fs::S3FileSystem::Make(s3_opts, io_context)); } @@ -416,7 +416,7 @@ std::shared_ptr fs___GcsFileSystem__Make(bool anonymous, } auto io_context = - arrow::io::IOContext(gc_memory_pool(), GetMainRThread().GetStopToken()); + arrow::io::IOContext(gc_memory_pool(), MainRThread::GetInstance().GetStopToken()); // TODO(ARROW-16884): update when this returns Result return fs::GcsFileSystem::Make(gcs_opts, io_context); } diff --git a/r/src/safe-call-into-r-impl.cpp b/r/src/safe-call-into-r-impl.cpp index 24299fdf34d..72558df1564 100644 --- a/r/src/safe-call-into-r-impl.cpp +++ b/r/src/safe-call-into-r-impl.cpp @@ -22,13 +22,13 @@ #include #include -MainRThread& GetMainRThread() { +MainRThread& MainRThread::GetInstance() { static MainRThread main_r_thread; return main_r_thread; } // [[arrow::export]] -void InitializeMainRThread() { GetMainRThread().Initialize(); } +void InitializeMainRThread() { MainRThread::GetInstance().Initialize(); } bool CanRunWithCapturedR() { #if defined(HAS_UNWIND_PROTECT) diff --git a/r/src/safe-call-into-r.h b/r/src/safe-call-into-r.h index 1d341c2ff3e..7ea27852bf8 100644 --- a/r/src/safe-call-into-r.h +++ b/r/src/safe-call-into-r.h @@ -42,12 +42,13 @@ extern "C" void OverridingSignalHandler(int sig); // The MainRThread class keeps track of the thread on which it is safe // to call the R API to facilitate its safe use (or erroring // if it is not safe). The MainRThread singleton can be accessed from -// any thread using GetMainRThread(); the preferred way to call +// any thread using MainRThread::GetInstance(); the preferred way to call // the R API where it may not be safe to do so is to use // SafeCallIntoR([&]() { ... }). class MainRThread { public: - MainRThread() : initialized_(false), executor_(nullptr), stop_source_(nullptr) {} + // Return a reference to the MainRThread singleton + static MainRThread& GetInstance(); // Call this method from the R thread (e.g., on package load) // to save an internal copy of the thread id. @@ -93,7 +94,7 @@ class MainRThread { // Throw an exception if there was an error executing on the main // thread. - void ClearError() { + void ReraiseErrorIfExists() { if (SignalStopSourceEnabled()) { stop_source_->Reset(); } @@ -108,24 +109,25 @@ class MainRThread { arrow::Status status_; arrow::internal::Executor* executor_; arrow::StopSource* stop_source_; -}; -// Retrieve the MainRThread singleton -MainRThread& GetMainRThread(); + MainRThread() : initialized_(false), executor_(nullptr), stop_source_(nullptr) {} +}; class SafeCallIntoRContext { public: SafeCallIntoRContext() { - if (!GetMainRThread().IsMainThread() && GetMainRThread().SignalStopSourceEnabled()) { + if (!MainRThread::GetInstance().IsMainThread() && + MainRThread::GetInstance().SignalStopSourceEnabled()) { arrow::UnregisterCancellingSignalHandler(); } } ~SafeCallIntoRContext() { - if (!GetMainRThread().IsMainThread() && GetMainRThread().SignalStopSourceEnabled()) { + if (!MainRThread::GetInstance().IsMainThread() && + MainRThread::GetInstance().SignalStopSourceEnabled()) { arrow::Status result = arrow::RegisterCancellingSignalHandler({SIGINT}); if (!result.ok()) { - GetMainRThread().SetError(result); + MainRThread::GetInstance().SetError(result); } } } @@ -134,7 +136,7 @@ class SafeCallIntoRContext { class RunWithCapturedRContext { public: arrow::Status Init() { - if (GetMainRThread().SignalStopSourceEnabled()) { + if (MainRThread::GetInstance().SignalStopSourceEnabled()) { RETURN_NOT_OK(arrow::RegisterCancellingSignalHandler({SIGINT})); } @@ -142,7 +144,7 @@ class RunWithCapturedRContext { } ~RunWithCapturedRContext() { - if (GetMainRThread().SignalStopSourceEnabled()) { + if (MainRThread::GetInstance().SignalStopSourceEnabled()) { arrow::UnregisterCancellingSignalHandler(); } } @@ -154,7 +156,7 @@ class RunWithCapturedRContext { template arrow::Future SafeCallIntoRAsync(std::function(void)> fun, std::string reason = "unspecified") { - MainRThread& main_r_thread = GetMainRThread(); + MainRThread& main_r_thread = MainRThread::GetInstance(); if (main_r_thread.IsMainThread()) { // If we're on the main thread, run the task immediately and let // the cpp11::unwind_exception be thrown since it will be caught @@ -171,7 +173,7 @@ arrow::Future SafeCallIntoRAsync(std::function(void)> fun, // This occurs when some other R code that was previously scheduled to run // has errored, in which case we skip execution and let the original // error surface. - if (GetMainRThread().HasError()) { + if (MainRThread::GetInstance().HasError()) { return arrow::Status::Cancelled("Previous R code execution error (", reason, ")"); } @@ -180,10 +182,10 @@ arrow::Future SafeCallIntoRAsync(std::function(void)> fun, return fun(); } catch (cpp11::unwind_exception& e) { // Here we save the token and set the main R thread to an error state - GetMainRThread().SetError(arrow::StatusUnwindProtect(e.token)); + MainRThread::GetInstance().SetError(arrow::StatusUnwindProtect(e.token)); // We also return an error although this should not surface because - // main_r_thread.ClearError() will get called before this value can be + // main_r_thread.ReraiseErrorIfExists() will get called before this value can be // returned and will StopIfNotOk(). We don't save the error token here // to ensure that it will only get thrown once. return arrow::Status::UnknownError("R code execution error (", reason, ")"); @@ -222,22 +224,22 @@ arrow::Result RunWithCapturedR(std::function()> make_arrow_c return arrow::Status::NotImplemented("RunWithCapturedR() without UnwindProtect"); } - if (GetMainRThread().Executor() != nullptr) { + if (MainRThread::GetInstance().Executor() != nullptr) { return arrow::Status::AlreadyExists("Attempt to use more than one R Executor()"); } RunWithCapturedRContext context; ARROW_RETURN_NOT_OK(context.Init()); - GetMainRThread().ResetError(); + MainRThread::GetInstance().ResetError(); arrow::Result result = arrow::internal::SerialExecutor::RunInSerialExecutor( [make_arrow_call](arrow::internal::Executor* executor) { - GetMainRThread().Executor() = executor; + MainRThread::GetInstance().Executor() = executor; return make_arrow_call(); }); - GetMainRThread().Executor() = nullptr; - GetMainRThread().ClearError(); + MainRThread::GetInstance().Executor() = nullptr; + MainRThread::GetInstance().ReraiseErrorIfExists(); return result; } @@ -271,6 +273,7 @@ static inline arrow::Status RunWithCapturedRIfPossibleVoid( ARROW_RETURN_NOT_OK(make_arrow_call()); return true; }); + ARROW_RETURN_NOT_OK(result); return result.status(); } From a982529e52de3d162040481ebd0b140e3b218e01 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Thu, 21 Jul 2022 12:23:09 -0300 Subject: [PATCH 13/39] helper for cancellable io context --- r/src/csv.cpp | 3 +-- r/src/filesystem.cpp | 9 +++------ r/src/safe-call-into-r.h | 5 +++++ 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/r/src/csv.cpp b/r/src/csv.cpp index 4c67d77eeca..b4f2ef98bc1 100644 --- a/r/src/csv.cpp +++ b/r/src/csv.cpp @@ -31,8 +31,7 @@ std::shared_ptr csv___WriteOptions__initialize( std::make_shared(arrow::csv::WriteOptions::Defaults()); res->include_header = cpp11::as_cpp(options["include_header"]); res->batch_size = cpp11::as_cpp(options["batch_size"]); - res->io_context = - arrow::io::IOContext(gc_memory_pool(), MainRThread::GetInstance().GetStopToken()); + res->io_context = MainRThread::GetInstance().CancellableIOContext(); return res; } diff --git a/r/src/filesystem.cpp b/r/src/filesystem.cpp index 259ef41c9f5..f42fa6875e9 100644 --- a/r/src/filesystem.cpp +++ b/r/src/filesystem.cpp @@ -240,8 +240,7 @@ std::string fs___FileSystem__type_name( // [[arrow::export]] std::shared_ptr fs___LocalFileSystem__create() { // Affects OpenInputFile/OpenInputStream - auto io_context = - arrow::io::IOContext(gc_memory_pool(), MainRThread::GetInstance().GetStopToken()); + auto io_context = MainRThread::GetInstance().CancellableIOContext(); return std::make_shared(io_context); } @@ -336,8 +335,7 @@ std::shared_ptr fs___S3FileSystem__create( s3_opts.allow_bucket_creation = allow_bucket_creation; s3_opts.allow_bucket_deletion = allow_bucket_deletion; - auto io_context = - arrow::io::IOContext(gc_memory_pool(), MainRThread::GetInstance().GetStopToken()); + auto io_context = MainRThread::GetInstance().CancellableIOContext(); return ValueOrStop(fs::S3FileSystem::Make(s3_opts, io_context)); } @@ -415,8 +413,7 @@ std::shared_ptr fs___GcsFileSystem__Make(bool anonymous, gcs_opts.default_metadata = strings_to_kvm(options["default_metadata"]); } - auto io_context = - arrow::io::IOContext(gc_memory_pool(), MainRThread::GetInstance().GetStopToken()); + auto io_context = MainRThread::GetInstance().CancellableIOContext(); // TODO(ARROW-16884): update when this returns Result return fs::GcsFileSystem::Make(gcs_opts, io_context); } diff --git a/r/src/safe-call-into-r.h b/r/src/safe-call-into-r.h index 7ea27852bf8..1a549dbd5ef 100644 --- a/r/src/safe-call-into-r.h +++ b/r/src/safe-call-into-r.h @@ -75,6 +75,11 @@ class MainRThread { bool SignalStopSourceEnabled() { return stop_source_ != nullptr; } + arrow::io::IOContext CancellableIOContext() { + return arrow::io::IOContext(gc_memory_pool(), + MainRThread::GetInstance().GetStopToken()); + } + // Check if a SafeCallIntoR call is able to execute bool CanExecuteSafeCallIntoR() { return IsMainThread() || executor_ != nullptr; } From f8318b6196176f99e5d959a4e82cf5f049b93ce3 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Thu, 21 Jul 2022 14:05:40 -0300 Subject: [PATCH 14/39] properly clean up the stop token on package unload --- r/R/arrow-package.R | 22 ++++++++++++++++++++++ r/src/safe-call-into-r-impl.cpp | 3 +++ r/src/safe-call-into-r.h | 20 ++++++++++++++++++-- 3 files changed, 43 insertions(+), 2 deletions(-) diff --git a/r/R/arrow-package.R b/r/R/arrow-package.R index e6b3f481e21..3cb725a278c 100644 --- a/r/R/arrow-package.R +++ b/r/R/arrow-package.R @@ -142,6 +142,28 @@ configure_tzdb <- function() { }) } +# Clean up the StopSource that was registered in .onLoad() so that if the +# package is reloaded we don't get an error from C++ informing us that +# a StopSource has already been set up. +.onUnload <- function(...) { + DeinitializeMainRThread() +} + +# While .onUnload should be sufficient, devtools::load_all() does not call it +# (but it does call .onDetach()). It is safe to call DeinitializeMainRThread() +# more than once. +.onDetach <- function(...) { + DeinitializeMainRThread() +} + +on_old_windows <- function() { + is_32bit <- .Machine$sizeof.pointer < 8 + is_old_r <- getRversion() < "4.0.0" + is_windows <- tolower(Sys.info()[["sysname"]]) == "windows" + + is_32bit && is_old_r && is_windows +} + # True when the OS is linux + and the R version is development # helpful for skipping on Valgrind, and the sanitizer checks (clang + gcc) on cran diff --git a/r/src/safe-call-into-r-impl.cpp b/r/src/safe-call-into-r-impl.cpp index 72558df1564..03ebde3ec49 100644 --- a/r/src/safe-call-into-r-impl.cpp +++ b/r/src/safe-call-into-r-impl.cpp @@ -30,6 +30,9 @@ MainRThread& MainRThread::GetInstance() { // [[arrow::export]] void InitializeMainRThread() { MainRThread::GetInstance().Initialize(); } +// [[arrow::export]] +void DeinitializeMainRThread() { MainRThread::GetInstance().Deinitialize(); } + bool CanRunWithCapturedR() { #if defined(HAS_UNWIND_PROTECT) static int on_old_windows = -1; diff --git a/r/src/safe-call-into-r.h b/r/src/safe-call-into-r.h index 1a549dbd5ef..e3a41cfbea7 100644 --- a/r/src/safe-call-into-r.h +++ b/r/src/safe-call-into-r.h @@ -56,12 +56,28 @@ class MainRThread { thread_id_ = std::this_thread::get_id(); initialized_ = true; ResetError(); - arrow::ResetSignalStopSource(); - stop_source_ = arrow::ValueOrStop(arrow::SetSignalStopSource()); + + // Try to set up the stop source. If another library linking to + // the same libarrow shared object has already done this, this call + // will fail (which is OK, we just don't get the ability to cancel) + auto maybe_stop_source = arrow::SetSignalStopSource(); + if (maybe_stop_source.ok()) { + stop_source_ = maybe_stop_source.ValueUnsafe(); + } else { + stop_source_ = nullptr; + } } bool IsInitialized() { return initialized_; } + void Deinitialize() { + initialized_ = false; + if (SignalStopSourceEnabled()) { + arrow::ResetSignalStopSource(); + stop_source_ = nullptr; + } + } + // Check if the current thread is the main R thread bool IsMainThread() { return initialized_ && std::this_thread::get_id() == thread_id_; } From 38c9e7d0908d6a7f406ee002a24e4077e6b62f7e Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Thu, 21 Jul 2022 15:01:13 -0300 Subject: [PATCH 15/39] make cancellation via signal handler override opt-in --- r/NAMESPACE | 1 + r/R/arrowExports.R | 4 +++ r/R/config.R | 12 ++++++++ r/man/arrow_enable_cancel_from_interrupt.Rd | 19 +++++++++++++ r/src/arrowExports.cpp | 8 ++++++ r/src/safe-call-into-r-impl.cpp | 12 ++++++++ r/src/safe-call-into-r.h | 31 +++++++++++---------- 7 files changed, 73 insertions(+), 14 deletions(-) create mode 100644 r/man/arrow_enable_cancel_from_interrupt.Rd diff --git a/r/NAMESPACE b/r/NAMESPACE index 49db309b8e8..2e628931148 100644 --- a/r/NAMESPACE +++ b/r/NAMESPACE @@ -256,6 +256,7 @@ export(Type) export(UnionDataset) export(all_of) export(arrow_available) +export(arrow_enable_cancel_from_interrupt) export(arrow_info) export(arrow_table) export(arrow_with_dataset) diff --git a/r/R/arrowExports.R b/r/R/arrowExports.R index 35c73e547c9..ea7eb0fa53b 100644 --- a/r/R/arrowExports.R +++ b/r/R/arrowExports.R @@ -1824,6 +1824,10 @@ CanRunWithCapturedR <- function() { .Call(`_arrow_CanRunWithCapturedR`) } +SetEnableSignalStopSource <- function(enabled) { + .Call(`_arrow_SetEnableSignalStopSource`, enabled) +} + TestSafeCallIntoR <- function(r_fun_that_returns_a_string, opt) { .Call(`_arrow_TestSafeCallIntoR`, r_fun_that_returns_a_string, opt) } diff --git a/r/R/config.R b/r/R/config.R index e373b3ee3ea..38e4fec590d 100644 --- a/r/R/config.R +++ b/r/R/config.R @@ -46,3 +46,15 @@ set_io_thread_count <- function(num_threads) { SetIOThreadPoolCapacity(as.integer(num_threads)) invisible(current_io_thread_count) } + +#' Enable cancel of long-running Arrow operations +#' +#' @param enabled Use `TRUE` to turn on cancellation of long-running +#' Arrow operations where this is supported; use `FALSE` to disable. +#' Using `TRUE` is currently experimental. +#' +#' @return The previous value of `enabled`, invisibly +#' @export +arrow_enable_cancel_from_interrupt <- function(enabled = TRUE) { + invisible(SetEnableSignalStopSource(enabled)) +} diff --git a/r/man/arrow_enable_cancel_from_interrupt.Rd b/r/man/arrow_enable_cancel_from_interrupt.Rd new file mode 100644 index 00000000000..4e1ded6df98 --- /dev/null +++ b/r/man/arrow_enable_cancel_from_interrupt.Rd @@ -0,0 +1,19 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/config.R +\name{arrow_enable_cancel_from_interrupt} +\alias{arrow_enable_cancel_from_interrupt} +\title{Enable cancel of long-running Arrow operations} +\usage{ +arrow_enable_cancel_from_interrupt(enabled = TRUE) +} +\arguments{ +\item{enabled}{Use \code{TRUE} to turn on cancellation of long-running +Arrow operations where this is supported; use \code{FALSE} to disable. +Using \code{TRUE} is currently experimental.} +} +\value{ +The previous value of \code{enabled}, invisibly +} +\description{ +Enable cancel of long-running Arrow operations +} diff --git a/r/src/arrowExports.cpp b/r/src/arrowExports.cpp index 409bf50282f..a7b459c8ea9 100644 --- a/r/src/arrowExports.cpp +++ b/r/src/arrowExports.cpp @@ -4665,6 +4665,14 @@ BEGIN_CPP11 END_CPP11 } // safe-call-into-r-impl.cpp +bool SetEnableSignalStopSource(bool enabled); +extern "C" SEXP _arrow_SetEnableSignalStopSource(SEXP enabled_sexp){ +BEGIN_CPP11 + arrow::r::Input::type enabled(enabled_sexp); + return cpp11::as_sexp(SetEnableSignalStopSource(enabled)); +END_CPP11 +} +// safe-call-into-r-impl.cpp std::string TestSafeCallIntoR(cpp11::function r_fun_that_returns_a_string, std::string opt); extern "C" SEXP _arrow_TestSafeCallIntoR(SEXP r_fun_that_returns_a_string_sexp, SEXP opt_sexp){ BEGIN_CPP11 diff --git a/r/src/safe-call-into-r-impl.cpp b/r/src/safe-call-into-r-impl.cpp index 03ebde3ec49..1150a2cb93f 100644 --- a/r/src/safe-call-into-r-impl.cpp +++ b/r/src/safe-call-into-r-impl.cpp @@ -33,6 +33,18 @@ void InitializeMainRThread() { MainRThread::GetInstance().Initialize(); } // [[arrow::export]] void DeinitializeMainRThread() { MainRThread::GetInstance().Deinitialize(); } +// [[arrow::export]] +bool SetEnableSignalStopSource(bool enabled) { + bool was_enabled = MainRThread::GetInstance().SignalStopSourceEnabled(); + if (was_enabled && !enabled) { + MainRThread::GetInstance().DisableSignalStopSource(); + } else if (!was_enabled && enabled) { + MainRThread::GetInstance().EnableSignalStopSource(); + } + + return was_enabled; +} + bool CanRunWithCapturedR() { #if defined(HAS_UNWIND_PROTECT) static int on_old_windows = -1; diff --git a/r/src/safe-call-into-r.h b/r/src/safe-call-into-r.h index e3a41cfbea7..4f321488c61 100644 --- a/r/src/safe-call-into-r.h +++ b/r/src/safe-call-into-r.h @@ -56,26 +56,13 @@ class MainRThread { thread_id_ = std::this_thread::get_id(); initialized_ = true; ResetError(); - - // Try to set up the stop source. If another library linking to - // the same libarrow shared object has already done this, this call - // will fail (which is OK, we just don't get the ability to cancel) - auto maybe_stop_source = arrow::SetSignalStopSource(); - if (maybe_stop_source.ok()) { - stop_source_ = maybe_stop_source.ValueUnsafe(); - } else { - stop_source_ = nullptr; - } } bool IsInitialized() { return initialized_; } void Deinitialize() { initialized_ = false; - if (SignalStopSourceEnabled()) { - arrow::ResetSignalStopSource(); - stop_source_ = nullptr; - } + DisableSignalStopSource(); } // Check if the current thread is the main R thread @@ -91,6 +78,22 @@ class MainRThread { bool SignalStopSourceEnabled() { return stop_source_ != nullptr; } + bool EnableSignalStopSource() { + // Try to set up the stop source. If another library linking to + // the same libarrow shared object has already done this, this call + // will fail (which is OK, we just don't get the ability to cancel) + if (!SignalStopSourceEnabled()) { + stop_source_ = arrow::ValueOrStop(arrow::SetSignalStopSource()); + } + } + + bool DisableSignalStopSource() { + if (SignalStopSourceEnabled()) { + arrow::ResetSignalStopSource(); + stop_source_ = nullptr; + } + } + arrow::io::IOContext CancellableIOContext() { return arrow::io::IOContext(gc_memory_pool(), MainRThread::GetInstance().GetStopToken()); From 57e7817a9933dd8f4157477986950a86c5ef3b01 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Thu, 21 Jul 2022 15:09:41 -0300 Subject: [PATCH 16/39] synchronize when we can and cannot runwithcapturedr --- r/R/arrowExports.R | 4 ++++ r/src/arrowExports.cpp | 7 +++++++ r/src/feather.cpp | 1 - r/src/safe-call-into-r-impl.cpp | 1 + r/src/safe-call-into-r.h | 4 ++-- r/tests/testthat/test-safe-call-into-r.R | 6 ++++++ 6 files changed, 20 insertions(+), 3 deletions(-) diff --git a/r/R/arrowExports.R b/r/R/arrowExports.R index ea7eb0fa53b..06d5fbf87e6 100644 --- a/r/R/arrowExports.R +++ b/r/R/arrowExports.R @@ -1828,6 +1828,10 @@ SetEnableSignalStopSource <- function(enabled) { .Call(`_arrow_SetEnableSignalStopSource`, enabled) } +CanRunWithCapturedR <- function() { + .Call(`_arrow_CanRunWithCapturedR`) +} + TestSafeCallIntoR <- function(r_fun_that_returns_a_string, opt) { .Call(`_arrow_TestSafeCallIntoR`, r_fun_that_returns_a_string, opt) } diff --git a/r/src/arrowExports.cpp b/r/src/arrowExports.cpp index a7b459c8ea9..ef4546eff01 100644 --- a/r/src/arrowExports.cpp +++ b/r/src/arrowExports.cpp @@ -4673,6 +4673,13 @@ BEGIN_CPP11 END_CPP11 } // safe-call-into-r-impl.cpp +bool CanRunWithCapturedR(); +extern "C" SEXP _arrow_CanRunWithCapturedR(){ +BEGIN_CPP11 + return cpp11::as_sexp(CanRunWithCapturedR()); +END_CPP11 +} +// safe-call-into-r-impl.cpp std::string TestSafeCallIntoR(cpp11::function r_fun_that_returns_a_string, std::string opt); extern "C" SEXP _arrow_TestSafeCallIntoR(SEXP r_fun_that_returns_a_string_sexp, SEXP opt_sexp){ BEGIN_CPP11 diff --git a/r/src/feather.cpp b/r/src/feather.cpp index cf68faef1b5..72e7c8e29c4 100644 --- a/r/src/feather.cpp +++ b/r/src/feather.cpp @@ -68,7 +68,6 @@ std::shared_ptr ipc___feather___Reader__Read( } else { read_result = reader->Read(&table); } - if (read_result.ok()) { return arrow::Result>(table); } else { diff --git a/r/src/safe-call-into-r-impl.cpp b/r/src/safe-call-into-r-impl.cpp index 1150a2cb93f..2b42418c784 100644 --- a/r/src/safe-call-into-r-impl.cpp +++ b/r/src/safe-call-into-r-impl.cpp @@ -45,6 +45,7 @@ bool SetEnableSignalStopSource(bool enabled) { return was_enabled; } +// [[arrow::export]] bool CanRunWithCapturedR() { #if defined(HAS_UNWIND_PROTECT) static int on_old_windows = -1; diff --git a/r/src/safe-call-into-r.h b/r/src/safe-call-into-r.h index 4f321488c61..f036acf1246 100644 --- a/r/src/safe-call-into-r.h +++ b/r/src/safe-call-into-r.h @@ -78,7 +78,7 @@ class MainRThread { bool SignalStopSourceEnabled() { return stop_source_ != nullptr; } - bool EnableSignalStopSource() { + void EnableSignalStopSource() { // Try to set up the stop source. If another library linking to // the same libarrow shared object has already done this, this call // will fail (which is OK, we just don't get the ability to cancel) @@ -87,7 +87,7 @@ class MainRThread { } } - bool DisableSignalStopSource() { + void DisableSignalStopSource() { if (SignalStopSourceEnabled()) { arrow::ResetSignalStopSource(); stop_source_ = nullptr; diff --git a/r/tests/testthat/test-safe-call-into-r.R b/r/tests/testthat/test-safe-call-into-r.R index c07d90433fd..5cce67ebee8 100644 --- a/r/tests/testthat/test-safe-call-into-r.R +++ b/r/tests/testthat/test-safe-call-into-r.R @@ -33,7 +33,10 @@ test_that("SafeCallIntoR works from the main R thread", { test_that("SafeCallIntoR works within RunWithCapturedR", { skip_if_not(CanRunWithCapturedR()) +<<<<<<< HEAD skip_on_cran() +======= +>>>>>>> 0b1d07483 (synchronize when we can and cannot runwithcapturedr) expect_identical( TestSafeCallIntoR(function() "string one!", opt = "async_with_executor"), @@ -48,7 +51,10 @@ test_that("SafeCallIntoR works within RunWithCapturedR", { test_that("SafeCallIntoR errors from the non-R thread", { skip_if_not(CanRunWithCapturedR()) +<<<<<<< HEAD skip_on_cran() +======= +>>>>>>> 0b1d07483 (synchronize when we can and cannot runwithcapturedr) expect_error( TestSafeCallIntoR(function() "string one!", opt = "async_without_executor"), From 20494b9b5ceaa5abe9483ddbc034bcef0aa6504d Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Thu, 21 Jul 2022 15:41:34 -0300 Subject: [PATCH 17/39] better name, pkgdown section --- r/NAMESPACE | 2 +- r/R/config.R | 2 +- r/_pkgdown.yml | 1 + ...el_from_interrupt.Rd => enable_cancel_from_interrupt.Rd} | 6 +++--- 4 files changed, 6 insertions(+), 5 deletions(-) rename r/man/{arrow_enable_cancel_from_interrupt.Rd => enable_cancel_from_interrupt.Rd} (77%) diff --git a/r/NAMESPACE b/r/NAMESPACE index 2e628931148..3c0a6157c02 100644 --- a/r/NAMESPACE +++ b/r/NAMESPACE @@ -256,7 +256,6 @@ export(Type) export(UnionDataset) export(all_of) export(arrow_available) -export(arrow_enable_cancel_from_interrupt) export(arrow_info) export(arrow_table) export(arrow_with_dataset) @@ -295,6 +294,7 @@ export(decimal256) export(default_memory_pool) export(dictionary) export(duration) +export(enable_cancel_from_interrupt) export(ends_with) export(everything) export(field) diff --git a/r/R/config.R b/r/R/config.R index 38e4fec590d..80dd52863e3 100644 --- a/r/R/config.R +++ b/r/R/config.R @@ -55,6 +55,6 @@ set_io_thread_count <- function(num_threads) { #' #' @return The previous value of `enabled`, invisibly #' @export -arrow_enable_cancel_from_interrupt <- function(enabled = TRUE) { +enable_cancel_from_interrupt <- function(enabled = TRUE) { invisible(SetEnableSignalStopSource(enabled)) } diff --git a/r/_pkgdown.yml b/r/_pkgdown.yml index 70bd7ac518c..d025afe477f 100644 --- a/r/_pkgdown.yml +++ b/r/_pkgdown.yml @@ -235,6 +235,7 @@ reference: - install_arrow - install_pyarrow - create_package_with_all_dependencies + - enable_cancel_from_interrupt repo: jira_projects: [ARROW] diff --git a/r/man/arrow_enable_cancel_from_interrupt.Rd b/r/man/enable_cancel_from_interrupt.Rd similarity index 77% rename from r/man/arrow_enable_cancel_from_interrupt.Rd rename to r/man/enable_cancel_from_interrupt.Rd index 4e1ded6df98..0c04fc5c32d 100644 --- a/r/man/arrow_enable_cancel_from_interrupt.Rd +++ b/r/man/enable_cancel_from_interrupt.Rd @@ -1,10 +1,10 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/config.R -\name{arrow_enable_cancel_from_interrupt} -\alias{arrow_enable_cancel_from_interrupt} +\name{enable_cancel_from_interrupt} +\alias{enable_cancel_from_interrupt} \title{Enable cancel of long-running Arrow operations} \usage{ -arrow_enable_cancel_from_interrupt(enabled = TRUE) +enable_cancel_from_interrupt(enabled = TRUE) } \arguments{ \item{enabled}{Use \code{TRUE} to turn on cancellation of long-running From 576c6657ed416adc803044c42caaf1edea28a954 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Fri, 22 Jul 2022 09:50:34 -0300 Subject: [PATCH 18/39] fix merges --- r/R/arrowExports.R | 4 +- r/src/arrowExports.cpp | 1021 +++++++++++----------- r/src/safe-call-into-r-impl.cpp | 15 - r/src/safe-call-into-r.h | 33 - r/tests/testthat/test-safe-call-into-r.R | 10 +- 5 files changed, 516 insertions(+), 567 deletions(-) diff --git a/r/R/arrowExports.R b/r/R/arrowExports.R index 06d5fbf87e6..b73bef71023 100644 --- a/r/R/arrowExports.R +++ b/r/R/arrowExports.R @@ -1820,8 +1820,8 @@ InitializeMainRThread <- function() { invisible(.Call(`_arrow_InitializeMainRThread`)) } -CanRunWithCapturedR <- function() { - .Call(`_arrow_CanRunWithCapturedR`) +DeinitializeMainRThread <- function() { + invisible(.Call(`_arrow_DeinitializeMainRThread`)) } SetEnableSignalStopSource <- function(enabled) { diff --git a/r/src/arrowExports.cpp b/r/src/arrowExports.cpp index ef4546eff01..0e2f2e7197b 100644 --- a/r/src/arrowExports.cpp +++ b/r/src/arrowExports.cpp @@ -4658,10 +4658,11 @@ BEGIN_CPP11 END_CPP11 } // safe-call-into-r-impl.cpp -bool CanRunWithCapturedR(); -extern "C" SEXP _arrow_CanRunWithCapturedR(){ +void DeinitializeMainRThread(); +extern "C" SEXP _arrow_DeinitializeMainRThread(){ BEGIN_CPP11 - return cpp11::as_sexp(CanRunWithCapturedR()); + DeinitializeMainRThread(); + return R_NilValue; END_CPP11 } // safe-call-into-r-impl.cpp @@ -5217,512 +5218,514 @@ static const R_CallMethodDef CallEntries[] = { { "_s3_available", (DL_FUNC)& _s3_available, 0 }, { "_gcs_available", (DL_FUNC)& _gcs_available, 0 }, { "_json_available", (DL_FUNC)& _json_available, 0 }, - { "_arrow_test_SET_STRING_ELT", (DL_FUNC) &_arrow_test_SET_STRING_ELT, 1}, - { "_arrow_is_arrow_altrep", (DL_FUNC) &_arrow_is_arrow_altrep, 1}, - { "_arrow_Array__Slice1", (DL_FUNC) &_arrow_Array__Slice1, 2}, - { "_arrow_Array__Slice2", (DL_FUNC) &_arrow_Array__Slice2, 3}, - { "_arrow_Array__IsNull", (DL_FUNC) &_arrow_Array__IsNull, 2}, - { "_arrow_Array__IsValid", (DL_FUNC) &_arrow_Array__IsValid, 2}, - { "_arrow_Array__length", (DL_FUNC) &_arrow_Array__length, 1}, - { "_arrow_Array__offset", (DL_FUNC) &_arrow_Array__offset, 1}, - { "_arrow_Array__null_count", (DL_FUNC) &_arrow_Array__null_count, 1}, - { "_arrow_Array__type", (DL_FUNC) &_arrow_Array__type, 1}, - { "_arrow_Array__ToString", (DL_FUNC) &_arrow_Array__ToString, 1}, - { "_arrow_Array__type_id", (DL_FUNC) &_arrow_Array__type_id, 1}, - { "_arrow_Array__Equals", (DL_FUNC) &_arrow_Array__Equals, 2}, - { "_arrow_Array__ApproxEquals", (DL_FUNC) &_arrow_Array__ApproxEquals, 2}, - { "_arrow_Array__Diff", (DL_FUNC) &_arrow_Array__Diff, 2}, - { "_arrow_Array__data", (DL_FUNC) &_arrow_Array__data, 1}, - { "_arrow_Array__RangeEquals", (DL_FUNC) &_arrow_Array__RangeEquals, 5}, - { "_arrow_Array__View", (DL_FUNC) &_arrow_Array__View, 2}, - { "_arrow_Array__Validate", (DL_FUNC) &_arrow_Array__Validate, 1}, - { "_arrow_DictionaryArray__indices", (DL_FUNC) &_arrow_DictionaryArray__indices, 1}, - { "_arrow_DictionaryArray__dictionary", (DL_FUNC) &_arrow_DictionaryArray__dictionary, 1}, - { "_arrow_StructArray__field", (DL_FUNC) &_arrow_StructArray__field, 2}, - { "_arrow_StructArray__GetFieldByName", (DL_FUNC) &_arrow_StructArray__GetFieldByName, 2}, - { "_arrow_StructArray__Flatten", (DL_FUNC) &_arrow_StructArray__Flatten, 1}, - { "_arrow_ListArray__value_type", (DL_FUNC) &_arrow_ListArray__value_type, 1}, - { "_arrow_LargeListArray__value_type", (DL_FUNC) &_arrow_LargeListArray__value_type, 1}, - { "_arrow_ListArray__values", (DL_FUNC) &_arrow_ListArray__values, 1}, - { "_arrow_LargeListArray__values", (DL_FUNC) &_arrow_LargeListArray__values, 1}, - { "_arrow_ListArray__value_length", (DL_FUNC) &_arrow_ListArray__value_length, 2}, - { "_arrow_LargeListArray__value_length", (DL_FUNC) &_arrow_LargeListArray__value_length, 2}, - { "_arrow_FixedSizeListArray__value_length", (DL_FUNC) &_arrow_FixedSizeListArray__value_length, 2}, - { "_arrow_ListArray__value_offset", (DL_FUNC) &_arrow_ListArray__value_offset, 2}, - { "_arrow_LargeListArray__value_offset", (DL_FUNC) &_arrow_LargeListArray__value_offset, 2}, - { "_arrow_FixedSizeListArray__value_offset", (DL_FUNC) &_arrow_FixedSizeListArray__value_offset, 2}, - { "_arrow_ListArray__raw_value_offsets", (DL_FUNC) &_arrow_ListArray__raw_value_offsets, 1}, - { "_arrow_LargeListArray__raw_value_offsets", (DL_FUNC) &_arrow_LargeListArray__raw_value_offsets, 1}, - { "_arrow_MapArray__keys", (DL_FUNC) &_arrow_MapArray__keys, 1}, - { "_arrow_MapArray__items", (DL_FUNC) &_arrow_MapArray__items, 1}, - { "_arrow_MapArray__keys_nested", (DL_FUNC) &_arrow_MapArray__keys_nested, 1}, - { "_arrow_MapArray__items_nested", (DL_FUNC) &_arrow_MapArray__items_nested, 1}, - { "_arrow_Array__Same", (DL_FUNC) &_arrow_Array__Same, 2}, - { "_arrow_Array__ReferencedBufferSize", (DL_FUNC) &_arrow_Array__ReferencedBufferSize, 1}, - { "_arrow_arrow__Concatenate", (DL_FUNC) &_arrow_arrow__Concatenate, 1}, - { "_arrow_Array__as_vector", (DL_FUNC) &_arrow_Array__as_vector, 1}, - { "_arrow_ChunkedArray__as_vector", (DL_FUNC) &_arrow_ChunkedArray__as_vector, 2}, - { "_arrow_RecordBatch__to_dataframe", (DL_FUNC) &_arrow_RecordBatch__to_dataframe, 2}, - { "_arrow_Table__to_dataframe", (DL_FUNC) &_arrow_Table__to_dataframe, 2}, - { "_arrow_ArrayData__get_type", (DL_FUNC) &_arrow_ArrayData__get_type, 1}, - { "_arrow_ArrayData__get_length", (DL_FUNC) &_arrow_ArrayData__get_length, 1}, - { "_arrow_ArrayData__get_null_count", (DL_FUNC) &_arrow_ArrayData__get_null_count, 1}, - { "_arrow_ArrayData__get_offset", (DL_FUNC) &_arrow_ArrayData__get_offset, 1}, - { "_arrow_ArrayData__buffers", (DL_FUNC) &_arrow_ArrayData__buffers, 1}, - { "_arrow_external_pointer_addr_double", (DL_FUNC) &_arrow_external_pointer_addr_double, 1}, - { "_arrow_external_pointer_addr_character", (DL_FUNC) &_arrow_external_pointer_addr_character, 1}, - { "_arrow_external_pointer_addr_integer64", (DL_FUNC) &_arrow_external_pointer_addr_integer64, 1}, - { "_arrow_external_pointer_addr_raw", (DL_FUNC) &_arrow_external_pointer_addr_raw, 1}, - { "_arrow_allocate_arrow_schema", (DL_FUNC) &_arrow_allocate_arrow_schema, 0}, - { "_arrow_delete_arrow_schema", (DL_FUNC) &_arrow_delete_arrow_schema, 1}, - { "_arrow_allocate_arrow_array", (DL_FUNC) &_arrow_allocate_arrow_array, 0}, - { "_arrow_delete_arrow_array", (DL_FUNC) &_arrow_delete_arrow_array, 1}, - { "_arrow_allocate_arrow_array_stream", (DL_FUNC) &_arrow_allocate_arrow_array_stream, 0}, - { "_arrow_delete_arrow_array_stream", (DL_FUNC) &_arrow_delete_arrow_array_stream, 1}, - { "_arrow_ImportArray", (DL_FUNC) &_arrow_ImportArray, 2}, - { "_arrow_ImportRecordBatch", (DL_FUNC) &_arrow_ImportRecordBatch, 2}, - { "_arrow_ImportSchema", (DL_FUNC) &_arrow_ImportSchema, 1}, - { "_arrow_ImportField", (DL_FUNC) &_arrow_ImportField, 1}, - { "_arrow_ImportType", (DL_FUNC) &_arrow_ImportType, 1}, - { "_arrow_ImportRecordBatchReader", (DL_FUNC) &_arrow_ImportRecordBatchReader, 1}, - { "_arrow_ExportType", (DL_FUNC) &_arrow_ExportType, 2}, - { "_arrow_ExportField", (DL_FUNC) &_arrow_ExportField, 2}, - { "_arrow_ExportSchema", (DL_FUNC) &_arrow_ExportSchema, 2}, - { "_arrow_ExportArray", (DL_FUNC) &_arrow_ExportArray, 3}, - { "_arrow_ExportRecordBatch", (DL_FUNC) &_arrow_ExportRecordBatch, 3}, - { "_arrow_ExportRecordBatchReader", (DL_FUNC) &_arrow_ExportRecordBatchReader, 2}, - { "_arrow_Buffer__is_mutable", (DL_FUNC) &_arrow_Buffer__is_mutable, 1}, - { "_arrow_Buffer__ZeroPadding", (DL_FUNC) &_arrow_Buffer__ZeroPadding, 1}, - { "_arrow_Buffer__capacity", (DL_FUNC) &_arrow_Buffer__capacity, 1}, - { "_arrow_Buffer__size", (DL_FUNC) &_arrow_Buffer__size, 1}, - { "_arrow_r___RBuffer__initialize", (DL_FUNC) &_arrow_r___RBuffer__initialize, 1}, - { "_arrow_Buffer__data", (DL_FUNC) &_arrow_Buffer__data, 1}, - { "_arrow_Buffer__Equals", (DL_FUNC) &_arrow_Buffer__Equals, 2}, - { "_arrow_ChunkedArray__length", (DL_FUNC) &_arrow_ChunkedArray__length, 1}, - { "_arrow_ChunkedArray__null_count", (DL_FUNC) &_arrow_ChunkedArray__null_count, 1}, - { "_arrow_ChunkedArray__num_chunks", (DL_FUNC) &_arrow_ChunkedArray__num_chunks, 1}, - { "_arrow_ChunkedArray__chunk", (DL_FUNC) &_arrow_ChunkedArray__chunk, 2}, - { "_arrow_ChunkedArray__chunks", (DL_FUNC) &_arrow_ChunkedArray__chunks, 1}, - { "_arrow_ChunkedArray__type", (DL_FUNC) &_arrow_ChunkedArray__type, 1}, - { "_arrow_ChunkedArray__Slice1", (DL_FUNC) &_arrow_ChunkedArray__Slice1, 2}, - { "_arrow_ChunkedArray__Slice2", (DL_FUNC) &_arrow_ChunkedArray__Slice2, 3}, - { "_arrow_ChunkedArray__View", (DL_FUNC) &_arrow_ChunkedArray__View, 2}, - { "_arrow_ChunkedArray__Validate", (DL_FUNC) &_arrow_ChunkedArray__Validate, 1}, - { "_arrow_ChunkedArray__Equals", (DL_FUNC) &_arrow_ChunkedArray__Equals, 2}, - { "_arrow_ChunkedArray__ToString", (DL_FUNC) &_arrow_ChunkedArray__ToString, 1}, - { "_arrow_ChunkedArray__from_list", (DL_FUNC) &_arrow_ChunkedArray__from_list, 2}, - { "_arrow_ChunkedArray__ReferencedBufferSize", (DL_FUNC) &_arrow_ChunkedArray__ReferencedBufferSize, 1}, - { "_arrow_util___Codec__Create", (DL_FUNC) &_arrow_util___Codec__Create, 2}, - { "_arrow_util___Codec__name", (DL_FUNC) &_arrow_util___Codec__name, 1}, - { "_arrow_util___Codec__IsAvailable", (DL_FUNC) &_arrow_util___Codec__IsAvailable, 1}, - { "_arrow_io___CompressedOutputStream__Make", (DL_FUNC) &_arrow_io___CompressedOutputStream__Make, 2}, - { "_arrow_io___CompressedInputStream__Make", (DL_FUNC) &_arrow_io___CompressedInputStream__Make, 2}, - { "_arrow_ExecPlan_create", (DL_FUNC) &_arrow_ExecPlan_create, 1}, - { "_arrow_ExecPlan_run", (DL_FUNC) &_arrow_ExecPlan_run, 5}, - { "_arrow_ExecPlan_read_table", (DL_FUNC) &_arrow_ExecPlan_read_table, 5}, - { "_arrow_ExecPlan_StopProducing", (DL_FUNC) &_arrow_ExecPlan_StopProducing, 1}, - { "_arrow_ExecNode_output_schema", (DL_FUNC) &_arrow_ExecNode_output_schema, 1}, - { "_arrow_ExecNode_Scan", (DL_FUNC) &_arrow_ExecNode_Scan, 4}, - { "_arrow_ExecPlan_Write", (DL_FUNC) &_arrow_ExecPlan_Write, 14}, - { "_arrow_ExecNode_Filter", (DL_FUNC) &_arrow_ExecNode_Filter, 2}, - { "_arrow_ExecNode_Project", (DL_FUNC) &_arrow_ExecNode_Project, 3}, - { "_arrow_ExecNode_Aggregate", (DL_FUNC) &_arrow_ExecNode_Aggregate, 3}, - { "_arrow_ExecNode_Join", (DL_FUNC) &_arrow_ExecNode_Join, 9}, - { "_arrow_ExecNode_Union", (DL_FUNC) &_arrow_ExecNode_Union, 2}, - { "_arrow_ExecNode_SourceNode", (DL_FUNC) &_arrow_ExecNode_SourceNode, 2}, - { "_arrow_ExecNode_TableSourceNode", (DL_FUNC) &_arrow_ExecNode_TableSourceNode, 2}, - { "_arrow_substrait__internal__SubstraitToJSON", (DL_FUNC) &_arrow_substrait__internal__SubstraitToJSON, 1}, - { "_arrow_substrait__internal__SubstraitFromJSON", (DL_FUNC) &_arrow_substrait__internal__SubstraitFromJSON, 1}, - { "_arrow_ExecPlan_run_substrait", (DL_FUNC) &_arrow_ExecPlan_run_substrait, 2}, - { "_arrow_RecordBatch__cast", (DL_FUNC) &_arrow_RecordBatch__cast, 3}, - { "_arrow_Table__cast", (DL_FUNC) &_arrow_Table__cast, 3}, - { "_arrow_compute__CallFunction", (DL_FUNC) &_arrow_compute__CallFunction, 3}, - { "_arrow_compute__GetFunctionNames", (DL_FUNC) &_arrow_compute__GetFunctionNames, 0}, - { "_arrow_RegisterScalarUDF", (DL_FUNC) &_arrow_RegisterScalarUDF, 2}, - { "_arrow_build_info", (DL_FUNC) &_arrow_build_info, 0}, - { "_arrow_runtime_info", (DL_FUNC) &_arrow_runtime_info, 0}, - { "_arrow_set_timezone_database", (DL_FUNC) &_arrow_set_timezone_database, 1}, - { "_arrow_csv___WriteOptions__initialize", (DL_FUNC) &_arrow_csv___WriteOptions__initialize, 1}, - { "_arrow_csv___ReadOptions__initialize", (DL_FUNC) &_arrow_csv___ReadOptions__initialize, 1}, - { "_arrow_csv___ParseOptions__initialize", (DL_FUNC) &_arrow_csv___ParseOptions__initialize, 1}, - { "_arrow_csv___ReadOptions__column_names", (DL_FUNC) &_arrow_csv___ReadOptions__column_names, 1}, - { "_arrow_csv___ConvertOptions__initialize", (DL_FUNC) &_arrow_csv___ConvertOptions__initialize, 1}, - { "_arrow_csv___TableReader__Make", (DL_FUNC) &_arrow_csv___TableReader__Make, 4}, - { "_arrow_csv___TableReader__Read", (DL_FUNC) &_arrow_csv___TableReader__Read, 1}, - { "_arrow_TimestampParser__kind", (DL_FUNC) &_arrow_TimestampParser__kind, 1}, - { "_arrow_TimestampParser__format", (DL_FUNC) &_arrow_TimestampParser__format, 1}, - { "_arrow_TimestampParser__MakeStrptime", (DL_FUNC) &_arrow_TimestampParser__MakeStrptime, 1}, - { "_arrow_TimestampParser__MakeISO8601", (DL_FUNC) &_arrow_TimestampParser__MakeISO8601, 0}, - { "_arrow_csv___WriteCSV__Table", (DL_FUNC) &_arrow_csv___WriteCSV__Table, 3}, - { "_arrow_csv___WriteCSV__RecordBatch", (DL_FUNC) &_arrow_csv___WriteCSV__RecordBatch, 3}, - { "_arrow_csv___WriteCSV__RecordBatchReader", (DL_FUNC) &_arrow_csv___WriteCSV__RecordBatchReader, 3}, - { "_arrow_dataset___Dataset__NewScan", (DL_FUNC) &_arrow_dataset___Dataset__NewScan, 1}, - { "_arrow_dataset___Dataset__schema", (DL_FUNC) &_arrow_dataset___Dataset__schema, 1}, - { "_arrow_dataset___Dataset__type_name", (DL_FUNC) &_arrow_dataset___Dataset__type_name, 1}, - { "_arrow_dataset___Dataset__ReplaceSchema", (DL_FUNC) &_arrow_dataset___Dataset__ReplaceSchema, 2}, - { "_arrow_dataset___UnionDataset__create", (DL_FUNC) &_arrow_dataset___UnionDataset__create, 2}, - { "_arrow_dataset___InMemoryDataset__create", (DL_FUNC) &_arrow_dataset___InMemoryDataset__create, 1}, - { "_arrow_dataset___UnionDataset__children", (DL_FUNC) &_arrow_dataset___UnionDataset__children, 1}, - { "_arrow_dataset___FileSystemDataset__format", (DL_FUNC) &_arrow_dataset___FileSystemDataset__format, 1}, - { "_arrow_dataset___FileSystemDataset__filesystem", (DL_FUNC) &_arrow_dataset___FileSystemDataset__filesystem, 1}, - { "_arrow_dataset___FileSystemDataset__files", (DL_FUNC) &_arrow_dataset___FileSystemDataset__files, 1}, - { "_arrow_dataset___DatasetFactory__Finish1", (DL_FUNC) &_arrow_dataset___DatasetFactory__Finish1, 2}, - { "_arrow_dataset___DatasetFactory__Finish2", (DL_FUNC) &_arrow_dataset___DatasetFactory__Finish2, 2}, - { "_arrow_dataset___DatasetFactory__Inspect", (DL_FUNC) &_arrow_dataset___DatasetFactory__Inspect, 2}, - { "_arrow_dataset___UnionDatasetFactory__Make", (DL_FUNC) &_arrow_dataset___UnionDatasetFactory__Make, 1}, - { "_arrow_dataset___FileSystemDatasetFactory__Make", (DL_FUNC) &_arrow_dataset___FileSystemDatasetFactory__Make, 4}, - { "_arrow_dataset___FileSystemDatasetFactory__MakePaths", (DL_FUNC) &_arrow_dataset___FileSystemDatasetFactory__MakePaths, 4}, - { "_arrow_dataset___FileFormat__type_name", (DL_FUNC) &_arrow_dataset___FileFormat__type_name, 1}, - { "_arrow_dataset___FileFormat__DefaultWriteOptions", (DL_FUNC) &_arrow_dataset___FileFormat__DefaultWriteOptions, 1}, - { "_arrow_dataset___ParquetFileFormat__Make", (DL_FUNC) &_arrow_dataset___ParquetFileFormat__Make, 2}, - { "_arrow_dataset___FileWriteOptions__type_name", (DL_FUNC) &_arrow_dataset___FileWriteOptions__type_name, 1}, - { "_arrow_dataset___ParquetFileWriteOptions__update", (DL_FUNC) &_arrow_dataset___ParquetFileWriteOptions__update, 3}, - { "_arrow_dataset___IpcFileWriteOptions__update2", (DL_FUNC) &_arrow_dataset___IpcFileWriteOptions__update2, 4}, - { "_arrow_dataset___IpcFileWriteOptions__update1", (DL_FUNC) &_arrow_dataset___IpcFileWriteOptions__update1, 3}, - { "_arrow_dataset___CsvFileWriteOptions__update", (DL_FUNC) &_arrow_dataset___CsvFileWriteOptions__update, 2}, - { "_arrow_dataset___IpcFileFormat__Make", (DL_FUNC) &_arrow_dataset___IpcFileFormat__Make, 0}, - { "_arrow_dataset___CsvFileFormat__Make", (DL_FUNC) &_arrow_dataset___CsvFileFormat__Make, 3}, - { "_arrow_dataset___FragmentScanOptions__type_name", (DL_FUNC) &_arrow_dataset___FragmentScanOptions__type_name, 1}, - { "_arrow_dataset___CsvFragmentScanOptions__Make", (DL_FUNC) &_arrow_dataset___CsvFragmentScanOptions__Make, 2}, - { "_arrow_dataset___ParquetFragmentScanOptions__Make", (DL_FUNC) &_arrow_dataset___ParquetFragmentScanOptions__Make, 3}, - { "_arrow_dataset___DirectoryPartitioning", (DL_FUNC) &_arrow_dataset___DirectoryPartitioning, 2}, - { "_arrow_dataset___DirectoryPartitioning__MakeFactory", (DL_FUNC) &_arrow_dataset___DirectoryPartitioning__MakeFactory, 2}, - { "_arrow_dataset___HivePartitioning", (DL_FUNC) &_arrow_dataset___HivePartitioning, 3}, - { "_arrow_dataset___HivePartitioning__MakeFactory", (DL_FUNC) &_arrow_dataset___HivePartitioning__MakeFactory, 2}, - { "_arrow_dataset___PartitioningFactory__Inspect", (DL_FUNC) &_arrow_dataset___PartitioningFactory__Inspect, 2}, - { "_arrow_dataset___PartitioningFactory__Finish", (DL_FUNC) &_arrow_dataset___PartitioningFactory__Finish, 2}, - { "_arrow_dataset___PartitioningFactory__type_name", (DL_FUNC) &_arrow_dataset___PartitioningFactory__type_name, 1}, - { "_arrow_dataset___ScannerBuilder__ProjectNames", (DL_FUNC) &_arrow_dataset___ScannerBuilder__ProjectNames, 2}, - { "_arrow_dataset___ScannerBuilder__ProjectExprs", (DL_FUNC) &_arrow_dataset___ScannerBuilder__ProjectExprs, 3}, - { "_arrow_dataset___ScannerBuilder__Filter", (DL_FUNC) &_arrow_dataset___ScannerBuilder__Filter, 2}, - { "_arrow_dataset___ScannerBuilder__UseThreads", (DL_FUNC) &_arrow_dataset___ScannerBuilder__UseThreads, 2}, - { "_arrow_dataset___ScannerBuilder__BatchSize", (DL_FUNC) &_arrow_dataset___ScannerBuilder__BatchSize, 2}, - { "_arrow_dataset___ScannerBuilder__FragmentScanOptions", (DL_FUNC) &_arrow_dataset___ScannerBuilder__FragmentScanOptions, 2}, - { "_arrow_dataset___ScannerBuilder__schema", (DL_FUNC) &_arrow_dataset___ScannerBuilder__schema, 1}, - { "_arrow_dataset___ScannerBuilder__Finish", (DL_FUNC) &_arrow_dataset___ScannerBuilder__Finish, 1}, - { "_arrow_dataset___ScannerBuilder__FromRecordBatchReader", (DL_FUNC) &_arrow_dataset___ScannerBuilder__FromRecordBatchReader, 1}, - { "_arrow_dataset___Scanner__ToTable", (DL_FUNC) &_arrow_dataset___Scanner__ToTable, 1}, - { "_arrow_dataset___Scanner__ScanBatches", (DL_FUNC) &_arrow_dataset___Scanner__ScanBatches, 1}, - { "_arrow_dataset___Scanner__ToRecordBatchReader", (DL_FUNC) &_arrow_dataset___Scanner__ToRecordBatchReader, 1}, - { "_arrow_dataset___Scanner__head", (DL_FUNC) &_arrow_dataset___Scanner__head, 2}, - { "_arrow_dataset___Scanner__schema", (DL_FUNC) &_arrow_dataset___Scanner__schema, 1}, - { "_arrow_dataset___Scanner__TakeRows", (DL_FUNC) &_arrow_dataset___Scanner__TakeRows, 2}, - { "_arrow_dataset___Scanner__CountRows", (DL_FUNC) &_arrow_dataset___Scanner__CountRows, 1}, - { "_arrow_Int8__initialize", (DL_FUNC) &_arrow_Int8__initialize, 0}, - { "_arrow_Int16__initialize", (DL_FUNC) &_arrow_Int16__initialize, 0}, - { "_arrow_Int32__initialize", (DL_FUNC) &_arrow_Int32__initialize, 0}, - { "_arrow_Int64__initialize", (DL_FUNC) &_arrow_Int64__initialize, 0}, - { "_arrow_UInt8__initialize", (DL_FUNC) &_arrow_UInt8__initialize, 0}, - { "_arrow_UInt16__initialize", (DL_FUNC) &_arrow_UInt16__initialize, 0}, - { "_arrow_UInt32__initialize", (DL_FUNC) &_arrow_UInt32__initialize, 0}, - { "_arrow_UInt64__initialize", (DL_FUNC) &_arrow_UInt64__initialize, 0}, - { "_arrow_Float16__initialize", (DL_FUNC) &_arrow_Float16__initialize, 0}, - { "_arrow_Float32__initialize", (DL_FUNC) &_arrow_Float32__initialize, 0}, - { "_arrow_Float64__initialize", (DL_FUNC) &_arrow_Float64__initialize, 0}, - { "_arrow_Boolean__initialize", (DL_FUNC) &_arrow_Boolean__initialize, 0}, - { "_arrow_Utf8__initialize", (DL_FUNC) &_arrow_Utf8__initialize, 0}, - { "_arrow_LargeUtf8__initialize", (DL_FUNC) &_arrow_LargeUtf8__initialize, 0}, - { "_arrow_Binary__initialize", (DL_FUNC) &_arrow_Binary__initialize, 0}, - { "_arrow_LargeBinary__initialize", (DL_FUNC) &_arrow_LargeBinary__initialize, 0}, - { "_arrow_Date32__initialize", (DL_FUNC) &_arrow_Date32__initialize, 0}, - { "_arrow_Date64__initialize", (DL_FUNC) &_arrow_Date64__initialize, 0}, - { "_arrow_Null__initialize", (DL_FUNC) &_arrow_Null__initialize, 0}, - { "_arrow_Decimal128Type__initialize", (DL_FUNC) &_arrow_Decimal128Type__initialize, 2}, - { "_arrow_Decimal256Type__initialize", (DL_FUNC) &_arrow_Decimal256Type__initialize, 2}, - { "_arrow_DayTimeInterval__initialize", (DL_FUNC) &_arrow_DayTimeInterval__initialize, 0}, - { "_arrow_FixedSizeBinary__initialize", (DL_FUNC) &_arrow_FixedSizeBinary__initialize, 1}, - { "_arrow_FixedSizeBinary__byte_width", (DL_FUNC) &_arrow_FixedSizeBinary__byte_width, 1}, - { "_arrow_Timestamp__initialize", (DL_FUNC) &_arrow_Timestamp__initialize, 2}, - { "_arrow_Time32__initialize", (DL_FUNC) &_arrow_Time32__initialize, 1}, - { "_arrow_Time64__initialize", (DL_FUNC) &_arrow_Time64__initialize, 1}, - { "_arrow_Duration__initialize", (DL_FUNC) &_arrow_Duration__initialize, 1}, - { "_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_map__", (DL_FUNC) &_arrow_map__, 3}, - { "_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}, - { "_arrow_DataType__num_fields", (DL_FUNC) &_arrow_DataType__num_fields, 1}, - { "_arrow_DataType__fields", (DL_FUNC) &_arrow_DataType__fields, 1}, - { "_arrow_DataType__id", (DL_FUNC) &_arrow_DataType__id, 1}, - { "_arrow_ListType__ToString", (DL_FUNC) &_arrow_ListType__ToString, 1}, - { "_arrow_FixedWidthType__bit_width", (DL_FUNC) &_arrow_FixedWidthType__bit_width, 1}, - { "_arrow_DateType__unit", (DL_FUNC) &_arrow_DateType__unit, 1}, - { "_arrow_TimeType__unit", (DL_FUNC) &_arrow_TimeType__unit, 1}, - { "_arrow_DurationType__unit", (DL_FUNC) &_arrow_DurationType__unit, 1}, - { "_arrow_DecimalType__precision", (DL_FUNC) &_arrow_DecimalType__precision, 1}, - { "_arrow_DecimalType__scale", (DL_FUNC) &_arrow_DecimalType__scale, 1}, - { "_arrow_TimestampType__timezone", (DL_FUNC) &_arrow_TimestampType__timezone, 1}, - { "_arrow_TimestampType__unit", (DL_FUNC) &_arrow_TimestampType__unit, 1}, - { "_arrow_DictionaryType__initialize", (DL_FUNC) &_arrow_DictionaryType__initialize, 3}, - { "_arrow_DictionaryType__index_type", (DL_FUNC) &_arrow_DictionaryType__index_type, 1}, - { "_arrow_DictionaryType__value_type", (DL_FUNC) &_arrow_DictionaryType__value_type, 1}, - { "_arrow_DictionaryType__name", (DL_FUNC) &_arrow_DictionaryType__name, 1}, - { "_arrow_DictionaryType__ordered", (DL_FUNC) &_arrow_DictionaryType__ordered, 1}, - { "_arrow_StructType__GetFieldByName", (DL_FUNC) &_arrow_StructType__GetFieldByName, 2}, - { "_arrow_StructType__GetFieldIndex", (DL_FUNC) &_arrow_StructType__GetFieldIndex, 2}, - { "_arrow_StructType__field_names", (DL_FUNC) &_arrow_StructType__field_names, 1}, - { "_arrow_ListType__value_field", (DL_FUNC) &_arrow_ListType__value_field, 1}, - { "_arrow_ListType__value_type", (DL_FUNC) &_arrow_ListType__value_type, 1}, - { "_arrow_LargeListType__value_field", (DL_FUNC) &_arrow_LargeListType__value_field, 1}, - { "_arrow_LargeListType__value_type", (DL_FUNC) &_arrow_LargeListType__value_type, 1}, - { "_arrow_FixedSizeListType__value_field", (DL_FUNC) &_arrow_FixedSizeListType__value_field, 1}, - { "_arrow_FixedSizeListType__value_type", (DL_FUNC) &_arrow_FixedSizeListType__value_type, 1}, - { "_arrow_FixedSizeListType__list_size", (DL_FUNC) &_arrow_FixedSizeListType__list_size, 1}, - { "_arrow_MapType__key_field", (DL_FUNC) &_arrow_MapType__key_field, 1}, - { "_arrow_MapType__item_field", (DL_FUNC) &_arrow_MapType__item_field, 1}, - { "_arrow_MapType__key_type", (DL_FUNC) &_arrow_MapType__key_type, 1}, - { "_arrow_MapType__item_type", (DL_FUNC) &_arrow_MapType__item_type, 1}, - { "_arrow_MapType__keys_sorted", (DL_FUNC) &_arrow_MapType__keys_sorted, 1}, - { "_arrow_compute___expr__equals", (DL_FUNC) &_arrow_compute___expr__equals, 2}, - { "_arrow_compute___expr__call", (DL_FUNC) &_arrow_compute___expr__call, 3}, - { "_arrow_field_names_in_expression", (DL_FUNC) &_arrow_field_names_in_expression, 1}, - { "_arrow_compute___expr__get_field_ref_name", (DL_FUNC) &_arrow_compute___expr__get_field_ref_name, 1}, - { "_arrow_compute___expr__field_ref", (DL_FUNC) &_arrow_compute___expr__field_ref, 1}, - { "_arrow_compute___expr__scalar", (DL_FUNC) &_arrow_compute___expr__scalar, 1}, - { "_arrow_compute___expr__ToString", (DL_FUNC) &_arrow_compute___expr__ToString, 1}, - { "_arrow_compute___expr__type", (DL_FUNC) &_arrow_compute___expr__type, 2}, - { "_arrow_compute___expr__type_id", (DL_FUNC) &_arrow_compute___expr__type_id, 2}, - { "_arrow_ExtensionType__initialize", (DL_FUNC) &_arrow_ExtensionType__initialize, 4}, - { "_arrow_ExtensionType__extension_name", (DL_FUNC) &_arrow_ExtensionType__extension_name, 1}, - { "_arrow_ExtensionType__Serialize", (DL_FUNC) &_arrow_ExtensionType__Serialize, 1}, - { "_arrow_ExtensionType__storage_type", (DL_FUNC) &_arrow_ExtensionType__storage_type, 1}, - { "_arrow_ExtensionType__MakeArray", (DL_FUNC) &_arrow_ExtensionType__MakeArray, 2}, - { "_arrow_ExtensionType__r6_class", (DL_FUNC) &_arrow_ExtensionType__r6_class, 1}, - { "_arrow_ExtensionArray__storage", (DL_FUNC) &_arrow_ExtensionArray__storage, 1}, - { "_arrow_arrow__RegisterRExtensionType", (DL_FUNC) &_arrow_arrow__RegisterRExtensionType, 1}, - { "_arrow_arrow__UnregisterRExtensionType", (DL_FUNC) &_arrow_arrow__UnregisterRExtensionType, 1}, - { "_arrow_ipc___WriteFeather__Table", (DL_FUNC) &_arrow_ipc___WriteFeather__Table, 6}, - { "_arrow_ipc___feather___Reader__version", (DL_FUNC) &_arrow_ipc___feather___Reader__version, 1}, - { "_arrow_ipc___feather___Reader__Read", (DL_FUNC) &_arrow_ipc___feather___Reader__Read, 2}, - { "_arrow_ipc___feather___Reader__Open", (DL_FUNC) &_arrow_ipc___feather___Reader__Open, 1}, - { "_arrow_ipc___feather___Reader__schema", (DL_FUNC) &_arrow_ipc___feather___Reader__schema, 1}, - { "_arrow_Field__initialize", (DL_FUNC) &_arrow_Field__initialize, 3}, - { "_arrow_Field__ToString", (DL_FUNC) &_arrow_Field__ToString, 1}, - { "_arrow_Field__name", (DL_FUNC) &_arrow_Field__name, 1}, - { "_arrow_Field__Equals", (DL_FUNC) &_arrow_Field__Equals, 2}, - { "_arrow_Field__nullable", (DL_FUNC) &_arrow_Field__nullable, 1}, - { "_arrow_Field__type", (DL_FUNC) &_arrow_Field__type, 1}, - { "_arrow_fs___FileInfo__type", (DL_FUNC) &_arrow_fs___FileInfo__type, 1}, - { "_arrow_fs___FileInfo__set_type", (DL_FUNC) &_arrow_fs___FileInfo__set_type, 2}, - { "_arrow_fs___FileInfo__path", (DL_FUNC) &_arrow_fs___FileInfo__path, 1}, - { "_arrow_fs___FileInfo__set_path", (DL_FUNC) &_arrow_fs___FileInfo__set_path, 2}, - { "_arrow_fs___FileInfo__size", (DL_FUNC) &_arrow_fs___FileInfo__size, 1}, - { "_arrow_fs___FileInfo__set_size", (DL_FUNC) &_arrow_fs___FileInfo__set_size, 2}, - { "_arrow_fs___FileInfo__base_name", (DL_FUNC) &_arrow_fs___FileInfo__base_name, 1}, - { "_arrow_fs___FileInfo__extension", (DL_FUNC) &_arrow_fs___FileInfo__extension, 1}, - { "_arrow_fs___FileInfo__mtime", (DL_FUNC) &_arrow_fs___FileInfo__mtime, 1}, - { "_arrow_fs___FileInfo__set_mtime", (DL_FUNC) &_arrow_fs___FileInfo__set_mtime, 2}, - { "_arrow_fs___FileSelector__base_dir", (DL_FUNC) &_arrow_fs___FileSelector__base_dir, 1}, - { "_arrow_fs___FileSelector__allow_not_found", (DL_FUNC) &_arrow_fs___FileSelector__allow_not_found, 1}, - { "_arrow_fs___FileSelector__recursive", (DL_FUNC) &_arrow_fs___FileSelector__recursive, 1}, - { "_arrow_fs___FileSelector__create", (DL_FUNC) &_arrow_fs___FileSelector__create, 3}, - { "_arrow_fs___FileSystem__GetTargetInfos_Paths", (DL_FUNC) &_arrow_fs___FileSystem__GetTargetInfos_Paths, 2}, - { "_arrow_fs___FileSystem__GetTargetInfos_FileSelector", (DL_FUNC) &_arrow_fs___FileSystem__GetTargetInfos_FileSelector, 2}, - { "_arrow_fs___FileSystem__CreateDir", (DL_FUNC) &_arrow_fs___FileSystem__CreateDir, 3}, - { "_arrow_fs___FileSystem__DeleteDir", (DL_FUNC) &_arrow_fs___FileSystem__DeleteDir, 2}, - { "_arrow_fs___FileSystem__DeleteDirContents", (DL_FUNC) &_arrow_fs___FileSystem__DeleteDirContents, 2}, - { "_arrow_fs___FileSystem__DeleteFile", (DL_FUNC) &_arrow_fs___FileSystem__DeleteFile, 2}, - { "_arrow_fs___FileSystem__DeleteFiles", (DL_FUNC) &_arrow_fs___FileSystem__DeleteFiles, 2}, - { "_arrow_fs___FileSystem__Move", (DL_FUNC) &_arrow_fs___FileSystem__Move, 3}, - { "_arrow_fs___FileSystem__CopyFile", (DL_FUNC) &_arrow_fs___FileSystem__CopyFile, 3}, - { "_arrow_fs___FileSystem__OpenInputStream", (DL_FUNC) &_arrow_fs___FileSystem__OpenInputStream, 2}, - { "_arrow_fs___FileSystem__OpenInputFile", (DL_FUNC) &_arrow_fs___FileSystem__OpenInputFile, 2}, - { "_arrow_fs___FileSystem__OpenOutputStream", (DL_FUNC) &_arrow_fs___FileSystem__OpenOutputStream, 2}, - { "_arrow_fs___FileSystem__OpenAppendStream", (DL_FUNC) &_arrow_fs___FileSystem__OpenAppendStream, 2}, - { "_arrow_fs___FileSystem__type_name", (DL_FUNC) &_arrow_fs___FileSystem__type_name, 1}, - { "_arrow_fs___LocalFileSystem__create", (DL_FUNC) &_arrow_fs___LocalFileSystem__create, 0}, - { "_arrow_fs___SubTreeFileSystem__create", (DL_FUNC) &_arrow_fs___SubTreeFileSystem__create, 2}, - { "_arrow_fs___SubTreeFileSystem__base_fs", (DL_FUNC) &_arrow_fs___SubTreeFileSystem__base_fs, 1}, - { "_arrow_fs___SubTreeFileSystem__base_path", (DL_FUNC) &_arrow_fs___SubTreeFileSystem__base_path, 1}, - { "_arrow_fs___FileSystemFromUri", (DL_FUNC) &_arrow_fs___FileSystemFromUri, 1}, - { "_arrow_fs___CopyFiles", (DL_FUNC) &_arrow_fs___CopyFiles, 6}, - { "_arrow_fs___S3FileSystem__create", (DL_FUNC) &_arrow_fs___S3FileSystem__create, 15}, - { "_arrow_fs___S3FileSystem__region", (DL_FUNC) &_arrow_fs___S3FileSystem__region, 1}, - { "_arrow_fs___GcsFileSystem__Make", (DL_FUNC) &_arrow_fs___GcsFileSystem__Make, 2}, - { "_arrow_io___Readable__Read", (DL_FUNC) &_arrow_io___Readable__Read, 2}, - { "_arrow_io___InputStream__Close", (DL_FUNC) &_arrow_io___InputStream__Close, 1}, - { "_arrow_io___OutputStream__Close", (DL_FUNC) &_arrow_io___OutputStream__Close, 1}, - { "_arrow_io___RandomAccessFile__GetSize", (DL_FUNC) &_arrow_io___RandomAccessFile__GetSize, 1}, - { "_arrow_io___RandomAccessFile__supports_zero_copy", (DL_FUNC) &_arrow_io___RandomAccessFile__supports_zero_copy, 1}, - { "_arrow_io___RandomAccessFile__Seek", (DL_FUNC) &_arrow_io___RandomAccessFile__Seek, 2}, - { "_arrow_io___RandomAccessFile__Tell", (DL_FUNC) &_arrow_io___RandomAccessFile__Tell, 1}, - { "_arrow_io___RandomAccessFile__Read0", (DL_FUNC) &_arrow_io___RandomAccessFile__Read0, 1}, - { "_arrow_io___RandomAccessFile__ReadAt", (DL_FUNC) &_arrow_io___RandomAccessFile__ReadAt, 3}, - { "_arrow_io___RandomAccessFile__ReadMetadata", (DL_FUNC) &_arrow_io___RandomAccessFile__ReadMetadata, 1}, - { "_arrow_io___MemoryMappedFile__Create", (DL_FUNC) &_arrow_io___MemoryMappedFile__Create, 2}, - { "_arrow_io___MemoryMappedFile__Open", (DL_FUNC) &_arrow_io___MemoryMappedFile__Open, 2}, - { "_arrow_io___MemoryMappedFile__Resize", (DL_FUNC) &_arrow_io___MemoryMappedFile__Resize, 2}, - { "_arrow_io___ReadableFile__Open", (DL_FUNC) &_arrow_io___ReadableFile__Open, 1}, - { "_arrow_io___BufferReader__initialize", (DL_FUNC) &_arrow_io___BufferReader__initialize, 1}, - { "_arrow_io___Writable__write", (DL_FUNC) &_arrow_io___Writable__write, 2}, - { "_arrow_io___OutputStream__Tell", (DL_FUNC) &_arrow_io___OutputStream__Tell, 1}, - { "_arrow_io___FileOutputStream__Open", (DL_FUNC) &_arrow_io___FileOutputStream__Open, 1}, - { "_arrow_io___BufferOutputStream__Create", (DL_FUNC) &_arrow_io___BufferOutputStream__Create, 1}, - { "_arrow_io___BufferOutputStream__capacity", (DL_FUNC) &_arrow_io___BufferOutputStream__capacity, 1}, - { "_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_MakeRConnectionInputStream", (DL_FUNC) &_arrow_MakeRConnectionInputStream, 1}, - { "_arrow_MakeRConnectionOutputStream", (DL_FUNC) &_arrow_MakeRConnectionOutputStream, 1}, - { "_arrow_MakeRConnectionRandomAccessFile", (DL_FUNC) &_arrow_MakeRConnectionRandomAccessFile, 1}, - { "_arrow_MakeReencodeInputStream", (DL_FUNC) &_arrow_MakeReencodeInputStream, 2}, - { "_arrow_json___ReadOptions__initialize", (DL_FUNC) &_arrow_json___ReadOptions__initialize, 2}, - { "_arrow_json___ParseOptions__initialize1", (DL_FUNC) &_arrow_json___ParseOptions__initialize1, 1}, - { "_arrow_json___ParseOptions__initialize2", (DL_FUNC) &_arrow_json___ParseOptions__initialize2, 2}, - { "_arrow_json___TableReader__Make", (DL_FUNC) &_arrow_json___TableReader__Make, 3}, - { "_arrow_json___TableReader__Read", (DL_FUNC) &_arrow_json___TableReader__Read, 1}, - { "_arrow_MemoryPool__default", (DL_FUNC) &_arrow_MemoryPool__default, 0}, - { "_arrow_MemoryPool__bytes_allocated", (DL_FUNC) &_arrow_MemoryPool__bytes_allocated, 1}, - { "_arrow_MemoryPool__max_memory", (DL_FUNC) &_arrow_MemoryPool__max_memory, 1}, - { "_arrow_MemoryPool__backend_name", (DL_FUNC) &_arrow_MemoryPool__backend_name, 1}, - { "_arrow_supported_memory_backends", (DL_FUNC) &_arrow_supported_memory_backends, 0}, - { "_arrow_ipc___Message__body_length", (DL_FUNC) &_arrow_ipc___Message__body_length, 1}, - { "_arrow_ipc___Message__metadata", (DL_FUNC) &_arrow_ipc___Message__metadata, 1}, - { "_arrow_ipc___Message__body", (DL_FUNC) &_arrow_ipc___Message__body, 1}, - { "_arrow_ipc___Message__Verify", (DL_FUNC) &_arrow_ipc___Message__Verify, 1}, - { "_arrow_ipc___Message__type", (DL_FUNC) &_arrow_ipc___Message__type, 1}, - { "_arrow_ipc___Message__Equals", (DL_FUNC) &_arrow_ipc___Message__Equals, 2}, - { "_arrow_ipc___ReadRecordBatch__Message__Schema", (DL_FUNC) &_arrow_ipc___ReadRecordBatch__Message__Schema, 2}, - { "_arrow_ipc___ReadSchema_InputStream", (DL_FUNC) &_arrow_ipc___ReadSchema_InputStream, 1}, - { "_arrow_ipc___ReadSchema_Message", (DL_FUNC) &_arrow_ipc___ReadSchema_Message, 1}, - { "_arrow_ipc___MessageReader__Open", (DL_FUNC) &_arrow_ipc___MessageReader__Open, 1}, - { "_arrow_ipc___MessageReader__ReadNextMessage", (DL_FUNC) &_arrow_ipc___MessageReader__ReadNextMessage, 1}, - { "_arrow_ipc___ReadMessage", (DL_FUNC) &_arrow_ipc___ReadMessage, 1}, - { "_arrow_parquet___arrow___ArrowReaderProperties__Make", (DL_FUNC) &_arrow_parquet___arrow___ArrowReaderProperties__Make, 1}, - { "_arrow_parquet___arrow___ArrowReaderProperties__set_use_threads", (DL_FUNC) &_arrow_parquet___arrow___ArrowReaderProperties__set_use_threads, 2}, - { "_arrow_parquet___arrow___ArrowReaderProperties__get_use_threads", (DL_FUNC) &_arrow_parquet___arrow___ArrowReaderProperties__get_use_threads, 2}, - { "_arrow_parquet___arrow___ArrowReaderProperties__get_read_dictionary", (DL_FUNC) &_arrow_parquet___arrow___ArrowReaderProperties__get_read_dictionary, 2}, - { "_arrow_parquet___arrow___ArrowReaderProperties__set_read_dictionary", (DL_FUNC) &_arrow_parquet___arrow___ArrowReaderProperties__set_read_dictionary, 3}, - { "_arrow_parquet___arrow___ArrowReaderProperties__set_coerce_int96_timestamp_unit", (DL_FUNC) &_arrow_parquet___arrow___ArrowReaderProperties__set_coerce_int96_timestamp_unit, 2}, - { "_arrow_parquet___arrow___ArrowReaderProperties__get_coerce_int96_timestamp_unit", (DL_FUNC) &_arrow_parquet___arrow___ArrowReaderProperties__get_coerce_int96_timestamp_unit, 1}, - { "_arrow_parquet___arrow___FileReader__OpenFile", (DL_FUNC) &_arrow_parquet___arrow___FileReader__OpenFile, 2}, - { "_arrow_parquet___arrow___FileReader__ReadTable1", (DL_FUNC) &_arrow_parquet___arrow___FileReader__ReadTable1, 1}, - { "_arrow_parquet___arrow___FileReader__ReadTable2", (DL_FUNC) &_arrow_parquet___arrow___FileReader__ReadTable2, 2}, - { "_arrow_parquet___arrow___FileReader__ReadRowGroup1", (DL_FUNC) &_arrow_parquet___arrow___FileReader__ReadRowGroup1, 2}, - { "_arrow_parquet___arrow___FileReader__ReadRowGroup2", (DL_FUNC) &_arrow_parquet___arrow___FileReader__ReadRowGroup2, 3}, - { "_arrow_parquet___arrow___FileReader__ReadRowGroups1", (DL_FUNC) &_arrow_parquet___arrow___FileReader__ReadRowGroups1, 2}, - { "_arrow_parquet___arrow___FileReader__ReadRowGroups2", (DL_FUNC) &_arrow_parquet___arrow___FileReader__ReadRowGroups2, 3}, - { "_arrow_parquet___arrow___FileReader__num_rows", (DL_FUNC) &_arrow_parquet___arrow___FileReader__num_rows, 1}, - { "_arrow_parquet___arrow___FileReader__num_columns", (DL_FUNC) &_arrow_parquet___arrow___FileReader__num_columns, 1}, - { "_arrow_parquet___arrow___FileReader__num_row_groups", (DL_FUNC) &_arrow_parquet___arrow___FileReader__num_row_groups, 1}, - { "_arrow_parquet___arrow___FileReader__ReadColumn", (DL_FUNC) &_arrow_parquet___arrow___FileReader__ReadColumn, 2}, - { "_arrow_parquet___ArrowWriterProperties___create", (DL_FUNC) &_arrow_parquet___ArrowWriterProperties___create, 3}, - { "_arrow_parquet___WriterProperties___Builder__create", (DL_FUNC) &_arrow_parquet___WriterProperties___Builder__create, 0}, - { "_arrow_parquet___WriterProperties___Builder__version", (DL_FUNC) &_arrow_parquet___WriterProperties___Builder__version, 2}, - { "_arrow_parquet___ArrowWriterProperties___Builder__set_compressions", (DL_FUNC) &_arrow_parquet___ArrowWriterProperties___Builder__set_compressions, 3}, - { "_arrow_parquet___ArrowWriterProperties___Builder__set_compression_levels", (DL_FUNC) &_arrow_parquet___ArrowWriterProperties___Builder__set_compression_levels, 3}, - { "_arrow_parquet___ArrowWriterProperties___Builder__set_use_dictionary", (DL_FUNC) &_arrow_parquet___ArrowWriterProperties___Builder__set_use_dictionary, 3}, - { "_arrow_parquet___ArrowWriterProperties___Builder__set_write_statistics", (DL_FUNC) &_arrow_parquet___ArrowWriterProperties___Builder__set_write_statistics, 3}, - { "_arrow_parquet___ArrowWriterProperties___Builder__data_page_size", (DL_FUNC) &_arrow_parquet___ArrowWriterProperties___Builder__data_page_size, 2}, - { "_arrow_parquet___WriterProperties___Builder__build", (DL_FUNC) &_arrow_parquet___WriterProperties___Builder__build, 1}, - { "_arrow_parquet___arrow___ParquetFileWriter__Open", (DL_FUNC) &_arrow_parquet___arrow___ParquetFileWriter__Open, 4}, - { "_arrow_parquet___arrow___FileWriter__WriteTable", (DL_FUNC) &_arrow_parquet___arrow___FileWriter__WriteTable, 3}, - { "_arrow_parquet___arrow___FileWriter__Close", (DL_FUNC) &_arrow_parquet___arrow___FileWriter__Close, 1}, - { "_arrow_parquet___arrow___WriteTable", (DL_FUNC) &_arrow_parquet___arrow___WriteTable, 4}, - { "_arrow_parquet___arrow___FileReader__GetSchema", (DL_FUNC) &_arrow_parquet___arrow___FileReader__GetSchema, 1}, - { "_arrow_Table__from_dots", (DL_FUNC) &_arrow_Table__from_dots, 3}, - { "_arrow_vec_to_Array", (DL_FUNC) &_arrow_vec_to_Array, 2}, - { "_arrow_DictionaryArray__FromArrays", (DL_FUNC) &_arrow_DictionaryArray__FromArrays, 3}, - { "_arrow_RecordBatch__num_columns", (DL_FUNC) &_arrow_RecordBatch__num_columns, 1}, - { "_arrow_RecordBatch__num_rows", (DL_FUNC) &_arrow_RecordBatch__num_rows, 1}, - { "_arrow_RecordBatch__schema", (DL_FUNC) &_arrow_RecordBatch__schema, 1}, - { "_arrow_RecordBatch__RenameColumns", (DL_FUNC) &_arrow_RecordBatch__RenameColumns, 2}, - { "_arrow_RecordBatch__ReplaceSchemaMetadata", (DL_FUNC) &_arrow_RecordBatch__ReplaceSchemaMetadata, 2}, - { "_arrow_RecordBatch__columns", (DL_FUNC) &_arrow_RecordBatch__columns, 1}, - { "_arrow_RecordBatch__column", (DL_FUNC) &_arrow_RecordBatch__column, 2}, - { "_arrow_RecordBatch__GetColumnByName", (DL_FUNC) &_arrow_RecordBatch__GetColumnByName, 2}, - { "_arrow_RecordBatch__SelectColumns", (DL_FUNC) &_arrow_RecordBatch__SelectColumns, 2}, - { "_arrow_RecordBatch__Equals", (DL_FUNC) &_arrow_RecordBatch__Equals, 3}, - { "_arrow_RecordBatch__AddColumn", (DL_FUNC) &_arrow_RecordBatch__AddColumn, 4}, - { "_arrow_RecordBatch__SetColumn", (DL_FUNC) &_arrow_RecordBatch__SetColumn, 4}, - { "_arrow_RecordBatch__RemoveColumn", (DL_FUNC) &_arrow_RecordBatch__RemoveColumn, 2}, - { "_arrow_RecordBatch__column_name", (DL_FUNC) &_arrow_RecordBatch__column_name, 2}, - { "_arrow_RecordBatch__names", (DL_FUNC) &_arrow_RecordBatch__names, 1}, - { "_arrow_RecordBatch__Slice1", (DL_FUNC) &_arrow_RecordBatch__Slice1, 2}, - { "_arrow_RecordBatch__Slice2", (DL_FUNC) &_arrow_RecordBatch__Slice2, 3}, - { "_arrow_ipc___SerializeRecordBatch__Raw", (DL_FUNC) &_arrow_ipc___SerializeRecordBatch__Raw, 1}, - { "_arrow_ipc___ReadRecordBatch__InputStream__Schema", (DL_FUNC) &_arrow_ipc___ReadRecordBatch__InputStream__Schema, 2}, - { "_arrow_RecordBatch__from_arrays", (DL_FUNC) &_arrow_RecordBatch__from_arrays, 2}, - { "_arrow_RecordBatch__ReferencedBufferSize", (DL_FUNC) &_arrow_RecordBatch__ReferencedBufferSize, 1}, - { "_arrow_RecordBatchReader__schema", (DL_FUNC) &_arrow_RecordBatchReader__schema, 1}, - { "_arrow_RecordBatchReader__ReadNext", (DL_FUNC) &_arrow_RecordBatchReader__ReadNext, 1}, - { "_arrow_RecordBatchReader__batches", (DL_FUNC) &_arrow_RecordBatchReader__batches, 1}, - { "_arrow_RecordBatchReader__from_batches", (DL_FUNC) &_arrow_RecordBatchReader__from_batches, 2}, - { "_arrow_RecordBatchReader__from_Table", (DL_FUNC) &_arrow_RecordBatchReader__from_Table, 1}, - { "_arrow_Table__from_RecordBatchReader", (DL_FUNC) &_arrow_Table__from_RecordBatchReader, 1}, - { "_arrow_RecordBatchReader__Head", (DL_FUNC) &_arrow_RecordBatchReader__Head, 2}, - { "_arrow_ipc___RecordBatchStreamReader__Open", (DL_FUNC) &_arrow_ipc___RecordBatchStreamReader__Open, 1}, - { "_arrow_ipc___RecordBatchFileReader__schema", (DL_FUNC) &_arrow_ipc___RecordBatchFileReader__schema, 1}, - { "_arrow_ipc___RecordBatchFileReader__num_record_batches", (DL_FUNC) &_arrow_ipc___RecordBatchFileReader__num_record_batches, 1}, - { "_arrow_ipc___RecordBatchFileReader__ReadRecordBatch", (DL_FUNC) &_arrow_ipc___RecordBatchFileReader__ReadRecordBatch, 2}, - { "_arrow_ipc___RecordBatchFileReader__Open", (DL_FUNC) &_arrow_ipc___RecordBatchFileReader__Open, 1}, - { "_arrow_Table__from_RecordBatchFileReader", (DL_FUNC) &_arrow_Table__from_RecordBatchFileReader, 1}, - { "_arrow_ipc___RecordBatchFileReader__batches", (DL_FUNC) &_arrow_ipc___RecordBatchFileReader__batches, 1}, - { "_arrow_ipc___RecordBatchWriter__WriteRecordBatch", (DL_FUNC) &_arrow_ipc___RecordBatchWriter__WriteRecordBatch, 2}, - { "_arrow_ipc___RecordBatchWriter__WriteTable", (DL_FUNC) &_arrow_ipc___RecordBatchWriter__WriteTable, 2}, - { "_arrow_ipc___RecordBatchWriter__Close", (DL_FUNC) &_arrow_ipc___RecordBatchWriter__Close, 1}, - { "_arrow_ipc___RecordBatchFileWriter__Open", (DL_FUNC) &_arrow_ipc___RecordBatchFileWriter__Open, 4}, - { "_arrow_ipc___RecordBatchStreamWriter__Open", (DL_FUNC) &_arrow_ipc___RecordBatchStreamWriter__Open, 4}, - { "_arrow_InitializeMainRThread", (DL_FUNC) &_arrow_InitializeMainRThread, 0}, - { "_arrow_CanRunWithCapturedR", (DL_FUNC) &_arrow_CanRunWithCapturedR, 0}, - { "_arrow_TestSafeCallIntoR", (DL_FUNC) &_arrow_TestSafeCallIntoR, 2}, - { "_arrow_Array__GetScalar", (DL_FUNC) &_arrow_Array__GetScalar, 2}, - { "_arrow_Scalar__ToString", (DL_FUNC) &_arrow_Scalar__ToString, 1}, - { "_arrow_StructScalar__field", (DL_FUNC) &_arrow_StructScalar__field, 2}, - { "_arrow_StructScalar__GetFieldByName", (DL_FUNC) &_arrow_StructScalar__GetFieldByName, 2}, - { "_arrow_Scalar__as_vector", (DL_FUNC) &_arrow_Scalar__as_vector, 1}, - { "_arrow_MakeArrayFromScalar", (DL_FUNC) &_arrow_MakeArrayFromScalar, 2}, - { "_arrow_Scalar__is_valid", (DL_FUNC) &_arrow_Scalar__is_valid, 1}, - { "_arrow_Scalar__type", (DL_FUNC) &_arrow_Scalar__type, 1}, - { "_arrow_Scalar__Equals", (DL_FUNC) &_arrow_Scalar__Equals, 2}, - { "_arrow_Scalar__ApproxEquals", (DL_FUNC) &_arrow_Scalar__ApproxEquals, 2}, - { "_arrow_schema_", (DL_FUNC) &_arrow_schema_, 1}, - { "_arrow_Schema__ToString", (DL_FUNC) &_arrow_Schema__ToString, 1}, - { "_arrow_Schema__num_fields", (DL_FUNC) &_arrow_Schema__num_fields, 1}, - { "_arrow_Schema__field", (DL_FUNC) &_arrow_Schema__field, 2}, - { "_arrow_Schema__AddField", (DL_FUNC) &_arrow_Schema__AddField, 3}, - { "_arrow_Schema__SetField", (DL_FUNC) &_arrow_Schema__SetField, 3}, - { "_arrow_Schema__RemoveField", (DL_FUNC) &_arrow_Schema__RemoveField, 2}, - { "_arrow_Schema__GetFieldByName", (DL_FUNC) &_arrow_Schema__GetFieldByName, 2}, - { "_arrow_Schema__fields", (DL_FUNC) &_arrow_Schema__fields, 1}, - { "_arrow_Schema__field_names", (DL_FUNC) &_arrow_Schema__field_names, 1}, - { "_arrow_Schema__HasMetadata", (DL_FUNC) &_arrow_Schema__HasMetadata, 1}, - { "_arrow_Schema__metadata", (DL_FUNC) &_arrow_Schema__metadata, 1}, - { "_arrow_Schema__WithMetadata", (DL_FUNC) &_arrow_Schema__WithMetadata, 2}, - { "_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__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}, - { "_arrow_Table__ReplaceSchemaMetadata", (DL_FUNC) &_arrow_Table__ReplaceSchemaMetadata, 2}, - { "_arrow_Table__column", (DL_FUNC) &_arrow_Table__column, 2}, - { "_arrow_Table__field", (DL_FUNC) &_arrow_Table__field, 2}, - { "_arrow_Table__columns", (DL_FUNC) &_arrow_Table__columns, 1}, - { "_arrow_Table__ColumnNames", (DL_FUNC) &_arrow_Table__ColumnNames, 1}, - { "_arrow_Table__RenameColumns", (DL_FUNC) &_arrow_Table__RenameColumns, 2}, - { "_arrow_Table__Slice1", (DL_FUNC) &_arrow_Table__Slice1, 2}, - { "_arrow_Table__Slice2", (DL_FUNC) &_arrow_Table__Slice2, 3}, - { "_arrow_Table__Equals", (DL_FUNC) &_arrow_Table__Equals, 3}, - { "_arrow_Table__Validate", (DL_FUNC) &_arrow_Table__Validate, 1}, - { "_arrow_Table__ValidateFull", (DL_FUNC) &_arrow_Table__ValidateFull, 1}, - { "_arrow_Table__GetColumnByName", (DL_FUNC) &_arrow_Table__GetColumnByName, 2}, - { "_arrow_Table__RemoveColumn", (DL_FUNC) &_arrow_Table__RemoveColumn, 2}, - { "_arrow_Table__AddColumn", (DL_FUNC) &_arrow_Table__AddColumn, 4}, - { "_arrow_Table__SetColumn", (DL_FUNC) &_arrow_Table__SetColumn, 4}, - { "_arrow_Table__SelectColumns", (DL_FUNC) &_arrow_Table__SelectColumns, 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__ReferencedBufferSize", (DL_FUNC) &_arrow_Table__ReferencedBufferSize, 1}, - { "_arrow_Table__ConcatenateTables", (DL_FUNC) &_arrow_Table__ConcatenateTables, 2}, - { "_arrow_GetCpuThreadPoolCapacity", (DL_FUNC) &_arrow_GetCpuThreadPoolCapacity, 0}, - { "_arrow_SetCpuThreadPoolCapacity", (DL_FUNC) &_arrow_SetCpuThreadPoolCapacity, 1}, - { "_arrow_GetIOThreadPoolCapacity", (DL_FUNC) &_arrow_GetIOThreadPoolCapacity, 0}, - { "_arrow_SetIOThreadPoolCapacity", (DL_FUNC) &_arrow_SetIOThreadPoolCapacity, 1}, - { "_arrow_Array__infer_type", (DL_FUNC) &_arrow_Array__infer_type, 1}, + { "_arrow_test_SET_STRING_ELT", (DL_FUNC) &_arrow_test_SET_STRING_ELT, 1}, + { "_arrow_is_arrow_altrep", (DL_FUNC) &_arrow_is_arrow_altrep, 1}, + { "_arrow_Array__Slice1", (DL_FUNC) &_arrow_Array__Slice1, 2}, + { "_arrow_Array__Slice2", (DL_FUNC) &_arrow_Array__Slice2, 3}, + { "_arrow_Array__IsNull", (DL_FUNC) &_arrow_Array__IsNull, 2}, + { "_arrow_Array__IsValid", (DL_FUNC) &_arrow_Array__IsValid, 2}, + { "_arrow_Array__length", (DL_FUNC) &_arrow_Array__length, 1}, + { "_arrow_Array__offset", (DL_FUNC) &_arrow_Array__offset, 1}, + { "_arrow_Array__null_count", (DL_FUNC) &_arrow_Array__null_count, 1}, + { "_arrow_Array__type", (DL_FUNC) &_arrow_Array__type, 1}, + { "_arrow_Array__ToString", (DL_FUNC) &_arrow_Array__ToString, 1}, + { "_arrow_Array__type_id", (DL_FUNC) &_arrow_Array__type_id, 1}, + { "_arrow_Array__Equals", (DL_FUNC) &_arrow_Array__Equals, 2}, + { "_arrow_Array__ApproxEquals", (DL_FUNC) &_arrow_Array__ApproxEquals, 2}, + { "_arrow_Array__Diff", (DL_FUNC) &_arrow_Array__Diff, 2}, + { "_arrow_Array__data", (DL_FUNC) &_arrow_Array__data, 1}, + { "_arrow_Array__RangeEquals", (DL_FUNC) &_arrow_Array__RangeEquals, 5}, + { "_arrow_Array__View", (DL_FUNC) &_arrow_Array__View, 2}, + { "_arrow_Array__Validate", (DL_FUNC) &_arrow_Array__Validate, 1}, + { "_arrow_DictionaryArray__indices", (DL_FUNC) &_arrow_DictionaryArray__indices, 1}, + { "_arrow_DictionaryArray__dictionary", (DL_FUNC) &_arrow_DictionaryArray__dictionary, 1}, + { "_arrow_StructArray__field", (DL_FUNC) &_arrow_StructArray__field, 2}, + { "_arrow_StructArray__GetFieldByName", (DL_FUNC) &_arrow_StructArray__GetFieldByName, 2}, + { "_arrow_StructArray__Flatten", (DL_FUNC) &_arrow_StructArray__Flatten, 1}, + { "_arrow_ListArray__value_type", (DL_FUNC) &_arrow_ListArray__value_type, 1}, + { "_arrow_LargeListArray__value_type", (DL_FUNC) &_arrow_LargeListArray__value_type, 1}, + { "_arrow_ListArray__values", (DL_FUNC) &_arrow_ListArray__values, 1}, + { "_arrow_LargeListArray__values", (DL_FUNC) &_arrow_LargeListArray__values, 1}, + { "_arrow_ListArray__value_length", (DL_FUNC) &_arrow_ListArray__value_length, 2}, + { "_arrow_LargeListArray__value_length", (DL_FUNC) &_arrow_LargeListArray__value_length, 2}, + { "_arrow_FixedSizeListArray__value_length", (DL_FUNC) &_arrow_FixedSizeListArray__value_length, 2}, + { "_arrow_ListArray__value_offset", (DL_FUNC) &_arrow_ListArray__value_offset, 2}, + { "_arrow_LargeListArray__value_offset", (DL_FUNC) &_arrow_LargeListArray__value_offset, 2}, + { "_arrow_FixedSizeListArray__value_offset", (DL_FUNC) &_arrow_FixedSizeListArray__value_offset, 2}, + { "_arrow_ListArray__raw_value_offsets", (DL_FUNC) &_arrow_ListArray__raw_value_offsets, 1}, + { "_arrow_LargeListArray__raw_value_offsets", (DL_FUNC) &_arrow_LargeListArray__raw_value_offsets, 1}, + { "_arrow_MapArray__keys", (DL_FUNC) &_arrow_MapArray__keys, 1}, + { "_arrow_MapArray__items", (DL_FUNC) &_arrow_MapArray__items, 1}, + { "_arrow_MapArray__keys_nested", (DL_FUNC) &_arrow_MapArray__keys_nested, 1}, + { "_arrow_MapArray__items_nested", (DL_FUNC) &_arrow_MapArray__items_nested, 1}, + { "_arrow_Array__Same", (DL_FUNC) &_arrow_Array__Same, 2}, + { "_arrow_Array__ReferencedBufferSize", (DL_FUNC) &_arrow_Array__ReferencedBufferSize, 1}, + { "_arrow_arrow__Concatenate", (DL_FUNC) &_arrow_arrow__Concatenate, 1}, + { "_arrow_Array__as_vector", (DL_FUNC) &_arrow_Array__as_vector, 1}, + { "_arrow_ChunkedArray__as_vector", (DL_FUNC) &_arrow_ChunkedArray__as_vector, 2}, + { "_arrow_RecordBatch__to_dataframe", (DL_FUNC) &_arrow_RecordBatch__to_dataframe, 2}, + { "_arrow_Table__to_dataframe", (DL_FUNC) &_arrow_Table__to_dataframe, 2}, + { "_arrow_ArrayData__get_type", (DL_FUNC) &_arrow_ArrayData__get_type, 1}, + { "_arrow_ArrayData__get_length", (DL_FUNC) &_arrow_ArrayData__get_length, 1}, + { "_arrow_ArrayData__get_null_count", (DL_FUNC) &_arrow_ArrayData__get_null_count, 1}, + { "_arrow_ArrayData__get_offset", (DL_FUNC) &_arrow_ArrayData__get_offset, 1}, + { "_arrow_ArrayData__buffers", (DL_FUNC) &_arrow_ArrayData__buffers, 1}, + { "_arrow_external_pointer_addr_double", (DL_FUNC) &_arrow_external_pointer_addr_double, 1}, + { "_arrow_external_pointer_addr_character", (DL_FUNC) &_arrow_external_pointer_addr_character, 1}, + { "_arrow_external_pointer_addr_integer64", (DL_FUNC) &_arrow_external_pointer_addr_integer64, 1}, + { "_arrow_external_pointer_addr_raw", (DL_FUNC) &_arrow_external_pointer_addr_raw, 1}, + { "_arrow_allocate_arrow_schema", (DL_FUNC) &_arrow_allocate_arrow_schema, 0}, + { "_arrow_delete_arrow_schema", (DL_FUNC) &_arrow_delete_arrow_schema, 1}, + { "_arrow_allocate_arrow_array", (DL_FUNC) &_arrow_allocate_arrow_array, 0}, + { "_arrow_delete_arrow_array", (DL_FUNC) &_arrow_delete_arrow_array, 1}, + { "_arrow_allocate_arrow_array_stream", (DL_FUNC) &_arrow_allocate_arrow_array_stream, 0}, + { "_arrow_delete_arrow_array_stream", (DL_FUNC) &_arrow_delete_arrow_array_stream, 1}, + { "_arrow_ImportArray", (DL_FUNC) &_arrow_ImportArray, 2}, + { "_arrow_ImportRecordBatch", (DL_FUNC) &_arrow_ImportRecordBatch, 2}, + { "_arrow_ImportSchema", (DL_FUNC) &_arrow_ImportSchema, 1}, + { "_arrow_ImportField", (DL_FUNC) &_arrow_ImportField, 1}, + { "_arrow_ImportType", (DL_FUNC) &_arrow_ImportType, 1}, + { "_arrow_ImportRecordBatchReader", (DL_FUNC) &_arrow_ImportRecordBatchReader, 1}, + { "_arrow_ExportType", (DL_FUNC) &_arrow_ExportType, 2}, + { "_arrow_ExportField", (DL_FUNC) &_arrow_ExportField, 2}, + { "_arrow_ExportSchema", (DL_FUNC) &_arrow_ExportSchema, 2}, + { "_arrow_ExportArray", (DL_FUNC) &_arrow_ExportArray, 3}, + { "_arrow_ExportRecordBatch", (DL_FUNC) &_arrow_ExportRecordBatch, 3}, + { "_arrow_ExportRecordBatchReader", (DL_FUNC) &_arrow_ExportRecordBatchReader, 2}, + { "_arrow_Buffer__is_mutable", (DL_FUNC) &_arrow_Buffer__is_mutable, 1}, + { "_arrow_Buffer__ZeroPadding", (DL_FUNC) &_arrow_Buffer__ZeroPadding, 1}, + { "_arrow_Buffer__capacity", (DL_FUNC) &_arrow_Buffer__capacity, 1}, + { "_arrow_Buffer__size", (DL_FUNC) &_arrow_Buffer__size, 1}, + { "_arrow_r___RBuffer__initialize", (DL_FUNC) &_arrow_r___RBuffer__initialize, 1}, + { "_arrow_Buffer__data", (DL_FUNC) &_arrow_Buffer__data, 1}, + { "_arrow_Buffer__Equals", (DL_FUNC) &_arrow_Buffer__Equals, 2}, + { "_arrow_ChunkedArray__length", (DL_FUNC) &_arrow_ChunkedArray__length, 1}, + { "_arrow_ChunkedArray__null_count", (DL_FUNC) &_arrow_ChunkedArray__null_count, 1}, + { "_arrow_ChunkedArray__num_chunks", (DL_FUNC) &_arrow_ChunkedArray__num_chunks, 1}, + { "_arrow_ChunkedArray__chunk", (DL_FUNC) &_arrow_ChunkedArray__chunk, 2}, + { "_arrow_ChunkedArray__chunks", (DL_FUNC) &_arrow_ChunkedArray__chunks, 1}, + { "_arrow_ChunkedArray__type", (DL_FUNC) &_arrow_ChunkedArray__type, 1}, + { "_arrow_ChunkedArray__Slice1", (DL_FUNC) &_arrow_ChunkedArray__Slice1, 2}, + { "_arrow_ChunkedArray__Slice2", (DL_FUNC) &_arrow_ChunkedArray__Slice2, 3}, + { "_arrow_ChunkedArray__View", (DL_FUNC) &_arrow_ChunkedArray__View, 2}, + { "_arrow_ChunkedArray__Validate", (DL_FUNC) &_arrow_ChunkedArray__Validate, 1}, + { "_arrow_ChunkedArray__Equals", (DL_FUNC) &_arrow_ChunkedArray__Equals, 2}, + { "_arrow_ChunkedArray__ToString", (DL_FUNC) &_arrow_ChunkedArray__ToString, 1}, + { "_arrow_ChunkedArray__from_list", (DL_FUNC) &_arrow_ChunkedArray__from_list, 2}, + { "_arrow_ChunkedArray__ReferencedBufferSize", (DL_FUNC) &_arrow_ChunkedArray__ReferencedBufferSize, 1}, + { "_arrow_util___Codec__Create", (DL_FUNC) &_arrow_util___Codec__Create, 2}, + { "_arrow_util___Codec__name", (DL_FUNC) &_arrow_util___Codec__name, 1}, + { "_arrow_util___Codec__IsAvailable", (DL_FUNC) &_arrow_util___Codec__IsAvailable, 1}, + { "_arrow_io___CompressedOutputStream__Make", (DL_FUNC) &_arrow_io___CompressedOutputStream__Make, 2}, + { "_arrow_io___CompressedInputStream__Make", (DL_FUNC) &_arrow_io___CompressedInputStream__Make, 2}, + { "_arrow_ExecPlan_create", (DL_FUNC) &_arrow_ExecPlan_create, 1}, + { "_arrow_ExecPlan_run", (DL_FUNC) &_arrow_ExecPlan_run, 5}, + { "_arrow_ExecPlan_read_table", (DL_FUNC) &_arrow_ExecPlan_read_table, 5}, + { "_arrow_ExecPlan_StopProducing", (DL_FUNC) &_arrow_ExecPlan_StopProducing, 1}, + { "_arrow_ExecNode_output_schema", (DL_FUNC) &_arrow_ExecNode_output_schema, 1}, + { "_arrow_ExecNode_Scan", (DL_FUNC) &_arrow_ExecNode_Scan, 4}, + { "_arrow_ExecPlan_Write", (DL_FUNC) &_arrow_ExecPlan_Write, 14}, + { "_arrow_ExecNode_Filter", (DL_FUNC) &_arrow_ExecNode_Filter, 2}, + { "_arrow_ExecNode_Project", (DL_FUNC) &_arrow_ExecNode_Project, 3}, + { "_arrow_ExecNode_Aggregate", (DL_FUNC) &_arrow_ExecNode_Aggregate, 3}, + { "_arrow_ExecNode_Join", (DL_FUNC) &_arrow_ExecNode_Join, 9}, + { "_arrow_ExecNode_Union", (DL_FUNC) &_arrow_ExecNode_Union, 2}, + { "_arrow_ExecNode_SourceNode", (DL_FUNC) &_arrow_ExecNode_SourceNode, 2}, + { "_arrow_ExecNode_TableSourceNode", (DL_FUNC) &_arrow_ExecNode_TableSourceNode, 2}, + { "_arrow_substrait__internal__SubstraitToJSON", (DL_FUNC) &_arrow_substrait__internal__SubstraitToJSON, 1}, + { "_arrow_substrait__internal__SubstraitFromJSON", (DL_FUNC) &_arrow_substrait__internal__SubstraitFromJSON, 1}, + { "_arrow_ExecPlan_run_substrait", (DL_FUNC) &_arrow_ExecPlan_run_substrait, 2}, + { "_arrow_RecordBatch__cast", (DL_FUNC) &_arrow_RecordBatch__cast, 3}, + { "_arrow_Table__cast", (DL_FUNC) &_arrow_Table__cast, 3}, + { "_arrow_compute__CallFunction", (DL_FUNC) &_arrow_compute__CallFunction, 3}, + { "_arrow_compute__GetFunctionNames", (DL_FUNC) &_arrow_compute__GetFunctionNames, 0}, + { "_arrow_RegisterScalarUDF", (DL_FUNC) &_arrow_RegisterScalarUDF, 2}, + { "_arrow_build_info", (DL_FUNC) &_arrow_build_info, 0}, + { "_arrow_runtime_info", (DL_FUNC) &_arrow_runtime_info, 0}, + { "_arrow_set_timezone_database", (DL_FUNC) &_arrow_set_timezone_database, 1}, + { "_arrow_csv___WriteOptions__initialize", (DL_FUNC) &_arrow_csv___WriteOptions__initialize, 1}, + { "_arrow_csv___ReadOptions__initialize", (DL_FUNC) &_arrow_csv___ReadOptions__initialize, 1}, + { "_arrow_csv___ParseOptions__initialize", (DL_FUNC) &_arrow_csv___ParseOptions__initialize, 1}, + { "_arrow_csv___ReadOptions__column_names", (DL_FUNC) &_arrow_csv___ReadOptions__column_names, 1}, + { "_arrow_csv___ConvertOptions__initialize", (DL_FUNC) &_arrow_csv___ConvertOptions__initialize, 1}, + { "_arrow_csv___TableReader__Make", (DL_FUNC) &_arrow_csv___TableReader__Make, 4}, + { "_arrow_csv___TableReader__Read", (DL_FUNC) &_arrow_csv___TableReader__Read, 1}, + { "_arrow_TimestampParser__kind", (DL_FUNC) &_arrow_TimestampParser__kind, 1}, + { "_arrow_TimestampParser__format", (DL_FUNC) &_arrow_TimestampParser__format, 1}, + { "_arrow_TimestampParser__MakeStrptime", (DL_FUNC) &_arrow_TimestampParser__MakeStrptime, 1}, + { "_arrow_TimestampParser__MakeISO8601", (DL_FUNC) &_arrow_TimestampParser__MakeISO8601, 0}, + { "_arrow_csv___WriteCSV__Table", (DL_FUNC) &_arrow_csv___WriteCSV__Table, 3}, + { "_arrow_csv___WriteCSV__RecordBatch", (DL_FUNC) &_arrow_csv___WriteCSV__RecordBatch, 3}, + { "_arrow_csv___WriteCSV__RecordBatchReader", (DL_FUNC) &_arrow_csv___WriteCSV__RecordBatchReader, 3}, + { "_arrow_dataset___Dataset__NewScan", (DL_FUNC) &_arrow_dataset___Dataset__NewScan, 1}, + { "_arrow_dataset___Dataset__schema", (DL_FUNC) &_arrow_dataset___Dataset__schema, 1}, + { "_arrow_dataset___Dataset__type_name", (DL_FUNC) &_arrow_dataset___Dataset__type_name, 1}, + { "_arrow_dataset___Dataset__ReplaceSchema", (DL_FUNC) &_arrow_dataset___Dataset__ReplaceSchema, 2}, + { "_arrow_dataset___UnionDataset__create", (DL_FUNC) &_arrow_dataset___UnionDataset__create, 2}, + { "_arrow_dataset___InMemoryDataset__create", (DL_FUNC) &_arrow_dataset___InMemoryDataset__create, 1}, + { "_arrow_dataset___UnionDataset__children", (DL_FUNC) &_arrow_dataset___UnionDataset__children, 1}, + { "_arrow_dataset___FileSystemDataset__format", (DL_FUNC) &_arrow_dataset___FileSystemDataset__format, 1}, + { "_arrow_dataset___FileSystemDataset__filesystem", (DL_FUNC) &_arrow_dataset___FileSystemDataset__filesystem, 1}, + { "_arrow_dataset___FileSystemDataset__files", (DL_FUNC) &_arrow_dataset___FileSystemDataset__files, 1}, + { "_arrow_dataset___DatasetFactory__Finish1", (DL_FUNC) &_arrow_dataset___DatasetFactory__Finish1, 2}, + { "_arrow_dataset___DatasetFactory__Finish2", (DL_FUNC) &_arrow_dataset___DatasetFactory__Finish2, 2}, + { "_arrow_dataset___DatasetFactory__Inspect", (DL_FUNC) &_arrow_dataset___DatasetFactory__Inspect, 2}, + { "_arrow_dataset___UnionDatasetFactory__Make", (DL_FUNC) &_arrow_dataset___UnionDatasetFactory__Make, 1}, + { "_arrow_dataset___FileSystemDatasetFactory__Make", (DL_FUNC) &_arrow_dataset___FileSystemDatasetFactory__Make, 4}, + { "_arrow_dataset___FileSystemDatasetFactory__MakePaths", (DL_FUNC) &_arrow_dataset___FileSystemDatasetFactory__MakePaths, 4}, + { "_arrow_dataset___FileFormat__type_name", (DL_FUNC) &_arrow_dataset___FileFormat__type_name, 1}, + { "_arrow_dataset___FileFormat__DefaultWriteOptions", (DL_FUNC) &_arrow_dataset___FileFormat__DefaultWriteOptions, 1}, + { "_arrow_dataset___ParquetFileFormat__Make", (DL_FUNC) &_arrow_dataset___ParquetFileFormat__Make, 2}, + { "_arrow_dataset___FileWriteOptions__type_name", (DL_FUNC) &_arrow_dataset___FileWriteOptions__type_name, 1}, + { "_arrow_dataset___ParquetFileWriteOptions__update", (DL_FUNC) &_arrow_dataset___ParquetFileWriteOptions__update, 3}, + { "_arrow_dataset___IpcFileWriteOptions__update2", (DL_FUNC) &_arrow_dataset___IpcFileWriteOptions__update2, 4}, + { "_arrow_dataset___IpcFileWriteOptions__update1", (DL_FUNC) &_arrow_dataset___IpcFileWriteOptions__update1, 3}, + { "_arrow_dataset___CsvFileWriteOptions__update", (DL_FUNC) &_arrow_dataset___CsvFileWriteOptions__update, 2}, + { "_arrow_dataset___IpcFileFormat__Make", (DL_FUNC) &_arrow_dataset___IpcFileFormat__Make, 0}, + { "_arrow_dataset___CsvFileFormat__Make", (DL_FUNC) &_arrow_dataset___CsvFileFormat__Make, 3}, + { "_arrow_dataset___FragmentScanOptions__type_name", (DL_FUNC) &_arrow_dataset___FragmentScanOptions__type_name, 1}, + { "_arrow_dataset___CsvFragmentScanOptions__Make", (DL_FUNC) &_arrow_dataset___CsvFragmentScanOptions__Make, 2}, + { "_arrow_dataset___ParquetFragmentScanOptions__Make", (DL_FUNC) &_arrow_dataset___ParquetFragmentScanOptions__Make, 3}, + { "_arrow_dataset___DirectoryPartitioning", (DL_FUNC) &_arrow_dataset___DirectoryPartitioning, 2}, + { "_arrow_dataset___DirectoryPartitioning__MakeFactory", (DL_FUNC) &_arrow_dataset___DirectoryPartitioning__MakeFactory, 2}, + { "_arrow_dataset___HivePartitioning", (DL_FUNC) &_arrow_dataset___HivePartitioning, 3}, + { "_arrow_dataset___HivePartitioning__MakeFactory", (DL_FUNC) &_arrow_dataset___HivePartitioning__MakeFactory, 2}, + { "_arrow_dataset___PartitioningFactory__Inspect", (DL_FUNC) &_arrow_dataset___PartitioningFactory__Inspect, 2}, + { "_arrow_dataset___PartitioningFactory__Finish", (DL_FUNC) &_arrow_dataset___PartitioningFactory__Finish, 2}, + { "_arrow_dataset___PartitioningFactory__type_name", (DL_FUNC) &_arrow_dataset___PartitioningFactory__type_name, 1}, + { "_arrow_dataset___ScannerBuilder__ProjectNames", (DL_FUNC) &_arrow_dataset___ScannerBuilder__ProjectNames, 2}, + { "_arrow_dataset___ScannerBuilder__ProjectExprs", (DL_FUNC) &_arrow_dataset___ScannerBuilder__ProjectExprs, 3}, + { "_arrow_dataset___ScannerBuilder__Filter", (DL_FUNC) &_arrow_dataset___ScannerBuilder__Filter, 2}, + { "_arrow_dataset___ScannerBuilder__UseThreads", (DL_FUNC) &_arrow_dataset___ScannerBuilder__UseThreads, 2}, + { "_arrow_dataset___ScannerBuilder__BatchSize", (DL_FUNC) &_arrow_dataset___ScannerBuilder__BatchSize, 2}, + { "_arrow_dataset___ScannerBuilder__FragmentScanOptions", (DL_FUNC) &_arrow_dataset___ScannerBuilder__FragmentScanOptions, 2}, + { "_arrow_dataset___ScannerBuilder__schema", (DL_FUNC) &_arrow_dataset___ScannerBuilder__schema, 1}, + { "_arrow_dataset___ScannerBuilder__Finish", (DL_FUNC) &_arrow_dataset___ScannerBuilder__Finish, 1}, + { "_arrow_dataset___ScannerBuilder__FromRecordBatchReader", (DL_FUNC) &_arrow_dataset___ScannerBuilder__FromRecordBatchReader, 1}, + { "_arrow_dataset___Scanner__ToTable", (DL_FUNC) &_arrow_dataset___Scanner__ToTable, 1}, + { "_arrow_dataset___Scanner__ScanBatches", (DL_FUNC) &_arrow_dataset___Scanner__ScanBatches, 1}, + { "_arrow_dataset___Scanner__ToRecordBatchReader", (DL_FUNC) &_arrow_dataset___Scanner__ToRecordBatchReader, 1}, + { "_arrow_dataset___Scanner__head", (DL_FUNC) &_arrow_dataset___Scanner__head, 2}, + { "_arrow_dataset___Scanner__schema", (DL_FUNC) &_arrow_dataset___Scanner__schema, 1}, + { "_arrow_dataset___Scanner__TakeRows", (DL_FUNC) &_arrow_dataset___Scanner__TakeRows, 2}, + { "_arrow_dataset___Scanner__CountRows", (DL_FUNC) &_arrow_dataset___Scanner__CountRows, 1}, + { "_arrow_Int8__initialize", (DL_FUNC) &_arrow_Int8__initialize, 0}, + { "_arrow_Int16__initialize", (DL_FUNC) &_arrow_Int16__initialize, 0}, + { "_arrow_Int32__initialize", (DL_FUNC) &_arrow_Int32__initialize, 0}, + { "_arrow_Int64__initialize", (DL_FUNC) &_arrow_Int64__initialize, 0}, + { "_arrow_UInt8__initialize", (DL_FUNC) &_arrow_UInt8__initialize, 0}, + { "_arrow_UInt16__initialize", (DL_FUNC) &_arrow_UInt16__initialize, 0}, + { "_arrow_UInt32__initialize", (DL_FUNC) &_arrow_UInt32__initialize, 0}, + { "_arrow_UInt64__initialize", (DL_FUNC) &_arrow_UInt64__initialize, 0}, + { "_arrow_Float16__initialize", (DL_FUNC) &_arrow_Float16__initialize, 0}, + { "_arrow_Float32__initialize", (DL_FUNC) &_arrow_Float32__initialize, 0}, + { "_arrow_Float64__initialize", (DL_FUNC) &_arrow_Float64__initialize, 0}, + { "_arrow_Boolean__initialize", (DL_FUNC) &_arrow_Boolean__initialize, 0}, + { "_arrow_Utf8__initialize", (DL_FUNC) &_arrow_Utf8__initialize, 0}, + { "_arrow_LargeUtf8__initialize", (DL_FUNC) &_arrow_LargeUtf8__initialize, 0}, + { "_arrow_Binary__initialize", (DL_FUNC) &_arrow_Binary__initialize, 0}, + { "_arrow_LargeBinary__initialize", (DL_FUNC) &_arrow_LargeBinary__initialize, 0}, + { "_arrow_Date32__initialize", (DL_FUNC) &_arrow_Date32__initialize, 0}, + { "_arrow_Date64__initialize", (DL_FUNC) &_arrow_Date64__initialize, 0}, + { "_arrow_Null__initialize", (DL_FUNC) &_arrow_Null__initialize, 0}, + { "_arrow_Decimal128Type__initialize", (DL_FUNC) &_arrow_Decimal128Type__initialize, 2}, + { "_arrow_Decimal256Type__initialize", (DL_FUNC) &_arrow_Decimal256Type__initialize, 2}, + { "_arrow_DayTimeInterval__initialize", (DL_FUNC) &_arrow_DayTimeInterval__initialize, 0}, + { "_arrow_FixedSizeBinary__initialize", (DL_FUNC) &_arrow_FixedSizeBinary__initialize, 1}, + { "_arrow_FixedSizeBinary__byte_width", (DL_FUNC) &_arrow_FixedSizeBinary__byte_width, 1}, + { "_arrow_Timestamp__initialize", (DL_FUNC) &_arrow_Timestamp__initialize, 2}, + { "_arrow_Time32__initialize", (DL_FUNC) &_arrow_Time32__initialize, 1}, + { "_arrow_Time64__initialize", (DL_FUNC) &_arrow_Time64__initialize, 1}, + { "_arrow_Duration__initialize", (DL_FUNC) &_arrow_Duration__initialize, 1}, + { "_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_map__", (DL_FUNC) &_arrow_map__, 3}, + { "_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}, + { "_arrow_DataType__num_fields", (DL_FUNC) &_arrow_DataType__num_fields, 1}, + { "_arrow_DataType__fields", (DL_FUNC) &_arrow_DataType__fields, 1}, + { "_arrow_DataType__id", (DL_FUNC) &_arrow_DataType__id, 1}, + { "_arrow_ListType__ToString", (DL_FUNC) &_arrow_ListType__ToString, 1}, + { "_arrow_FixedWidthType__bit_width", (DL_FUNC) &_arrow_FixedWidthType__bit_width, 1}, + { "_arrow_DateType__unit", (DL_FUNC) &_arrow_DateType__unit, 1}, + { "_arrow_TimeType__unit", (DL_FUNC) &_arrow_TimeType__unit, 1}, + { "_arrow_DurationType__unit", (DL_FUNC) &_arrow_DurationType__unit, 1}, + { "_arrow_DecimalType__precision", (DL_FUNC) &_arrow_DecimalType__precision, 1}, + { "_arrow_DecimalType__scale", (DL_FUNC) &_arrow_DecimalType__scale, 1}, + { "_arrow_TimestampType__timezone", (DL_FUNC) &_arrow_TimestampType__timezone, 1}, + { "_arrow_TimestampType__unit", (DL_FUNC) &_arrow_TimestampType__unit, 1}, + { "_arrow_DictionaryType__initialize", (DL_FUNC) &_arrow_DictionaryType__initialize, 3}, + { "_arrow_DictionaryType__index_type", (DL_FUNC) &_arrow_DictionaryType__index_type, 1}, + { "_arrow_DictionaryType__value_type", (DL_FUNC) &_arrow_DictionaryType__value_type, 1}, + { "_arrow_DictionaryType__name", (DL_FUNC) &_arrow_DictionaryType__name, 1}, + { "_arrow_DictionaryType__ordered", (DL_FUNC) &_arrow_DictionaryType__ordered, 1}, + { "_arrow_StructType__GetFieldByName", (DL_FUNC) &_arrow_StructType__GetFieldByName, 2}, + { "_arrow_StructType__GetFieldIndex", (DL_FUNC) &_arrow_StructType__GetFieldIndex, 2}, + { "_arrow_StructType__field_names", (DL_FUNC) &_arrow_StructType__field_names, 1}, + { "_arrow_ListType__value_field", (DL_FUNC) &_arrow_ListType__value_field, 1}, + { "_arrow_ListType__value_type", (DL_FUNC) &_arrow_ListType__value_type, 1}, + { "_arrow_LargeListType__value_field", (DL_FUNC) &_arrow_LargeListType__value_field, 1}, + { "_arrow_LargeListType__value_type", (DL_FUNC) &_arrow_LargeListType__value_type, 1}, + { "_arrow_FixedSizeListType__value_field", (DL_FUNC) &_arrow_FixedSizeListType__value_field, 1}, + { "_arrow_FixedSizeListType__value_type", (DL_FUNC) &_arrow_FixedSizeListType__value_type, 1}, + { "_arrow_FixedSizeListType__list_size", (DL_FUNC) &_arrow_FixedSizeListType__list_size, 1}, + { "_arrow_MapType__key_field", (DL_FUNC) &_arrow_MapType__key_field, 1}, + { "_arrow_MapType__item_field", (DL_FUNC) &_arrow_MapType__item_field, 1}, + { "_arrow_MapType__key_type", (DL_FUNC) &_arrow_MapType__key_type, 1}, + { "_arrow_MapType__item_type", (DL_FUNC) &_arrow_MapType__item_type, 1}, + { "_arrow_MapType__keys_sorted", (DL_FUNC) &_arrow_MapType__keys_sorted, 1}, + { "_arrow_compute___expr__equals", (DL_FUNC) &_arrow_compute___expr__equals, 2}, + { "_arrow_compute___expr__call", (DL_FUNC) &_arrow_compute___expr__call, 3}, + { "_arrow_field_names_in_expression", (DL_FUNC) &_arrow_field_names_in_expression, 1}, + { "_arrow_compute___expr__get_field_ref_name", (DL_FUNC) &_arrow_compute___expr__get_field_ref_name, 1}, + { "_arrow_compute___expr__field_ref", (DL_FUNC) &_arrow_compute___expr__field_ref, 1}, + { "_arrow_compute___expr__scalar", (DL_FUNC) &_arrow_compute___expr__scalar, 1}, + { "_arrow_compute___expr__ToString", (DL_FUNC) &_arrow_compute___expr__ToString, 1}, + { "_arrow_compute___expr__type", (DL_FUNC) &_arrow_compute___expr__type, 2}, + { "_arrow_compute___expr__type_id", (DL_FUNC) &_arrow_compute___expr__type_id, 2}, + { "_arrow_ExtensionType__initialize", (DL_FUNC) &_arrow_ExtensionType__initialize, 4}, + { "_arrow_ExtensionType__extension_name", (DL_FUNC) &_arrow_ExtensionType__extension_name, 1}, + { "_arrow_ExtensionType__Serialize", (DL_FUNC) &_arrow_ExtensionType__Serialize, 1}, + { "_arrow_ExtensionType__storage_type", (DL_FUNC) &_arrow_ExtensionType__storage_type, 1}, + { "_arrow_ExtensionType__MakeArray", (DL_FUNC) &_arrow_ExtensionType__MakeArray, 2}, + { "_arrow_ExtensionType__r6_class", (DL_FUNC) &_arrow_ExtensionType__r6_class, 1}, + { "_arrow_ExtensionArray__storage", (DL_FUNC) &_arrow_ExtensionArray__storage, 1}, + { "_arrow_arrow__RegisterRExtensionType", (DL_FUNC) &_arrow_arrow__RegisterRExtensionType, 1}, + { "_arrow_arrow__UnregisterRExtensionType", (DL_FUNC) &_arrow_arrow__UnregisterRExtensionType, 1}, + { "_arrow_ipc___WriteFeather__Table", (DL_FUNC) &_arrow_ipc___WriteFeather__Table, 6}, + { "_arrow_ipc___feather___Reader__version", (DL_FUNC) &_arrow_ipc___feather___Reader__version, 1}, + { "_arrow_ipc___feather___Reader__Read", (DL_FUNC) &_arrow_ipc___feather___Reader__Read, 2}, + { "_arrow_ipc___feather___Reader__Open", (DL_FUNC) &_arrow_ipc___feather___Reader__Open, 1}, + { "_arrow_ipc___feather___Reader__schema", (DL_FUNC) &_arrow_ipc___feather___Reader__schema, 1}, + { "_arrow_Field__initialize", (DL_FUNC) &_arrow_Field__initialize, 3}, + { "_arrow_Field__ToString", (DL_FUNC) &_arrow_Field__ToString, 1}, + { "_arrow_Field__name", (DL_FUNC) &_arrow_Field__name, 1}, + { "_arrow_Field__Equals", (DL_FUNC) &_arrow_Field__Equals, 2}, + { "_arrow_Field__nullable", (DL_FUNC) &_arrow_Field__nullable, 1}, + { "_arrow_Field__type", (DL_FUNC) &_arrow_Field__type, 1}, + { "_arrow_fs___FileInfo__type", (DL_FUNC) &_arrow_fs___FileInfo__type, 1}, + { "_arrow_fs___FileInfo__set_type", (DL_FUNC) &_arrow_fs___FileInfo__set_type, 2}, + { "_arrow_fs___FileInfo__path", (DL_FUNC) &_arrow_fs___FileInfo__path, 1}, + { "_arrow_fs___FileInfo__set_path", (DL_FUNC) &_arrow_fs___FileInfo__set_path, 2}, + { "_arrow_fs___FileInfo__size", (DL_FUNC) &_arrow_fs___FileInfo__size, 1}, + { "_arrow_fs___FileInfo__set_size", (DL_FUNC) &_arrow_fs___FileInfo__set_size, 2}, + { "_arrow_fs___FileInfo__base_name", (DL_FUNC) &_arrow_fs___FileInfo__base_name, 1}, + { "_arrow_fs___FileInfo__extension", (DL_FUNC) &_arrow_fs___FileInfo__extension, 1}, + { "_arrow_fs___FileInfo__mtime", (DL_FUNC) &_arrow_fs___FileInfo__mtime, 1}, + { "_arrow_fs___FileInfo__set_mtime", (DL_FUNC) &_arrow_fs___FileInfo__set_mtime, 2}, + { "_arrow_fs___FileSelector__base_dir", (DL_FUNC) &_arrow_fs___FileSelector__base_dir, 1}, + { "_arrow_fs___FileSelector__allow_not_found", (DL_FUNC) &_arrow_fs___FileSelector__allow_not_found, 1}, + { "_arrow_fs___FileSelector__recursive", (DL_FUNC) &_arrow_fs___FileSelector__recursive, 1}, + { "_arrow_fs___FileSelector__create", (DL_FUNC) &_arrow_fs___FileSelector__create, 3}, + { "_arrow_fs___FileSystem__GetTargetInfos_Paths", (DL_FUNC) &_arrow_fs___FileSystem__GetTargetInfos_Paths, 2}, + { "_arrow_fs___FileSystem__GetTargetInfos_FileSelector", (DL_FUNC) &_arrow_fs___FileSystem__GetTargetInfos_FileSelector, 2}, + { "_arrow_fs___FileSystem__CreateDir", (DL_FUNC) &_arrow_fs___FileSystem__CreateDir, 3}, + { "_arrow_fs___FileSystem__DeleteDir", (DL_FUNC) &_arrow_fs___FileSystem__DeleteDir, 2}, + { "_arrow_fs___FileSystem__DeleteDirContents", (DL_FUNC) &_arrow_fs___FileSystem__DeleteDirContents, 2}, + { "_arrow_fs___FileSystem__DeleteFile", (DL_FUNC) &_arrow_fs___FileSystem__DeleteFile, 2}, + { "_arrow_fs___FileSystem__DeleteFiles", (DL_FUNC) &_arrow_fs___FileSystem__DeleteFiles, 2}, + { "_arrow_fs___FileSystem__Move", (DL_FUNC) &_arrow_fs___FileSystem__Move, 3}, + { "_arrow_fs___FileSystem__CopyFile", (DL_FUNC) &_arrow_fs___FileSystem__CopyFile, 3}, + { "_arrow_fs___FileSystem__OpenInputStream", (DL_FUNC) &_arrow_fs___FileSystem__OpenInputStream, 2}, + { "_arrow_fs___FileSystem__OpenInputFile", (DL_FUNC) &_arrow_fs___FileSystem__OpenInputFile, 2}, + { "_arrow_fs___FileSystem__OpenOutputStream", (DL_FUNC) &_arrow_fs___FileSystem__OpenOutputStream, 2}, + { "_arrow_fs___FileSystem__OpenAppendStream", (DL_FUNC) &_arrow_fs___FileSystem__OpenAppendStream, 2}, + { "_arrow_fs___FileSystem__type_name", (DL_FUNC) &_arrow_fs___FileSystem__type_name, 1}, + { "_arrow_fs___LocalFileSystem__create", (DL_FUNC) &_arrow_fs___LocalFileSystem__create, 0}, + { "_arrow_fs___SubTreeFileSystem__create", (DL_FUNC) &_arrow_fs___SubTreeFileSystem__create, 2}, + { "_arrow_fs___SubTreeFileSystem__base_fs", (DL_FUNC) &_arrow_fs___SubTreeFileSystem__base_fs, 1}, + { "_arrow_fs___SubTreeFileSystem__base_path", (DL_FUNC) &_arrow_fs___SubTreeFileSystem__base_path, 1}, + { "_arrow_fs___FileSystemFromUri", (DL_FUNC) &_arrow_fs___FileSystemFromUri, 1}, + { "_arrow_fs___CopyFiles", (DL_FUNC) &_arrow_fs___CopyFiles, 6}, + { "_arrow_fs___S3FileSystem__create", (DL_FUNC) &_arrow_fs___S3FileSystem__create, 15}, + { "_arrow_fs___S3FileSystem__region", (DL_FUNC) &_arrow_fs___S3FileSystem__region, 1}, + { "_arrow_fs___GcsFileSystem__Make", (DL_FUNC) &_arrow_fs___GcsFileSystem__Make, 2}, + { "_arrow_io___Readable__Read", (DL_FUNC) &_arrow_io___Readable__Read, 2}, + { "_arrow_io___InputStream__Close", (DL_FUNC) &_arrow_io___InputStream__Close, 1}, + { "_arrow_io___OutputStream__Close", (DL_FUNC) &_arrow_io___OutputStream__Close, 1}, + { "_arrow_io___RandomAccessFile__GetSize", (DL_FUNC) &_arrow_io___RandomAccessFile__GetSize, 1}, + { "_arrow_io___RandomAccessFile__supports_zero_copy", (DL_FUNC) &_arrow_io___RandomAccessFile__supports_zero_copy, 1}, + { "_arrow_io___RandomAccessFile__Seek", (DL_FUNC) &_arrow_io___RandomAccessFile__Seek, 2}, + { "_arrow_io___RandomAccessFile__Tell", (DL_FUNC) &_arrow_io___RandomAccessFile__Tell, 1}, + { "_arrow_io___RandomAccessFile__Read0", (DL_FUNC) &_arrow_io___RandomAccessFile__Read0, 1}, + { "_arrow_io___RandomAccessFile__ReadAt", (DL_FUNC) &_arrow_io___RandomAccessFile__ReadAt, 3}, + { "_arrow_io___RandomAccessFile__ReadMetadata", (DL_FUNC) &_arrow_io___RandomAccessFile__ReadMetadata, 1}, + { "_arrow_io___MemoryMappedFile__Create", (DL_FUNC) &_arrow_io___MemoryMappedFile__Create, 2}, + { "_arrow_io___MemoryMappedFile__Open", (DL_FUNC) &_arrow_io___MemoryMappedFile__Open, 2}, + { "_arrow_io___MemoryMappedFile__Resize", (DL_FUNC) &_arrow_io___MemoryMappedFile__Resize, 2}, + { "_arrow_io___ReadableFile__Open", (DL_FUNC) &_arrow_io___ReadableFile__Open, 1}, + { "_arrow_io___BufferReader__initialize", (DL_FUNC) &_arrow_io___BufferReader__initialize, 1}, + { "_arrow_io___Writable__write", (DL_FUNC) &_arrow_io___Writable__write, 2}, + { "_arrow_io___OutputStream__Tell", (DL_FUNC) &_arrow_io___OutputStream__Tell, 1}, + { "_arrow_io___FileOutputStream__Open", (DL_FUNC) &_arrow_io___FileOutputStream__Open, 1}, + { "_arrow_io___BufferOutputStream__Create", (DL_FUNC) &_arrow_io___BufferOutputStream__Create, 1}, + { "_arrow_io___BufferOutputStream__capacity", (DL_FUNC) &_arrow_io___BufferOutputStream__capacity, 1}, + { "_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_MakeRConnectionInputStream", (DL_FUNC) &_arrow_MakeRConnectionInputStream, 1}, + { "_arrow_MakeRConnectionOutputStream", (DL_FUNC) &_arrow_MakeRConnectionOutputStream, 1}, + { "_arrow_MakeRConnectionRandomAccessFile", (DL_FUNC) &_arrow_MakeRConnectionRandomAccessFile, 1}, + { "_arrow_MakeReencodeInputStream", (DL_FUNC) &_arrow_MakeReencodeInputStream, 2}, + { "_arrow_json___ReadOptions__initialize", (DL_FUNC) &_arrow_json___ReadOptions__initialize, 2}, + { "_arrow_json___ParseOptions__initialize1", (DL_FUNC) &_arrow_json___ParseOptions__initialize1, 1}, + { "_arrow_json___ParseOptions__initialize2", (DL_FUNC) &_arrow_json___ParseOptions__initialize2, 2}, + { "_arrow_json___TableReader__Make", (DL_FUNC) &_arrow_json___TableReader__Make, 3}, + { "_arrow_json___TableReader__Read", (DL_FUNC) &_arrow_json___TableReader__Read, 1}, + { "_arrow_MemoryPool__default", (DL_FUNC) &_arrow_MemoryPool__default, 0}, + { "_arrow_MemoryPool__bytes_allocated", (DL_FUNC) &_arrow_MemoryPool__bytes_allocated, 1}, + { "_arrow_MemoryPool__max_memory", (DL_FUNC) &_arrow_MemoryPool__max_memory, 1}, + { "_arrow_MemoryPool__backend_name", (DL_FUNC) &_arrow_MemoryPool__backend_name, 1}, + { "_arrow_supported_memory_backends", (DL_FUNC) &_arrow_supported_memory_backends, 0}, + { "_arrow_ipc___Message__body_length", (DL_FUNC) &_arrow_ipc___Message__body_length, 1}, + { "_arrow_ipc___Message__metadata", (DL_FUNC) &_arrow_ipc___Message__metadata, 1}, + { "_arrow_ipc___Message__body", (DL_FUNC) &_arrow_ipc___Message__body, 1}, + { "_arrow_ipc___Message__Verify", (DL_FUNC) &_arrow_ipc___Message__Verify, 1}, + { "_arrow_ipc___Message__type", (DL_FUNC) &_arrow_ipc___Message__type, 1}, + { "_arrow_ipc___Message__Equals", (DL_FUNC) &_arrow_ipc___Message__Equals, 2}, + { "_arrow_ipc___ReadRecordBatch__Message__Schema", (DL_FUNC) &_arrow_ipc___ReadRecordBatch__Message__Schema, 2}, + { "_arrow_ipc___ReadSchema_InputStream", (DL_FUNC) &_arrow_ipc___ReadSchema_InputStream, 1}, + { "_arrow_ipc___ReadSchema_Message", (DL_FUNC) &_arrow_ipc___ReadSchema_Message, 1}, + { "_arrow_ipc___MessageReader__Open", (DL_FUNC) &_arrow_ipc___MessageReader__Open, 1}, + { "_arrow_ipc___MessageReader__ReadNextMessage", (DL_FUNC) &_arrow_ipc___MessageReader__ReadNextMessage, 1}, + { "_arrow_ipc___ReadMessage", (DL_FUNC) &_arrow_ipc___ReadMessage, 1}, + { "_arrow_parquet___arrow___ArrowReaderProperties__Make", (DL_FUNC) &_arrow_parquet___arrow___ArrowReaderProperties__Make, 1}, + { "_arrow_parquet___arrow___ArrowReaderProperties__set_use_threads", (DL_FUNC) &_arrow_parquet___arrow___ArrowReaderProperties__set_use_threads, 2}, + { "_arrow_parquet___arrow___ArrowReaderProperties__get_use_threads", (DL_FUNC) &_arrow_parquet___arrow___ArrowReaderProperties__get_use_threads, 2}, + { "_arrow_parquet___arrow___ArrowReaderProperties__get_read_dictionary", (DL_FUNC) &_arrow_parquet___arrow___ArrowReaderProperties__get_read_dictionary, 2}, + { "_arrow_parquet___arrow___ArrowReaderProperties__set_read_dictionary", (DL_FUNC) &_arrow_parquet___arrow___ArrowReaderProperties__set_read_dictionary, 3}, + { "_arrow_parquet___arrow___ArrowReaderProperties__set_coerce_int96_timestamp_unit", (DL_FUNC) &_arrow_parquet___arrow___ArrowReaderProperties__set_coerce_int96_timestamp_unit, 2}, + { "_arrow_parquet___arrow___ArrowReaderProperties__get_coerce_int96_timestamp_unit", (DL_FUNC) &_arrow_parquet___arrow___ArrowReaderProperties__get_coerce_int96_timestamp_unit, 1}, + { "_arrow_parquet___arrow___FileReader__OpenFile", (DL_FUNC) &_arrow_parquet___arrow___FileReader__OpenFile, 2}, + { "_arrow_parquet___arrow___FileReader__ReadTable1", (DL_FUNC) &_arrow_parquet___arrow___FileReader__ReadTable1, 1}, + { "_arrow_parquet___arrow___FileReader__ReadTable2", (DL_FUNC) &_arrow_parquet___arrow___FileReader__ReadTable2, 2}, + { "_arrow_parquet___arrow___FileReader__ReadRowGroup1", (DL_FUNC) &_arrow_parquet___arrow___FileReader__ReadRowGroup1, 2}, + { "_arrow_parquet___arrow___FileReader__ReadRowGroup2", (DL_FUNC) &_arrow_parquet___arrow___FileReader__ReadRowGroup2, 3}, + { "_arrow_parquet___arrow___FileReader__ReadRowGroups1", (DL_FUNC) &_arrow_parquet___arrow___FileReader__ReadRowGroups1, 2}, + { "_arrow_parquet___arrow___FileReader__ReadRowGroups2", (DL_FUNC) &_arrow_parquet___arrow___FileReader__ReadRowGroups2, 3}, + { "_arrow_parquet___arrow___FileReader__num_rows", (DL_FUNC) &_arrow_parquet___arrow___FileReader__num_rows, 1}, + { "_arrow_parquet___arrow___FileReader__num_columns", (DL_FUNC) &_arrow_parquet___arrow___FileReader__num_columns, 1}, + { "_arrow_parquet___arrow___FileReader__num_row_groups", (DL_FUNC) &_arrow_parquet___arrow___FileReader__num_row_groups, 1}, + { "_arrow_parquet___arrow___FileReader__ReadColumn", (DL_FUNC) &_arrow_parquet___arrow___FileReader__ReadColumn, 2}, + { "_arrow_parquet___ArrowWriterProperties___create", (DL_FUNC) &_arrow_parquet___ArrowWriterProperties___create, 3}, + { "_arrow_parquet___WriterProperties___Builder__create", (DL_FUNC) &_arrow_parquet___WriterProperties___Builder__create, 0}, + { "_arrow_parquet___WriterProperties___Builder__version", (DL_FUNC) &_arrow_parquet___WriterProperties___Builder__version, 2}, + { "_arrow_parquet___ArrowWriterProperties___Builder__set_compressions", (DL_FUNC) &_arrow_parquet___ArrowWriterProperties___Builder__set_compressions, 3}, + { "_arrow_parquet___ArrowWriterProperties___Builder__set_compression_levels", (DL_FUNC) &_arrow_parquet___ArrowWriterProperties___Builder__set_compression_levels, 3}, + { "_arrow_parquet___ArrowWriterProperties___Builder__set_use_dictionary", (DL_FUNC) &_arrow_parquet___ArrowWriterProperties___Builder__set_use_dictionary, 3}, + { "_arrow_parquet___ArrowWriterProperties___Builder__set_write_statistics", (DL_FUNC) &_arrow_parquet___ArrowWriterProperties___Builder__set_write_statistics, 3}, + { "_arrow_parquet___ArrowWriterProperties___Builder__data_page_size", (DL_FUNC) &_arrow_parquet___ArrowWriterProperties___Builder__data_page_size, 2}, + { "_arrow_parquet___WriterProperties___Builder__build", (DL_FUNC) &_arrow_parquet___WriterProperties___Builder__build, 1}, + { "_arrow_parquet___arrow___ParquetFileWriter__Open", (DL_FUNC) &_arrow_parquet___arrow___ParquetFileWriter__Open, 4}, + { "_arrow_parquet___arrow___FileWriter__WriteTable", (DL_FUNC) &_arrow_parquet___arrow___FileWriter__WriteTable, 3}, + { "_arrow_parquet___arrow___FileWriter__Close", (DL_FUNC) &_arrow_parquet___arrow___FileWriter__Close, 1}, + { "_arrow_parquet___arrow___WriteTable", (DL_FUNC) &_arrow_parquet___arrow___WriteTable, 4}, + { "_arrow_parquet___arrow___FileReader__GetSchema", (DL_FUNC) &_arrow_parquet___arrow___FileReader__GetSchema, 1}, + { "_arrow_Table__from_dots", (DL_FUNC) &_arrow_Table__from_dots, 3}, + { "_arrow_vec_to_Array", (DL_FUNC) &_arrow_vec_to_Array, 2}, + { "_arrow_DictionaryArray__FromArrays", (DL_FUNC) &_arrow_DictionaryArray__FromArrays, 3}, + { "_arrow_RecordBatch__num_columns", (DL_FUNC) &_arrow_RecordBatch__num_columns, 1}, + { "_arrow_RecordBatch__num_rows", (DL_FUNC) &_arrow_RecordBatch__num_rows, 1}, + { "_arrow_RecordBatch__schema", (DL_FUNC) &_arrow_RecordBatch__schema, 1}, + { "_arrow_RecordBatch__RenameColumns", (DL_FUNC) &_arrow_RecordBatch__RenameColumns, 2}, + { "_arrow_RecordBatch__ReplaceSchemaMetadata", (DL_FUNC) &_arrow_RecordBatch__ReplaceSchemaMetadata, 2}, + { "_arrow_RecordBatch__columns", (DL_FUNC) &_arrow_RecordBatch__columns, 1}, + { "_arrow_RecordBatch__column", (DL_FUNC) &_arrow_RecordBatch__column, 2}, + { "_arrow_RecordBatch__GetColumnByName", (DL_FUNC) &_arrow_RecordBatch__GetColumnByName, 2}, + { "_arrow_RecordBatch__SelectColumns", (DL_FUNC) &_arrow_RecordBatch__SelectColumns, 2}, + { "_arrow_RecordBatch__Equals", (DL_FUNC) &_arrow_RecordBatch__Equals, 3}, + { "_arrow_RecordBatch__AddColumn", (DL_FUNC) &_arrow_RecordBatch__AddColumn, 4}, + { "_arrow_RecordBatch__SetColumn", (DL_FUNC) &_arrow_RecordBatch__SetColumn, 4}, + { "_arrow_RecordBatch__RemoveColumn", (DL_FUNC) &_arrow_RecordBatch__RemoveColumn, 2}, + { "_arrow_RecordBatch__column_name", (DL_FUNC) &_arrow_RecordBatch__column_name, 2}, + { "_arrow_RecordBatch__names", (DL_FUNC) &_arrow_RecordBatch__names, 1}, + { "_arrow_RecordBatch__Slice1", (DL_FUNC) &_arrow_RecordBatch__Slice1, 2}, + { "_arrow_RecordBatch__Slice2", (DL_FUNC) &_arrow_RecordBatch__Slice2, 3}, + { "_arrow_ipc___SerializeRecordBatch__Raw", (DL_FUNC) &_arrow_ipc___SerializeRecordBatch__Raw, 1}, + { "_arrow_ipc___ReadRecordBatch__InputStream__Schema", (DL_FUNC) &_arrow_ipc___ReadRecordBatch__InputStream__Schema, 2}, + { "_arrow_RecordBatch__from_arrays", (DL_FUNC) &_arrow_RecordBatch__from_arrays, 2}, + { "_arrow_RecordBatch__ReferencedBufferSize", (DL_FUNC) &_arrow_RecordBatch__ReferencedBufferSize, 1}, + { "_arrow_RecordBatchReader__schema", (DL_FUNC) &_arrow_RecordBatchReader__schema, 1}, + { "_arrow_RecordBatchReader__ReadNext", (DL_FUNC) &_arrow_RecordBatchReader__ReadNext, 1}, + { "_arrow_RecordBatchReader__batches", (DL_FUNC) &_arrow_RecordBatchReader__batches, 1}, + { "_arrow_RecordBatchReader__from_batches", (DL_FUNC) &_arrow_RecordBatchReader__from_batches, 2}, + { "_arrow_RecordBatchReader__from_Table", (DL_FUNC) &_arrow_RecordBatchReader__from_Table, 1}, + { "_arrow_Table__from_RecordBatchReader", (DL_FUNC) &_arrow_Table__from_RecordBatchReader, 1}, + { "_arrow_RecordBatchReader__Head", (DL_FUNC) &_arrow_RecordBatchReader__Head, 2}, + { "_arrow_ipc___RecordBatchStreamReader__Open", (DL_FUNC) &_arrow_ipc___RecordBatchStreamReader__Open, 1}, + { "_arrow_ipc___RecordBatchFileReader__schema", (DL_FUNC) &_arrow_ipc___RecordBatchFileReader__schema, 1}, + { "_arrow_ipc___RecordBatchFileReader__num_record_batches", (DL_FUNC) &_arrow_ipc___RecordBatchFileReader__num_record_batches, 1}, + { "_arrow_ipc___RecordBatchFileReader__ReadRecordBatch", (DL_FUNC) &_arrow_ipc___RecordBatchFileReader__ReadRecordBatch, 2}, + { "_arrow_ipc___RecordBatchFileReader__Open", (DL_FUNC) &_arrow_ipc___RecordBatchFileReader__Open, 1}, + { "_arrow_Table__from_RecordBatchFileReader", (DL_FUNC) &_arrow_Table__from_RecordBatchFileReader, 1}, + { "_arrow_ipc___RecordBatchFileReader__batches", (DL_FUNC) &_arrow_ipc___RecordBatchFileReader__batches, 1}, + { "_arrow_ipc___RecordBatchWriter__WriteRecordBatch", (DL_FUNC) &_arrow_ipc___RecordBatchWriter__WriteRecordBatch, 2}, + { "_arrow_ipc___RecordBatchWriter__WriteTable", (DL_FUNC) &_arrow_ipc___RecordBatchWriter__WriteTable, 2}, + { "_arrow_ipc___RecordBatchWriter__Close", (DL_FUNC) &_arrow_ipc___RecordBatchWriter__Close, 1}, + { "_arrow_ipc___RecordBatchFileWriter__Open", (DL_FUNC) &_arrow_ipc___RecordBatchFileWriter__Open, 4}, + { "_arrow_ipc___RecordBatchStreamWriter__Open", (DL_FUNC) &_arrow_ipc___RecordBatchStreamWriter__Open, 4}, + { "_arrow_InitializeMainRThread", (DL_FUNC) &_arrow_InitializeMainRThread, 0}, + { "_arrow_DeinitializeMainRThread", (DL_FUNC) &_arrow_DeinitializeMainRThread, 0}, + { "_arrow_SetEnableSignalStopSource", (DL_FUNC) &_arrow_SetEnableSignalStopSource, 1}, + { "_arrow_CanRunWithCapturedR", (DL_FUNC) &_arrow_CanRunWithCapturedR, 0}, + { "_arrow_TestSafeCallIntoR", (DL_FUNC) &_arrow_TestSafeCallIntoR, 2}, + { "_arrow_Array__GetScalar", (DL_FUNC) &_arrow_Array__GetScalar, 2}, + { "_arrow_Scalar__ToString", (DL_FUNC) &_arrow_Scalar__ToString, 1}, + { "_arrow_StructScalar__field", (DL_FUNC) &_arrow_StructScalar__field, 2}, + { "_arrow_StructScalar__GetFieldByName", (DL_FUNC) &_arrow_StructScalar__GetFieldByName, 2}, + { "_arrow_Scalar__as_vector", (DL_FUNC) &_arrow_Scalar__as_vector, 1}, + { "_arrow_MakeArrayFromScalar", (DL_FUNC) &_arrow_MakeArrayFromScalar, 2}, + { "_arrow_Scalar__is_valid", (DL_FUNC) &_arrow_Scalar__is_valid, 1}, + { "_arrow_Scalar__type", (DL_FUNC) &_arrow_Scalar__type, 1}, + { "_arrow_Scalar__Equals", (DL_FUNC) &_arrow_Scalar__Equals, 2}, + { "_arrow_Scalar__ApproxEquals", (DL_FUNC) &_arrow_Scalar__ApproxEquals, 2}, + { "_arrow_schema_", (DL_FUNC) &_arrow_schema_, 1}, + { "_arrow_Schema__ToString", (DL_FUNC) &_arrow_Schema__ToString, 1}, + { "_arrow_Schema__num_fields", (DL_FUNC) &_arrow_Schema__num_fields, 1}, + { "_arrow_Schema__field", (DL_FUNC) &_arrow_Schema__field, 2}, + { "_arrow_Schema__AddField", (DL_FUNC) &_arrow_Schema__AddField, 3}, + { "_arrow_Schema__SetField", (DL_FUNC) &_arrow_Schema__SetField, 3}, + { "_arrow_Schema__RemoveField", (DL_FUNC) &_arrow_Schema__RemoveField, 2}, + { "_arrow_Schema__GetFieldByName", (DL_FUNC) &_arrow_Schema__GetFieldByName, 2}, + { "_arrow_Schema__fields", (DL_FUNC) &_arrow_Schema__fields, 1}, + { "_arrow_Schema__field_names", (DL_FUNC) &_arrow_Schema__field_names, 1}, + { "_arrow_Schema__HasMetadata", (DL_FUNC) &_arrow_Schema__HasMetadata, 1}, + { "_arrow_Schema__metadata", (DL_FUNC) &_arrow_Schema__metadata, 1}, + { "_arrow_Schema__WithMetadata", (DL_FUNC) &_arrow_Schema__WithMetadata, 2}, + { "_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__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}, + { "_arrow_Table__ReplaceSchemaMetadata", (DL_FUNC) &_arrow_Table__ReplaceSchemaMetadata, 2}, + { "_arrow_Table__column", (DL_FUNC) &_arrow_Table__column, 2}, + { "_arrow_Table__field", (DL_FUNC) &_arrow_Table__field, 2}, + { "_arrow_Table__columns", (DL_FUNC) &_arrow_Table__columns, 1}, + { "_arrow_Table__ColumnNames", (DL_FUNC) &_arrow_Table__ColumnNames, 1}, + { "_arrow_Table__RenameColumns", (DL_FUNC) &_arrow_Table__RenameColumns, 2}, + { "_arrow_Table__Slice1", (DL_FUNC) &_arrow_Table__Slice1, 2}, + { "_arrow_Table__Slice2", (DL_FUNC) &_arrow_Table__Slice2, 3}, + { "_arrow_Table__Equals", (DL_FUNC) &_arrow_Table__Equals, 3}, + { "_arrow_Table__Validate", (DL_FUNC) &_arrow_Table__Validate, 1}, + { "_arrow_Table__ValidateFull", (DL_FUNC) &_arrow_Table__ValidateFull, 1}, + { "_arrow_Table__GetColumnByName", (DL_FUNC) &_arrow_Table__GetColumnByName, 2}, + { "_arrow_Table__RemoveColumn", (DL_FUNC) &_arrow_Table__RemoveColumn, 2}, + { "_arrow_Table__AddColumn", (DL_FUNC) &_arrow_Table__AddColumn, 4}, + { "_arrow_Table__SetColumn", (DL_FUNC) &_arrow_Table__SetColumn, 4}, + { "_arrow_Table__SelectColumns", (DL_FUNC) &_arrow_Table__SelectColumns, 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__ReferencedBufferSize", (DL_FUNC) &_arrow_Table__ReferencedBufferSize, 1}, + { "_arrow_Table__ConcatenateTables", (DL_FUNC) &_arrow_Table__ConcatenateTables, 2}, + { "_arrow_GetCpuThreadPoolCapacity", (DL_FUNC) &_arrow_GetCpuThreadPoolCapacity, 0}, + { "_arrow_SetCpuThreadPoolCapacity", (DL_FUNC) &_arrow_SetCpuThreadPoolCapacity, 1}, + { "_arrow_GetIOThreadPoolCapacity", (DL_FUNC) &_arrow_GetIOThreadPoolCapacity, 0}, + { "_arrow_SetIOThreadPoolCapacity", (DL_FUNC) &_arrow_SetIOThreadPoolCapacity, 1}, + { "_arrow_Array__infer_type", (DL_FUNC) &_arrow_Array__infer_type, 1}, {NULL, NULL, 0} }; extern "C" void R_init_arrow(DllInfo* dll){ diff --git a/r/src/safe-call-into-r-impl.cpp b/r/src/safe-call-into-r-impl.cpp index 2b42418c784..b7b452b23bb 100644 --- a/r/src/safe-call-into-r-impl.cpp +++ b/r/src/safe-call-into-r-impl.cpp @@ -45,21 +45,6 @@ bool SetEnableSignalStopSource(bool enabled) { return was_enabled; } -// [[arrow::export]] -bool CanRunWithCapturedR() { -#if defined(HAS_UNWIND_PROTECT) - static int on_old_windows = -1; - if (on_old_windows == -1) { - cpp11::function on_old_windows_fun = cpp11::package("arrow")["on_old_windows"]; - on_old_windows = on_old_windows_fun(); - } - - return !on_old_windows; -#else - return false; -#endif -} - // [[arrow::export]] bool CanRunWithCapturedR() { #if defined(HAS_UNWIND_PROTECT) diff --git a/r/src/safe-call-into-r.h b/r/src/safe-call-into-r.h index f036acf1246..2f52c9fd1ed 100644 --- a/r/src/safe-call-into-r.h +++ b/r/src/safe-call-into-r.h @@ -301,37 +301,4 @@ static inline arrow::Status RunWithCapturedRIfPossibleVoid( return result.status(); } -// Performs an Arrow call (e.g., run an exec plan) in such a way that background threads -// can use SafeCallIntoR(). This version is useful for Arrow calls that do not already -// return a Future<>(). If it is not possible to use RunWithCapturedR() (i.e., -// CanRunWithCapturedR() returns false), this will run make_arrow_call on the main -// R thread (which will cause background threads that try to SafeCallIntoR() to -// error). -template -arrow::Result RunWithCapturedRIfPossible( - std::function()> make_arrow_call) { - if (CanRunWithCapturedR()) { - // Note that the use of the io_context here is arbitrary (i.e. we could use - // any construct that launches a background thread). - const auto& io_context = arrow::io::default_io_context(); - return RunWithCapturedR([&]() { - return DeferNotOk(io_context.executor()->Submit(std::move(make_arrow_call))); - }); - } else { - return make_arrow_call(); - } -} - -// Like RunWithCapturedRIfPossible<>() but for arrow calls that don't return -// a Result. -static inline arrow::Status RunWithCapturedRIfPossibleVoid( - std::function make_arrow_call) { - auto result = RunWithCapturedRIfPossible([&]() -> arrow::Result { - ARROW_RETURN_NOT_OK(make_arrow_call()); - return true; - }); - ARROW_RETURN_NOT_OK(result); - return result.status(); -} - #endif diff --git a/r/tests/testthat/test-safe-call-into-r.R b/r/tests/testthat/test-safe-call-into-r.R index 5cce67ebee8..368f46bfa0e 100644 --- a/r/tests/testthat/test-safe-call-into-r.R +++ b/r/tests/testthat/test-safe-call-into-r.R @@ -32,11 +32,8 @@ test_that("SafeCallIntoR works from the main R thread", { }) test_that("SafeCallIntoR works within RunWithCapturedR", { - skip_if_not(CanRunWithCapturedR()) -<<<<<<< HEAD skip_on_cran() -======= ->>>>>>> 0b1d07483 (synchronize when we can and cannot runwithcapturedr) + skip_if_not(CanRunWithCapturedR()) expect_identical( TestSafeCallIntoR(function() "string one!", opt = "async_with_executor"), @@ -50,11 +47,8 @@ test_that("SafeCallIntoR works within RunWithCapturedR", { }) test_that("SafeCallIntoR errors from the non-R thread", { - skip_if_not(CanRunWithCapturedR()) -<<<<<<< HEAD skip_on_cran() -======= ->>>>>>> 0b1d07483 (synchronize when we can and cannot runwithcapturedr) + skip_if_not(CanRunWithCapturedR()) expect_error( TestSafeCallIntoR(function() "string one!", opt = "async_without_executor"), From 18813ff81b9c2ca20f27a082b5ce74caeb51ab00 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Fri, 16 Sep 2022 10:09:11 -0300 Subject: [PATCH 19/39] fix merges --- r/src/arrowExports.cpp | 9 +++++++-- r/src/safe-call-into-r-impl.cpp | 2 +- r/src/safe-call-into-r.h | 2 -- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/r/src/arrowExports.cpp b/r/src/arrowExports.cpp index 0e2f2e7197b..aa4fd01af49 100644 --- a/r/src/arrowExports.cpp +++ b/r/src/arrowExports.cpp @@ -5319,9 +5319,12 @@ static const R_CallMethodDef CallEntries[] = { { "_arrow_io___CompressedOutputStream__Make", (DL_FUNC) &_arrow_io___CompressedOutputStream__Make, 2}, { "_arrow_io___CompressedInputStream__Make", (DL_FUNC) &_arrow_io___CompressedInputStream__Make, 2}, { "_arrow_ExecPlan_create", (DL_FUNC) &_arrow_ExecPlan_create, 1}, + { "_arrow_ExecPlanReader__batches", (DL_FUNC) &_arrow_ExecPlanReader__batches, 1}, + { "_arrow_Table__from_ExecPlanReader", (DL_FUNC) &_arrow_Table__from_ExecPlanReader, 1}, + { "_arrow_ExecPlanReader__Plan", (DL_FUNC) &_arrow_ExecPlanReader__Plan, 1}, + { "_arrow_ExecPlanReader__PlanStatus", (DL_FUNC) &_arrow_ExecPlanReader__PlanStatus, 1}, { "_arrow_ExecPlan_run", (DL_FUNC) &_arrow_ExecPlan_run, 5}, - { "_arrow_ExecPlan_read_table", (DL_FUNC) &_arrow_ExecPlan_read_table, 5}, - { "_arrow_ExecPlan_StopProducing", (DL_FUNC) &_arrow_ExecPlan_StopProducing, 1}, + { "_arrow_ExecPlan_ToString", (DL_FUNC) &_arrow_ExecPlan_ToString, 1}, { "_arrow_ExecNode_output_schema", (DL_FUNC) &_arrow_ExecNode_output_schema, 1}, { "_arrow_ExecNode_Scan", (DL_FUNC) &_arrow_ExecNode_Scan, 4}, { "_arrow_ExecPlan_Write", (DL_FUNC) &_arrow_ExecPlan_Write, 14}, @@ -5649,9 +5652,11 @@ static const R_CallMethodDef CallEntries[] = { { "_arrow_RecordBatch__from_arrays", (DL_FUNC) &_arrow_RecordBatch__from_arrays, 2}, { "_arrow_RecordBatch__ReferencedBufferSize", (DL_FUNC) &_arrow_RecordBatch__ReferencedBufferSize, 1}, { "_arrow_RecordBatchReader__schema", (DL_FUNC) &_arrow_RecordBatchReader__schema, 1}, + { "_arrow_RecordBatchReader__Close", (DL_FUNC) &_arrow_RecordBatchReader__Close, 1}, { "_arrow_RecordBatchReader__ReadNext", (DL_FUNC) &_arrow_RecordBatchReader__ReadNext, 1}, { "_arrow_RecordBatchReader__batches", (DL_FUNC) &_arrow_RecordBatchReader__batches, 1}, { "_arrow_RecordBatchReader__from_batches", (DL_FUNC) &_arrow_RecordBatchReader__from_batches, 2}, + { "_arrow_RecordBatchReader__from_function", (DL_FUNC) &_arrow_RecordBatchReader__from_function, 2}, { "_arrow_RecordBatchReader__from_Table", (DL_FUNC) &_arrow_RecordBatchReader__from_Table, 1}, { "_arrow_Table__from_RecordBatchReader", (DL_FUNC) &_arrow_Table__from_RecordBatchReader, 1}, { "_arrow_RecordBatchReader__Head", (DL_FUNC) &_arrow_RecordBatchReader__Head, 2}, diff --git a/r/src/safe-call-into-r-impl.cpp b/r/src/safe-call-into-r-impl.cpp index b7b452b23bb..de4ee9b6bd1 100644 --- a/r/src/safe-call-into-r-impl.cpp +++ b/r/src/safe-call-into-r-impl.cpp @@ -48,7 +48,7 @@ bool SetEnableSignalStopSource(bool enabled) { // [[arrow::export]] bool CanRunWithCapturedR() { #if defined(HAS_UNWIND_PROTECT) - return GetMainRThread().Executor() == nullptr; + return MainRThread::GetInstance().Executor() == nullptr; #else return false; #endif diff --git a/r/src/safe-call-into-r.h b/r/src/safe-call-into-r.h index 2f52c9fd1ed..b8f58527022 100644 --- a/r/src/safe-call-into-r.h +++ b/r/src/safe-call-into-r.h @@ -37,8 +37,6 @@ // because only one of these can exist at any given time. bool CanRunWithCapturedR(); -extern "C" void OverridingSignalHandler(int sig); - // The MainRThread class keeps track of the thread on which it is safe // to call the R API to facilitate its safe use (or erroring // if it is not safe). The MainRThread singleton can be accessed from From 0c361f577aa27516c8bf803076a282e4807fe036 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Fri, 16 Sep 2022 10:27:49 -0300 Subject: [PATCH 20/39] check stop token in exec plan reader --- r/src/compute-exec.cpp | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/r/src/compute-exec.cpp b/r/src/compute-exec.cpp index 5af6450050e..19657baed6b 100644 --- a/r/src/compute-exec.cpp +++ b/r/src/compute-exec.cpp @@ -73,7 +73,11 @@ class ExecPlanReader : public arrow::RecordBatchReader { ExecPlanReader(const std::shared_ptr& plan, const std::shared_ptr& schema, arrow::AsyncGenerator> sink_gen) - : schema_(schema), plan_(plan), sink_gen_(sink_gen), status_(PLAN_NOT_STARTED) {} + : schema_(schema), + plan_(plan), + sink_gen_(sink_gen), + status_(PLAN_NOT_STARTED), + stop_token_(MainRThread::GetInstance().GetStopToken()) {} std::string PlanStatus() const { switch (status_) { @@ -91,8 +95,6 @@ class ExecPlanReader : public arrow::RecordBatchReader { std::shared_ptr schema() const override { return schema_; } arrow::Status ReadNext(std::shared_ptr* batch_out) override { - // TODO(ARROW-11841) check a StopToken to potentially cancel this plan - // If this is the first batch getting pulled, tell the exec plan to // start producing if (status_ == PLAN_NOT_STARTED) { @@ -106,6 +108,15 @@ class ExecPlanReader : public arrow::RecordBatchReader { return arrow::Status::OK(); } + // Check for cancellation and stop the plan if we have a request. When + // the ExecPlan supports passing a StopToken and handling this itself, + // this will be redundant. + ARROW_RETURN_NOT_OK(stop_token_.Poll()); + if (stop_token_.IsStopRequested()) { + StopProducing(); + return arrow::Status::Cancelled("Cancelled"); + } + auto out = sink_gen_().result(); if (!out.ok()) { StopProducing(); @@ -141,7 +152,8 @@ class ExecPlanReader : public arrow::RecordBatchReader { std::shared_ptr schema_; std::shared_ptr plan_; arrow::AsyncGenerator> sink_gen_; - int status_; + enum ExecPlanReaderStatus status_; + arrow::StopToken stop_token_; arrow::Status StartProducing() { ARROW_RETURN_NOT_OK(plan_->StartProducing()); From dd3c810ad90fc7b82598d5e31a390d9aeed07080 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Fri, 16 Sep 2022 10:45:23 -0300 Subject: [PATCH 21/39] actually enable the stop source --- r/R/arrow-package.R | 3 +++ r/src/safe-call-into-r.h | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/r/R/arrow-package.R b/r/R/arrow-package.R index 3cb725a278c..ce3a66c6a74 100644 --- a/r/R/arrow-package.R +++ b/r/R/arrow-package.R @@ -102,6 +102,9 @@ supported_dplyr_methods <- list( configure_tzdb() } + # set interrupt handlers + enable_cancel_from_interrupt(TRUE) + # register extension types that we use internally reregister_extension_type(vctrs_extension_type(vctrs::unspecified())) diff --git a/r/src/safe-call-into-r.h b/r/src/safe-call-into-r.h index b8f58527022..835af1eb775 100644 --- a/r/src/safe-call-into-r.h +++ b/r/src/safe-call-into-r.h @@ -81,7 +81,13 @@ class MainRThread { // the same libarrow shared object has already done this, this call // will fail (which is OK, we just don't get the ability to cancel) if (!SignalStopSourceEnabled()) { - stop_source_ = arrow::ValueOrStop(arrow::SetSignalStopSource()); + auto maybe_stop_source = arrow::SetSignalStopSource(); + if (maybe_stop_source.ok()) { + stop_source_ = maybe_stop_source.ValueUnsafe(); + } else { + cpp11::warning("Failed to enable user cancellation: %s", + maybe_stop_source.status().message().c_str()); + } } } From 57b51b541f34cc152750437f02c6d8becc054215 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Fri, 16 Sep 2022 10:56:26 -0300 Subject: [PATCH 22/39] remove user-facing option to enable handlers since it's on by default for now --- r/NAMESPACE | 1 - r/R/arrow-package.R | 6 +++--- r/R/config.R | 12 ------------ r/_pkgdown.yml | 1 - r/man/enable_cancel_from_interrupt.Rd | 19 ------------------- 5 files changed, 3 insertions(+), 36 deletions(-) delete mode 100644 r/man/enable_cancel_from_interrupt.Rd diff --git a/r/NAMESPACE b/r/NAMESPACE index 3c0a6157c02..49db309b8e8 100644 --- a/r/NAMESPACE +++ b/r/NAMESPACE @@ -294,7 +294,6 @@ export(decimal256) export(default_memory_pool) export(dictionary) export(duration) -export(enable_cancel_from_interrupt) export(ends_with) export(everything) export(field) diff --git a/r/R/arrow-package.R b/r/R/arrow-package.R index ce3a66c6a74..65ff6c61890 100644 --- a/r/R/arrow-package.R +++ b/r/R/arrow-package.R @@ -102,10 +102,10 @@ supported_dplyr_methods <- list( configure_tzdb() } - # set interrupt handlers - enable_cancel_from_interrupt(TRUE) + # Set interrupt handlers + SetEnableSignalStopSource(TRUE) - # register extension types that we use internally + # Register extension types that we use internally reregister_extension_type(vctrs_extension_type(vctrs::unspecified())) invisible() diff --git a/r/R/config.R b/r/R/config.R index 80dd52863e3..e373b3ee3ea 100644 --- a/r/R/config.R +++ b/r/R/config.R @@ -46,15 +46,3 @@ set_io_thread_count <- function(num_threads) { SetIOThreadPoolCapacity(as.integer(num_threads)) invisible(current_io_thread_count) } - -#' Enable cancel of long-running Arrow operations -#' -#' @param enabled Use `TRUE` to turn on cancellation of long-running -#' Arrow operations where this is supported; use `FALSE` to disable. -#' Using `TRUE` is currently experimental. -#' -#' @return The previous value of `enabled`, invisibly -#' @export -enable_cancel_from_interrupt <- function(enabled = TRUE) { - invisible(SetEnableSignalStopSource(enabled)) -} diff --git a/r/_pkgdown.yml b/r/_pkgdown.yml index d025afe477f..70bd7ac518c 100644 --- a/r/_pkgdown.yml +++ b/r/_pkgdown.yml @@ -235,7 +235,6 @@ reference: - install_arrow - install_pyarrow - create_package_with_all_dependencies - - enable_cancel_from_interrupt repo: jira_projects: [ARROW] diff --git a/r/man/enable_cancel_from_interrupt.Rd b/r/man/enable_cancel_from_interrupt.Rd deleted file mode 100644 index 0c04fc5c32d..00000000000 --- a/r/man/enable_cancel_from_interrupt.Rd +++ /dev/null @@ -1,19 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/config.R -\name{enable_cancel_from_interrupt} -\alias{enable_cancel_from_interrupt} -\title{Enable cancel of long-running Arrow operations} -\usage{ -enable_cancel_from_interrupt(enabled = TRUE) -} -\arguments{ -\item{enabled}{Use \code{TRUE} to turn on cancellation of long-running -Arrow operations where this is supported; use \code{FALSE} to disable. -Using \code{TRUE} is currently experimental.} -} -\value{ -The previous value of \code{enabled}, invisibly -} -\description{ -Enable cancel of long-running Arrow operations -} From 4ed6641511a9f2b53d0f96257b841ba0e4c6ba6d Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Tue, 20 Sep 2022 09:38:51 -0300 Subject: [PATCH 23/39] only use cancelling in interactive session --- r/R/arrow-package.R | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/r/R/arrow-package.R b/r/R/arrow-package.R index 65ff6c61890..01e0474e718 100644 --- a/r/R/arrow-package.R +++ b/r/R/arrow-package.R @@ -102,8 +102,10 @@ supported_dplyr_methods <- list( configure_tzdb() } - # Set interrupt handlers - SetEnableSignalStopSource(TRUE) + # Set interrupt handlers if in an interactive session + if (rlang::is_interactive()) { + SetEnableSignalStopSource(TRUE) + } # Register extension types that we use internally reregister_extension_type(vctrs_extension_type(vctrs::unspecified())) From ef6fdd28b8826b6a4cebbe1fa7ac86af6a7c70f6 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Tue, 20 Sep 2022 12:18:02 -0300 Subject: [PATCH 24/39] propagate R code execution errors via Status instead of via exception --- r/src/arrow_types.h | 4 ++-- r/src/r_to_arrow.cpp | 2 +- r/src/safe-call-into-r-impl.cpp | 1 - r/src/safe-call-into-r.h | 30 +++++++++++++++--------------- 4 files changed, 18 insertions(+), 19 deletions(-) diff --git a/r/src/arrow_types.h b/r/src/arrow_types.h index dd0dc24449e..c29a31fd663 100644 --- a/r/src/arrow_types.h +++ b/r/src/arrow_types.h @@ -94,8 +94,8 @@ class UnwindProtectDetail : public StatusDetail { virtual std::string ToString() const { return "R code execution error"; } }; -static inline Status StatusUnwindProtect(SEXP token) { - return Status::Invalid("R code execution error") +static inline Status StatusUnwindProtect(SEXP token, std::string reason = "") { + return Status::Invalid("R code execution error (", reason, ")") .WithDetail(std::make_shared(token)); } diff --git a/r/src/r_to_arrow.cpp b/r/src/r_to_arrow.cpp index b37ae5df78a..aa517995856 100644 --- a/r/src/r_to_arrow.cpp +++ b/r/src/r_to_arrow.cpp @@ -296,7 +296,7 @@ class AsArrowArrayConverter : public RConverter { arrays_.push_back(std::move(array)); return Status::OK(); } catch (cpp11::unwind_exception& e) { - return StatusUnwindProtect(e.token); + return StatusUnwindProtect(e.token, "calling as_arrow_array()"); } } diff --git a/r/src/safe-call-into-r-impl.cpp b/r/src/safe-call-into-r-impl.cpp index de4ee9b6bd1..c156bd959d9 100644 --- a/r/src/safe-call-into-r-impl.cpp +++ b/r/src/safe-call-into-r-impl.cpp @@ -18,7 +18,6 @@ #include "./arrow_types.h" #include "./safe-call-into-r.h" -#include #include #include diff --git a/r/src/safe-call-into-r.h b/r/src/safe-call-into-r.h index 835af1eb775..31cfe40e088 100644 --- a/r/src/safe-call-into-r.h +++ b/r/src/safe-call-into-r.h @@ -25,7 +25,6 @@ #include #include -#include #include #include @@ -120,15 +119,15 @@ class MainRThread { // Check if there is a saved error bool HasError() { return !status_.ok(); } - // Throw an exception if there was an error executing on the main - // thread. - void ReraiseErrorIfExists() { + // Resets this object after a RunWithCapturedR is about to return + // to the R interpreter. + arrow::Status ReraiseErrorIfExists() { if (SignalStopSourceEnabled()) { stop_source_->Reset(); } arrow::Status maybe_error_status = status_; ResetError(); - arrow::StopIfNotOk(maybe_error_status); + return maybe_error_status; } private: @@ -209,14 +208,9 @@ arrow::Future SafeCallIntoRAsync(std::function(void)> fun, SafeCallIntoRContext context; return fun(); } catch (cpp11::unwind_exception& e) { - // Here we save the token and set the main R thread to an error state - MainRThread::GetInstance().SetError(arrow::StatusUnwindProtect(e.token)); - - // We also return an error although this should not surface because - // main_r_thread.ReraiseErrorIfExists() will get called before this value can be - // returned and will StopIfNotOk(). We don't save the error token here - // to ensure that it will only get thrown once. - return arrow::Status::UnknownError("R code execution error (", reason, ")"); + // Return a status that will rethrow a cpp11::unwind_exception() + // when ValueOrStop() is called. + return arrow::StatusUnwindProtect(e.token, reason); } })); } else { @@ -267,9 +261,15 @@ arrow::Result RunWithCapturedR(std::function()> make_arrow_c }); MainRThread::GetInstance().Executor() = nullptr; - MainRThread::GetInstance().ReraiseErrorIfExists(); - return result; + // R execution error will already be embedded in `result`; however, + // if there was an error restoring the signal handlers it will be + // embedded here. + if (MainRThread::GetInstance().HasError()) { + return MainRThread::GetInstance().ReraiseErrorIfExists(); + } else { + return result; + } } // Performs an Arrow call (e.g., run an exec plan) in such a way that background threads From a3d7a1000250ab89361f0d48d40379d68a69e57c Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Tue, 20 Sep 2022 12:20:57 -0300 Subject: [PATCH 25/39] don't use raw thread pointers in tests --- r/src/safe-call-into-r-impl.cpp | 41 +++++++++++++++------------------ 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/r/src/safe-call-into-r-impl.cpp b/r/src/safe-call-into-r-impl.cpp index c156bd959d9..2cf7493cb74 100644 --- a/r/src/safe-call-into-r-impl.cpp +++ b/r/src/safe-call-into-r-impl.cpp @@ -57,43 +57,40 @@ bool CanRunWithCapturedR() { std::string TestSafeCallIntoR(cpp11::function r_fun_that_returns_a_string, std::string opt) { if (opt == "async_with_executor") { - std::thread* thread_ptr; + std::unique_ptr thread_ptr; auto result = RunWithCapturedR([&thread_ptr, r_fun_that_returns_a_string]() { auto fut = arrow::Future::Make(); - thread_ptr = new std::thread([fut, r_fun_that_returns_a_string]() mutable { - auto result = SafeCallIntoR([&] { - return cpp11::as_cpp(r_fun_that_returns_a_string()); - }); + thread_ptr = + std::make_unique([&fut, r_fun_that_returns_a_string]() { + auto result = SafeCallIntoR([&] { + return cpp11::as_cpp(r_fun_that_returns_a_string()); + }); - fut.MarkFinished(result); - }); + fut.MarkFinished(result); + }); return fut; }); thread_ptr->join(); - delete thread_ptr; - return arrow::ValueOrStop(result); } else if (opt == "async_without_executor") { - std::thread* thread_ptr; - auto fut = arrow::Future::Make(); - thread_ptr = new std::thread([fut, r_fun_that_returns_a_string]() mutable { - auto result = SafeCallIntoR( - [&] { return cpp11::as_cpp(r_fun_that_returns_a_string()); }); - - if (result.ok()) { - fut.MarkFinished(result.ValueUnsafe()); - } else { - fut.MarkFinished(result.status()); - } - }); + auto thread_ptr = + std::make_unique([&fut, r_fun_that_returns_a_string]() { + auto result = SafeCallIntoR( + [&] { return cpp11::as_cpp(r_fun_that_returns_a_string()); }); + + if (result.ok()) { + fut.MarkFinished(result.ValueUnsafe()); + } else { + fut.MarkFinished(result.status()); + } + }); thread_ptr->join(); - delete thread_ptr; // We should be able to get this far, but fut will contain an error // because it tried to evaluate R code from another thread From 0201112f672417ea563a2acd4ede9abd018c826b Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Tue, 20 Sep 2022 15:08:06 -0300 Subject: [PATCH 26/39] fix include --- r/src/safe-call-into-r.h | 1 + 1 file changed, 1 insertion(+) diff --git a/r/src/safe-call-into-r.h b/r/src/safe-call-into-r.h index 31cfe40e088..7998a3c6641 100644 --- a/r/src/safe-call-into-r.h +++ b/r/src/safe-call-into-r.h @@ -25,6 +25,7 @@ #include #include +#include #include #include From f4480f2473001108037b0d62a1aaa163f95a2145 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Thu, 22 Sep 2022 09:29:59 -0300 Subject: [PATCH 27/39] always set the interrupt handlers --- r/R/arrow-package.R | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/r/R/arrow-package.R b/r/R/arrow-package.R index 01e0474e718..65ff6c61890 100644 --- a/r/R/arrow-package.R +++ b/r/R/arrow-package.R @@ -102,10 +102,8 @@ supported_dplyr_methods <- list( configure_tzdb() } - # Set interrupt handlers if in an interactive session - if (rlang::is_interactive()) { - SetEnableSignalStopSource(TRUE) - } + # Set interrupt handlers + SetEnableSignalStopSource(TRUE) # Register extension types that we use internally reregister_extension_type(vctrs_extension_type(vctrs::unspecified())) From e110159b690e8c14b228d220e12ecbc7ea7c2cac Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Thu, 22 Sep 2022 22:20:56 -0300 Subject: [PATCH 28/39] polish some cpp --- r/src/csv.cpp | 4 +- r/src/feather.cpp | 1 + r/src/safe-call-into-r.h | 60 +++++++++++++++--------- r/tests/testthat/test-safe-call-into-r.R | 4 +- 4 files changed, 42 insertions(+), 27 deletions(-) diff --git a/r/src/csv.cpp b/r/src/csv.cpp index b4f2ef98bc1..7747369300a 100644 --- a/r/src/csv.cpp +++ b/r/src/csv.cpp @@ -155,8 +155,8 @@ std::shared_ptr csv___TableReader__Make( const std::shared_ptr& parse_options, const std::shared_ptr& convert_options) { return ValueOrStop(arrow::csv::TableReader::Make( - arrow::io::IOContext(gc_memory_pool(), MainRThread::GetInstance().GetStopToken()), - input, *read_options, *parse_options, *convert_options)); + MainRThread::GetInstance().CancellableIOContext(), input, *read_options, + *parse_options, *convert_options)); } // [[arrow::export]] diff --git a/r/src/feather.cpp b/r/src/feather.cpp index 72e7c8e29c4..cf68faef1b5 100644 --- a/r/src/feather.cpp +++ b/r/src/feather.cpp @@ -68,6 +68,7 @@ std::shared_ptr ipc___feather___Reader__Read( } else { read_result = reader->Read(&table); } + if (read_result.ok()) { return arrow::Result>(table); } else { diff --git a/r/src/safe-call-into-r.h b/r/src/safe-call-into-r.h index 7998a3c6641..b222ebe265c 100644 --- a/r/src/safe-call-into-r.h +++ b/r/src/safe-call-into-r.h @@ -141,6 +141,34 @@ class MainRThread { MainRThread() : initialized_(false), executor_(nullptr), stop_source_(nullptr) {} }; +// This object is used to ensure that signal hanlders are registered when +// RunWithCapturedR launches its background thread to call Arrow and is +// cleaned up however this exits. Note that the lifecycle of the StopSource, +// which is registered at package load, is not necessarily tied to the +// lifecycle of the signal handlers. The general approach is to register +// the signal handlers only when we are evaluating code outside the R thread +// (when we are evaluating code *on* the R thread, R's signal handlers are +// sufficient and will signal an interupt condition that will propagate +// via a cpp11::unwind_excpetion). +class RunWithCapturedRContext { + public: + arrow::Status Init() { + if (MainRThread::GetInstance().SignalStopSourceEnabled()) { + RETURN_NOT_OK(arrow::RegisterCancellingSignalHandler({SIGINT})); + } + + return arrow::Status::OK(); + } + + ~RunWithCapturedRContext() { + if (MainRThread::GetInstance().SignalStopSourceEnabled()) { + arrow::UnregisterCancellingSignalHandler(); + } + } +}; + +// This is an object whose scope ensures we do not register signal handlers when +// evaluating R code when that evaluation happens via SafeCallIntoR. class SafeCallIntoRContext { public: SafeCallIntoRContext() { @@ -161,23 +189,6 @@ class SafeCallIntoRContext { } }; -class RunWithCapturedRContext { - public: - arrow::Status Init() { - if (MainRThread::GetInstance().SignalStopSourceEnabled()) { - RETURN_NOT_OK(arrow::RegisterCancellingSignalHandler({SIGINT})); - } - - return arrow::Status::OK(); - } - - ~RunWithCapturedRContext() { - if (MainRThread::GetInstance().SignalStopSourceEnabled()) { - arrow::UnregisterCancellingSignalHandler(); - } - } -}; - // Call into R and return a C++ object. Note that you can't return // a SEXP (use cpp11::as_cpp to convert it to a C++ type inside // `fun`). @@ -209,9 +220,13 @@ arrow::Future SafeCallIntoRAsync(std::function(void)> fun, SafeCallIntoRContext context; return fun(); } catch (cpp11::unwind_exception& e) { - // Return a status that will rethrow a cpp11::unwind_exception() - // when ValueOrStop() is called. - return arrow::StatusUnwindProtect(e.token, reason); + // Set the MainRThread error so that subsequent calls to SafeCallIntoR + // know not to execute R code + MainRThread::GetInstance().SetError(arrow::StatusUnwindProtect(e.token, reason)); + + // Return an error Status (which is unlikely to surface since RunWithCapturedR + // will preferentially return the MainRThread error). + return arrow::Status::Invalid("R code execution error (", reason, ")"); } })); } else { @@ -263,9 +278,8 @@ arrow::Result RunWithCapturedR(std::function()> make_arrow_c MainRThread::GetInstance().Executor() = nullptr; - // R execution error will already be embedded in `result`; however, - // if there was an error restoring the signal handlers it will be - // embedded here. + // A StatusUnwindProtect error, if it was thrown, lives in the MainRThread and + // should be returned if possible. if (MainRThread::GetInstance().HasError()) { return MainRThread::GetInstance().ReraiseErrorIfExists(); } else { diff --git a/r/tests/testthat/test-safe-call-into-r.R b/r/tests/testthat/test-safe-call-into-r.R index 368f46bfa0e..c07d90433fd 100644 --- a/r/tests/testthat/test-safe-call-into-r.R +++ b/r/tests/testthat/test-safe-call-into-r.R @@ -32,8 +32,8 @@ test_that("SafeCallIntoR works from the main R thread", { }) test_that("SafeCallIntoR works within RunWithCapturedR", { - skip_on_cran() skip_if_not(CanRunWithCapturedR()) + skip_on_cran() expect_identical( TestSafeCallIntoR(function() "string one!", opt = "async_with_executor"), @@ -47,8 +47,8 @@ test_that("SafeCallIntoR works within RunWithCapturedR", { }) test_that("SafeCallIntoR errors from the non-R thread", { - skip_on_cran() skip_if_not(CanRunWithCapturedR()) + skip_on_cran() expect_error( TestSafeCallIntoR(function() "string one!", opt = "async_without_executor"), From c1d16d2b61a44dba31e501c29e09ca9912e67c2b Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Thu, 22 Sep 2022 22:30:04 -0300 Subject: [PATCH 29/39] make sure the stop source always gets reset --- r/src/safe-call-into-r.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/r/src/safe-call-into-r.h b/r/src/safe-call-into-r.h index b222ebe265c..95f32825641 100644 --- a/r/src/safe-call-into-r.h +++ b/r/src/safe-call-into-r.h @@ -163,6 +163,7 @@ class RunWithCapturedRContext { ~RunWithCapturedRContext() { if (MainRThread::GetInstance().SignalStopSourceEnabled()) { arrow::UnregisterCancellingSignalHandler(); + } } }; @@ -280,8 +281,9 @@ arrow::Result RunWithCapturedR(std::function()> make_arrow_c // A StatusUnwindProtect error, if it was thrown, lives in the MainRThread and // should be returned if possible. - if (MainRThread::GetInstance().HasError()) { - return MainRThread::GetInstance().ReraiseErrorIfExists(); + arrow::Status global_status = MainRThread::GetInstance().ReraiseErrorIfExists(); + if (!global_status.ok()) { + return global_status; } else { return result; } From 64d88a596fdd5d6ab9266a8b24e3e752d64f3a4d Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Thu, 22 Sep 2022 23:20:17 -0300 Subject: [PATCH 30/39] clang-format --- r/src/safe-call-into-r.h | 1 - 1 file changed, 1 deletion(-) diff --git a/r/src/safe-call-into-r.h b/r/src/safe-call-into-r.h index 95f32825641..19ea1647047 100644 --- a/r/src/safe-call-into-r.h +++ b/r/src/safe-call-into-r.h @@ -163,7 +163,6 @@ class RunWithCapturedRContext { ~RunWithCapturedRContext() { if (MainRThread::GetInstance().SignalStopSourceEnabled()) { arrow::UnregisterCancellingSignalHandler(); - } } }; From a855d751d91d72811f6f4fbee25e789031ed7dbc Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Fri, 23 Sep 2022 09:14:06 -0300 Subject: [PATCH 31/39] re-remove on old windows --- r/R/arrow-package.R | 9 --------- 1 file changed, 9 deletions(-) diff --git a/r/R/arrow-package.R b/r/R/arrow-package.R index 65ff6c61890..0314a1cbd19 100644 --- a/r/R/arrow-package.R +++ b/r/R/arrow-package.R @@ -159,15 +159,6 @@ configure_tzdb <- function() { DeinitializeMainRThread() } -on_old_windows <- function() { - is_32bit <- .Machine$sizeof.pointer < 8 - is_old_r <- getRversion() < "4.0.0" - is_windows <- tolower(Sys.info()[["sysname"]]) == "windows" - - is_32bit && is_old_r && is_windows -} - - # True when the OS is linux + and the R version is development # helpful for skipping on Valgrind, and the sanitizer checks (clang + gcc) on cran on_linux_dev <- function() { From 8965e387d8eb15105bee7a50f8566663296942bc Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Wed, 28 Sep 2022 10:14:41 -0300 Subject: [PATCH 32/39] Update r/src/compute-exec.cpp Co-authored-by: Antoine Pitrou --- r/src/compute-exec.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r/src/compute-exec.cpp b/r/src/compute-exec.cpp index 19657baed6b..9f2079f6519 100644 --- a/r/src/compute-exec.cpp +++ b/r/src/compute-exec.cpp @@ -152,7 +152,7 @@ class ExecPlanReader : public arrow::RecordBatchReader { std::shared_ptr schema_; std::shared_ptr plan_; arrow::AsyncGenerator> sink_gen_; - enum ExecPlanReaderStatus status_; + ExecPlanReaderStatus status_; arrow::StopToken stop_token_; arrow::Status StartProducing() { From 4ccd840a5421e9e389db09d21964a3ac6fb97798 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Wed, 28 Sep 2022 10:14:58 -0300 Subject: [PATCH 33/39] Update r/src/safe-call-into-r.h Co-authored-by: Antoine Pitrou --- r/src/safe-call-into-r.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/r/src/safe-call-into-r.h b/r/src/safe-call-into-r.h index 19ea1647047..8dde80fba94 100644 --- a/r/src/safe-call-into-r.h +++ b/r/src/safe-call-into-r.h @@ -280,12 +280,8 @@ arrow::Result RunWithCapturedR(std::function()> make_arrow_c // A StatusUnwindProtect error, if it was thrown, lives in the MainRThread and // should be returned if possible. - arrow::Status global_status = MainRThread::GetInstance().ReraiseErrorIfExists(); - if (!global_status.ok()) { - return global_status; - } else { - return result; - } + ARROW_RETURN_NOT_OK(MainRThread::GetInstance().ReraiseErrorIfExists()); + return result; } // Performs an Arrow call (e.g., run an exec plan) in such a way that background threads From e6aaa74dc50b5682a201db3fd6954e5e46221878 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Wed, 28 Sep 2022 10:54:16 -0300 Subject: [PATCH 34/39] improvements to signal handling --- r/src/safe-call-into-r.h | 60 +++++++++++++++++++++++++--------------- 1 file changed, 37 insertions(+), 23 deletions(-) diff --git a/r/src/safe-call-into-r.h b/r/src/safe-call-into-r.h index 8dde80fba94..319d46d11f0 100644 --- a/r/src/safe-call-into-r.h +++ b/r/src/safe-call-into-r.h @@ -150,43 +150,60 @@ class MainRThread { // (when we are evaluating code *on* the R thread, R's signal handlers are // sufficient and will signal an interupt condition that will propagate // via a cpp11::unwind_excpetion). -class RunWithCapturedRContext { +class WithSignalHandlerContext { public: - arrow::Status Init() { + WithSignalHandlerContext() : signal_handler_registered_(false) { if (MainRThread::GetInstance().SignalStopSourceEnabled()) { - RETURN_NOT_OK(arrow::RegisterCancellingSignalHandler({SIGINT})); - } + arrow::Status result = arrow::RegisterCancellingSignalHandler({SIGINT}); - return arrow::Status::OK(); + // If this result was not OK we don't get cancellation for the + // lifecycle of this object; however, we can still carry on. This + // can occur when forking the R process (e.g., using parallel::mclapply()). + if (result.ok()) { + signal_handler_registered_ = true; + } else { + result.Warn(); + } + } } - ~RunWithCapturedRContext() { - if (MainRThread::GetInstance().SignalStopSourceEnabled()) { + ~WithSignalHandlerContext() { + if (signal_handler_registered_) { arrow::UnregisterCancellingSignalHandler(); } } + + private: + bool signal_handler_registered_; }; // This is an object whose scope ensures we do not register signal handlers when // evaluating R code when that evaluation happens via SafeCallIntoR. -class SafeCallIntoRContext { +class WithoutSignalHandlerContext { public: - SafeCallIntoRContext() { - if (!MainRThread::GetInstance().IsMainThread() && - MainRThread::GetInstance().SignalStopSourceEnabled()) { + WithoutSignalHandlerContext() : signal_handler_unregistered_(false) { + if (MainRThread::GetInstance().SignalStopSourceEnabled()) { arrow::UnregisterCancellingSignalHandler(); + signal_handler_unregistered_ = true; } } - ~SafeCallIntoRContext() { - if (!MainRThread::GetInstance().IsMainThread() && - MainRThread::GetInstance().SignalStopSourceEnabled()) { + ~WithoutSignalHandlerContext() { + if (signal_handler_unregistered_) { arrow::Status result = arrow::RegisterCancellingSignalHandler({SIGINT}); + + // This is unlikely because the signal handlers were previously registered; + // however, it's better to warn here instead of error because it doesn't + // affect what the user tried to do (it probably just means we didn't + // anticipate a use case). if (!result.ok()) { - MainRThread::GetInstance().SetError(result); + result.Warn(); } } } + + private: + bool signal_handler_unregistered_; }; // Call into R and return a C++ object. Note that you can't return @@ -200,13 +217,12 @@ arrow::Future SafeCallIntoRAsync(std::function(void)> fun, // If we're on the main thread, run the task immediately and let // the cpp11::unwind_exception be thrown since it will be caught // at the top level. - SafeCallIntoRContext context; return fun(); } else if (main_r_thread.CanExecuteSafeCallIntoR()) { // If we are not on the main thread and have an Executor, // use it to run the task on the main R thread. We can't throw // a cpp11::unwind_exception here, so we need to propagate it back - // to RunWithCapturedR through the MainRThread singleton. + // to RunWithCapturedR through the MainRThread instance. return DeferNotOk(main_r_thread.Executor()->Submit([fun, reason]() -> arrow::Result { // This occurs when some other R code that was previously scheduled to run @@ -217,11 +233,11 @@ arrow::Future SafeCallIntoRAsync(std::function(void)> fun, } try { - SafeCallIntoRContext context; + WithoutSignalHandlerContext context; return fun(); } catch (cpp11::unwind_exception& e) { // Set the MainRThread error so that subsequent calls to SafeCallIntoR - // know not to execute R code + // know not to execute R code. MainRThread::GetInstance().SetError(arrow::StatusUnwindProtect(e.token, reason)); // Return an error Status (which is unlikely to surface since RunWithCapturedR @@ -266,10 +282,8 @@ arrow::Result RunWithCapturedR(std::function()> make_arrow_c return arrow::Status::AlreadyExists("Attempt to use more than one R Executor()"); } - RunWithCapturedRContext context; - ARROW_RETURN_NOT_OK(context.Init()); MainRThread::GetInstance().ResetError(); - + WithSignalHandlerContext context; arrow::Result result = arrow::internal::SerialExecutor::RunInSerialExecutor( [make_arrow_call](arrow::internal::Executor* executor) { MainRThread::GetInstance().Executor() = executor; @@ -313,7 +327,7 @@ static inline arrow::Status RunWithCapturedRIfPossibleVoid( ARROW_RETURN_NOT_OK(make_arrow_call()); return true; }); - ARROW_RETURN_NOT_OK(result); + return result.status(); } From 9c965f2e65870f777298d46531ef2a422dd012fd Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Wed, 28 Sep 2022 11:02:27 -0300 Subject: [PATCH 35/39] improvements to compute-exec --- r/src/compute-exec.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/r/src/compute-exec.cpp b/r/src/compute-exec.cpp index 9f2079f6519..f4db8191266 100644 --- a/r/src/compute-exec.cpp +++ b/r/src/compute-exec.cpp @@ -76,11 +76,11 @@ class ExecPlanReader : public arrow::RecordBatchReader { : schema_(schema), plan_(plan), sink_gen_(sink_gen), - status_(PLAN_NOT_STARTED), + plan_status_(PLAN_NOT_STARTED), stop_token_(MainRThread::GetInstance().GetStopToken()) {} std::string PlanStatus() const { - switch (status_) { + switch (plan_status_) { case PLAN_NOT_STARTED: return "PLAN_NOT_STARTED"; case PLAN_RUNNING: @@ -97,13 +97,13 @@ class ExecPlanReader : public arrow::RecordBatchReader { arrow::Status ReadNext(std::shared_ptr* batch_out) override { // If this is the first batch getting pulled, tell the exec plan to // start producing - if (status_ == PLAN_NOT_STARTED) { + if (plan_status_ == PLAN_NOT_STARTED) { ARROW_RETURN_NOT_OK(StartProducing()); } // If we've closed the reader, keep sending nullptr // (consistent with what most RecordBatchReader subclasses do) - if (status_ == PLAN_FINISHED) { + if (plan_status_ == PLAN_FINISHED) { batch_out->reset(); return arrow::Status::OK(); } @@ -111,9 +111,9 @@ class ExecPlanReader : public arrow::RecordBatchReader { // Check for cancellation and stop the plan if we have a request. When // the ExecPlan supports passing a StopToken and handling this itself, // this will be redundant. - ARROW_RETURN_NOT_OK(stop_token_.Poll()); if (stop_token_.IsStopRequested()) { StopProducing(); + ARROW_RETURN_NOT_OK(stop_token_.Poll()); return arrow::Status::Cancelled("Cancelled"); } @@ -152,17 +152,17 @@ class ExecPlanReader : public arrow::RecordBatchReader { std::shared_ptr schema_; std::shared_ptr plan_; arrow::AsyncGenerator> sink_gen_; - ExecPlanReaderStatus status_; + ExecPlanReaderStatus plan_status_; arrow::StopToken stop_token_; arrow::Status StartProducing() { ARROW_RETURN_NOT_OK(plan_->StartProducing()); - status_ = PLAN_RUNNING; + plan_status_ = PLAN_RUNNING; return arrow::Status::OK(); } void StopProducing() { - if (status_ == PLAN_RUNNING) { + if (plan_status_ == PLAN_RUNNING) { // We're done with the plan, but it may still need some time // to finish and clean up after itself. To do this, we give a // callable with its own copy of the shared_ptr so @@ -176,7 +176,7 @@ class ExecPlanReader : public arrow::RecordBatchReader { } } - status_ = PLAN_FINISHED; + plan_status_ = PLAN_FINISHED; plan_.reset(); sink_gen_ = arrow::MakeEmptyGenerator>(); } From bb617fd6ddf00791cb1c4751f3b712af62fda93d Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Wed, 28 Sep 2022 11:10:40 -0300 Subject: [PATCH 36/39] don't join thread that may not have been assigned --- r/src/safe-call-into-r-impl.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/r/src/safe-call-into-r-impl.cpp b/r/src/safe-call-into-r-impl.cpp index 2cf7493cb74..e96337f0075 100644 --- a/r/src/safe-call-into-r-impl.cpp +++ b/r/src/safe-call-into-r-impl.cpp @@ -74,7 +74,10 @@ std::string TestSafeCallIntoR(cpp11::function r_fun_that_returns_a_string, return fut; }); - thread_ptr->join(); + if (result.ok()) { + thread_ptr->join(); + } + return arrow::ValueOrStop(result); } else if (opt == "async_without_executor") { auto fut = arrow::Future::Make(); From f68ab9e8c4d672d99706e0b7a225b956258e54a1 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Wed, 28 Sep 2022 11:32:59 -0300 Subject: [PATCH 37/39] fix thread syntax --- r/src/safe-call-into-r-impl.cpp | 54 ++++++++++++++++----------------- 1 file changed, 26 insertions(+), 28 deletions(-) diff --git a/r/src/safe-call-into-r-impl.cpp b/r/src/safe-call-into-r-impl.cpp index e96337f0075..77031aa1854 100644 --- a/r/src/safe-call-into-r-impl.cpp +++ b/r/src/safe-call-into-r-impl.cpp @@ -57,43 +57,41 @@ bool CanRunWithCapturedR() { std::string TestSafeCallIntoR(cpp11::function r_fun_that_returns_a_string, std::string opt) { if (opt == "async_with_executor") { - std::unique_ptr thread_ptr; + std::thread thread; - auto result = - RunWithCapturedR([&thread_ptr, r_fun_that_returns_a_string]() { - auto fut = arrow::Future::Make(); - thread_ptr = - std::make_unique([&fut, r_fun_that_returns_a_string]() { - auto result = SafeCallIntoR([&] { - return cpp11::as_cpp(r_fun_that_returns_a_string()); - }); + auto result = RunWithCapturedR([&thread, r_fun_that_returns_a_string]() { + auto fut = arrow::Future::Make(); + thread = std::thread([&fut, r_fun_that_returns_a_string]() { + auto result = SafeCallIntoR( + [&] { return cpp11::as_cpp(r_fun_that_returns_a_string()); }); - fut.MarkFinished(result); - }); + fut.MarkFinished(result); + }); - return fut; - }); + return fut; + }); - if (result.ok()) { - thread_ptr->join(); + if (thread.joinable()) { + thread.join(); } return arrow::ValueOrStop(result); } else if (opt == "async_without_executor") { auto fut = arrow::Future::Make(); - auto thread_ptr = - std::make_unique([&fut, r_fun_that_returns_a_string]() { - auto result = SafeCallIntoR( - [&] { return cpp11::as_cpp(r_fun_that_returns_a_string()); }); - - if (result.ok()) { - fut.MarkFinished(result.ValueUnsafe()); - } else { - fut.MarkFinished(result.status()); - } - }); - - thread_ptr->join(); + std::thread thread([&fut, r_fun_that_returns_a_string]() { + auto result = SafeCallIntoR( + [&] { return cpp11::as_cpp(r_fun_that_returns_a_string()); }); + + if (result.ok()) { + fut.MarkFinished(result.ValueUnsafe()); + } else { + fut.MarkFinished(result.status()); + } + }); + + if (thread.joinable()) { + thread.join(); + } // We should be able to get this far, but fut will contain an error // because it tried to evaluate R code from another thread From 6d4f5cdf01ea0b8690cadb9e0a46fce1a0bab5a4 Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Wed, 28 Sep 2022 11:42:50 -0300 Subject: [PATCH 38/39] Update r/src/compute-exec.cpp Co-authored-by: Antoine Pitrou --- r/src/compute-exec.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/r/src/compute-exec.cpp b/r/src/compute-exec.cpp index f4db8191266..ca980345dfb 100644 --- a/r/src/compute-exec.cpp +++ b/r/src/compute-exec.cpp @@ -113,8 +113,7 @@ class ExecPlanReader : public arrow::RecordBatchReader { // this will be redundant. if (stop_token_.IsStopRequested()) { StopProducing(); - ARROW_RETURN_NOT_OK(stop_token_.Poll()); - return arrow::Status::Cancelled("Cancelled"); + return stop_token_.Poll(); } auto out = sink_gen_().result(); From e30e59a08d5e4bede4b9a7efbed024fbef507b5d Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Wed, 28 Sep 2022 11:43:45 -0300 Subject: [PATCH 39/39] remove unnecessary if() --- r/src/safe-call-into-r-impl.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/r/src/safe-call-into-r-impl.cpp b/r/src/safe-call-into-r-impl.cpp index 77031aa1854..92dce7e0ba0 100644 --- a/r/src/safe-call-into-r-impl.cpp +++ b/r/src/safe-call-into-r-impl.cpp @@ -89,9 +89,7 @@ std::string TestSafeCallIntoR(cpp11::function r_fun_that_returns_a_string, } }); - if (thread.joinable()) { - thread.join(); - } + thread.join(); // We should be able to get this far, but fut will contain an error // because it tried to evaluate R code from another thread