You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/07/04 09:19:25 UTC

[GitHub] [arrow] paleolimbot commented on a diff in pull request #13482: ARROW-14989: [R] Update num_rows methods to output doubles not integers to prevent integer overflow

paleolimbot commented on code in PR #13482:
URL: https://github.com/apache/arrow/pull/13482#discussion_r912793393


##########
r/src/recordbatch.cpp:
##########
@@ -32,7 +32,7 @@ int RecordBatch__num_columns(const std::shared_ptr<arrow::RecordBatch>& x) {
 }
 
 // [[arrow::export]]
-int RecordBatch__num_rows(const std::shared_ptr<arrow::RecordBatch>& x) {
+r_vec_size RecordBatch__num_rows(const std::shared_ptr<arrow::RecordBatch>& x) {
   return x->num_rows();

Review Comment:
   ```suggestion
     return r_vec_size(x->num_rows());
   ```



##########
r/src/table.cpp:
##########
@@ -28,7 +28,9 @@ int Table__num_columns(const std::shared_ptr<arrow::Table>& x) {
 }
 
 // [[arrow::export]]
-int Table__num_rows(const std::shared_ptr<arrow::Table>& x) { return x->num_rows(); }
+r_vec_size Table__num_rows(const std::shared_ptr<arrow::Table>& x) {
+  return x->num_rows();

Review Comment:
   ```suggestion
     return r_vec_size(x->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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org