waynr opened a new pull request, #7160: URL: https://github.com/apache/arrow-rs/pull/7160
# Which issue does this PR close? Closes https://github.com/apache/arrow-rs/issues/7155 <!-- We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123. --> # Rationale for this change This is laid out in the associated issue. <!-- Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed. Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes. --> # What changes are included in this PR? <!-- There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR. --> * Introduces a new type, `object_store::Extensions` * Uses a `HashMap<TypeId, Arc<dyn Any + Send + Sync + 'static>>` * This is modeled after (ie copied from) and meant to be compatible with the [extension mechanism in datafusion::execution::config::SessionConfig](https://github.com/apache/datafusion/blob/main/datafusion/execution/src/config.rs#L466-L591) * It's probably worth considering using the same [double hash avoidance optimization](https://github.com/apache/datafusion/blob/2f40f6c2ef352904d6661653ffe18ba4c3144b92/datafusion/execution/src/config.rs#L595-L596) used there, but for simplicity I've left it out of this PR while it's in draft form -- I just wanted to end up with something I could test out and get early feedback on. * This is a public type for now because I am not sure what the preference of maintainers will be and it's simpler in my mind for now to make use of this at the datafusion level (draft PR for that coming shortly after this) if we can construct an `Extensions` instance once rather than on every `ObjectStore` method call where one is needed. * Adds a new `extensions: Extensions` field to `GetOptions` * Could easily be implemented for `PutOptions` as well, but I'm personally less interested in that so I'm leaving it out for now. # Are there any user-facing changes? Yes, the new field in `GetOptions` and a new publicly-exposed type, `object_store::Extensions`. <!-- If there are user-facing changes then we may require documentation to be updated before approving the PR. --> <!--- If there are any breaking changes to public APIs, please call them out. --> -- 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]
