dwsmith1983 commented on code in PR #5872:
URL: https://github.com/apache/datafusion-comet/pull/5872#discussion_r4081237926


##########
native/core/src/parquet/objectstore/s3.rs:
##########
@@ -239,24 +240,25 @@ fn extract_s3_config_options(
         s3_configs.insert(AmazonS3ConfigKey::Region, region.to_string());
     }
 
-    // Extract and handle path style access (virtual hosted style)
-    let mut virtual_hosted_style_request = false;
-    if let Some(path_style) = get_config_trimmed(configs, bucket, 
"path.style.access") {
-        virtual_hosted_style_request = path_style.to_lowercase() == "true";
-        s3_configs.insert(
-            AmazonS3ConfigKey::VirtualHostedStyleRequest,
-            virtual_hosted_style_request.to_string(),
-        );
-    }
+    // Hadoop defaults fs.s3a.path.style.access to false, which means 
virtual-hosted addressing,
+    // and treats non-boolean text as that default. object_store expects the 
inverse flag.
+    let path_style_access = get_config_trimmed(configs, bucket, 
"path.style.access")
+        .is_some_and(|value| value.eq_ignore_ascii_case("true"));
+    let mut virtual_hosted_style_request = !path_style_access;

Review Comment:
   > Please retain path-style addressing for dotted HTTPS buckets, including 
when no custom endpoint is configured, and add assertions on the resulting 
request URL.
   
   In 0c76e6c1a. A bucket name containing a dot is addressed path-style 
whenever the endpoint is HTTPS, the default AWS endpoint included, and stays 
virtual-hosted over HTTP as the SDK does. The tests assert the endpoint and 
flag pair for the default endpoint, an explicit HTTPS endpoint, an HTTP 
endpoint and a plain bucket.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to