Github user liancheng commented on a diff in the pull request: https://github.com/apache/spark/pull/11410#discussion_r54334598 --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/encoders/OuterScopes.scala --- @@ -39,4 +41,31 @@ object OuterScopes { def addOuterScope(outer: AnyRef): Unit = { outerScopes.putIfAbsent(outer.getClass.getName, outer) } + + def getOuterScope(innerCls: Class[_]): AnyRef = { + assert(innerCls.isMemberClass) + val outerCls = innerCls.getDeclaringClass.getName + val outer = outerScopes.get(outerCls) + if (outer == null) { + outerCls match { + case REPLClass(line) => + val cls1 = Utils.classForName(line + "$read$") --- End diff -- Let's add a comment here to explain the REPL use case.
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org