tustvold commented on code in PR #4077:
URL: https://github.com/apache/arrow-rs/pull/4077#discussion_r1167480241


##########
object_store/src/options.rs:
##########
@@ -0,0 +1,129 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+use std::collections::HashMap;
+pub use std::str::FromStr;
+
+#[cfg(any(feature = "gcp", feature = "aws", feature = "azure", feature = 
"http"))]
+use crate::client::ClientOptions;
+
+#[cfg(any(feature = "aws"))]
+use crate::aws::AmazonS3ConfigKey;
+#[cfg(feature = "azure")]
+use crate::azure::AzureConfigKey;
+#[cfg(feature = "gcp")]
+use crate::gcp::GoogleConfigKey;
+
+/// Options used for configuring backend store
+#[derive(Clone, Debug, Default)]
+pub struct StoreOptions {
+    /// Store specific options like key, secret, region etc.
+    pub store_options: HashMap<String, String>,
+
+    /// Options specific for the internal client
+    #[cfg(any(feature = "gcp", feature = "aws", feature = "azure", feature = 
"http"))]
+    pub client_options: ClientOptions,

Review Comment:
   ```suggestion
       client_options: ClientOptions,
   ```



##########
object_store/src/lib.rs:
##########
@@ -717,6 +727,113 @@ impl From<Error> for std::io::Error {
     }
 }
 
+/// Creates object store from provided url and options
+///
+/// The scheme of the provided url is used to instantiate the store. If the url
+/// scheme is cannot be mapped to a store, [`NotImplemented`] is raised. For 
invalid
+/// input, e.g. url with no scheme the default behaviour is to return
+/// [`local::LocalFileSystem`].
+///
+/// # Examples
+///
+/// ```
+///

Review Comment:
   Brilliant example :smile: 



##########
object_store/src/options.rs:
##########
@@ -0,0 +1,129 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+use std::collections::HashMap;
+pub use std::str::FromStr;
+
+#[cfg(any(feature = "gcp", feature = "aws", feature = "azure", feature = 
"http"))]
+use crate::client::ClientOptions;
+
+#[cfg(any(feature = "aws"))]
+use crate::aws::AmazonS3ConfigKey;
+#[cfg(feature = "azure")]
+use crate::azure::AzureConfigKey;
+#[cfg(feature = "gcp")]
+use crate::gcp::GoogleConfigKey;
+
+/// Options used for configuring backend store
+#[derive(Clone, Debug, Default)]
+pub struct StoreOptions {
+    /// Store specific options like key, secret, region etc.
+    pub store_options: HashMap<String, String>,

Review Comment:
   ```suggestion
       store_options: HashMap<String, String>,
   ```
   
   In case we want to extend this further later



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