You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Guillaume Martres (Jira)" <ji...@apache.org> on 2020/04/30 18:48:00 UTC

[jira] [Comment Edited] (SPARK-29292) Fix internal usages of mutable collection for Seq in 2.13

    [ https://issues.apache.org/jira/browse/SPARK-29292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17096876#comment-17096876 ] 

Guillaume Martres edited comment on SPARK-29292 at 4/30/20, 6:47 PM:
---------------------------------------------------------------------

Thanks [~srowen], I got spark to compile with Scala 2.13.2 based on this branch, cf https://issues.apache.org/jira/browse/SPARK-25075?focusedCommentId=17096870&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-17096870. But I think that the use of .toSeq should be reconsidered since it means copying on Scala 2.13 for mutable collections. Instead, I think that usages of scala.Seq should be replaced by scala.collection.Seq when it makes sense to do so.


was (Author: smarter):
Thanks [~srowen], I got spark to compile with Scala 2.13.2 based on this branch, cf https://issues.apache.org/jira/browse/SPARK-25075?focusedCommentId=17096870&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-17096870. But I think that the use of .toSeq should be reconsidered since it means copying on Scala 2.13. Instead, I think that usages of scala.Seq should be replaced by scala.collection.Seq when it makes sense to do so.

> Fix internal usages of mutable collection for Seq in 2.13
> ---------------------------------------------------------
>
>                 Key: SPARK-29292
>                 URL: https://issues.apache.org/jira/browse/SPARK-29292
>             Project: Spark
>          Issue Type: Sub-task
>          Components: Spark Core
>    Affects Versions: 3.0.0
>            Reporter: Sean R. Owen
>            Assignee: Sean R. Owen
>            Priority: Minor
>
> Kind of related to https://issues.apache.org/jira/browse/SPARK-27681, but a simpler subset. 
> In 2.13, a mutable collection can't be returned as a {{scala.collection.Seq}}. It's easy enough to call .toSeq on these as that still works on 2.12.
> {code}
> [ERROR] [Error] /Users/seanowen/Documents/spark_2.13/core/src/main/scala/org/apache/spark/ExecutorAllocationManager.scala:467: type mismatch;
>  found   : Seq[String] (in scala.collection) 
>  required: Seq[String] (in scala.collection.immutable) 
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org