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

    https://github.com/apache/spark/pull/448#discussion_r12022387
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/SchemaRDD.scala ---
    @@ -313,4 +315,82 @@ class SchemaRDD(
           }
         }
       }
    +
    +  /**
    +   * Creates SchemaRDD by applying own schema to derived RDD. Typically 
used to wrap return value
    +   * of base RDD functions that do not change schema.
    +   *
    +   * @param rdd RDD derived from this one and has same schema
    +   *
    +   * @group schema
    +   */
    +  private def applySchema(rdd: RDD[Row]): SchemaRDD = {
    +    new SchemaRDD(sqlContext, 
SparkLogicalPlan(ExistingRdd(logicalPlan.output, rdd)))
    +  }
    +
    +  // 
=======================================================================
    +  // Base RDD functions that do NOT change schema
    +  // 
=======================================================================
    +
    +  // Common RDD functions
    +
    +  override def cache(): SchemaRDD = {
    --- End diff --
    
    I'd be okay trying it, my questions then are what it looks like in Scaladoc 
and what it looks like in Java. We should also double-check that Scala expects 
binary compatibility for this kind of return type.


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