-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Conversation
b1a7d05
to
78755f9
Compare
cpp/src/arrow/record_batch.h
Outdated
/// std::shared_ptr<RecordBatch> batch; | ||
/// while (true) { | ||
/// ARROW_RETURN_NOT_OK(reader->ReadNext(&batch)); | ||
/// if (batch == nullptr) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add a block to suggest skipping empty batch?
if (batch->num_rows() == 0) {
continue;
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally I found some place handled this( like DatasetWriter ) but some not...
@github-actions crossbow submit preview-docs |
Revision: 78755f9 Submitted crossbow builds: ursacomputing/crossbow @ actions-73318a0fd1
|
Hmmm at least this looks better than before |
cpp/src/arrow/record_batch.h
Outdated
/// if (!batch) { | ||
/// break; | ||
/// } | ||
/// // handling the `batch`, the `batch->size()` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RecordBatch doesn't actually have a size
method. Perhaps you mean batch->num_rows()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, yeah
8096c64
to
65c3d53
Compare
@github-actions crossbow submit preview-docs |
Revision: 65c3d53 Submitted crossbow builds: ursacomputing/crossbow @ actions-2c8f4ac0c5
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
After merging your PR, Conbench analyzed the 6 benchmarking runs that have been run so far on merge-commit f5b01e4. There were no benchmark performance regressions. 🎉 The full Conbench report has more details. It also includes information about 2 possible false positives for unstable benchmarks that are known to sometimes produce them. |
…pache#42239) ### Rationale for this change Enhance the document for `RecordBatchReader::ReadNext` ### What changes are included in this PR? Add an example for `RecordBatchReader::ReadNext`. ### Are these changes tested? No ### Are there any user-facing changes? No Authored-by: mwish <[email protected]> Signed-off-by: mwish <[email protected]>
Rationale for this change
Enhance the document for
RecordBatchReader::ReadNext
What changes are included in this PR?
Add an example for
RecordBatchReader::ReadNext
.Are these changes tested?
No
Are there any user-facing changes?
No