alamb commented on a change in pull request #9448:
URL: https://github.com/apache/arrow/pull/9448#discussion_r573289996



##########
File path: rust/datafusion/src/datasource/memory.rs
##########
@@ -107,7 +107,7 @@ impl MemTable {
 
     /// Create a mem table by reading from another data source
     pub async fn load(
-        t: &dyn TableProvider,
+        t: Box<dyn TableProvider + Send + Sync>,

Review comment:
       ```suggestion
           t: Arc<dyn TableProvider + Send + Sync>,
   ```
   I suggest using `Arc` to follow the convention in ExecutionContext:
   
https://github.com/apache/arrow/blob/master/rust/datafusion/src/execution/context.rs#L565
   
   I don't think there is any reason `load` needs exclusive ownership over the 
`TableProvider`




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


Reply via email to