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

    https://github.com/apache/spark/pull/448#discussion_r12357557
  
    --- Diff: core/src/main/scala/org/apache/spark/rdd/RDD.scala ---
    @@ -138,7 +138,7 @@ abstract class RDD[T: ClassTag](
        * it is computed. This can only be used to assign a new storage level 
if the RDD does not
        * have a storage level set yet..
        */
    -  def persist(newLevel: StorageLevel): RDD[T] = {
    +  def persist(newLevel: StorageLevel): this.type = {
         // TODO: Handle changes of StorageLevel
    --- End diff --
    
    Thanks for clarifying, in retrospect that looks obvious !
    On 07-May-2014 2:52 am, "Patrick Wendell" <notificati...@github.com> wrote:
    
    > In core/src/main/scala/org/apache/spark/rdd/RDD.scala:
    >
    > > @@ -138,7 +138,7 @@ abstract class RDD[T: ClassTag](
    > >     * it is computed. This can only be used to assign a new storage 
level if the RDD does not
    > >     * have a storage level set yet..
    > >     */
    > > -  def persist(newLevel: StorageLevel): RDD[T] = {
    > > +  def persist(newLevel: StorageLevel): this.type = {
    > >      // TODO: Handle changes of StorageLevel
    >
    > @mridulm <https://github.com/mridulm> if you look at this patch, it
    > explicitly overrides those for SchemaRDD. You can't use this.type there
    > because the return type is actually a new RDD class (FilteredRDD and so
    > on).
    >
    > —
    > Reply to this email directly or view it on 
GitHub<https://github.com/apache/spark/pull/448/files#r12349982>
    > .
    >


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to