pitrou commented on a change in pull request #11136:
URL: https://github.com/apache/arrow/pull/11136#discussion_r707390053
##########
File path: cpp/src/arrow/filesystem/s3fs.cc
##########
@@ -87,6 +85,7 @@
#include "arrow/util/optional.h"
#include "arrow/util/task_group.h"
#include "arrow/util/thread_pool.h"
+#include "arrow/util/windows_fixup.h"
Review comment:
I don't know if moving this line is deliberate but it _might_ break
Windows builds (or it might no; I honestly have no idea :-)).
##########
File path: cpp/src/arrow/filesystem/s3fs.cc
##########
@@ -1530,6 +1529,23 @@ class S3FileSystem::Impl : public
std::enable_shared_from_this<S3FileSystem::Imp
}
}
+ // Tests to see if a bucket exists
+ Result<bool> BucketExists(const std::string& bucket) {
+ S3Model::HeadBucketRequest req;
+ req.SetBucket(ToAwsString(bucket));
+
+ auto outcome = client_->HeadBucket(req);
+ if (!outcome.IsSuccess()) {
+ if (!IsNotFound(outcome.GetError())) {
+ return ErrorToStatus(
+ std::forward_as_tuple("When testing for bucket existence '",
bucket, "': "),
Review comment:
"for bucket existence 'xxx'" -> "for existence of bucket 'xxx'" perhaps ?
##########
File path: ci/etc/minio-no-create-bucket-policy.json
##########
@@ -0,0 +1,20 @@
+{
Review comment:
Hmm, this file doesn't seem used anywhere. Did you forget to add some
other files?
--
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]