Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/19561#discussion_r146342617
--- Diff: core/src/main/scala/org/apache/spark/FutureAction.scala ---
@@ -113,6 +117,42 @@ trait FutureAction[T] extends Future[T] {
}
+/**
+ * Scala 2.12 defines the two new transform/transformWith methods
mentioned above. Impementing
+ * these for 2.12 in the Spark class here requires delegating to these
same methods in an
+ * underlying Future object. But that only exists in 2.12. But these
methods are only called
+ * in 2.12. So define helper shims to access these methods on a Future by
reflection.
+ */
+private[spark] object FutureAction {
+
+ private val transformTryMethod =
--- End diff --
Having to access this by reflection is a little annoying but keeping 2.11 +
2.12 compatibility in one source file is nice, and doesn't entail much of any
runtime overhead
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]