Github user kanzhang commented on the pull request:

    https://github.com/apache/spark/pull/448#issuecomment-41966458
  
    @marmbrus @mateiz Here's an update on using this.type as return type. See 
following shell output. The result type for setName() method has changed from 
org.apache.spark.rdd.RDD[Record] to rdd.type. Similar things happened for 
SchemaRDD and JavaSchemaRDD (not a subclass). However, object types for rdd, 
srdd, and jsrdd still print the same. Are these changes of concern? The benefit 
is we don't have to reimplement those methods in subclasses. 
    
    Also, any tip on quickly checking Scaladoc and Javadoc impact? Thx.
    
    {code}
    scala> rdd.setName("RDD")
    res0: rdd.type = RDD ParallelCollectionRDD[0] at parallelize at <console>:16
    
    scala> rdd
    res1: org.apache.spark.rdd.RDD[Record] = RDD ParallelCollectionRDD[0] at 
parallelize at <console>:16
    
    scala> srdd.setName("SCHEMA RDD")
    res2: srdd.type = 
    SCHEMA RDD SchemaRDD[2] at RDD at SchemaRDD.scala:98
    == Query Plan ==
    ExistingRdd [key#0,value#1], MappedRDD[1] at map at basicOperators.scala:147
    
    scala> srdd
    res3: org.apache.spark.sql.SchemaRDD = 
    SCHEMA RDD SchemaRDD[2] at RDD at SchemaRDD.scala:98
    == Query Plan ==
    ExistingRdd [key#0,value#1], MappedRDD[1] at map at basicOperators.scala:147
    
    scala> jsrdd.setName("JAVA SCHEMA RDD")
    res4: jsrdd.type = 
    JAVA SCHEMA RDD SchemaRDD[3] at RDD at SchemaRDD.scala:98
    == Query Plan ==
    ExistingRdd [key#0,value#1], MappedRDD[1] at map at basicOperators.scala:147
    
    scala> jsrdd
    res5: org.apache.spark.sql.api.java.JavaSchemaRDD = 
    JAVA SCHEMA RDD SchemaRDD[3] at RDD at SchemaRDD.scala:98
    == Query Plan ==
    ExistingRdd [key#0,value#1], MappedRDD[1] at map at basicOperators.scala:147
    {code}


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

Reply via email to