Github user andrewor14 commented on the pull request:
https://github.com/apache/spark/pull/10366#issuecomment-165607657
I was able to verify SI-6654 locally and I think this is the correct fix:
```
scala> val map = Map[String, String]("a" -> "b", "c" -> "d")
map: scala.collection.immutable.Map[String,String] = Map(a -> b, c -> d)
scala> val filteredMap = map.filterKeys(_ != "a")
filteredMap: scala.collection.immutable.Map[String,String] = Map(c -> d)
scala> val identitiedMap = filteredMap.map(identity)
identitiedMap: scala.collection.immutable.Map[String,String] = Map(c -> d)
scala> (new ObjectOutputStream(new ByteArrayOutputStream)).writeObject(map)
scala> (new ObjectOutputStream(new
ByteArrayOutputStream)).writeObject(filteredMap)
java.io.NotSerializableException: scala.collection.immutable.MapLike$$anon$1
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1183)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:347)
... 33 elided
scala> (new ObjectOutputStream(new
ByteArrayOutputStream)).writeObject(identitiedMap)
```
---
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]