jc4x4 opened a new pull request, #12040:
URL: https://github.com/apache/datafusion/pull/12040

   ## Which issue does this PR close?
   Closes #10485.
   
   ## Rationale for this change
   Refactor to avoid unnecessary copies of LogicalPlan.
   
   ## What changes are included in this PR?
   
   Update struct to use Arc. Verified test passes.
   
   Used Arc::clone as much as I can; and unwrap_arc when a owned LogicalPlan is 
required.
   
   Keep pub fn input unchanged as LogicalPlan to limit change scope. If we 
change the pub fn, we can also get rid of this pattern:
   
   ```
   unnest(unwrap_arc(self.plan), ...).map(Self::from)
   ```
   
   ## Are these changes tested?
   Run unit tests inside builder.rs
   
   ## Are there any user-facing changes?
   No. Pub fn is explicitly not affected.
   


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

To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to