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/16 18:13:55 UTC

[GitHub] spark pull request #13714: [SPARK-15996][R] Fix R dataframe example by remov...

GitHub user dongjoon-hyun opened a pull request:

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

    [SPARK-15996][R] Fix R dataframe example by removing deprecated functions

    ## What changes were proposed in this pull request?
    
    Currently, R dataframe example fails like the following. We had better update that before releasing 2.0 RC. This issue update that to use up-to-date APIs.
    ```
    $ bin/spark-submit examples/src/main/r/dataframe.R 
    ...
    Warning message:
    'createDataFrame(sqlContext...)' is deprecated.
    Use 'createDataFrame(data, schema = NULL, samplingRatio = 1.0)' instead.
    See help("Deprecated") 
    ...
    Warning message:
    'read.json(sqlContext...)' is deprecated.
    Use 'read.json(path)' instead.
    See help("Deprecated") 
    ...
    Error: could not find function "registerTempTable"
    Execution halted
    ```
    
    ## How was this patch tested?
    
    Manual. (Run `bin/spark-submit examples/src/main/r/dataframe.R`)

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

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

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

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

----


---
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 #13714: [SPARK-15996][R] Fix R examples by removing depre...

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

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


---
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 #13714: [SPARK-15996][R] Fix R examples by removing deprecated f...

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

    https://github.com/apache/spark/pull/13714
  
    **[Test build #60655 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/60655/consoleFull)** for PR 13714 at commit [`852de0d`](https://github.com/apache/spark/commit/852de0d8bf1cb7fac00d6778d33df1cbf1596ec2).
     * 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 #13714: [SPARK-15996][R] Fix R examples by removing depre...

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/13714#discussion_r67440657
  
    --- Diff: examples/src/main/r/data-manipulation.R ---
    @@ -75,8 +75,8 @@ destDF <- select(flightsDF, "dest", "cancelled")
     
     # Using SQL to select columns of data
     # First, register the flights SparkDataFrame as a table
    -registerTempTable(flightsDF, "flightsTable")
    -destDF <- sql(sqlContext, "SELECT dest, cancelled FROM flightsTable")
    +createOrReplaceTempView(flightsDF, "flightsTable")
    --- End diff --
    
    Thank you all for nice conclusion! :)


---
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 #13714: [SPARK-15996][R] Fix R examples by removing depre...

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

    https://github.com/apache/spark/pull/13714#discussion_r67446548
  
    --- Diff: examples/src/main/r/data-manipulation.R ---
    @@ -75,8 +75,8 @@ destDF <- select(flightsDF, "dest", "cancelled")
     
     # Using SQL to select columns of data
     # First, register the flights SparkDataFrame as a table
    -registerTempTable(flightsDF, "flightsTable")
    -destDF <- sql(sqlContext, "SELECT dest, cancelled FROM flightsTable")
    +createOrReplaceTempView(flightsDF, "flightsTable")
    --- End diff --
    
    Cool, 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 issue #13714: [SPARK-15996][R] Fix R examples by removing deprecated f...

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

    https://github.com/apache/spark/pull/13714
  
    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 #13714: [SPARK-15996][R] Fix R examples by removing depre...

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

    https://github.com/apache/spark/pull/13714#discussion_r67438295
  
    --- Diff: examples/src/main/r/data-manipulation.R ---
    @@ -75,8 +75,8 @@ destDF <- select(flightsDF, "dest", "cancelled")
     
     # Using SQL to select columns of data
     # First, register the flights SparkDataFrame as a table
    -registerTempTable(flightsDF, "flightsTable")
    -destDF <- sql(sqlContext, "SELECT dest, cancelled FROM flightsTable")
    +createOrReplaceTempView(flightsDF, "flightsTable")
    --- End diff --
    
    Hmm - it looks like we have made a breaking change? IMO it's ok to leave the registerTempTable - at least we should deprecate before removing it completely? @shivaram - It is SPARK-15925


---
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 #13714: [SPARK-15996][R] Fix R examples by removing deprecated f...

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

    https://github.com/apache/spark/pull/13714
  
    Thank you, @shivaram !


---
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 #13714: [SPARK-15996][R] Fix R examples by removing deprecated f...

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

    https://github.com/apache/spark/pull/13714
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/60655/
    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 #13714: [SPARK-15996][R] Fix R examples by removing deprecated f...

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

    https://github.com/apache/spark/pull/13714
  
    Thanks for catching these!


