You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/08/16 14:04:15 UTC

[GitHub] [arrow] andygrove commented on a change in pull request #7972: ARROW-9742: [Rust] [DataFusion] Improved DataFrame trait (formerly known as the Table trait)

andygrove commented on a change in pull request #7972:
URL: https://github.com/apache/arrow/pull/7972#discussion_r471116942



##########
File path: rust/datafusion/src/execution/context.rs
##########
@@ -89,12 +91,18 @@ impl ExecutionConfig {
 }
 
 /// Execution context for registering data sources and executing queries
-pub struct ExecutionContext {
-    datasources: HashMap<String, Box<dyn TableProvider + Send + Sync>>,
-    scalar_functions: HashMap<String, Box<ScalarFunction>>,
+#[derive(Clone)]
+pub struct ExecutionContextState {
+    datasources: Rc<RefCell<HashMap<String, Box<dyn TableProvider + Send + Sync>>>>,

Review comment:
       So we do need interior mutability here. Users can register new data sources. I can convert to `Arc<Mutex<_>>` instead though.




----------------------------------------------------------------
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:
users@infra.apache.org