viirya commented on PR #56928:
URL: https://github.com/apache/spark/pull/56928#issuecomment-4909124816

   Implemented, with one twist worth noting. Marking a per-node copy didn't 
survive: a copy that differs only in tags is structurally equal to the 
original, so `withNewChildren`'s `fastEquals` short-circuit discards the tagged 
copy and keeps the original untagged node. Instead the rule now clones the 
whole plan and tags the clone in place, which achieves the same goal — the rule 
never mutates a node it was handed — without fighting the tree-rebuilding APIs. 
The clone only happens for plans that will actually be marked, which are small 
by construction. Also added a regression test asserting the input plan's nodes 
stay untagged after the rule runs.


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