raulcd opened a new issue, #50204:
URL: https://github.com/apache/arrow/issues/50204

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   The following new ad-hoc test:
   ```
   TEST_F(S3OptionsTest, MakeUri) {
     S3Options options;
     options.ConfigureAccessKey("minio", "miniopass");
     options.region = "us-east-1";
     ASSERT_OK_AND_ASSIGN(auto fs, S3FileSystem::Make(options));
     ASSERT_OK_AND_ASSIGN(auto uri, 
fs->MakeUri("/bucket/somedir/subdir/subfile"));
     EXPECT_EQ(uri,
               "s3://minio:miniopass@bucket/somedir/subdir/subfile"
               "?region=us-east-1&scheme=https&endpoint_override="
               "&allow_bucket_creation=0&allow_bucket_deletion=0");
   }
   ```
   fails on Windows MinGW because the bucket is dropped from the URL. I tested 
it in isolation on this PR:
   - https://github.com/raulcd/arrow/pull/98
   
   And the failure
   ```
    [ RUN      ] S3OptionsTest.MakeUri
   D:/a/arrow/arrow/cpp/src/arrow/filesystem/s3fs_test.cc:1747: Failure
   Expected equality of these values:
     uri
       Which is: 
"***somedir/subdir/subfile?region=us-east-1&scheme=https&endpoint_override=&allow_bucket_creation=0&allow_bucket_deletion=0"
     "***bucket/somedir/subdir/subfile" 
"?region=us-east-1&scheme=https&endpoint_override=" 
"&allow_bucket_creation=0&allow_bucket_deletion=0"
       Which is: 
"***bucket/somedir/subdir/subfile?region=us-east-1&scheme=https&endpoint_override=&allow_bucket_creation=0&allow_bucket_deletion=0"
   
   [  FAILED  ] S3OptionsTest.MakeUri (0 ms)
   ```
   
   This is because the manual path parsing doesn't take Windows paths into 
account:
   
https://github.com/apache/arrow/blob/546d42c71a467c3741df2d6ececad966fc66bf4c/cpp/src/arrow/filesystem/s3fs.cc#L3051-L3061
   
   I found out when testing our `arrow-s3fs-module-test` on all platforms not 
only on Linux where we have a similar test. This is a pre-existing bug.
   Seems to be related to `util::UriFromAbsolutePath` but haven't been able to 
pin down the problem due to difficulty testing MinGW.
   
   ### Component(s)
   
   C++


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