Github user ScrapCodes commented on a diff in the pull request:
https://github.com/apache/spark/pull/9825#discussion_r45331355
--- Diff:
repl/scala-2.10/src/main/scala/org/apache/spark/repl/SparkIMain.scala ---
@@ -1221,10 +1221,16 @@ import org.apache.spark.annotation.DeveloperApi
)
}
- val preamble = """
- |class %s extends Serializable {
- | %s%s%s
- """.stripMargin.format(lineRep.readName, envLines.map(" " + _ +
";\n").mkString, importsPreamble, indentCode(toCompute))
+ val preamble = s"""
+ |class ${lineRep.readName} extends Serializable {
+ | ${envLines.map(" " + _ + ";\n").mkString}
+ | $importsPreamble
+ |
+ | // If we need to construct any objects defined in the REPL on
an executor we will need
+ | // to pass the outer scope to the appropriate encoder.
+ |
org.apache.spark.sql.catalyst.encoders.OuterScopes.addOuterScope(this)
--- End diff --
@marmbrus Can you explain more about this change. This change will be
difficult to port to 2.11, I can take a stab.
I just wanted to understand if there is an alternate way to solve this ?
---
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]