crepererum commented on code in PR #669:
URL: 
https://github.com/apache/arrow-rs-object-store/pull/669#discussion_r2964912072


##########
src/aws/builder.rs:
##########
@@ -1264,6 +1262,37 @@ fn parse_bucket_az(bucket: &str) -> Option<&str> {
     Some(bucket.strip_suffix("--x-s3")?.rsplit_once("--")?.1)
 }
 
+#[derive(Debug, Default, Clone, Copy, PartialEq, Eq, Hash)]

Review Comment:
   ```suggestion
   /// Captures `AWS_REQUEST_PAYER`.
   ///
   /// Parses either as `"requester"` (case-insensitive) meaning `true`, or as 
a [`bool`] (i.e. `"true"`, `"1"`, `"no"`, etc.).
   #[derive(Debug, Default, Clone, Copy, PartialEq, Eq, Hash)]
   ```
   
   Feel free to rephrase, but I think leaving some documentation might be nice.



##########
src/aws/builder.rs:
##########
@@ -1780,6 +1809,54 @@ mod tests {
             err,
             "Generic Config error: \"md5\" is not a valid checksum algorithm"
         );
+
+        let err = AmazonS3Builder::new()
+            .with_config(AmazonS3ConfigKey::RequestPayer, "requestr")
+            .with_bucket_name("bucket")
+            .with_region("region")
+            .build()
+            .unwrap_err()
+            .to_string();
+
+        assert_eq!(
+            err,
+            "Generic Config error: failed to parse \"requestr\" as boolean"
+        );
+    }
+
+    #[test]
+    fn test_request_payer_config() {
+        let s3 = AmazonS3Builder::new()

Review Comment:
   Can I get a case-insensitive test case too, e.g. `Requester` or `REQUESTER`?



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