kou commented on code in PR #37600:
URL: https://github.com/apache/arrow/pull/37600#discussion_r1320902928
##########
ruby/red-arrow/ext/arrow/raw-records.cpp:
##########
@@ -305,9 +305,10 @@ namespace red_arrow {
}
VALUE
- record_batch_each_raw_record(VALUE rb_record_batch){
+ record_batch_each_raw_record(VALUE rb_record_batch) {
auto garrow_record_batch = GARROW_RECORD_BATCH(RVAL2GOBJ(rb_record_batch));
auto record_batch = garrow_record_batch_get_raw(garrow_record_batch).get();
+ RETURN_SIZED_ENUMERATOR(rb_record_batch, 0, 0, record_batch->num_rows());
Review Comment:
We should use `nullptr` for a null pointer in C++:
```suggestion
RETURN_SIZED_ENUMERATOR(rb_record_batch, 0, nullptr,
record_batch->num_rows());
```
##########
ruby/red-arrow/ext/arrow/raw-records.cpp:
##########
@@ -323,6 +324,7 @@ namespace red_arrow {
table_each_raw_record(VALUE rb_table) {
auto garrow_table = GARROW_TABLE(RVAL2GOBJ(rb_table));
auto table = garrow_table_get_raw(garrow_table).get();
+ RETURN_SIZED_ENUMERATOR(rb_table, 0, 0, table->num_rows());
Review Comment:
```suggestion
RETURN_SIZED_ENUMERATOR(rb_table, 0, nullptr, table->num_rows());
```
--
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]