You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GayathriMurali <gi...@git.apache.org> on 2016/03/06 02:53:04 UTC

[GitHub] spark pull request: [SPARK-10380] Confusing examples in pyspark SQ...

GitHub user GayathriMurali opened a pull request:

    https://github.com/apache/spark/pull/11543

    [SPARK-10380] Confusing examples in pyspark SQL docs

    #8647 
    
    JIRA : https://issues.apache.org/jira/browse/SPARK-10380
    
    Fixed confusing pyspark examples in SQL docs

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/GayathriMurali/spark SPARK-10380

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/11543.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #11543
    
----
commit 75cd8494b81ad781979de9ec4c4018e3517dfac9
Author: GayathriMurali <ga...@gmail.com>
Date:   2016-03-06T01:34:35Z

    Confusing examples in pyspark SQL docs

----


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-10380] Confusing examples in pyspark SQ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/11543#issuecomment-195606355
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/52961/
    Test PASSed.


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-10380] Confusing examples in pyspark SQ...

Posted by GayathriMurali <gi...@git.apache.org>.
Github user GayathriMurali commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11543#discussion_r55431663
  
    --- Diff: python/pyspark/sql/dataframe.py ---
    @@ -974,6 +974,35 @@ def dropDuplicates(self, subset=None):
                 jdf = self._jdf.dropDuplicates(self._jseq(subset))
             return DataFrame(jdf, self.sql_ctx)
     
    +    @since(1.4)
    +    def drop_duplicates(self, subset=None):
    +        """Return a new :class:`DataFrame` with duplicate rows removed,
    +        optionally only considering certain columns.
    +
    +        :func:`dropDuplicates` is an alias for :func:`drop_duplicates`.
    +
    +        >>> from pyspark.sql import Row
    +        >>> df = sc.parallelize([ \
    +            Row(name='Alice', age=5, height=80), \
    +            Row(name='Alice', age=5, height=80), \
    +            Row(name='Alice', age=10, height=80)]).toDF()
    +        >>> df.drop_duplicates().show()
    +        +---+------+-----+
    +        |age|height| name|
    +        +---+------+-----+
    +        |  5|    80|Alice|
    +        | 10|    80|Alice|
    +        +---+------+-----+
    +
    +        >>> df.drop_duplicates(['name', 'height']).show()
    +        +---+------+-----+
    +        |age|height| name|
    +        +---+------+-----+
    +        |  5|    80|Alice|
    +        +---+------+-----+
    +        """
    --- End diff --
    
    Should we remove the example and just have one sentence which says "drop_duplicates() alias for dropDuplicates()


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-10380] Confusing examples in pyspark SQ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/11543#issuecomment-195207709
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/52904/
    Test FAILed.


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-10380] Confusing examples in pyspark SQ...

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11543#discussion_r55297346
  
    --- Diff: python/pyspark/sql/dataframe.py ---
    @@ -974,6 +974,35 @@ def dropDuplicates(self, subset=None):
                 jdf = self._jdf.dropDuplicates(self._jseq(subset))
             return DataFrame(jdf, self.sql_ctx)
     
    +    @since(1.4)
    +    def drop_duplicates(self, subset=None):
    +        """Return a new :class:`DataFrame` with duplicate rows removed,
    +        optionally only considering certain columns.
    +
    +        :func:`dropDuplicates` is an alias for :func:`drop_duplicates`.
    +
    +        >>> from pyspark.sql import Row
    +        >>> df = sc.parallelize([ \
    +            Row(name='Alice', age=5, height=80), \
    +            Row(name='Alice', age=5, height=80), \
    +            Row(name='Alice', age=10, height=80)]).toDF()
    +        >>> df.drop_duplicates().show()
    +        +---+------+-----+
    +        |age|height| name|
    +        +---+------+-----+
    +        |  5|    80|Alice|
    +        | 10|    80|Alice|
    +        +---+------+-----+
    +
    +        >>> df.drop_duplicates(['name', 'height']).show()
    +        +---+------+-----+
    +        |age|height| name|
    +        +---+------+-----+
    +        |  5|    80|Alice|
    +        +---+------+-----+
    +        """
    --- End diff --
    
    I think Michael was referring to keeping only one sentence in the doc.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-10380] Confusing examples in pyspark SQ...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11543#discussion_r55366653
  
    --- Diff: python/pyspark/sql/dataframe.py ---
    @@ -974,6 +974,35 @@ def dropDuplicates(self, subset=None):
                 jdf = self._jdf.dropDuplicates(self._jseq(subset))
             return DataFrame(jdf, self.sql_ctx)
     
    +    @since(1.4)
    +    def drop_duplicates(self, subset=None):
    +        """Return a new :class:`DataFrame` with duplicate rows removed,
    +        optionally only considering certain columns.
    +
    +        :func:`dropDuplicates` is an alias for :func:`drop_duplicates`.
    +
    +        >>> from pyspark.sql import Row
    +        >>> df = sc.parallelize([ \
    +            Row(name='Alice', age=5, height=80), \
    +            Row(name='Alice', age=5, height=80), \
    +            Row(name='Alice', age=10, height=80)]).toDF()
    +        >>> df.drop_duplicates().show()
    +        +---+------+-----+
    +        |age|height| name|
    +        +---+------+-----+
    +        |  5|    80|Alice|
    +        | 10|    80|Alice|
    +        +---+------+-----+
    +
    +        >>> df.drop_duplicates(['name', 'height']).show()
    +        +---+------+-----+
    +        |age|height| name|
    +        +---+------+-----+
    +        |  5|    80|Alice|
    +        +---+------+-----+
    +        """
    --- End diff --
    
    I think we can simply do `drop_duplicates  = dropDuplicates `, one example is https://github.com/apache/spark/blob/v1.6.0/python/pyspark/sql/dataframe.py#L904


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-10380] Confusing examples in pyspark SQ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/11543#issuecomment-195152802
  
    Merged build finished. Test FAILed.


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-10380] Confusing examples in pyspark SQ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/11543#issuecomment-195606353
  
    Merged build finished. Test PASSed.


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-10380] Confusing examples in pyspark SQ...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/spark/pull/11543


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-10380] Confusing examples in pyspark SQ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/11543#issuecomment-195207707
  
    Merged build finished. Test FAILed.


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-10380] Confusing examples in pyspark SQ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11543#issuecomment-195205893
  
    **[Test build #52904 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/52904/consoleFull)** for PR 11543 at commit [`3dd4013`](https://github.com/apache/spark/commit/3dd40134643f3621aaf23b2069d22a88e3ff81de).


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-10380] Confusing examples in pyspark SQ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/11543#issuecomment-195238668
  
    Merged build finished. Test FAILed.


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-10380] Confusing examples in pyspark SQ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11543#issuecomment-195238667
  
    **[Test build #52911 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/52911/consoleFull)** for PR 11543 at commit [`a1220dd`](https://github.com/apache/spark/commit/a1220ddbffd21d0c2e11b2d892a7c9851005eeb5).
     * This patch **fails to build**.
     * This patch merges cleanly.
     * This patch adds no public classes.


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-10380] Confusing examples in pyspark SQ...

