yahoNanJing commented on PR #8835:
URL: 
https://github.com/apache/arrow-datafusion/pull/8835#issuecomment-1892570956

   > It does seem useful to know if a rule transformed the plan or not without 
having to perform an expensive plan comparison.
   
   The enum `Transformed` is mainly for the rewriting interface, which will be 
frequently used in the plan optimization. Suppose in the future we will 
introduce an optimization rule mixed with multiple conditions. For example, 
   `
   if rule A is applied, then return new plan; 
   else if rule B is applied, then return new plan;
   else return original plan
   `
   
   If we removed the enum, it will bring a few cost to achieve this. 
   
   Currently, the optimization rules in the Datafusion are actually not plenty. 
And this trait of **TreeNode** is quite fundamental and we need to consider 
more about the future extension. Therefore, I'm with a conservative point of 
view to remove this enum. 


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