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

[GitHub] spark pull request #18809: [SPARK-21602][R] Add map_keys and map_values func...

GitHub user HyukjinKwon opened a pull request:

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

    [SPARK-21602][R] Add map_keys and map_values functions to R

    ## What changes were proposed in this pull request?
    
    This PR adds `map_values` and `map_keys` to R API.
    
    ```r
    > df <- createDataFrame(cbind(model = rownames(mtcars), mtcars))
    > tmp <- mutate(df, v = create_map(df$model, df$cyl))
    > head(select(tmp, map_keys(tmp$v)))
    ```
    ```
            map_keys(v)
    1         Mazda RX4
    2     Mazda RX4 Wag
    3        Datsun 710
    4    Hornet 4 Drive
    5 Hornet Sportabout
    6           Valiant
    ```
    ```r
    > head(select(tmp, map_values(tmp$v)))
    ```
    ```
      map_values(v)
    1             6
    2             6
    3             4
    4             6
    5             8
    6             6
    ```
    
    ## How was this patch tested?
    
    Manual tests and unit tests in `R/pkg/tests/fulltests/test_sparkSQL.R`

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

    $ git pull https://github.com/HyukjinKwon/spark map-keys-values-r

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

    https://github.com/apache/spark/pull/18809.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 #18809
    
----
commit 75b615a5d0728f14a0219cb1f0576cfcb3e1f73d
Author: hyukjinkwon <gu...@gmail.com>
Date:   2017-08-02T04:10:29Z

    Add map_keys and map_values functions to R

commit d87f4c4a63067aba8d1dc4228fda5d94bd5c830c
Author: hyukjinkwon <gu...@gmail.com>
Date:   2017-08-02T04:39:02Z

    Add examples 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 issue #18809: [SPARK-21602][R] Add map_keys and map_values functions t...

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

    https://github.com/apache/spark/pull/18809
  
    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 issue #18809: [SPARK-21602][R] Add map_keys and map_values functions t...

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

    https://github.com/apache/spark/pull/18809
  
    cc @felixcheung, could you take a look when you have some time?


---
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 #18809: [SPARK-21602][R] Add map_keys and map_values functions t...

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

    https://github.com/apache/spark/pull/18809
  
    Merged 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 #18809: [SPARK-21602][R] Add map_keys and map_values func...

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

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


---
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 #18809: [SPARK-21602][R] Add map_keys and map_values functions t...

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

    https://github.com/apache/spark/pull/18809
  
    **[Test build #80147 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/80147/testReport)** for PR 18809 at commit [`d87f4c4`](https://github.com/apache/spark/commit/d87f4c4a63067aba8d1dc4228fda5d94bd5c830c).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18809: [SPARK-21602][R] Add map_keys and map_values functions t...

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

    https://github.com/apache/spark/pull/18809
  
    **[Test build #80147 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/80147/testReport)** for PR 18809 at commit [`d87f4c4`](https://github.com/apache/spark/commit/d87f4c4a63067aba8d1dc4228fda5d94bd5c830c).


---
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 #18809: [SPARK-21602][R] Add map_keys and map_values func...

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

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


---
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 #18809: [SPARK-21602][R] Add map_keys and map_values func...

Posted by HyukjinKwon <gi...@git.apache.org>.
GitHub user HyukjinKwon reopened a pull request:

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

    [SPARK-21602][R] Add map_keys and map_values functions to R

    ## What changes were proposed in this pull request?
    
    This PR adds `map_values` and `map_keys` to R API.
    
    ```r
    > df <- createDataFrame(cbind(model = rownames(mtcars), mtcars))
    > tmp <- mutate(df, v = create_map(df$model, df$cyl))
    > head(select(tmp, map_keys(tmp$v)))
    ```
    ```
            map_keys(v)
    1         Mazda RX4
    2     Mazda RX4 Wag
    3        Datsun 710
    4    Hornet 4 Drive
    5 Hornet Sportabout
    6           Valiant
    ```
    ```r
    > head(select(tmp, map_values(tmp$v)))
    ```
    ```
      map_values(v)
    1             6
    2             6
    3             4
    4             6
    5             8
    6             6
    ```
    
    ## How was this patch tested?
    
    Manual tests and unit tests in `R/pkg/tests/fulltests/test_sparkSQL.R`

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

    $ git pull https://github.com/HyukjinKwon/spark map-keys-values-r

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

    https://github.com/apache/spark/pull/18809.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 #18809
    
----
commit 75b615a5d0728f14a0219cb1f0576cfcb3e1f73d
Author: hyukjinkwon <gu...@gmail.com>
Date:   2017-08-02T04:10:29Z

    Add map_keys and map_values functions to R

commit d87f4c4a63067aba8d1dc4228fda5d94bd5c830c
Author: hyukjinkwon <gu...@gmail.com>
Date:   2017-08-02T04:39:02Z

    Add examples 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 issue #18809: [SPARK-21602][R] Add map_keys and map_values functions t...

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

    https://github.com/apache/spark/pull/18809
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/80147/
    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 #18809: [SPARK-21602][R] Add map_keys and map_values functions t...

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

    https://github.com/apache/spark/pull/18809
  
    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 #18809: [SPARK-21602][R] Add map_keys and map_values functions t...

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

    https://github.com/apache/spark/pull/18809
  
    Thank you @felixcheung and @actuaryzhang.


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