tustvold opened a new issue, #4627:
URL: https://github.com/apache/arrow-datafusion/issues/4627

   **Is your feature request related to a problem or challenge? Please describe 
what you are trying to do.**
   
   The current interface for `OptimizerRule` takes `&LogicalPlan`, effectively 
forcing rules to clone their input.
   
   **Describe the solution you'd like**
   
   #4208 added a try_optimise method to try to reduce this, but I think it 
would make for a cleaner interface if the method was simply.
   
   ```
   fn apply(
       &self,
       plan: LogicalPlan,
       optimizer_config: &mut OptimizerConfig,
   ) -> Result<LogicalPlan> {
       Ok(self.try_optimize(&plan, optimizer_config)?.unwrap_or(plan))
   }
   ```
   
   **Describe alternatives you've considered**
   A clear and concise description of any alternative solutions or features 
you've considered.
   
   **Additional context**
   
   #4208 
   
   FYI @andygrove @alamb @jackwener 


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