jackwener commented on issue #2620:
URL: 
https://github.com/apache/arrow-datafusion/issues/2620#issuecomment-1165281099

   Currently, `datafusion` optimize the plan many times. Because the all rules 
will traverse the whole plan tree one time.
   Times is O(n). (n is number of rules).
   
   I think it's not good choice. But now `explain verbose` print the changes 
after apply one rule. This ability depends on apply rule one by one.
   
   I think the better and usual practice is traverse plan instead of traverse 
rules.
   
   ```
   Now:
   rules.foreach(
        plan.apply(rule)
   )
   
   After
   DFS(plannode) {
        plannode.appy(rules).
   }
   
   ```


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