spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sean R. Owen (Jira)" <>
Subject [jira] [Commented] (SPARK-29292) Fix internal usages of mutable collection for Seq in 2.13
Date Sun, 03 May 2020 14:16:00 GMT


Sean R. Owen commented on SPARK-29292:

I think the issue is that if you import scala.collection.Seq, then yes you keep the type,
but unless callers do the same thing, you end up not being able to write simple things in
2.13 like {{val mySeq: Seq[...] = spark.somethingThatReturnsSeq()}} because Spark is returning
a collection.Seq, not an immutable Seq. It's viable, just think it looked like a lot more
change for callers. There was more discussion at

> Fix internal usages of mutable collection for Seq in 2.13
> ---------------------------------------------------------
>                 Key: SPARK-29292
>                 URL:
>             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, 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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message