Github user viirya commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18416#discussion_r125903295
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/ScalaReflection.scala 
---
    @@ -325,8 +328,10 @@ object ScalaReflection extends ScalaReflection {
             }
     
             val companion = 
t.normalize.typeSymbol.companionSymbol.typeSignature
    -        val cls = companion.declaration(newTermName("newBuilder")) match {
    -          case NoSymbol => classOf[Seq[_]]
    +        val cls = companion.member(newTermName("newBuilder")) match {
    --- End diff --
    
    It works.
    
        To adjust logging level use sc.setLogLevel(newLevel). For SparkR, use 
setLogLevel(newLevel).
        Welcome to
              ____              __
             / __/__  ___ _____/ /__
            _\ \/ _ \/ _ `/ __/  '_/
           /___/ .__/\_,_/_/ /_/\_\   version 2.3.0-SNAPSHOT
              /_/
    
        Using Scala version 2.10.6 (Java HotSpot(TM) 64-Bit Server VM, Java 
1.8.0_102)
        Type in expressions to have them evaluated.
        Type :help for more information.
        ...
    
        scala> val t = 
ScalaReflection.localTypeOf[scala.collection.mutable.HashSet[Int]]
        t: org.apache.spark.sql.catalyst.ScalaReflection.universe.Type = 
scala.collection.mutable.HashSet[Int]
    
        scala> val companion = 
t.normalize.typeSymbol.companionSymbol.typeSignature
        companion: org.apache.spark.sql.catalyst.ScalaReflection.universe.Type 
= scala.collection.mutable.HashSet.type
    
        scala> val cls = companion.member(newTermName("newBuilder"))
        cls: org.apache.spark.sql.catalyst.ScalaReflection.universe.Symbol = 
method newBuilder
    



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