{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/21142","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/21142/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/21142/comments","events_url":"https://api.github.com/repos/apache/spark/issues/21142/events","html_url":"https://github.com/apache/spark/pull/21142","id":317298269,"number":21142,"title":"[SPARK-24069][R] Add array_min / array_max functions","user":{"login":"HyukjinKwon","id":6477701,"avatar_url":"https://avatars0.githubusercontent.com/u/6477701?v=4","gravatar_id":"","url":"https://api.github.com/users/HyukjinKwon","html_url":"https://github.com/HyukjinKwon","followers_url":"https://api.github.com/users/HyukjinKwon/followers","following_url":"https://api.github.com/users/HyukjinKwon/following{/other_user}","gists_url":"https://api.github.com/users/HyukjinKwon/gists{/gist_id}","starred_url":"https://api.github.com/users/HyukjinKwon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HyukjinKwon/subscriptions","organizations_url":"https://api.github.com/users/HyukjinKwon/orgs","repos_url":"https://api.github.com/users/HyukjinKwon/repos","events_url":"https://api.github.com/users/HyukjinKwon/events{/privacy}","received_events_url":"https://api.github.com/users/HyukjinKwon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-04-24T16:14:53Z","updated_at":"2018-04-25T07:05:03Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/21142","html_url":"https://github.com/apache/spark/pull/21142","diff_url":"https://github.com/apache/spark/pull/21142.diff","patch_url":"https://github.com/apache/spark/pull/21142.patch"},"body":"## What changes were proposed in this pull request?\r\n\r\nThis PR proposes to add array_max and array_min in R side too.\r\n\r\narray_max:\r\n\r\n```r\r\ndf <- createDataFrame(cbind(model = rownames(mtcars), mtcars))\r\nmutated <- mutate(df, v1 = create_array(df$gear, df$am, df$carb))\r\nhead(select(mutated, array_max(mutated$v1)))\r\n```\r\n\r\n```\r\n  array_max(v1)\r\n1             4\r\n2             4\r\n3             4\r\n4             3\r\n5             3\r\n6             3\r\n```\r\n\r\narray_min:\r\n\r\n```r\r\ndf <- createDataFrame(cbind(model = rownames(mtcars), mtcars))\r\nmutated <- mutate(df, v1 = create_array(df$mpg, df$cyl, df$hp))\r\nhead(select(mutated, array_min(mutated$v1)))\r\n```\r\n\r\n```\r\n  array_min(v1)\r\n1             6\r\n2             6\r\n3             4\r\n4             6\r\n5             8\r\n6             6\r\n```\r\n\r\n## How was this patch tested?\r\n\r\nUnit tests were added in `R/pkg/tests/fulltests/test_sparkSQL.R` and manually tested. Documentation was manually built and verified."},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/384181967","html_url":"https://github.com/apache/spark/pull/21142#issuecomment-384181967","issue_url":"https://api.github.com/repos/apache/spark/issues/21142","id":384181967,"user":{"login":"AmplabJenkins","id":4031291,"avatar_url":"https://avatars3.githubusercontent.com/u/4031291?v=4","gravatar_id":"","url":"https://api.github.com/users/AmplabJenkins","html_url":"https://github.com/AmplabJenkins","followers_url":"https://api.github.com/users/AmplabJenkins/followers","following_url":"https://api.github.com/users/AmplabJenkins/following{/other_user}","gists_url":"https://api.github.com/users/AmplabJenkins/gists{/gist_id}","starred_url":"https://api.github.com/users/AmplabJenkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AmplabJenkins/subscriptions","organizations_url":"https://api.github.com/users/AmplabJenkins/orgs","repos_url":"https://api.github.com/users/AmplabJenkins/repos","events_url":"https://api.github.com/users/AmplabJenkins/events{/privacy}","received_events_url":"https://api.github.com/users/AmplabJenkins/received_events","type":"User","site_admin":false},"created_at":"2018-04-25T07:05:03Z","updated_at":"2018-04-25T07:05:03Z","author_association":"NONE","body":"Test FAILed.\nRefer to this link for build results (access rights to CI server needed): \nhttps://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/89824/\nTest FAILed."}}
{"actor":{"display_login":"AmplabJenkins"}}