You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by dongjoon-hyun <gi...@git.apache.org> on 2016/06/07 18:38:18 UTC

[GitHub] spark pull request #13545: [SPARK-15807][SQL] Support varargs for distinct/d...

GitHub user dongjoon-hyun opened a pull request:

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

    [SPARK-15807][SQL] Support varargs for distinct/dropDuplicates in Dataset/DataFrame

    ## What changes were proposed in this pull request?
    This PR adds `varargs`-types `distinct/dropDuplicates` functions in `Dataset/DataFrame`. Currently, `distinct` does not get arguments, and `dropDuplicates` supports only `Seq` or `Array`.
    
    **Before**
    ```scala
    scala> val ds = spark.createDataFrame(Seq(("a", 1), ("b", 2), ("a", 2)))
    ds: org.apache.spark.sql.DataFrame = [_1: string, _2: int]
    
    scala> ds.dropDuplicates(Seq("_1", "_2"))
    res0: org.apache.spark.sql.Dataset[org.apache.spark.sql.Row] = [_1: string, _2: int]
    
    scala> ds.dropDuplicates("_1", "_2")
    <console>:26: error: overloaded method value dropDuplicates with alternatives:
      (colNames: Array[String])org.apache.spark.sql.Dataset[org.apache.spark.sql.Row] <and>
      (colNames: Seq[String])org.apache.spark.sql.Dataset[org.apache.spark.sql.Row] <and>
      ()org.apache.spark.sql.Dataset[org.apache.spark.sql.Row]
     cannot be applied to (String, String)
           ds.dropDuplicates("_1", "_2")
              ^
    
    scala> ds.distinct("_1", "_2")
    <console>:26: error: too many arguments for method distinct: ()org.apache.spark.sql.Dataset[org.apache.spark.sql.Row]
           ds.distinct("_1", "_2")
    ```
    
    **After**
    ```scala
    scala> val ds = spark.createDataFrame(Seq(("a", 1), ("b", 2), ("a", 2)))
    ds: org.apache.spark.sql.DataFrame = [_1: string, _2: int]
    
    scala> ds.dropDuplicates("_1", "_2")
    res0: org.apache.spark.sql.Dataset[org.apache.spark.sql.Row] = [_1: string, _2: int]
    
    scala> ds.distinct("_1", "_2")
    res1: org.apache.spark.sql.Dataset[org.apache.spark.sql.Row] = [_1: string, _2: int]
    ```
    
    ## How was this patch tested?
    
    Pass the Jenkins tests with new testcases.

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

    $ git pull https://github.com/dongjoon-hyun/spark SPARK-15807

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

    https://github.com/apache/spark/pull/13545.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 #13545
    
----
commit 33f446f4bb04e2ea0014c385b6f0d1b290db5a90
Author: Dongjoon Hyun <do...@apache.org>
Date:   2016-06-07T18:34:24Z

    [SPARK-15807][SQL] Support varargs for distinct/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 issue #13545: [SPARK-15807][SQL] Support varargs for dropDuplicates in...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on the issue:

    https://github.com/apache/spark/pull/13545
  
    Thank you again, @rxin .


---
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 issue #13545: [SPARK-15807][SQL] Support varargs for dropDuplicates in...

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

    https://github.com/apache/spark/pull/13545
  
    Merging in master/2.0.



