Kinrany commented on code in PR #678:
URL:
https://github.com/apache/arrow-rs-object-store/pull/678#discussion_r2983672795
##########
src/parse.rs:
##########
@@ -195,28 +182,29 @@ where
{
let _options = options;
let (scheme, path) = ObjectStoreScheme::parse(url)?;
- let path = Path::parse(path)?;
let store = match scheme {
#[cfg(all(feature = "fs", not(target_arch = "wasm32")))]
ObjectStoreScheme::Local => Box::new(LocalFileSystem::new()) as _,
ObjectStoreScheme::Memory => Box::new(InMemory::new()) as _,
#[cfg(feature = "aws")]
ObjectStoreScheme::AmazonS3 => {
- builder_opts!(crate::aws::AmazonS3Builder, url, _options)
+ crate::aws::AmazonS3Builder::build_from_url_and_options(url,
_options)?
}
#[cfg(feature = "gcp")]
ObjectStoreScheme::GoogleCloudStorage => {
- builder_opts!(crate::gcp::GoogleCloudStorageBuilder, url, _options)
+
crate::gcp::GoogleCloudStorageBuilder::build_from_url_and_options(url,
_options)?
}
#[cfg(feature = "azure")]
ObjectStoreScheme::MicrosoftAzure => {
- builder_opts!(crate::azure::MicrosoftAzureBuilder, url, _options)
+
crate::azure::MicrosoftAzureBuilder::build_from_url_and_options(url, _options)?
}
#[cfg(feature = "http")]
ObjectStoreScheme::Http => {
- let url = &url[..url::Position::BeforePath];
- builder_opts!(crate::http::HttpBuilder, url, _options)
+ let url: Url = url[..url::Position::BeforePath]
+ .parse()
+ .expect("URL with empty path and no query or fragment must
still be a valid URL");
+ crate::http::HttpBuilder::build_from_url_and_options(&url,
_options)?
Review Comment:
Hopefully I'm not crazy and the logic here is valid.
--
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]