Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16541#discussion_r108330326
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/ScalaReflection.scala 
---
    @@ -307,54 +307,11 @@ object ScalaReflection extends ScalaReflection {
               }
             }
     
    -        val array = Invoke(
    -          MapObjects(mapFunction, getPath, dataType),
    -          "array",
    -          ObjectType(classOf[Array[Any]]))
    -
    -        val wrappedArray = StaticInvoke(
    -          scala.collection.mutable.WrappedArray.getClass,
    -          ObjectType(classOf[Seq[_]]),
    -          "make",
    -          array :: Nil)
    -
    -        if (localTypeOf[scala.collection.mutable.WrappedArray[_]] <:< 
t.erasure) {
    -          wrappedArray
    -        } else {
    -          // Convert to another type using `to`
    -          val cls = mirror.runtimeClass(t.typeSymbol.asClass)
    -          import scala.collection.generic.CanBuildFrom
    -          import scala.reflect.ClassTag
    -
    -          // Some canBuildFrom methods take an implicit ClassTag parameter
    -          val cbfParams = try {
    -            cls.getDeclaredMethod("canBuildFrom", classOf[ClassTag[_]])
    -            StaticInvoke(
    -              ClassTag.getClass,
    -              ObjectType(classOf[ClassTag[_]]),
    -              "apply",
    -              StaticInvoke(
    -                cls,
    -                ObjectType(classOf[Class[_]]),
    -                "getClass"
    -              ) :: Nil
    -            ) :: Nil
    -          } catch {
    -            case _: NoSuchMethodException => Nil
    -          }
    -
    -          Invoke(
    -            wrappedArray,
    -            "to",
    -            ObjectType(cls),
    -            StaticInvoke(
    -              cls,
    -              ObjectType(classOf[CanBuildFrom[_, _, _]]),
    -              "canBuildFrom",
    -              cbfParams
    -            ) :: Nil
    -          )
    +        val cls = t.dealias.companion.decl(TermName("newBuilder")) match {
    --- End diff --
    
    `dealias` is not available in scala 2.10, @michalsenkyr can you come up 
with a workaround? thanks!


---
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]

Reply via email to