vsevolodstep-db commented on code in PR #42995:
URL: https://github.com/apache/spark/pull/42995#discussion_r1345541797


##########
common/utils/src/main/scala/org/apache/spark/util/ClosureCleaner.scala:
##########
@@ -678,18 +851,45 @@ private[spark] object IndylambdaScalaClosures extends 
Logging {
     // Depth-first search for inner closures and track the fields that were 
accessed in them.
     // Start from the lambda body's implementation method, follow method 
invocations
     val visited = Set.empty[MethodIdentifier[_]]
-    val stack = Stack[MethodIdentifier[_]](implMethodId)
+    val queue = Queue[MethodIdentifier[_]](implMethodId)

Review Comment:
   Yes, this is intentional. Left a comment.
   To be able to get references to all visited ammonite command objects we need 
to make sure that "parent" (in reference tree)  object is processed before the 
child



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