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/05 18:42:48 UTC

[GitHub] [arrow] nealrichardson commented on a diff in pull request #13514: ARROW-16977: [R] Update dataset row counting so no integer overflow on large datasets

nealrichardson commented on code in PR #13514:
URL: https://github.com/apache/arrow/pull/13514#discussion_r914102910


##########
r/src/dataset.cpp:
##########
@@ -511,8 +511,8 @@ std::shared_ptr<arrow::Table> dataset___Scanner__TakeRows(
 }
 
 // [[dataset::export]]
-int64_t dataset___Scanner__CountRows(const std::shared_ptr<ds::Scanner>& scanner) {
-  return ValueOrStop(scanner->CountRows());
+r_vec_size dataset___Scanner__CountRows(const std::shared_ptr<ds::Scanner>& scanner) {
+  return r_vec_size(ValueOrStop(scanner->CountRows()));

Review Comment:
   This way is right IIUC; you need `ValueOrStop()` to pull the actual value out of the Result<> object



-- 
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