From 9b74f4591d7557d4092572486ba5e91ee58b4e11 Mon Sep 17 00:00:00 2001 From: Nic Crane Date: Thu, 4 Jun 2026 10:19:06 +0100 Subject: [PATCH 1/2] adds missing cast_options and ctx parameters to TupleRangeFromTable --- docs/source/cpp/examples/tuple_range_conversion.rst | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/source/cpp/examples/tuple_range_conversion.rst b/docs/source/cpp/examples/tuple_range_conversion.rst index 64ba23782bd8..c48b8648bd70 100644 --- a/docs/source/cpp/examples/tuple_range_conversion.rst +++ b/docs/source/cpp/examples/tuple_range_conversion.rst @@ -41,7 +41,9 @@ type conversion is then inferred at compile time. } In reverse, you can use ``TupleRangeFromTable`` to fill an already -pre-allocated range with the data from a ``Table`` instance. +pre-allocated range with the data from a ``Table`` instance. You need to +provide ``CastOptions`` to control type conversions and an ``ExecContext`` +for the compute functions used during conversion. .. code:: @@ -50,11 +52,14 @@ pre-allocated range with the data from a ``Table`` instance. // is unnamed, matching is done on positions. std::shared_ptr table = .. + arrow::compute::ExecContext ctx; + arrow::compute::CastOptions cast_options; + // The range needs to be pre-allocated to the respective amount of rows. // This allows us to pass in an arbitrary range object, not only // `std::vector`. std::vector> rows(2); - if (!arrow::stl::TupleRangeFromTable(*table, &rows).ok()) { + if (!arrow::stl::TupleRangeFromTable(*table, cast_options, &ctx, &rows).ok()) { // Error handling code should go here. } From 729d98ac75d7e71baa1c090422053215fba5b40b Mon Sep 17 00:00:00 2001 From: Nic Crane Date: Thu, 4 Jun 2026 10:23:47 +0100 Subject: [PATCH 2/2] remove unnecesary explanation --- docs/source/cpp/examples/tuple_range_conversion.rst | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/source/cpp/examples/tuple_range_conversion.rst b/docs/source/cpp/examples/tuple_range_conversion.rst index c48b8648bd70..c4f526fcd200 100644 --- a/docs/source/cpp/examples/tuple_range_conversion.rst +++ b/docs/source/cpp/examples/tuple_range_conversion.rst @@ -41,9 +41,7 @@ type conversion is then inferred at compile time. } In reverse, you can use ``TupleRangeFromTable`` to fill an already -pre-allocated range with the data from a ``Table`` instance. You need to -provide ``CastOptions`` to control type conversions and an ``ExecContext`` -for the compute functions used during conversion. +pre-allocated range with the data from a ``Table`` instance. .. code::