Github user JoshRosen commented on a diff in the pull request:
https://github.com/apache/spark/pull/18645#discussion_r128892346
--- Diff: sql/core/src/test/scala/org/apache/spark/sql/DatasetSuite.scala
---
@@ -353,7 +353,7 @@ class DatasetSuite extends QueryTest with
SharedSQLContext {
test("foreachPartition") {
val ds = Seq(("a", 1), ("b", 2), ("c", 3)).toDS()
val acc = sparkContext.longAccumulator
- ds.foreachPartition(_.foreach(v => acc.add(v._2)))
+ ds.foreachPartition((it: Iterator[(String, Int)]) => it.foreach(v =>
acc.add(v._2)))
--- End diff --
I think this is primarily going to be an issue for end users who want to
use an existing source tree to cross-compile for Scala 2.10, 2.11, and 2.12.
Thus the pain of the source incompatibility would mostly be felt by
library/package maintainers but it can be worked around as long as there's at
least some common subset which is source compatible across all of those
versions.
A similar ambiguity issue exists for people writing Spark code in Java 8
and who use lambda syntax. The number of such users must also upgrade to Scala
2.12 is probably fairly small and the number of those users who have a
requirement to cross-build their Java 8 lambda syntax Spark code against 2.11
and 2.12 is probably even smaller, so maybe this isn't a huge deal to accept
the ambiguity and require those users to do a bit of work when upgrading.
---
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]