AlenkaF commented on code in PR #47350:
URL: https://github.com/apache/arrow/pull/47350#discussion_r2660729776


##########
cpp/src/arrow/filesystem/s3fs.cc:
##########
@@ -179,29 +179,94 @@ bool S3ProxyOptions::Equals(const S3ProxyOptions& other) 
const {
           username == other.username && password == other.password);
 }
 
+// -----------------------------------------------------------------------
+// Custom comparison for AWS retry strategies
+// To add a new strategy, add it to the AwsRetryStrategyVariant and
+// add a new specialization to the AwsRetryStrategyEquality struct
+using AwsRetryStrategyVariant =
+    std::variant<std::shared_ptr<Aws::Client::DefaultRetryStrategy>,
+                 std::shared_ptr<Aws::Client::StandardRetryStrategy>>;
+
+struct AwsRetryStrategyEquality {
+  bool operator()(const std::shared_ptr<Aws::Client::DefaultRetryStrategy>& 
lhs,
+                  const std::shared_ptr<Aws::Client::DefaultRetryStrategy>& 
rhs) const {
+    if (!lhs && !rhs) return true;
+    if (!lhs || !rhs) return false;
+
+    return lhs->GetMaxAttempts() == rhs->GetMaxAttempts();
+  }
+
+  bool operator()(const std::shared_ptr<Aws::Client::StandardRetryStrategy>& 
lhs,
+                  const std::shared_ptr<Aws::Client::StandardRetryStrategy>& 
rhs) const {
+    if (!lhs && !rhs) return true;
+    if (!lhs || !rhs) return false;
+
+    return lhs->GetMaxAttempts() == rhs->GetMaxAttempts();
+  }

Review Comment:
   From a quick look this seems a duplicate of above?



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