{"action":"created","comment":{"url":"https://api.github.com/repos/amplab-extras/SparkR-pkg/pulls/comments/24311611","id":24311611,"diff_hunk":"@@ -373,3 +384,17 @@ test_that(\"fullOuterJoin() on pairwise RDDs\", {\n   expect_equal(sortKeyValueList(actual),\n                sortKeyValueList(list(list(\"a\", list(1, NULL)), list(\"b\", list(2, NULL)), list(\"d\", list(NULL, 4)), list(\"c\", list(NULL, 3)))))\n })\n+\n+test_that(\"sortByKey() on pairwise RDDs\", {\n+  numPairsRdd <- map(rdd, function(x) { list (x, x) })\n+  sortedRdd <- sortByKey(numPairsRdd, ascending = FALSE)\n+  actual <- collect(sortedRdd)\n+  numPairs <- lapply(nums, function(x) { list (x, x) })\n+  expect_equal(actual, sortKeyValueList(numPairs, decreasing = TRUE))\n+\n+  rdd2 <- parallelize(sc, sort(nums, decreasing = TRUE), 2L)\n+  numPairsRdd2 <- map(rdd2, function(x) { list (x, x) })\n+  sortedRdd2 <- sortByKey(numPairsRdd2)\n+  actual <- collect(sortedRdd2)\n+  expect_equal(actual, numPairs)\n+})","path":"pkg/inst/tests/test_rdd.R","position":35,"original_position":35,"commit_id":"804355977ba387a036b9c5355156cf547e20a738","original_commit_id":"804355977ba387a036b9c5355156cf547e20a738","user":{"login":"sun-rui","id":2528327,"avatar_url":"https://avatars.githubusercontent.com/u/2528327?v=3","gravatar_id":"","url":"https://api.github.com/users/sun-rui","html_url":"https://github.com/sun-rui","followers_url":"https://api.github.com/users/sun-rui/followers","following_url":"https://api.github.com/users/sun-rui/following{/other_user}","gists_url":"https://api.github.com/users/sun-rui/gists{/gist_id}","starred_url":"https://api.github.com/users/sun-rui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sun-rui/subscriptions","organizations_url":"https://api.github.com/users/sun-rui/orgs","repos_url":"https://api.github.com/users/sun-rui/repos","events_url":"https://api.github.com/users/sun-rui/events{/privacy}","received_events_url":"https://api.github.com/users/sun-rui/received_events","type":"User","site_admin":false},"body":"fixed","created_at":"2015-02-09T06:59:57Z","updated_at":"2015-02-09T06:59:57Z","html_url":"https://github.com/amplab-extras/SparkR-pkg/pull/154#discussion_r24311611","pull_request_url":"https://api.github.com/repos/amplab-extras/SparkR-pkg/pulls/154","_links":{"self":{"href":"https://api.github.com/repos/amplab-extras/SparkR-pkg/pulls/comments/24311611"},"html":{"href":"https://github.com/amplab-extras/SparkR-pkg/pull/154#discussion_r24311611"},"pull_request":{"href":"https://api.github.com/repos/amplab-extras/SparkR-pkg/pulls/154"}}},"pull_request":{"url":"https://api.github.com/repos/amplab-extras/SparkR-pkg/pulls/154","id":28641103,"html_url":"https://github.com/amplab-extras/SparkR-pkg/pull/154","diff_url":"https://github.com/amplab-extras/SparkR-pkg/pull/154.diff","patch_url":"https://github.com/amplab-extras/SparkR-pkg/pull/154.patch","issue_url":"https://api.github.com/repos/amplab-extras/SparkR-pkg/issues/154","number":154,"state":"open","locked":false,"title":"[SPARKR-150] phase 1: implement sortBy() and sortByKey().","user":{"login":"sun-rui","id":2528327,"avatar_url":"https://avatars.githubusercontent.com/u/2528327?v=3","gravatar_id":"","url":"https://api.github.com/users/sun-rui","html_url":"https://github.com/sun-rui","followers_url":"https://api.github.com/users/sun-rui/followers","following_url":"https://api.github.com/users/sun-rui/following{/other_user}","gists_url":"https://api.github.com/users/sun-rui/gists{/gist_id}","starred_url":"https://api.github.com/users/sun-rui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sun-rui/subscriptions","organizations_url":"https://api.github.com/users/sun-rui/orgs","repos_url":"https://api.github.com/users/sun-rui/repos","events_url":"https://api.github.com/users/sun-rui/events{/privacy}","received_events_url":"https://api.github.com/users/sun-rui/received_events","type":"User","site_admin":false},"body":"This is phase 1 patch for SPARKR-150. It implements sortBy() and sortByKey().\r\n\r\nBasically the rangePartitioner is the same as that in PySpark. It is simpler that the rangePartitioner in Spark, we can enhance it later if necessary.\r\n\r\nNow add only two test cases. Will add more test cases during review.","created_at":"2015-02-04T14:15:05Z","updated_at":"2015-02-09T06:59:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/amplab-extras/SparkR-pkg/pulls/154/commits","review_comments_url":"https://api.github.com/repos/amplab-extras/SparkR-pkg/pulls/154/comments","review_comment_url":"https://api.github.com/repos/amplab-extras/SparkR-pkg/pulls/comments/{number}","comments_url":"https://api.github.com/repos/amplab-extras/SparkR-pkg/issues/154/comments","statuses_url":"https://api.github.com/repos/amplab-extras/SparkR-pkg/statuses/804355977ba387a036b9c5355156cf547e20a738","head":{"label":"sun-rui:SPARKR-150","ref":"SPARKR-150","sha":"804355977ba387a036b9c5355156cf547e20a738","user":{"login":"sun-rui","id":2528327,"avatar_url":"https://avatars.githubusercontent.com/u/2528327?v=3","gravatar_id":"","url":"https://api.github.com/users/sun-rui","html_url":"https://github.com/sun-rui","followers_url":"https://api.github.com/users/sun-rui/followers","following_url":"https://api.github.com/users/sun-rui/following{/other_user}","gists_url":"https://api.github.com/users/sun-rui/gists{/gist_id}","starred_url":"https://api.github.com/users/sun-rui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sun-rui/subscriptions","organizations_url":"https://api.github.com/users/sun-rui/orgs","repos_url":"https://api.github.com/users/sun-rui/repos","events_url":"https://api.github.com/users/sun-rui/events{/privacy}","received_events_url":"https://api.github.com/users/sun-rui/received_events","type":"User","site_admin":false},"repo":{"id":24314720,"name":"SparkR-pkg","full_name":"sun-rui/SparkR-pkg","owner":{"login":"sun-rui","id":2528327,"avatar_url":"https://avatars.githubusercontent.com/u/2528327?v=3","gravatar_id":"","url":"https://api.github.com/users/sun-rui","html_url":"https://github.com/sun-rui","followers_url":"https://api.github.com/users/sun-rui/followers","following_url":"https://api.github.com/users/sun-rui/following{/other_user}","gists_url":"https://api.github.com/users/sun-rui/gists{/gist_id}","starred_url":"https://api.github.com/users/sun-rui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sun-rui/subscriptions","organizations_url":"https://api.github.com/users/sun-rui/orgs","repos_url":"https://api.github.com/users/sun-rui/repos","events_url":"https://api.github.com/users/sun-rui/events{/privacy}","received_events_url":"https://api.github.com/users/sun-rui/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sun-rui/SparkR-pkg","description":"R frontend for Spark","fork":true,"url":"https://api.github.com/repos/sun-rui/SparkR-pkg","forks_url":"https://api.github.com/repos/sun-rui/SparkR-pkg/forks","keys_url":"https://api.github.com/repos/sun-rui/SparkR-pkg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sun-rui/SparkR-pkg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sun-rui/SparkR-pkg/teams","hooks_url":"https://api.github.com/repos/sun-rui/SparkR-pkg/hooks","issue_events_url":"https://api.github.com/repos/sun-rui/SparkR-pkg/issues/events{/number}","events_url":"https://api.github.com/repos/sun-rui/SparkR-pkg/events","assignees_url":"https://api.github.com/repos/sun-rui/SparkR-pkg/assignees{/user}","branches_url":"https://api.github.com/repos/sun-rui/SparkR-pkg/branches{/branch}","tags_url":"https://api.github.com/repos/sun-rui/SparkR-pkg/tags","blobs_url":"https://api.github.com/repos/sun-rui/SparkR-pkg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sun-rui/SparkR-pkg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sun-rui/SparkR-pkg/git/refs{/sha}","trees_url":"https://api.github.com/repos/sun-rui/SparkR-pkg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sun-rui/SparkR-pkg/statuses/{sha}","languages_url":"https://api.github.com/repos/sun-rui/SparkR-pkg/languages","stargazers_url":"https://api.github.com/repos/sun-rui/SparkR-pkg/stargazers","contributors_url":"https://api.github.com/repos/sun-rui/SparkR-pkg/contributors","subscribers_url":"https://api.github.com/repos/sun-rui/SparkR-pkg/subscribers","subscription_url":"https://api.github.com/repos/sun-rui/SparkR-pkg/subscription","commits_url":"https://api.github.com/repos/sun-rui/SparkR-pkg/commits{/sha}","git_commits_url":"https://api.github.com/repos/sun-rui/SparkR-pkg/git/commits{/sha}","comments_url":"https://api.github.com/repos/sun-rui/SparkR-pkg/comments{/number}","issue_comment_url":"https://api.github.com/repos/sun-rui/SparkR-pkg/issues/comments/{number}","contents_url":"https://api.github.com/repos/sun-rui/SparkR-pkg/contents/{+path}","compare_url":"https://api.github.com/repos/sun-rui/SparkR-pkg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sun-rui/SparkR-pkg/merges","archive_url":"https://api.github.com/repos/sun-rui/SparkR-pkg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sun-rui/SparkR-pkg/downloads","issues_url":"https://api.github.com/repos/sun-rui/SparkR-pkg/issues{/number}","pulls_url":"https://api.github.com/repos/sun-rui/SparkR-pkg/pulls{/number}","milestones_url":"https://api.github.com/repos/sun-rui/SparkR-pkg/milestones{/number}","notifications_url":"https://api.github.com/repos/sun-rui/SparkR-pkg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sun-rui/SparkR-pkg/labels{/name}","releases_url":"https://api.github.com/repos/sun-rui/SparkR-pkg/releases{/id}","created_at":"2014-09-22T04:51:58Z","updated_at":"2014-09-22T04:56:09Z","pushed_at":"2015-02-05T04:12:44Z","git_url":"git://github.com/sun-rui/SparkR-pkg.git","ssh_url":"git@github.com:sun-rui/SparkR-pkg.git","clone_url":"https://github.com/sun-rui/SparkR-pkg.git","svn_url":"https://github.com/sun-rui/SparkR-pkg","homepage":"http://amplab-extras.github.io/SparkR-pkg","size":3550,"stargazers_count":0,"watchers_count":0,"language":"R","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"amplab-extras:master","ref":"master","sha":"08ff30b14f86974ac085bd0e9ab95e536839bfc8","user":{"login":"amplab-extras","id":6403540,"avatar_url":"https://avatars.githubusercontent.com/u/6403540?v=3","gravatar_id":"","url":"https://api.github.com/users/amplab-extras","html_url":"https://github.com/amplab-extras","followers_url":"https://api.github.com/users/amplab-extras/followers","following_url":"https://api.github.com/users/amplab-extras/following{/other_user}","gists_url":"https://api.github.com/users/amplab-extras/gists{/gist_id}","starred_url":"https://api.github.com/users/amplab-extras/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amplab-extras/subscriptions","organizations_url":"https://api.github.com/users/amplab-extras/orgs","repos_url":"https://api.github.com/users/amplab-extras/repos","events_url":"https://api.github.com/users/amplab-extras/events{/privacy}","received_events_url":"https://api.github.com/users/amplab-extras/received_events","type":"Organization","site_admin":false},"repo":{"id":15365789,"name":"SparkR-pkg","full_name":"amplab-extras/SparkR-pkg","owner":{"login":"amplab-extras","id":6403540,"avatar_url":"https://avatars.githubusercontent.com/u/6403540?v=3","gravatar_id":"","url":"https://api.github.com/users/amplab-extras","html_url":"https://github.com/amplab-extras","followers_url":"https://api.github.com/users/amplab-extras/followers","following_url":"https://api.github.com/users/amplab-extras/following{/other_user}","gists_url":"https://api.github.com/users/amplab-extras/gists{/gist_id}","starred_url":"https://api.github.com/users/amplab-extras/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amplab-extras/subscriptions","organizations_url":"https://api.github.com/users/amplab-extras/orgs","repos_url":"https://api.github.com/users/amplab-extras/repos","events_url":"https://api.github.com/users/amplab-extras/events{/privacy}","received_events_url":"https://api.github.com/users/amplab-extras/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/amplab-extras/SparkR-pkg","description":"R frontend for Spark","fork":false,"url":"https://api.github.com/repos/amplab-extras/SparkR-pkg","forks_url":"https://api.github.com/repos/amplab-extras/SparkR-pkg/forks","keys_url":"https://api.github.com/repos/amplab-extras/SparkR-pkg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/amplab-extras/SparkR-pkg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/amplab-extras/SparkR-pkg/teams","hooks_url":"https://api.github.com/repos/amplab-extras/SparkR-pkg/hooks","issue_events_url":"https://api.github.com/repos/amplab-extras/SparkR-pkg/issues/events{/number}","events_url":"https://api.github.com/repos/amplab-extras/SparkR-pkg/events","assignees_url":"https://api.github.com/repos/amplab-extras/SparkR-pkg/assignees{/user}","branches_url":"https://api.github.com/repos/amplab-extras/SparkR-pkg/branches{/branch}","tags_url":"https://api.github.com/repos/amplab-extras/SparkR-pkg/tags","blobs_url":"https://api.github.com/repos/amplab-extras/SparkR-pkg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/amplab-extras/SparkR-pkg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/amplab-extras/SparkR-pkg/git/refs{/sha}","trees_url":"https://api.github.com/repos/amplab-extras/SparkR-pkg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/amplab-extras/SparkR-pkg/statuses/{sha}","languages_url":"https://api.github.com/repos/amplab-extras/SparkR-pkg/languages","stargazers_url":"https://api.github.com/repos/amplab-extras/SparkR-pkg/stargazers","contributors_url":"https://api.github.com/repos/amplab-extras/SparkR-pkg/contributors","subscribers_url":"https://api.github.com/repos/amplab-extras/SparkR-pkg/subscribers","subscription_url":"https://api.github.com/repos/amplab-extras/SparkR-pkg/subscription","commits_url":"https://api.github.com/repos/amplab-extras/SparkR-pkg/commits{/sha}","git_commits_url":"https://api.github.com/repos/amplab-extras/SparkR-pkg/git/commits{/sha}","comments_url":"https://api.github.com/repos/amplab-extras/SparkR-pkg/comments{/number}","issue_comment_url":"https://api.github.com/repos/amplab-extras/SparkR-pkg/issues/comments/{number}","contents_url":"https://api.github.com/repos/amplab-extras/SparkR-pkg/contents/{+path}","compare_url":"https://api.github.com/repos/amplab-extras/SparkR-pkg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/amplab-extras/SparkR-pkg/merges","archive_url":"https://api.github.com/repos/amplab-extras/SparkR-pkg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/amplab-extras/SparkR-pkg/downloads","issues_url":"https://api.github.com/repos/amplab-extras/SparkR-pkg/issues{/number}","pulls_url":"https://api.github.com/repos/amplab-extras/SparkR-pkg/pulls{/number}","milestones_url":"https://api.github.com/repos/amplab-extras/SparkR-pkg/milestones{/number}","notifications_url":"https://api.github.com/repos/amplab-extras/SparkR-pkg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/amplab-extras/SparkR-pkg/labels{/name}","releases_url":"https://api.github.com/repos/amplab-extras/SparkR-pkg/releases{/id}","created_at":"2013-12-21T21:16:54Z","updated_at":"2015-02-09T06:59:50Z","pushed_at":"2015-02-09T06:59:50Z","git_url":"git://github.com/amplab-extras/SparkR-pkg.git","ssh_url":"git@github.com:amplab-extras/SparkR-pkg.git","clone_url":"https://github.com/amplab-extras/SparkR-pkg.git","svn_url":"https://github.com/amplab-extras/SparkR-pkg","homepage":"http://amplab-extras.github.io/SparkR-pkg","size":4639,"stargazers_count":383,"watchers_count":383,"language":"R","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":133,"mirror_url":null,"open_issues_count":22,"forks":133,"open_issues":22,"watchers":383,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/amplab-extras/SparkR-pkg/pulls/154"},"html":{"href":"https://github.com/amplab-extras/SparkR-pkg/pull/154"},"issue":{"href":"https://api.github.com/repos/amplab-extras/SparkR-pkg/issues/154"},"comments":{"href":"https://api.github.com/repos/amplab-extras/SparkR-pkg/issues/154/comments"},"review_comments":{"href":"https://api.github.com/repos/amplab-extras/SparkR-pkg/pulls/154/comments"},"review_comment":{"href":"https://api.github.com/repos/amplab-extras/SparkR-pkg/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/amplab-extras/SparkR-pkg/pulls/154/commits"},"statuses":{"href":"https://api.github.com/repos/amplab-extras/SparkR-pkg/statuses/804355977ba387a036b9c5355156cf547e20a738"}}}}