lidavidm commented on a change in pull request #12669:
URL: https://github.com/apache/arrow/pull/12669#discussion_r831043036
##########
File path: cpp/src/arrow/flight/types.h
##########
@@ -507,14 +533,26 @@ class ARROW_FLIGHT_EXPORT MetadataRecordBatchReader {
/// \brief Get the schema for this stream.
virtual arrow::Result<std::shared_ptr<Schema>> GetSchema() = 0;
+
/// \brief Get the next message from Flight. If the stream is
/// finished, then the members of \a FlightStreamChunk will be
/// nullptr.
- virtual Status Next(FlightStreamChunk* next) = 0;
+ virtual arrow::Result<FlightStreamChunk> Next() = 0;
+
+ ARROW_DEPRECATED("Deprecated in 8.0.0. Use Result-returning overload
instead.")
+ Status Next(FlightStreamChunk* next);
+
/// \brief Consume entire stream as a vector of record batches
- virtual Status ReadAll(std::vector<std::shared_ptr<RecordBatch>>* batches);
+ virtual arrow::Result<std::vector<std::shared_ptr<RecordBatch>>>
ToRecordBatches();
+
+ ARROW_DEPRECATED("Deprecated in 8.0.0. Use ToRecordBatches overload
instead.")
+ Status ReadAll(std::vector<std::shared_ptr<RecordBatch>>* batches);
+
/// \brief Consume entire stream as a Table
- virtual Status ReadAll(std::shared_ptr<Table>* table);
+ virtual arrow::Result<std::shared_ptr<Table>> ToTable();
+
+ ARROW_DEPRECATED("Deprecated in 8.0.0. Use ToTable overload instead.")
+ Status ReadAll(std::shared_ptr<Table>* table);
Review comment:
@zagto we can probably split that into a separate PR if you prefer since
it's not really Flight related
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]