justinli500 commented on code in PR #49855:
URL: https://github.com/apache/arrow/pull/49855#discussion_r4520489460


##########
cpp/src/arrow/io/caching.h:
##########
@@ -136,12 +137,23 @@ class ARROW_EXPORT ReadRangeCache {
   /// \brief Read a range previously given to Cache().
   Result<std::shared_ptr<Buffer>> Read(ReadRange range);
 
+  /// \brief Read a range if it is still cached.
+  ///
+  /// A cache miss returns an empty optional. I/O errors are propagated.
+  Result<std::optional<std::shared_ptr<Buffer>>> ReadIfCached(ReadRange range);

Review Comment:
   Sounds good. I changed `Read()` to return an optional buffer and removed 
`ReadIfCached()`. I updated the callers, and IPC still reports a cache miss as 
Invalid.



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

Reply via email to