crepererum commented on PR #3429: URL: https://github.com/apache/arrow-rs/pull/3429#issuecomment-1369653402
I share @tustvold's concerns here. From an API perspective, I think "builders" should never be cloned or serialized. They are a convenience interface to avoid having large unchecked structs or constructor functions with too many arguments. However I think there is a good case for creating object store instances from key-value-like configs. This makes deployments and user interactions (e.g. in `polars` where you may come from Python) way easier and I've seen this being implemented in other, similar libraries before. My recommendation would be do add something like `fn from_kv(cfg: &HashMap<String, String>) -> Self` for each builder and a general top-level `fn from_type_and_kv(store_type: &str, cfg: HashMap<String, String>) -> Arc<dyn ObjectStore>` that can even dyn-construct instances just based on config. The API user may get the key-value pairs from wherever they want. I would not use the Unix env variables here since different top-level apps may want to prefix/name these in diff erent ways. -- 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]