Posted by GayathriMurali <gi...@git.apache.org>.
Github user GayathriMurali commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11543#discussion_r55297127
  
    --- Diff: python/pyspark/sql/dataframe.py ---
    @@ -974,6 +974,35 @@ def dropDuplicates(self, subset=None):
                 jdf = self._jdf.dropDuplicates(self._jseq(subset))
             return DataFrame(jdf, self.sql_ctx)
     
    +    @since(1.4)
    +    def drop_duplicates(self, subset=None):
    +        """Return a new :class:`DataFrame` with duplicate rows removed,
    +        optionally only considering certain columns.
    +
    +        :func:`dropDuplicates` is an alias for :func:`drop_duplicates`.
    +
    +        >>> from pyspark.sql import Row
    +        >>> df = sc.parallelize([ \
    +            Row(name='Alice', age=5, height=80), \
    +            Row(name='Alice', age=5, height=80), \
    +            Row(name='Alice', age=10, height=80)]).toDF()
    +        >>> df.drop_duplicates().show()
    +        +---+------+-----+
    +        |age|height| name|
    +        +---+------+-----+
    +        |  5|    80|Alice|
    +        | 10|    80|Alice|
    +        +---+------+-----+
    +
    +        >>> df.drop_duplicates(['name', 'height']).show()
    +        +---+------+-----+
    +        |age|height| name|
    +        +---+------+-----+
    +        |  5|    80|Alice|
    +        +---+------+-----+
    +        """
    --- End diff --
    
    Would you like to keep either one of them in the doc and just include the note that say "x is an alias for y"? Should I do the same for astype/cast as well? 


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-10380] Confusing examples in pyspark SQ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/11543#issuecomment-195002855
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/52841/
    Test FAILed.


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-10380] Confusing examples in pyspark SQ...

