abreis commented on a change in pull request #9487:
URL: https://github.com/apache/arrow/pull/9487#discussion_r575685201
##########
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:
Perhaps this could be a good time to also make this method return an
`Option<Arc<..>>` so users can tell when they register a table over an existing
table (consistent with `deregister_table`).
----------------------------------------------------------------
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]