You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/10/19 19:38:39 UTC

[GitHub] [arrow] emkornfield commented on a change in pull request #11436: ARROW-14345: [C++] Implement streaming reads

emkornfield commented on a change in pull request #11436:
URL: https://github.com/apache/arrow/pull/11436#discussion_r732186429



##########
File path: cpp/src/arrow/filesystem/gcsfs.cc
##########
@@ -58,9 +61,48 @@ struct GcsPath {
   }
 };
 
-}  // namespace
+class GcsInputStream : public arrow::io::InputStream {
+ public:
+  explicit GcsInputStream(gcs::ObjectReadStream stream) : stream_(std::move(stream)) {}
 
-namespace gcs = google::cloud::storage;
+  ~GcsInputStream() override = default;
+
+  Status Close() override {
+    stream_.Close();

Review comment:
       Just wanted to check if stream_.Close() is idempotent (not sure if this is a requirement but I believe all of the other interface implementations allow it). e.g. [S3](https://github.com/apache/arrow/blob/700ac1e783fad0107e812318c4edadfb5856e45b/cpp/src/arrow/filesystem/s3fs.cc#L926)




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