diff --git a/docs/source/cpp/examples/tuple_range_conversion.rst b/docs/source/cpp/examples/tuple_range_conversion.rst index 64ba23782bd8..c4f526fcd200 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 = .. + 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. }