Lordworms commented on issue #9576:
URL: 
https://github.com/apache/arrow-datafusion/issues/9576#issuecomment-2008336385

   Hey @mustafasrepo, the reason that the first plan added a new Projection is 
that in the Rewriter it would mark the c3+c4 twice so that it judges the 
expressions needed to add an extra Projection layer. However, here I got two 
Problem and wish you could give me an answer. Currently, it seems like I have 
two ways to implement this feature
   1. I can directly go through all the expressions of a single plan and if I 
find a BinaryOp then I just add another Projection upon the current plan with 
sub query (easy solution)
   2. The second one is that we should track a DAG over the expression and if 
it is referenced in another plan, we add an extra projection. (which I have no 
idea how to properly trace them)
   Which one do you think is better?


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