Skip to content

Commit

Permalink
MINOR: enhance document for RecordBatchReader::ReadNext
Browse files Browse the repository at this point in the history
  • Loading branch information
mapleFU committed Jun 21, 2024
1 parent 5e52077 commit 78755f9
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion cpp/src/arrow/record_batch.h
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,20 @@ class ARROW_EXPORT RecordBatchReader {
/// \brief Read the next record batch in the stream. Return null for batch
/// when reaching end of stream
///
/// \param[out] batch the next loaded batch, null at end of stream
/// example:
/// ```
/// std::shared_ptr<RecordBatch> batch;
/// while (true) {
/// ARROW_RETURN_NOT_OK(reader->ReadNext(&batch));
/// if (batch == nullptr) {
/// break;
/// }
/// // handling the `batch`
/// }
/// ```
///
/// \param[out] batch the next loaded batch, null at end of stream. Return
/// a empty batch doesn't means the end of stream, it could be a empty batch.
/// \return Status
virtual Status ReadNext(std::shared_ptr<RecordBatch>* batch) = 0;

Expand Down

0 comments on commit 78755f9

Please sign in to comment.