You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by sun-rui <gi...@git.apache.org> on 2015/12/08 13:07:07 UTC

[GitHub] spark pull request: [SPARK-12204][SPARKR] Implement drop method fo...

GitHub user sun-rui opened a pull request:

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

    [SPARK-12204][SPARKR] Implement drop method for DataFrame in SparkR.

    

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

    $ git pull https://github.com/sun-rui/spark SPARK-12204

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

    https://github.com/apache/spark/pull/10201.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 #10201
    
----
commit e4372d60e0c8ac8f7bf1c84c7467a10e08f004dc
Author: Sun Rui <ru...@intel.com>
Date:   2015-12-08T12:09:14Z

    [SPARK-12204][SPARKR] Implement drop method for DataFrame in SparkR.

----


---
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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-173084587
  
    rebased to master


---
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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#discussion_r47042545
  
    --- Diff: R/pkg/R/DataFrame.R ---
    @@ -1324,12 +1312,16 @@ setMethod("selectExpr",
     #' path <- "path/to/file.json"
     #' df <- jsonFile(sqlContext, path)
     #' newDF <- withColumn(df, "newCol", df$col1 * 5)
    +#' # Replace an existing column
    +#' newDF2 <- withColumn(newDF, "newCol", newDF$col1)
    --- End diff --
    
    I don't know the reason. The original commit can be found at https://github.com/amplab-extras/SparkR-pkg/pull/204.
    
    I don't think it is related to supporting multiple columns with the same name. Spark Core itself allows multiple columns with the same name:
    ```
    scala> val df=sqlContext.createDataFrame(Seq((1,2,3))).toDF("a","a","c")
    df: org.apache.spark.sql.DataFrame = [a: int, a: int, c: int]
    
    scala> df.show
    +---+---+---+
    |  a|  a|  c|
    +---+---+---+
    |  1|  2|  3|
    +---+---+---+
    scala> df.withColumn("a", df("c")).show
    +---+---+---+
    |  a|  a|  c|
    +---+---+---+
    |  3|  3|  3|
    +---+---+---+
    ```
    You can see all columns of the same name will be replaced in the above example.


---
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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#discussion_r50209692
  
    --- Diff: docs/sql-programming-guide.md ---
    @@ -2073,6 +2073,8 @@ options.
          --conf spark.sql.hive.thriftServer.singleSession=true \
          ...
        {% endhighlight %}
    + - Since 1.6.1, withColumn method in sparkR supports adding a new column to or replacing existing columns
    --- End diff --
    
    which version is appropriate here? 1.6.1 or 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 pull request: [SPARK-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-164370532
  
    **[Test build #47647 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47647/consoleFull)** for PR 10201 at commit [`14215d3`](https://github.com/apache/spark/commit/14215d3eecdff93e5ad9c923d74267480f614f7e).
     * 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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-164666296
  
    **[Test build #47718 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47718/consoleFull)** for PR 10201 at commit [`5eba7f9`](https://github.com/apache/spark/commit/5eba7f94afc4f7edcecde64f2f5f023d8b69f1c7).
     * 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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-165028416
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/47803/
    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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-163847471
  
    **[Test build #47571 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47571/consoleFull)** for PR 10201 at commit [`aa7682d`](https://github.com/apache/spark/commit/aa7682d488afb5fa4355b1c96db326faa8954deb).
     * 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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#discussion_r47043788
  
    --- Diff: R/pkg/R/DataFrame.R ---
    @@ -1324,12 +1312,16 @@ setMethod("selectExpr",
     #' path <- "path/to/file.json"
     #' df <- jsonFile(sqlContext, path)
     #' newDF <- withColumn(df, "newCol", df$col1 * 5)
    +#' # Replace an existing column
    +#' newDF2 <- withColumn(newDF, "newCol", newDF$col1)
    --- End diff --
    
    I know the reason. When the withColumn was implemented in SparkR, the withColumn() in Scala support just adding columns, without support for replacing existing columns. But later, withColumn() in Scala was enhanced to support replacing existing columns, see https://github.com/apache/spark/pull/5541.  However, withColumn in SparkR have not been synced with Scala until this PR:)


---
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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-162867660
  
    **[Test build #47335 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47335/consoleFull)** for PR 10201 at commit [`e4372d6`](https://github.com/apache/spark/commit/e4372d60e0c8ac8f7bf1c84c7467a10e08f004dc).
     * 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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#discussion_r47739548
  
    --- Diff: R/pkg/R/DataFrame.R ---
    @@ -2223,3 +2215,46 @@ setMethod("with",
                 newEnv <- assignNewEnv(data)
                 eval(substitute(expr), envir = newEnv, enclos = newEnv)
               })
    +
    +#' drop
    +#'
    +#' Returns a new DataFrame with columns dropped.
    +#' This is a no-op if schema doesn't contain column name(s).
    +#' 
    +#' @param x A SparkSQL DataFrame.
    +#' @param cols A character vector of column names or a Column.
    +#' @return A DataFrame
    +#'
    +#' @family DataFrame functions
    +#' @rdname drop
    +#' @name drop
    +#' @export
    +#' @examples
    +#'\dontrun{
    +#' sc <- sparkR.init()
    +#' sqlCtx <- sparkRSQL.init(sc)
    +#' path <- "path/to/file.json"
    +#' df <- jsonFile(sqlCtx, path)
    --- End diff --
    
    update this to read.json?


---
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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-164368190
  
    **[Test build #47647 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47647/consoleFull)** for PR 10201 at commit [`14215d3`](https://github.com/apache/spark/commit/14215d3eecdff93e5ad9c923d74267480f614f7e).


---
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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-173085805
  
    **[Test build #49758 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/49758/consoleFull)** for PR 10201 at commit [`89657f8`](https://github.com/apache/spark/commit/89657f8f059ea91b83cace02314b1b6865eea80d).
     * This patch **fails R 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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-173440987
  
    LGTM


---
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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-164294560
  
    @shivaram I checked but release notes and programming guide/migration guide and I don't see referencing to withColumn for Spark 1.4.0 or 1.4.1. Perhaps the behavior change happened before the 1.4.0 release?



---
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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-163886938
  
    **[Test build #47580 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47580/consoleFull)** for PR 10201 at commit [`619b946`](https://github.com/apache/spark/commit/619b94682043b437721cad50faa84d86ab17f7b2).
     * 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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-163847686
  
    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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-173135925
  
    **[Test build #49777 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/49777/consoleFull)** for PR 10201 at commit [`c08c1ea`](https://github.com/apache/spark/commit/c08c1ea9979c25aded74dcb505b9f03302b2c3cd).


---
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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#discussion_r47052771
  
    --- Diff: R/pkg/R/generics.R ---
    @@ -421,6 +421,10 @@ setGeneric("corr", function(x, ...) {standardGeneric("corr") })
     #' @export
     setGeneric("describe", function(x, col, ...) { standardGeneric("describe") })
     
    +#' @rdname drop
    +#' @export
    +setGeneric("drop", function(x, col) { standardGeneric("drop") })
    --- End diff --
    
    does base::drop work? https://stat.ethz.ch/R-manual/R-devel/library/base/html/drop.html
    if yes could you add a 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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-173085808
  
    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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-164356661
  
    @felixcheung, @shivaram, documentation for withColumn changed. please take a review


---
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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#discussion_r50219056
  
    --- Diff: docs/sql-programming-guide.md ---
    @@ -2073,6 +2073,8 @@ options.
          --conf spark.sql.hive.thriftServer.singleSession=true \
          ...
        {% endhighlight %}
    + - Since 1.6.1, withColumn method in sparkR supports adding a new column to or replacing existing columns
    --- End diff --
    
    maybe we want to put this in the R migration guide session instead of SQL? or both?


---
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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-164613571
  
    @felixcheung, refine the wording:
    ```
    Prior to 1.4, DataFrame.withColumn() supports adding a column only. The column will always be added as a new column with its name unchanged in the result DataFrame even if there may be any existing columns of the same name. Since 1.4, DataFrame.withColumn() supports adding a column of a different name from names of all existing columns or replacing existing columns of the same name.
    ```
    Any comment?


---
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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-164360023
  
    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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-163845381
  
    **[Test build #47571 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47571/consoleFull)** for PR 10201 at commit [`aa7682d`](https://github.com/apache/spark/commit/aa7682d488afb5fa4355b1c96db326faa8954deb).


---
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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-164094104
  
    SQL and MLlib have a "Migration guide" section, perhaps something like that? http://spark.apache.org/docs/latest/sql-programming-guide.html#migration-guide
    In fact, there's language specific stuff in SQL's migration guide.


---
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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-163864668
  
    looks good, though I'm concerned with the replace column which could be breaking behavior change we should document.
    Also @shivaram I think this shows it's good to be able to detected new/accidentally masked function :) #10171
    



---
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-12204][SPARKR] Implement drop method fo...

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

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


---
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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-163847687
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/47571/
    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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-164662728
  
    **[Test build #47718 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47718/consoleFull)** for PR 10201 at commit [`5eba7f9`](https://github.com/apache/spark/commit/5eba7f94afc4f7edcecde64f2f5f023d8b69f1c7).


---
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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#discussion_r47744724
  
    --- Diff: R/pkg/R/DataFrame.R ---
    @@ -2223,3 +2215,46 @@ setMethod("with",
                 newEnv <- assignNewEnv(data)
                 eval(substitute(expr), envir = newEnv, enclos = newEnv)
               })
    +
    +#' drop
    +#'
    +#' Returns a new DataFrame with columns dropped.
    +#' This is a no-op if schema doesn't contain column name(s).
    +#' 
    +#' @param x A SparkSQL DataFrame.
    +#' @param cols A character vector of column names or a Column.
    +#' @return A DataFrame
    +#'
    +#' @family DataFrame functions
    +#' @rdname drop
    +#' @name drop
    +#' @export
    +#' @examples
    +#'\dontrun{
    +#' sc <- sparkR.init()
    +#' sqlCtx <- sparkRSQL.init(sc)
    +#' path <- "path/to/file.json"
    +#' df <- jsonFile(sqlCtx, path)
    --- End diff --
    
    good catch. thanks


---
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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-163882254
  
    @felixcheung, yes, this may cause backward-compatibility issue. But this is not SparkR specific, as it's change in Spark SQL core.  Where is the appropriate place for documentation?


---
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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#discussion_r47015981
  
    --- Diff: R/pkg/R/DataFrame.R ---
    @@ -1324,12 +1312,16 @@ setMethod("selectExpr",
     #' path <- "path/to/file.json"
     #' df <- jsonFile(sqlContext, path)
     #' newDF <- withColumn(df, "newCol", df$col1 * 5)
    +#' # Replace an existing column
    +#' newDF2 <- withColumn(newDF, "newCol", newDF$col1)
    --- End diff --
    
    I'm not 100% about the replace existing column behavior - I thought it was intentional that we support multiple columns with the same name before?


---
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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-164110115
  
    @felixcheung Was there a migration guide entry for `withColumn` changing in Scala / Python. If so, we can also add one to a SparkR migration guide. At a high level, adding functionality that was added in Scala seems fine to me.


---
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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-173143577
  
    **[Test build #49777 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/49777/consoleFull)** for PR 10201 at commit [`c08c1ea`](https://github.com/apache/spark/commit/c08c1ea9979c25aded74dcb505b9f03302b2c3cd).
     * This patch **fails SparkR 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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-164666368
  
    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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-162867873
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/47335/
    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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-173436793
  
    **[Test build #49846 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/49846/consoleFull)** for PR 10201 at commit [`5eb3004`](https://github.com/apache/spark/commit/5eb30044e3655d884de2aebaa39b7245d099fbdb).


---
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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-173439516
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/49846/
    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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-173439417
  
    **[Test build #49846 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/49846/consoleFull)** for PR 10201 at commit [`5eb3004`](https://github.com/apache/spark/commit/5eb30044e3655d884de2aebaa39b7245d099fbdb).
     * 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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-162864236
  
    **[Test build #47335 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47335/consoleFull)** for PR 10201 at commit [`e4372d6`](https://github.com/apache/spark/commit/e4372d60e0c8ac8f7bf1c84c7467a10e08f004dc).


---
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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-164370649
  
    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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#discussion_r47327943
  
    --- Diff: R/pkg/R/DataFrame.R ---
    @@ -2223,3 +2215,46 @@ setMethod("with",
                 newEnv <- assignNewEnv(data)
                 eval(substitute(expr), envir = newEnv, enclos = newEnv)
               })
    +
    +#' drop
    +#'
    +#' Returns a new DataFrame with columns dropped.
    +#' This is a no-op if schema doesn't contain column name(s).
    +#' 
    +#' @param x A SparkSQL DataFrame.
    +#' @param cols A character vector of column names or a Column.
    +#' @return A DataFrame
    +#'
    +#' @family DataFrame functions
    +#' @rdname drop
    +#' @name drop
    +#' @export
    +#' @examples
    +#'\dontrun{
    +#' sc <- sparkR.init()
    +#' sqlCtx <- sparkRSQL.init(sc)
    +#' path <- "path/to/file.json"
    +#' df <- jsonFile(sqlCtx, path)
    +#' drop(df, "col1")
    +#' drop(df, c("col1", "col2"))
    +#' drop(df, df$col1)
    +#' }
    +setMethod("drop",
    +          signature(x = "DataFrame"),
    +          function(x, col) {
    +            stopifnot(class(col) == "character" || class(col) == "Column")
    +
    +            if (class(col) == "character") {
    --- End diff --
    
    I'd flip this check, since `@jc` should only be called on `Column`
    but minor point since it's checked in line 2245.


---
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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-164666369
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/47718/
    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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-164357016
  
    **[Test build #47643 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47643/consoleFull)** for PR 10201 at commit [`e6e9f10`](https://github.com/apache/spark/commit/e6e9f10b77aef9ba5e6086931442042b15f5ac1e).


---
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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-164320958
  
    According to https://issues.apache.org/jira/browse/SPARK-6635 and https://issues.apache.org/jira/browse/SPARK-10073, the feature for Scala was in Spark 1.4.0 and python in 1.5.0. But seems both just have API updated without any migration guide for compatibility break. Do we need to do it specifically for SparkR?


---
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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-165007479
  
    looks good - only a minor code doc comment.


---
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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-163887085
  
    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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-173452712
  
    Merging this to master


---
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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#discussion_r47323048
  
    --- Diff: R/pkg/R/generics.R ---
    @@ -421,6 +421,10 @@ setGeneric("corr", function(x, ...) {standardGeneric("corr") })
     #' @export
     setGeneric("describe", function(x, col, ...) { standardGeneric("describe") })
     
    +#' @rdname drop
    +#' @export
    +setGeneric("drop", function(x, col) { standardGeneric("drop") })
    --- End diff --
    
    good catch. fixed it


---
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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-173143638
  
    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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-163887087
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/47580/
    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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-164359997
  
    **[Test build #47643 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47643/consoleFull)** for PR 10201 at commit [`e6e9f10`](https://github.com/apache/spark/commit/e6e9f10b77aef9ba5e6086931442042b15f5ac1e).
     * This patch **fails SparkR 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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#discussion_r47052792
  
    --- Diff: R/pkg/R/DataFrame.R ---
    @@ -2223,3 +2215,43 @@ setMethod("with",
                 newEnv <- assignNewEnv(data)
                 eval(substitute(expr), envir = newEnv, enclos = newEnv)
               })
    +
    +#' drop
    +#'
    +#' Returns a new DataFrame with columns dropped.
    +#' This is a no-op if schema doesn't contain column name(s).
    +#' 
    +#' @param x A SparkSQL DataFrame.
    +#' @param cols A character vector of column names or a Column.
    +#' @return A DataFrame
    +#'
    +#' @family DataFrame functions
    +#' @rdname drop
    +#' @name drop
    +#' @export
    +#' @examples
    +#'\dontrun{
    +#' sc <- sparkR.init()
    +#' sqlCtx <- sparkRSQL.init(sc)
    +#' path <- "path/to/file.json"
    +#' df <- jsonFile(sqlCtx, path)
    +#' drop(df, "col1")
    +#' drop(df, c("col1", "col2"))
    +#' drop(df, df$col1)
    +#' }
    +setMethod("drop",
    +          signature(x = "DataFrame", col = "character"),
    +          function(x, col) {
    +            sdf <- callJMethod(x@sdf, "drop", as.list(col))
    +            dataFrame(sdf)
    +          })
    +
    +#' @rdname drop
    +#' @name drop
    +#' @export
    +setMethod("drop",
    +          signature(x = "DataFrame", col = "Column"),
    +          function(x, col) {
    +            sdf <- callJMethod(x@sdf, "drop", col@jc)
    --- End diff --
    
    nit: use "characterOrColumn" and have one body instead...


---
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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-165028301
  
    **[Test build #47803 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47803/consoleFull)** for PR 10201 at commit [`f9659db`](https://github.com/apache/spark/commit/f9659dba84c2dabb034a09be8cb92bfbf8a054f0).
     * 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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-173439514
  
    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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-164360026
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/47643/
    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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-165028413
  
    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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-166486283
  
    any other comments? @shivaram, could you merge it?


---
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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-173143641
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/49777/
    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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-163883375
  
    **[Test build #47580 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47580/consoleFull)** for PR 10201 at commit [`619b946`](https://github.com/apache/spark/commit/619b94682043b437721cad50faa84d86ab17f7b2).


---
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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-173015548
  
    @sun-rui Sorry for the delay in looking at this. Could you bring this up to date with master ? It looks good to me.


---
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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-164370651
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/47647/
    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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-165025380
  
    **[Test build #47803 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47803/consoleFull)** for PR 10201 at commit [`f9659db`](https://github.com/apache/spark/commit/f9659dba84c2dabb034a09be8cb92bfbf8a054f0).


---
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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-173085809
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/49758/
    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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-173085582
  
    **[Test build #49758 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/49758/consoleFull)** for PR 10201 at commit [`89657f8`](https://github.com/apache/spark/commit/89657f8f059ea91b83cace02314b1b6865eea80d).


---
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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-164648778
  
    that's good, thanks


---
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-12204][SPARKR] Implement drop method fo...

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

    https://github.com/apache/spark/pull/10201#issuecomment-162867871
  
    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