From 65c3d53acdea633666ae41aa0b476289a3e10bae Mon Sep 17 00:00:00 2001 From: mwish Date: Mon, 24 Jun 2024 21:22:01 +0800 Subject: [PATCH] update comments --- cpp/src/arrow/record_batch.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/cpp/src/arrow/record_batch.h b/cpp/src/arrow/record_batch.h index c45e500a65c58..95596e9c15594 100644 --- a/cpp/src/arrow/record_batch.h +++ b/cpp/src/arrow/record_batch.h @@ -310,20 +310,22 @@ class ARROW_EXPORT RecordBatchReader { /// \brief Read the next record batch in the stream. Return null for batch /// when reaching end of stream /// - /// example: + /// Example: + /// /// ``` - /// std::shared_ptr batch; /// while (true) { + /// std::shared_ptr batch; /// ARROW_RETURN_NOT_OK(reader->ReadNext(&batch)); - /// if (batch == nullptr) { + /// if (!batch) { /// break; /// } - /// // handling the `batch` + /// // handling the `batch`, the `batch->num_rows()` + /// // might be 0. /// } /// ``` /// - /// \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. + /// \param[out] batch the next loaded batch, null at end of stream. Returning + /// an empty batch doesn't mean the end of stream because it is valid data. /// \return Status virtual Status ReadNext(std::shared_ptr* batch) = 0;