---
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 issue #13545: [SPARK-15807][SQL] Support varargs for dropDuplicates in...

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

    https://github.com/apache/spark/pull/13545
  
    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 issue #13545: [SPARK-15807][SQL] Support varargs for dropDuplicates in...

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

    https://github.com/apache/spark/pull/13545
  
    **[Test build #60316 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/60316/consoleFull)** for PR 13545 at commit [`5ebabf8`](https://github.com/apache/spark/commit/5ebabf843c8da45b33bb6215eb9d74d1b3bca2ce).


---
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 issue #13545: [SPARK-15807][SQL] Support varargs for dropDuplicates in...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on the issue:

    https://github.com/apache/spark/pull/13545
  
    Thank you for merging, @rxin !


---
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 issue #13545: [SPARK-15807][SQL] Support varargs for distinct/dropDupl...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on the issue:

    https://github.com/apache/spark/pull/13545
  
    What do you think `dropDuplicates`?
    
    1. ds.select("_1", "_2", "_3").dropDuplicates(Seq("_1", "_2")).orderBy("_1", "_2").show()
    2. ds.select("_1", "_2", "_3").dropDuplicates("_1", "_2").orderBy("_1", "_2").show()
    
    I think the second is more consistent with the others, `select` and `orderBy`.
    Do you dislike this one too?


---
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 #13545: [SPARK-15807][SQL] Support varargs for dropDuplic...

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

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


---
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 issue #13545: [SPARK-15807][SQL] Support varargs for dropDuplicates in...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on the issue:

    https://github.com/apache/spark/pull/13545
  
    Hi, @rxin .
    For `dropDuplicates`, this PR definitely adds a new signature.
    However, I think this is the right direction to improve user experience because they expect the same usage pattern 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 issue #13545: [SPARK-15807][SQL] Support varargs for dropDuplicates in...

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

    https://github.com/apache/spark/pull/13545
  
    **[Test build #60196 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/60196/consoleFull)** for PR 13545 at commit [`04c7f84`](https://github.com/apache/spark/commit/04c7f84cbbf5a9e769e77b49de9cd2025d75aa2c).


---
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 issue #13545: [SPARK-15807][SQL] Support varargs for dropDuplicates in...

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

    https://github.com/apache/spark/pull/13545
  
    LGTM pending tests.



---
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 issue #13545: [SPARK-15807][SQL] Support varargs for dropDuplicates in...

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

    https://github.com/apache/spark/pull/13545
  
    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 issue #13545: [SPARK-15807][SQL] Support varargs for distinct/dropDupl...

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

    https://github.com/apache/spark/pull/13545
  
    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 #13545: [SPARK-15807][SQL] Support varargs for distinct/d...

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

    https://github.com/apache/spark/pull/13545#discussion_r66152341
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala ---
    @@ -2262,6 +2275,19 @@ class Dataset[T] private[sql](
       def distinct(): Dataset[T] = dropDuplicates()
     
       /**
    +   * Returns a new [[Dataset]] that contains only the unique rows from this [[Dataset]], considering
    +   * only the subset of columns. This is an alias for `dropDuplicates(cols)`.
    +   *
    +   * Note that, equality checking is performed directly on the encoded representation of the data
    +   * and thus is not affected by a custom `equals` function defined on `T`.
    +   *
    +   * @group typedrel
    +   * @since 2.0.0
    +   */
    +  @scala.annotation.varargs
    +  def distinct(cols: String*): Dataset[T] = dropDuplicates(cols)
    --- End diff --
    
    Thank you always for fast feedbacks, @rxin . And for nice lunch. :)
    
    Yes, right. For this, maybe it's not needed because `distinct` is usually used with `select`. 
    Also, we can use `dropDuplicates` since it's just an alias of `dropDuplicates`.
    
    I think `distinct` is a function name which is more consistent with SQL. If we have this, we can do this, too.
    ```
    ds.select("_1", "_2", "_3").distinct("_1").orderBy("_1", "_2").show()
    ```


---
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 #13545: [SPARK-15807][SQL] Support varargs for distinct/d...

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

    https://github.com/apache/spark/pull/13545#discussion_r66181659
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala ---
    @@ -2262,6 +2275,19 @@ class Dataset[T] private[sql](
       def distinct(): Dataset[T] = dropDuplicates()
     
       /**
    +   * Returns a new [[Dataset]] that contains only the unique rows from this [[Dataset]], considering
    +   * only the subset of columns. This is an alias for `dropDuplicates(cols)`.
    +   *
    +   * Note that, equality checking is performed directly on the encoded representation of the data
    +   * and thus is not affected by a custom `equals` function defined on `T`.
    +   *
    +   * @group typedrel
    +   * @since 2.0.0
    +   */
    +  @scala.annotation.varargs
    +  def distinct(cols: String*): Dataset[T] = dropDuplicates(cols)
    --- End diff --
    
    let's not have this.


---
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 issue #13545: [SPARK-15807][SQL] Support varargs for dropDuplicates in...

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

    https://github.com/apache/spark/pull/13545
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/60316/
    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 issue #13545: [SPARK-15807][SQL] Support varargs for dropDuplicates in...

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

    https://github.com/apache/spark/pull/13545
  
    **[Test build #60196 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/60196/consoleFull)** for PR 13545 at commit [`04c7f84`](https://github.com/apache/spark/commit/04c7f84cbbf5a9e769e77b49de9cd2025d75aa2c).
     * 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 issue #13545: [SPARK-15807][SQL] Support varargs for distinct/dropDupl...

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

    https://github.com/apache/spark/pull/13545
  
    **[Test build #60133 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/60133/consoleFull)** for PR 13545 at commit [`33f446f`](https://github.com/apache/spark/commit/33f446f4bb04e2ea0014c385b6f0d1b290db5a90).


---
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 #13545: [SPARK-15807][SQL] Support varargs for distinct/d...

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

    https://github.com/apache/spark/pull/13545#discussion_r66156310
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala ---
    @@ -2262,6 +2275,19 @@ class Dataset[T] private[sql](
       def distinct(): Dataset[T] = dropDuplicates()
     
       /**
    +   * Returns a new [[Dataset]] that contains only the unique rows from this [[Dataset]], considering
    +   * only the subset of columns. This is an alias for `dropDuplicates(cols)`.
    +   *
    +   * Note that, equality checking is performed directly on the encoded representation of the data
    +   * and thus is not affected by a custom `equals` function defined on `T`.
    +   *
    +   * @group typedrel
    +   * @since 2.0.0
    +   */
    +  @scala.annotation.varargs
    +  def distinct(cols: String*): Dataset[T] = dropDuplicates(cols)
    --- End diff --
    
    In addition, `distinct` of `dplyr` R packages works in the same manner.


---
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 issue #13545: [SPARK-15807][SQL] Support varargs for dropDuplicates in...

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

    https://github.com/apache/spark/pull/13545
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/60196/
    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 issue #13545: [SPARK-15807][SQL] Support varargs for distinct/dropDupl...

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

    https://github.com/apache/spark/pull/13545
  
    **[Test build #60133 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/60133/consoleFull)** for PR 13545 at commit [`33f446f`](https://github.com/apache/spark/commit/33f446f4bb04e2ea0014c385b6f0d1b290db5a90).
     * 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 issue #13545: [SPARK-15807][SQL] Support varargs for distinct/dropDupl...

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

    https://github.com/apache/spark/pull/13545
  
    For API design it would be better to be very conservative, because we cannot remove APIs. There is always value in adding something, but there is also a cost to maintenance and user experience (too many methods showing up).



---
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 issue #13545: [SPARK-15807][SQL] Support varargs for dropDuplicates in...

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

    https://github.com/apache/spark/pull/13545
  
    **[Test build #60316 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/60316/consoleFull)** for PR 13545 at commit [`5ebabf8`](https://github.com/apache/spark/commit/5ebabf843c8da45b33bb6215eb9d74d1b3bca2ce).
     * 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 issue #13545: [SPARK-15807][SQL] Support varargs for dropDuplicates in...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on the issue:

    https://github.com/apache/spark/pull/13545
  
    Hi, @rxin .
    I updated this PR and JIRA by removing `distinct`-related changes.


---
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 issue #13545: [SPARK-15807][SQL] Support varargs for distinct/dropDupl...

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

    https://github.com/apache/spark/pull/13545
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/60133/
    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 #13545: [SPARK-15807][SQL] Support varargs for distinct/d...

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

    https://github.com/apache/spark/pull/13545#discussion_r66135714
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala ---
    @@ -2262,6 +2275,19 @@ class Dataset[T] private[sql](
       def distinct(): Dataset[T] = dropDuplicates()
     
       /**
    +   * Returns a new [[Dataset]] that contains only the unique rows from this [[Dataset]], considering
    +   * only the subset of columns. This is an alias for `dropDuplicates(cols)`.
    +   *
    +   * Note that, equality checking is performed directly on the encoded representation of the data
    +   * and thus is not affected by a custom `equals` function defined on `T`.
    +   *
    +   * @group typedrel
    +   * @since 2.0.0
    +   */
    +  @scala.annotation.varargs
    +  def distinct(cols: String*): Dataset[T] = dropDuplicates(cols)
    --- End diff --
    
    why do we want this?



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