hvanhovell commented on code in PR #42473:
URL: https://github.com/apache/spark/pull/42473#discussion_r1292613320
##########
sql/api/src/main/scala/org/apache/spark/sql/catalyst/encoders/OuterScopes.scala:
##########
@@ -17,17 +17,42 @@
package org.apache.spark.sql.catalyst.encoders
-import java.util.concurrent.ConcurrentMap
+import java.lang.ref._
+import java.util.Objects
+import java.util.concurrent.ConcurrentHashMap
-import com.google.common.collect.MapMaker
-
-import org.apache.spark.sql.errors.QueryExecutionErrors
-import org.apache.spark.util.Utils
+import org.apache.spark.sql.errors.ExecutionErrors
+import org.apache.spark.util.SparkClassUtils
object OuterScopes {
- @transient
- lazy val outerScopes: ConcurrentMap[String, AnyRef] =
- new MapMaker().weakValues().makeMap()
+ private[this] val queue = new ReferenceQueue[AnyRef]
Review Comment:
Machinery to discard the entries for a `ClassLoader` when it is garbage
collected.
--
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]