Posted by GayathriMurali <gi...@git.apache.org>.
Github user GayathriMurali commented on the pull request:

    https://github.com/apache/spark/pull/11543#issuecomment-195000924
  
    @marmbrus @rxin Let me know if there is anything else I need to do, to help merge this patch


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-10380] Confusing examples in pyspark SQ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11543#issuecomment-195606238
  
    **[Test build #52961 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/52961/consoleFull)** for PR 11543 at commit [`9c7bc31`](https://github.com/apache/spark/commit/9c7bc31437742e74f9c91c64644a6b6b8cac4937).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-10380] Confusing examples in pyspark SQ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/11543#issuecomment-195002845
  
    Merged build finished. Test FAILed.


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-10380] Confusing examples in pyspark SQ...

Posted by marmbrus <gi...@git.apache.org>.
Github user marmbrus commented on the pull request:

    https://github.com/apache/spark/pull/11543#issuecomment-195001600
  
    ok to test


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-10380] Confusing examples in pyspark SQ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11543#issuecomment-195207701
  
    **[Test build #52904 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/52904/consoleFull)** for PR 11543 at commit [`3dd4013`](https://github.com/apache/spark/commit/3dd40134643f3621aaf23b2069d22a88e3ff81de).
     * This patch **fails to build**.
     * This patch merges cleanly.
     * This patch adds no public classes.


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-10380] Confusing examples in pyspark SQ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11543#issuecomment-195236464
  
    **[Test build #52911 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/52911/consoleFull)** for PR 11543 at commit [`a1220dd`](https://github.com/apache/spark/commit/a1220ddbffd21d0c2e11b2d892a7c9851005eeb5).


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-10380] Confusing examples in pyspark SQ...

Posted by marmbrus <gi...@git.apache.org>.
Github user marmbrus commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11543#discussion_r56051451
  
    --- Diff: python/pyspark/sql/dataframe.py ---
    @@ -974,6 +974,11 @@ def dropDuplicates(self, subset=None):
                 jdf = self._jdf.dropDuplicates(self._jseq(subset))
             return DataFrame(jdf, self.sql_ctx)
     
    +    def dropDuplicates(self, subset=None):
    +        """
    +        :func:`drop_duplicates` is an alias for :func:`dropDuplicates`.
    +        """
    --- End diff --
    
    Don't you need to actually delegate here?  Right now this looks like a no-op.


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-10380] Confusing examples in pyspark SQ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/11543#issuecomment-195238670
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/52911/
    Test FAILed.


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-10380] Confusing examples in pyspark SQ...

Posted by marmbrus <gi...@git.apache.org>.
Github user marmbrus commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11543#discussion_r55460514
  
    --- Diff: python/pyspark/sql/dataframe.py ---
    @@ -974,6 +974,35 @@ def dropDuplicates(self, subset=None):
                 jdf = self._jdf.dropDuplicates(self._jseq(subset))
             return DataFrame(jdf, self.sql_ctx)
     
    +    @since(1.4)
    +    def drop_duplicates(self, subset=None):
    +        """Return a new :class:`DataFrame` with duplicate rows removed,
    +        optionally only considering certain columns.
    +
    +        :func:`dropDuplicates` is an alias for :func:`drop_duplicates`.
    +
    +        >>> from pyspark.sql import Row
    +        >>> df = sc.parallelize([ \
    +            Row(name='Alice', age=5, height=80), \
    +            Row(name='Alice', age=5, height=80), \
    +            Row(name='Alice', age=10, height=80)]).toDF()
    +        >>> df.drop_duplicates().show()
    +        +---+------+-----+
    +        |age|height| name|
    +        +---+------+-----+
    +        |  5|    80|Alice|
    +        | 10|    80|Alice|
    +        +---+------+-----+
    +
    +        >>> df.drop_duplicates(['name', 'height']).show()
    +        +---+------+-----+
    +        |age|height| name|
    +        +---+------+-----+
    +        |  5|    80|Alice|
    +        +---+------+-----+
    +        """
    --- End diff --
    
    Yes


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-10380] Confusing examples in pyspark SQ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11543#issuecomment-195002410
  
    **[Test build #52841 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/52841/consoleFull)** for PR 11543 at commit [`728bb4f`](https://github.com/apache/spark/commit/728bb4f6e9c6aef00d5aa71e0fa40a0f5fe4c414).


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-10380] Confusing examples in pyspark SQ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11543#issuecomment-195601990
  
    **[Test build #52961 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/52961/consoleFull)** for PR 11543 at commit [`9c7bc31`](https://github.com/apache/spark/commit/9c7bc31437742e74f9c91c64644a6b6b8cac4937).


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-10380] Confusing examples in pyspark SQ...

