{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/13768","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/13768/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/13768/comments","events_url":"https://api.github.com/repos/apache/spark/issues/13768/events","html_url":"https://github.com/apache/spark/pull/13768","id":161060223,"number":13768,"title":"[SPARK-16053][R] Add `spark_partition_id` in SparkR","user":{"login":"dongjoon-hyun","id":9700541,"avatar_url":"https://avatars.githubusercontent.com/u/9700541?v=3","gravatar_id":"","url":"https://api.github.com/users/dongjoon-hyun","html_url":"https://github.com/dongjoon-hyun","followers_url":"https://api.github.com/users/dongjoon-hyun/followers","following_url":"https://api.github.com/users/dongjoon-hyun/following{/other_user}","gists_url":"https://api.github.com/users/dongjoon-hyun/gists{/gist_id}","starred_url":"https://api.github.com/users/dongjoon-hyun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dongjoon-hyun/subscriptions","organizations_url":"https://api.github.com/users/dongjoon-hyun/orgs","repos_url":"https://api.github.com/users/dongjoon-hyun/repos","events_url":"https://api.github.com/users/dongjoon-hyun/events{/privacy}","received_events_url":"https://api.github.com/users/dongjoon-hyun/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2016-06-19T07:11:12Z","updated_at":"2016-06-20T19:58:57Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/13768","html_url":"https://github.com/apache/spark/pull/13768","diff_url":"https://github.com/apache/spark/pull/13768.diff","patch_url":"https://github.com/apache/spark/pull/13768.patch"},"body":"## What changes were proposed in this pull request?\r\n\r\nThis PR adds `spark_partition_id` virtual column function in SparkR for API parity.\r\n\r\nThe following is just an example to illustrate a SparkR usage on a partitioned parquet table created by `spark.range(10).write.mode(\"overwrite\").parquet(\"/tmp/t1\")`.\r\n```r\r\n> collect(select(read.parquet('/tmp/t1'), c('id', spark_partition_id())))\r\n   id SPARK_PARTITION_ID()\r\n1   3                    0\r\n2   4                    0\r\n3   8                    1\r\n4   9                    1\r\n5   0                    2\r\n6   1                    3\r\n7   2                    4\r\n8   5                    5\r\n9   6                    6\r\n10  7                    7\r\n```\r\n\r\n## How was this patch tested?\r\n\r\nPass the Jenkins tests (including new testcase)."},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/227251840","html_url":"https://github.com/apache/spark/pull/13768#issuecomment-227251840","issue_url":"https://api.github.com/repos/apache/spark/issues/13768","id":227251840,"user":{"login":"AmplabJenkins","id":4031291,"avatar_url":"https://avatars.githubusercontent.com/u/4031291?v=3","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":"2016-06-20T19:58:57Z","updated_at":"2016-06-20T19:58:57Z","body":"Test PASSed.\nRefer to this link for build results (access rights to CI server needed): \nhttps://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/60867/\nTest PASSed."}}
{"actor":{"display_login":"AmplabJenkins"}}