Github user marmbrus commented on a diff in the pull request:
https://github.com/apache/spark/pull/2114#discussion_r16733513
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/trees/TreeNode.scala
---
@@ -38,7 +38,7 @@ abstract class TreeNode[BaseType <: TreeNode[BaseType]] {
* Unlike `equals`, `id` can be used to differentiate distinct but
structurally
* identical branches of a tree.
*/
- val id = TreeNode.nextId()
+ @transient lazy val id = TreeNode.nextId()
--- End diff --
I would consider generating new TreeNodes in the critical path a bug, and
any places where we do that should be removed (as you have done in other PRs).
As far as I know, we only use this `id` in a few places and all of these
could be replaced with `eq`. I just try removing it and see what breaks.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]