---
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 #13714: [SPARK-15996][R] Fix R examples by removing depre...

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

    https://github.com/apache/spark/pull/13714#discussion_r67439698
  
    --- Diff: examples/src/main/r/data-manipulation.R ---
    @@ -75,8 +75,8 @@ destDF <- select(flightsDF, "dest", "cancelled")
     
     # Using SQL to select columns of data
     # First, register the flights SparkDataFrame as a table
    -registerTempTable(flightsDF, "flightsTable")
    -destDF <- sql(sqlContext, "SELECT dest, cancelled FROM flightsTable")
    +createOrReplaceTempView(flightsDF, "flightsTable")
    --- End diff --
    
    At first I thought it might be OK to just replace `registerTempTable` with `createOrReplaceTempView` since SparkR is still in experimental status. But after double thinking about this, a deprecation makes more sense here. Will add back the removed function and deprecate it. 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 issue #13714: [SPARK-15996][R] Fix R examples by removing deprecated f...

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

    https://github.com/apache/spark/pull/13714
  
    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 #13714: [SPARK-15996][R] Fix R examples by removing deprecated f...

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

    https://github.com/apache/spark/pull/13714
  
    Hi, @shivaram , @felixcheung , @sun-rui .
    Could you review 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 #13714: [SPARK-15996][R] Fix R examples by removing depre...

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

    https://github.com/apache/spark/pull/13714#discussion_r67443332
  
    --- Diff: examples/src/main/r/data-manipulation.R ---
    @@ -75,8 +75,8 @@ destDF <- select(flightsDF, "dest", "cancelled")
     
     # Using SQL to select columns of data
     # First, register the flights SparkDataFrame as a table
    -registerTempTable(flightsDF, "flightsTable")
    -destDF <- sql(sqlContext, "SELECT dest, cancelled FROM flightsTable")
    +createOrReplaceTempView(flightsDF, "flightsTable")
    --- End diff --
    
    Sure - I'm on it @liancheng 


---
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 #13714: [SPARK-15996][R] Fix R examples by removing deprecated f...

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

    https://github.com/apache/spark/pull/13714
  
    LGTM. Thanks for the fix @dongjoon-hyun 


---
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 #13714: [SPARK-15996][R] Fix R examples by removing depre...

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

    https://github.com/apache/spark/pull/13714#discussion_r67438648
  
    --- Diff: examples/src/main/r/data-manipulation.R ---
    @@ -75,8 +75,8 @@ destDF <- select(flightsDF, "dest", "cancelled")
     
     # Using SQL to select columns of data
     # First, register the flights SparkDataFrame as a table
    -registerTempTable(flightsDF, "flightsTable")
    -destDF <- sql(sqlContext, "SELECT dest, cancelled FROM flightsTable")
    +createOrReplaceTempView(flightsDF, "flightsTable")
    --- End diff --
    
    Hmm I assumed this was a breaking change in 2.0 in Spark SQL for Scala and Python as well.  But looking at https://github.com/apache/spark/pull/12945 it looks like the call is only deprecated and its not a breaking change - In that case we should add it back with a similar deprecation warning
    
    cc @liancheng 


---
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 #13714: [SPARK-15996][R] Fix R dataframe example by removing dep...

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

    https://github.com/apache/spark/pull/13714
  
    **[Test build #60655 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/60655/consoleFull)** for PR 13714 at commit [`852de0d`](https://github.com/apache/spark/commit/852de0d8bf1cb7fac00d6778d33df1cbf1596ec2).


---
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 #13714: [SPARK-15996][R] Fix R examples by removing deprecated f...

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

    https://github.com/apache/spark/pull/13714
  
    **[Test build #60656 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/60656/consoleFull)** for PR 13714 at commit [`6753083`](https://github.com/apache/spark/commit/6753083fd3a431f78329c52aef0522d78c66e6f2).


---
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 #13714: [SPARK-15996][R] Fix R examples by removing deprecated f...

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

    https://github.com/apache/spark/pull/13714
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/60656/
    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 #13714: [SPARK-15996][R] Fix R examples by removing deprecated f...

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

    https://github.com/apache/spark/pull/13714
  
    Merging this to master and branch-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 #13714: [SPARK-15996][R] Fix R examples by removing deprecated f...

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

    https://github.com/apache/spark/pull/13714
  
    **[Test build #60656 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/60656/consoleFull)** for PR 13714 at commit [`6753083`](https://github.com/apache/spark/commit/6753083fd3a431f78329c52aef0522d78c66e6f2).
     * 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