Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion docs/source/cpp/examples/tuple_range_conversion.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
}

Expand Down
Loading