Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MINOR: [C++][Docs] Enhance document for RecordBatchReader::ReadNext #42239

Merged
merged 3 commits into from
Jun 25, 2024
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
17 changes: 16 additions & 1 deletion cpp/src/arrow/record_batch.h
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,22 @@ 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:
///
/// ```
/// while (true) {
/// std::shared_ptr<RecordBatch> batch;
/// ARROW_RETURN_NOT_OK(reader->ReadNext(&batch));
/// if (!batch) {
/// break;
/// }
/// // handling the `batch`, the `batch->num_rows()`
/// // might be 0.
/// }
/// ```
///
/// \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<RecordBatch>* batch) = 0;

Expand Down
Loading