alamb commented on a change in pull request #9487:
URL: https://github.com/apache/arrow/pull/9487#discussion_r575678117
##########
File path: rust/datafusion/src/execution/context.rs
##########
@@ -278,25 +278,23 @@ impl ExecutionContext {
pub fn register_table(
&mut self,
name: &str,
- provider: Box<dyn TableProvider + Send + Sync>,
+ provider: Arc<dyn TableProvider + Send + Sync>,
) {
self.state
.lock()
.unwrap()
.datasources
- .insert(name.to_string(), provider.into());
Review comment:
The `Box` passed into to `register_table` was already immediately
wrapped in an `Arc` -- this PR allows the user of this API to keep a reference
to the provider themselves.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]