pitrou commented on a change in pull request #11812:
URL: https://github.com/apache/arrow/pull/11812#discussion_r760210518



##########
File path: cpp/src/arrow/filesystem/gcsfs.cc
##########
@@ -324,17 +407,46 @@ Result<std::shared_ptr<io::InputStream>> 
GcsFileSystem::OpenInputStream(
     return Status::IOError("Only files can be opened as input streams");
   }
   ARROW_ASSIGN_OR_RAISE(auto p, GcsPath::FromString(info.path()));
-  return impl_->OpenInputStream(p);
+  return impl_->OpenInputStream(p.bucket, p.object, gcs::Generation(),
+                                gcs::ReadFromOffset());
 }
 
 Result<std::shared_ptr<io::RandomAccessFile>> GcsFileSystem::OpenInputFile(
     const std::string& path) {
-  return Status::NotImplemented("The GCS FileSystem is not fully implemented");
+  ARROW_ASSIGN_OR_RAISE(auto p, GcsPath::FromString(path));
+  auto metadata = impl_->GetObjectMetadata(p);

Review comment:
       >  I would think we want all operations in one io::RandomAccessFile to 
refer to the same generation.
   
   Oh, definitely. I just wonder if there's a way to extract the metadata from 
the first stream creation? Perhaps this is something that the GCS C++ library 
can provide (assuming the information exists at all at the HTTP level)?




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