srowen commented on a change in pull request #26072: [SPARK-29413][CORE] 
Rewrite ThreadUtils.parmap to avoid TraversableLike, gone in 2.13

 File path: core/src/main/scala/org/apache/spark/util/ThreadUtils.scala
 @@ -275,13 +274,7 @@ private[spark] object ThreadUtils {
    * @return new collection in which each element was given from the input 
collection `in` by
    *         applying the lambda function `f`.
-  def parmap[I, O, Col[X] <: TraversableLike[X, Col[X]]]
-      (in: Col[I], prefix: String, maxThreads: Int)
-      (f: I => O)
-      (implicit
-        cbf: CanBuildFrom[Col[I], Future[O], Col[Future[O]]], // For
-        cbf2: CanBuildFrom[Col[Future[O]], O, Col[O]] // for Future.sequence
-      ): Col[O] = {
+  def parmap[I, O](in: Seq[I], prefix: String, maxThreads: Int)(f: I => O): 
Seq[O] = {
 Review comment:
   Sure, but, do I necessarily have to get a List from a List? Seq -> Seq seems 
fine for all current usages.
   That said, if there's any other way to write this that works in 2.12 and 
2.13, definitely, open to that.

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

With regards,
Apache Git Services

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

Reply via email to