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/05/14 19:42:26 UTC

[GitHub] [arrow] paddyhoran commented on a change in pull request #7167: ARROW-8784: [Rust] [DataFusion] Remove use of Arc from LogicalPlan

paddyhoran commented on a change in pull request #7167:
URL: https://github.com/apache/arrow/pull/7167#discussion_r425386283



##########
File path: rust/datafusion/src/execution/context.rs
##########
@@ -233,11 +233,12 @@ impl ExecutionContext {
     pub fn table(&mut self, table_name: &str) -> Result<Arc<dyn Table>> {
         match self.datasources.get(table_name) {
             Some(provider) => {
+                let schema = provider.schema().as_ref().clone();
                 let table_scan = LogicalPlan::TableScan {
                     schema_name: "".to_string(),
                     table_name: table_name.to_string(),
-                    table_schema: provider.schema().clone(),
-                    projected_schema: provider.schema().clone(),
+                    table_schema: Box::new(schema.to_owned()),
+                    projected_schema: Box::new(schema.to_owned()),

Review comment:
       Is the second `to_owned` needed here?




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