tustvold commented on code in PR #4351:
URL: https://github.com/apache/arrow-rs/pull/4351#discussion_r1214625269


##########
object_store/src/lib.rs:
##########
@@ -359,10 +359,16 @@ pub trait ObjectStore: std::fmt::Display + Send + Sync + 
Debug + 'static {
     /// in the given byte range
     async fn get_range(&self, location: &Path, range: Range<usize>) -> 
Result<Bytes> {
         let options = GetOptions {
-            range: Some(range),
+            range: Some(range.clone()),
             ..Default::default()
         };
-        self.get_opts(location, options).await?.bytes().await
+        match self.get_opts(location, options).await? {

Review Comment:
   I considered 2. but aside from it also being a breaking change, it would 
make it hard to support a use-case where you want to do range requests if 
talking to a remote store to avoid fetching the entire file, but if a local 
filesystem want to get a file as then you can handle it directly.
   
   I also considered 1. and it is where my thinking is headed, but I would 
rather not rush into something on Friday afternoon :laughing: 
   



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