[
https://issues.apache.org/jira/browse/SPARK-3200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14111956#comment-14111956
]
Apache Spark commented on SPARK-3200:
-------------------------------------
User 'ScrapCodes' has created a pull request for this issue:
https://github.com/apache/spark/pull/2158
> Class defined with reference to external variables crashes in REPL.
> -------------------------------------------------------------------
>
> Key: SPARK-3200
> URL: https://issues.apache.org/jira/browse/SPARK-3200
> Project: Spark
> Issue Type: Bug
> Affects Versions: 1.1.0
> Reporter: Prashant Sharma
> Assignee: Prashant Sharma
>
> Reproducer:
> {noformat}
> val a = sc.textFile("README.md").count
> case class A(i: Int) { val j = a}
> sc.parallelize(1 to 10).map(A(_)).collect()
> {noformat}
> This will happen, when one refers something that refers sc and not otherwise.
> There are many ways to work around this, like directly assign a constant
> value instead of referring the variable.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]