This is an automated email from the ASF dual-hosted git repository.
pitrou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new 901a6d55a9 GH-17081: [C++] arrow::stl::TupleRangeFromTable docs
incorrect (#50095)
901a6d55a9 is described below
commit 901a6d55a9081a691894cdaf1bad82930dd38845
Author: Nic Crane <[email protected]>
AuthorDate: Tue Jun 9 14:26:27 2026 +0100
GH-17081: [C++] arrow::stl::TupleRangeFromTable docs incorrect (#50095)
### Rationale for this change
The documentation example for TupleRangeFromTable was missing the
cast_options and ctx parameters, so it didn't match the actual function
signature
### What changes are included in this PR?
Add them
### Are these changes tested?
No
### Are there any user-facing changes?
Better docs
* GitHub Issue: #17081
Authored-by: Nic Crane <[email protected]>
Signed-off-by: Antoine Pitrou <[email protected]>
---
docs/source/cpp/examples/tuple_range_conversion.rst | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/docs/source/cpp/examples/tuple_range_conversion.rst
b/docs/source/cpp/examples/tuple_range_conversion.rst
index 64ba23782b..c4f526fcd2 100644
--- a/docs/source/cpp/examples/tuple_range_conversion.rst
+++ b/docs/source/cpp/examples/tuple_range_conversion.rst
@@ -50,11 +50,14 @@ pre-allocated range with the data from a ``Table`` instance.
// is unnamed, matching is done on positions.
std::shared_ptr<Table> 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<std::tuple<double, std::string>> 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.
}