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



##########
File path: cpp/src/arrow/filesystem/s3fs.cc
##########
@@ -684,6 +685,85 @@ Result<S3Model::GetObjectResult> 
GetObjectRange(Aws::S3::S3Client* client,
   return OutcomeToResult(client->GetObject(req));
 }
 
+template <typename ObjectResult>
+std::shared_ptr<const KeyValueMetadata> GetObjectMetadata(const ObjectResult& 
result) {
+  std::vector<std::string> keys, values;
+
+  auto push = [&](std::string k, const Aws::String& v) {
+    if (!v.empty()) {
+      keys.push_back(std::move(k));
+      values.push_back(FromAwsString(v).to_string());
+    }
+  };
+  auto push_datetime = [&](std::string k, const Aws::Utils::DateTime& v) {
+    if (v != Aws::Utils::DateTime(0.0)) {

Review comment:
       Well, this is the value returned by the AWS SDK when the information is 
unavailable, AFAIK.




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

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


Reply via email to