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

Sean R. Owen commented on SPARK-27681:
--------------------------------------

I looked at this one more time today after clearing out some earlier 2.13 
related issues.

I'm pretty sure this is what we should do, all in all, which is much more in 
line with [~vanzin]'s take:

- Generally, don't change all the Spark {{Seq}} usages in methods and return 
values. Just too much change.
- Definitely fix all the compile errors within Spark that result in 2.13, by 
adding {{.toSeq}} or {{.toMap}} where applicable to get immutable versions from 
mutable Seqs, and Maps from MapViews (similar but different change in 2.13). 
This is what SPARK-29292 covers.
- ... and that may be it. Maybe we find a few corner cases where a public API 
method really does need to fix its Seq type to make sense, but I hadn't found 
it yet after fixing most of core

> Use scala.collection.Seq explicitly instead of scala.Seq alias
> --------------------------------------------------------------
>
>                 Key: SPARK-27681
>                 URL: https://issues.apache.org/jira/browse/SPARK-27681
>             Project: Spark
>          Issue Type: Sub-task
>          Components: ML, MLlib, Spark Core, SQL, Structured Streaming
>    Affects Versions: 3.0.0
>            Reporter: Sean R. Owen
>            Assignee: Sean R. Owen
>            Priority: Major
>
> {{scala.Seq}} is widely used in the code, and is an alias for 
> {{scala.collection.Seq}} in Scala 2.12. It will become an alias for 
> {{scala.collection.immutable.Seq}} in Scala 2.13. In many cases, this will be 
> fine, as Spark users using Scala 2.13 will also have this changed alias. In 
> some cases it may be undesirable, as it will cause some code to compile in 
> 2.12 but not in 2.13. In some cases, making the type {{scala.collection.Seq}} 
> explicit so that it doesn't vary can help avoid this, so that Spark apps 
> might cross-compile for 2.12 and 2.13 with the same source.



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

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

Reply via email to