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

[GitHub] [arrow-rs] tustvold commented on a diff in pull request #4351: Fix ObjectStore::get_range for GetResult::File (#4350)

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: github-unsubscribe@arrow.apache.org

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