alamb opened a new pull request, #9948:
URL: https://github.com/apache/arrow-datafusion/pull/9948

   
   
   
   ## Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and 
enhancements and this helps us generate change logs for our releases. You can 
link an issue to this PR using the GitHub syntax. For example `Closes #123` 
indicates that this PR will close issue #123.
   -->
   
   Closes #.
   
   ## Rationale for this change
   
   The current structure of the optimizer copies Logical plans a large number 
of times
   
   We now have a TreeNode API (TODO link)  that does mostly the same thing and 
we are in the process of optimizing it to avoid copies (see 
https://github.com/apache/arrow-datafusion/pull/9780)
   
   Thus it makes sense to rewrite the optimizer to use the TreeNode API to both 
be simpler as well as take advantage of the performance improvements we are 
adding.
   
   
   ## What changes are included in this PR?
   
   1. Rewrite Optimizer to use TreeNode API
   2. Change the Optimizer::optimize api to take an owned LogicalPlan rather 
than force a copy
   
   ## Are these changes tested?
   
   <!--
   We typically require tests for all PRs in order to:
   1. Prevent the code from being accidentally broken by subsequent changes
   2. Serve as another way to document the expected behavior of the code
   
   If tests are not included in your PR, please explain why (for example, are 
they covered by existing tests)?
   -->
   
   ## Are there any user-facing changes?
   `Optimizer::optimize` now takes an owned `LogicalPlan` rather a reference 
(which forces a copy) 
   
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to