n-young-db commented on code in PR #46285: URL: https://github.com/apache/spark/pull/46285#discussion_r1583618515
########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/trees/TreeNode.scala: ########## @@ -151,7 +159,7 @@ abstract class TreeNode[BaseType <: TreeNode[BaseType]] // SPARK-32753: it only makes sense to copy tags to a new node // but it's too expensive to detect other cases likes node removal // so we make a compromise here to copy tags to node with no tags - if (tags.isEmpty) { + if ((_tags eq null) || _tags.isEmpty) { tags ++= other.tags } Review Comment: Good call; i abstracted this emptiness check out. -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org