You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "jp0317 (via GitHub)" <gi...@apache.org> on 2023/06/28 00:17:52 UTC

[GitHub] [arrow] jp0317 commented on a diff in pull request #36180: GH-36178: [C++]support prefetching for ReadRangeCache lazy mode

jp0317 commented on code in PR #36180:
URL: https://github.com/apache/arrow/pull/36180#discussion_r1244509487


##########
cpp/src/arrow/io/caching.cc:
##########
@@ -204,6 +206,17 @@ struct ReadRangeCache::Impl {
     if (it != entries.end() && it->range.Contains(range)) {
       auto fut = MaybeRead(&*it);
       ARROW_ASSIGN_OR_RAISE(auto buf, fut.result());
+      if (options.lazy && options.prefetch_limit > 0) {
+        int64_t num_prefetched = 0;
+        for (auto next_it = it + 1;
+             next_it != entries.end() && num_prefetched++ < options.prefetch_limit;

Review Comment:
   Thanks for your review! Updated as suggested.



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