ahshahid commented on PR #37824:
URL: https://github.com/apache/spark/pull/37824#issuecomment-1244140015

   > > @peter-toth , @cloud-fan @attilapiros ..It just occured to me that even 
the precanonicalize variable( and hence going through children in it) is not 
needed.
   > 
   > I'm not sure that `preCanonicalized` is being a lazy val is bad as if you 
already have it calulated for an expression `e` and you just add a new root 
expression `r` on the top of `e`, you can reuse `e.preCanonicalized` to 
canonicalize `r` (if `r` is not a commutative operator).
   
   I thought about it, the thing is in any case precanonicalize has to undergo 
tree traversal at time of canonicalization, so there should hardly be any 
difference. More over I think currently precanonicalized is being called 
unnecessarily from many places.


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to