srowen commented on a change in pull request #26072: [SPARK-29413][CORE] 
Rewrite ThreadUtils.parmap to avoid TraversableLike, gone in 2.13
URL: https://github.com/apache/spark/pull/26072#discussion_r333234146
 
 

 ##########
 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 in.map
-        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:
   Heh, no, that's the hard part here. If you `./dev/change-scala-version.sh 
2.13` after modifying it to accept that value, and tweak a few more things, and 
use `-Pscala-2.13` you can at least get to the point where there are still tons 
of compile errors including this one. There are a few things we can't fix now 
(i.e. deps that don't support 2.13) and are hard (i.e. things that will require 
multiple source trees). I'm fixing everything short of that that I can.
   
   If you can write anything else in 2.12 that doesn't use TraversableLike, I 
can try it in my hacked up local build.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to