jayzhan211 commented on issue #9637:
URL: 
https://github.com/apache/arrow-datafusion/issues/9637#issuecomment-2002012945

   I have two idea before deep diving to the code
   1. rewrite to have owned LogicalPlan then we can have owned expression 
easily.
   2. lazy clone on rewrite, the spirit similar to copy on write. The idea from 
simplify() #9304 may help here too
   
   ```rust
   enum SimpliedExpr {
     Simplified(Expr)
     Original
   }
   
   fn simply_expr(&self, expr: &Expr) -> SimpliedExpr
   ```
   if expr is Original, we can avoid clone.


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