diff --git a/cpp/src/arrow/flight/client.h b/cpp/src/arrow/flight/client.h index 8ba14f259f5f4..ff90dd81cad82 100644 --- a/cpp/src/arrow/flight/client.h +++ b/cpp/src/arrow/flight/client.h @@ -398,6 +398,20 @@ class ARROW_FLIGHT_EXPORT FlightClient { return DoExchange({}, descriptor); } + ARROW_DEPRECATED("Deprecated in 8.0.0. Use Result-returning overload instead.") + Status DoExchange(const FlightCallOptions& options, const FlightDescriptor& descriptor, + std::unique_ptr* writer, + std::unique_ptr* reader); + ARROW_DEPRECATED("Deprecated in 8.0.0. Use Result-returning overload instead.") + Status DoExchange(const FlightDescriptor& descriptor, + std::unique_ptr* writer, + std::unique_ptr* reader) { + ARROW_ASSIGN_OR_RAISE(auto output, DoExchange({}, descriptor)); + *writer = std::move(output.writer); + *reader = std::move(output.reader); + return Status::OK(); + } + /// \brief Set server session option(s) by name/value. Sessions are generally /// persisted via HTTP cookies. /// \param[in] options Per-RPC options