Posted by marmbrus <gi...@git.apache.org>.
Github user marmbrus commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11543#discussion_r55293326
  
    --- Diff: python/pyspark/sql/dataframe.py ---
    @@ -974,6 +974,35 @@ def dropDuplicates(self, subset=None):
                 jdf = self._jdf.dropDuplicates(self._jseq(subset))
             return DataFrame(jdf, self.sql_ctx)
     
    +    @since(1.4)
    +    def drop_duplicates(self, subset=None):
    +        """Return a new :class:`DataFrame` with duplicate rows removed,
    +        optionally only considering certain columns.
    +
    +        :func:`dropDuplicates` is an alias for :func:`drop_duplicates`.
    +
    +        >>> from pyspark.sql import Row
    +        >>> df = sc.parallelize([ \
    +            Row(name='Alice', age=5, height=80), \
    +            Row(name='Alice', age=5, height=80), \
    +            Row(name='Alice', age=10, height=80)]).toDF()
    +        >>> df.drop_duplicates().show()
    +        +---+------+-----+
    +        |age|height| name|
    +        +---+------+-----+
    +        |  5|    80|Alice|
    +        | 10|    80|Alice|
    +        +---+------+-----+
    +
    +        >>> df.drop_duplicates(['name', 'height']).show()
    +        +---+------+-----+
    +        |age|height| name|
    +        +---+------+-----+
    +        |  5|    80|Alice|
    +        +---+------+-----+
    +        """
    --- End diff --
    
    @rxin and I are worried about these docs diverging overtime.  I think we should have it delegate (as it does today) and have the docs simply say ":func:`dropDuplicates` is an alias for :func:`drop_duplicates`."


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-10380] Confusing examples in pyspark SQ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11543#issuecomment-195002835
  
    **[Test build #52841 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/52841/consoleFull)** for PR 11543 at commit [`728bb4f`](https://github.com/apache/spark/commit/728bb4f6e9c6aef00d5aa71e0fa40a0f5fe4c414).
     * This patch **fails Python style tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-10380] Confusing examples in pyspark SQ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/11543#issuecomment-195152803
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/52886/
    Test FAILed.


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-10380] Confusing examples in pyspark SQ...

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on the pull request:

    https://github.com/apache/spark/pull/11543#issuecomment-196464174
  
    I subimtted https://github.com/apache/spark/pull/11698


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-10380] Confusing examples in pyspark SQ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11543#issuecomment-195152776
  
    **[Test build #52886 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/52886/consoleFull)** for PR 11543 at commit [`a318cab`](https://github.com/apache/spark/commit/a318cab9e4af6040366a7e0e4374c719f426cae1).
     * This patch **fails PySpark unit tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-10380] Confusing examples in pyspark SQ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11543#issuecomment-195149564
  
    **[Test build #52886 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/52886/consoleFull)** for PR 11543 at commit [`a318cab`](https://github.com/apache/spark/commit/a318cab9e4af6040366a7e0e4374c719f426cae1).


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-10380] Confusing examples in pyspark SQ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/11543#issuecomment-192780295
  
    Can one of the admins verify this patch?


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-10380] Confusing examples in pyspark SQ...

Posted by marmbrus <gi...@git.apache.org>.
Github user marmbrus commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11543#discussion_r55404252
  
    --- Diff: python/pyspark/sql/dataframe.py ---
    @@ -974,6 +974,35 @@ def dropDuplicates(self, subset=None):
                 jdf = self._jdf.dropDuplicates(self._jseq(subset))
             return DataFrame(jdf, self.sql_ctx)
     
    +    @since(1.4)
    +    def drop_duplicates(self, subset=None):
    +        """Return a new :class:`DataFrame` with duplicate rows removed,
    +        optionally only considering certain columns.
    +
    +        :func:`dropDuplicates` is an alias for :func:`drop_duplicates`.
    +
    +        >>> from pyspark.sql import Row
    +        >>> df = sc.parallelize([ \
    +            Row(name='Alice', age=5, height=80), \
    +            Row(name='Alice', age=5, height=80), \
    +            Row(name='Alice', age=10, height=80)]).toDF()
    +        >>> df.drop_duplicates().show()
    +        +---+------+-----+
    +        |age|height| name|
    +        +---+------+-----+
    +        |  5|    80|Alice|
    +        | 10|    80|Alice|
    +        +---+------+-----+
    +
    +        >>> df.drop_duplicates(['name', 'height']).show()
    +        +---+------+-----+
    +        |age|height| name|
    +        +---+------+-----+
    +        |  5|    80|Alice|
    +        +---+------+-----+
    +        """
    --- End diff --
    
    If you just do equals like that then in the docs the examples are not calling the function that is being defined, which a user complained was confusing.


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org