{"action":"created","comment":{"url":"https://api.github.com/repos/prestodb/presto/pulls/comments/67932861","id":67932861,"diff_hunk":"@@ -40,40 +34,35 @@\n         implements CompactionSetCreator\n {\n     private final long maxShardSizeBytes;\n-    private final Type type;\n     private final long maxShardRows;\n \n-    public TemporalCompactionSetCreator(DataSize maxShardSize, long maxShardRows, Type type)\n+    public TemporalCompactionSetCreator(DataSize maxShardSize, long maxShardRows)\n     {\n         requireNonNull(maxShardSize, \"maxShardSize is null\");\n-        checkArgument(type.equals(DATE) || type.equals(TIMESTAMP), \"type must be timestamp or date\");\n-\n         this.maxShardSizeBytes = maxShardSize.toBytes();\n \n         checkArgument(maxShardRows > 0, \"maxShardRows must be > 0\");\n         this.maxShardRows = maxShardRows;\n-        this.type = requireNonNull(type, \"type is null\");\n     }\n \n     @Override\n-    public Set<OrganizationSet> createCompactionSets(long tableId, Set<ShardMetadata> shardMetadata)\n+    public Set<OrganizationSet> createCompactionSets(Table tableInfo, Collection<ShardIndexInfo> shardMetadata)\n     {\n         if (shardMetadata.isEmpty()) {\n             return ImmutableSet.of();\n         }\n \n-        Set<OptionalInt> bucketNumbers = shardMetadata.stream()\n-                .map(ShardMetadata::getBucketNumber)\n-                .collect(toSet());\n-        verify(bucketNumbers.size() == 1, \"shards must belong to the same bucket\");\n-        OptionalInt bucketNumber = Iterables.getOnlyElement(bucketNumbers);\n-\n         ImmutableSet.Builder<OrganizationSet> compactionSets = ImmutableSet.builder();\n         // don't compact shards across days or buckets\n-        Collection<Collection<ShardMetadata>> shardSets = ShardOrganizerUtil.getShardsByDaysBuckets(shardMetadata, type);\n+        Collection<Collection<ShardIndexInfo>> shardSets = ShardOrganizerUtil.getShardsByDaysBuckets(tableInfo, shardMetadata);","path":"presto-raptor/src/main/java/com/facebook/presto/raptor/storage/organization/TemporalCompactionSetCreator.java","position":null,"original_position":65,"commit_id":"eedda6c694544d16e229dab10794cd017c45b442","original_commit_id":"f64ac1c65d1aab67f1fcb92e89d08d1b9b0b338c","user":{"login":"electrum","id":9230,"avatar_url":"https://avatars.githubusercontent.com/u/9230?v=3","gravatar_id":"","url":"https://api.github.com/users/electrum","html_url":"https://github.com/electrum","followers_url":"https://api.github.com/users/electrum/followers","following_url":"https://api.github.com/users/electrum/following{/other_user}","gists_url":"https://api.github.com/users/electrum/gists{/gist_id}","starred_url":"https://api.github.com/users/electrum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/electrum/subscriptions","organizations_url":"https://api.github.com/users/electrum/orgs","repos_url":"https://api.github.com/users/electrum/repos","events_url":"https://api.github.com/users/electrum/events{/privacy}","received_events_url":"https://api.github.com/users/electrum/received_events","type":"User","site_admin":false},"body":"Maybe static import this","created_at":"2016-06-21T19:11:06Z","updated_at":"2016-06-21T19:11:06Z","html_url":"https://github.com/prestodb/presto/pull/5477#discussion_r67932861","pull_request_url":"https://api.github.com/repos/prestodb/presto/pulls/5477","_links":{"self":{"href":"https://api.github.com/repos/prestodb/presto/pulls/comments/67932861"},"html":{"href":"https://github.com/prestodb/presto/pull/5477#discussion_r67932861"},"pull_request":{"href":"https://api.github.com/repos/prestodb/presto/pulls/5477"}}},"pull_request":{"url":"https://api.github.com/repos/prestodb/presto/pulls/5477","id":74512999,"html_url":"https://github.com/prestodb/presto/pull/5477","diff_url":"https://github.com/prestodb/presto/pull/5477.diff","patch_url":"https://github.com/prestodb/presto/pull/5477.patch","issue_url":"https://api.github.com/repos/prestodb/presto/issues/5477","number":5477,"state":"open","locked":false,"title":"Refactor shard compaction in Raptor ","user":{"login":"nileema","id":1034143,"avatar_url":"https://avatars.githubusercontent.com/u/1034143?v=3","gravatar_id":"","url":"https://api.github.com/users/nileema","html_url":"https://github.com/nileema","followers_url":"https://api.github.com/users/nileema/followers","following_url":"https://api.github.com/users/nileema/following{/other_user}","gists_url":"https://api.github.com/users/nileema/gists{/gist_id}","starred_url":"https://api.github.com/users/nileema/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nileema/subscriptions","organizations_url":"https://api.github.com/users/nileema/orgs","repos_url":"https://api.github.com/users/nileema/repos","events_url":"https://api.github.com/users/nileema/events{/privacy}","received_events_url":"https://api.github.com/users/nileema/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-20T21:04:19Z","updated_at":"2016-06-21T19:11:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5fa8431112cbb79d7960802a2c5ae666a168b45b","assignee":{"login":"electrum","id":9230,"avatar_url":"https://avatars.githubusercontent.com/u/9230?v=3","gravatar_id":"","url":"https://api.github.com/users/electrum","html_url":"https://github.com/electrum","followers_url":"https://api.github.com/users/electrum/followers","following_url":"https://api.github.com/users/electrum/following{/other_user}","gists_url":"https://api.github.com/users/electrum/gists{/gist_id}","starred_url":"https://api.github.com/users/electrum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/electrum/subscriptions","organizations_url":"https://api.github.com/users/electrum/orgs","repos_url":"https://api.github.com/users/electrum/repos","events_url":"https://api.github.com/users/electrum/events{/privacy}","received_events_url":"https://api.github.com/users/electrum/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/prestodb/presto/pulls/5477/commits","review_comments_url":"https://api.github.com/repos/prestodb/presto/pulls/5477/comments","review_comment_url":"https://api.github.com/repos/prestodb/presto/pulls/comments{/number}","comments_url":"https://api.github.com/repos/prestodb/presto/issues/5477/comments","statuses_url":"https://api.github.com/repos/prestodb/presto/statuses/eedda6c694544d16e229dab10794cd017c45b442","head":{"label":"nileema:compaction-package","ref":"compaction-package","sha":"eedda6c694544d16e229dab10794cd017c45b442","user":{"login":"nileema","id":1034143,"avatar_url":"https://avatars.githubusercontent.com/u/1034143?v=3","gravatar_id":"","url":"https://api.github.com/users/nileema","html_url":"https://github.com/nileema","followers_url":"https://api.github.com/users/nileema/followers","following_url":"https://api.github.com/users/nileema/following{/other_user}","gists_url":"https://api.github.com/users/nileema/gists{/gist_id}","starred_url":"https://api.github.com/users/nileema/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nileema/subscriptions","organizations_url":"https://api.github.com/users/nileema/orgs","repos_url":"https://api.github.com/users/nileema/repos","events_url":"https://api.github.com/users/nileema/events{/privacy}","received_events_url":"https://api.github.com/users/nileema/received_events","type":"User","site_admin":false},"repo":{"id":12574341,"name":"presto","full_name":"nileema/presto","owner":{"login":"nileema","id":1034143,"avatar_url":"https://avatars.githubusercontent.com/u/1034143?v=3","gravatar_id":"","url":"https://api.github.com/users/nileema","html_url":"https://github.com/nileema","followers_url":"https://api.github.com/users/nileema/followers","following_url":"https://api.github.com/users/nileema/following{/other_user}","gists_url":"https://api.github.com/users/nileema/gists{/gist_id}","starred_url":"https://api.github.com/users/nileema/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nileema/subscriptions","organizations_url":"https://api.github.com/users/nileema/orgs","repos_url":"https://api.github.com/users/nileema/repos","events_url":"https://api.github.com/users/nileema/events{/privacy}","received_events_url":"https://api.github.com/users/nileema/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nileema/presto","description":"","fork":true,"url":"https://api.github.com/repos/nileema/presto","forks_url":"https://api.github.com/repos/nileema/presto/forks","keys_url":"https://api.github.com/repos/nileema/presto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nileema/presto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nileema/presto/teams","hooks_url":"https://api.github.com/repos/nileema/presto/hooks","issue_events_url":"https://api.github.com/repos/nileema/presto/issues/events{/number}","events_url":"https://api.github.com/repos/nileema/presto/events","assignees_url":"https://api.github.com/repos/nileema/presto/assignees{/user}","branches_url":"https://api.github.com/repos/nileema/presto/branches{/branch}","tags_url":"https://api.github.com/repos/nileema/presto/tags","blobs_url":"https://api.github.com/repos/nileema/presto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nileema/presto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nileema/presto/git/refs{/sha}","trees_url":"https://api.github.com/repos/nileema/presto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nileema/presto/statuses/{sha}","languages_url":"https://api.github.com/repos/nileema/presto/languages","stargazers_url":"https://api.github.com/repos/nileema/presto/stargazers","contributors_url":"https://api.github.com/repos/nileema/presto/contributors","subscribers_url":"https://api.github.com/repos/nileema/presto/subscribers","subscription_url":"https://api.github.com/repos/nileema/presto/subscription","commits_url":"https://api.github.com/repos/nileema/presto/commits{/sha}","git_commits_url":"https://api.github.com/repos/nileema/presto/git/commits{/sha}","comments_url":"https://api.github.com/repos/nileema/presto/comments{/number}","issue_comment_url":"https://api.github.com/repos/nileema/presto/issues/comments{/number}","contents_url":"https://api.github.com/repos/nileema/presto/contents/{+path}","compare_url":"https://api.github.com/repos/nileema/presto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nileema/presto/merges","archive_url":"https://api.github.com/repos/nileema/presto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nileema/presto/downloads","issues_url":"https://api.github.com/repos/nileema/presto/issues{/number}","pulls_url":"https://api.github.com/repos/nileema/presto/pulls{/number}","milestones_url":"https://api.github.com/repos/nileema/presto/milestones{/number}","notifications_url":"https://api.github.com/repos/nileema/presto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nileema/presto/labels{/name}","releases_url":"https://api.github.com/repos/nileema/presto/releases{/id}","deployments_url":"https://api.github.com/repos/nileema/presto/deployments","created_at":"2013-09-03T20:40:19Z","updated_at":"2014-08-13T18:36:54Z","pushed_at":"2016-06-21T18:10:30Z","git_url":"git://github.com/nileema/presto.git","ssh_url":"git@github.com:nileema/presto.git","clone_url":"https://github.com/nileema/presto.git","svn_url":"https://github.com/nileema/presto","homepage":null,"size":54398,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"prestodb:master","ref":"master","sha":"be5008358edc7f5218fc757bcd8dee597b7f6830","user":{"login":"prestodb","id":6882181,"avatar_url":"https://avatars.githubusercontent.com/u/6882181?v=3","gravatar_id":"","url":"https://api.github.com/users/prestodb","html_url":"https://github.com/prestodb","followers_url":"https://api.github.com/users/prestodb/followers","following_url":"https://api.github.com/users/prestodb/following{/other_user}","gists_url":"https://api.github.com/users/prestodb/gists{/gist_id}","starred_url":"https://api.github.com/users/prestodb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prestodb/subscriptions","organizations_url":"https://api.github.com/users/prestodb/orgs","repos_url":"https://api.github.com/users/prestodb/repos","events_url":"https://api.github.com/users/prestodb/events{/privacy}","received_events_url":"https://api.github.com/users/prestodb/received_events","type":"Organization","site_admin":false},"repo":{"id":5349565,"name":"presto","full_name":"prestodb/presto","owner":{"login":"prestodb","id":6882181,"avatar_url":"https://avatars.githubusercontent.com/u/6882181?v=3","gravatar_id":"","url":"https://api.github.com/users/prestodb","html_url":"https://github.com/prestodb","followers_url":"https://api.github.com/users/prestodb/followers","following_url":"https://api.github.com/users/prestodb/following{/other_user}","gists_url":"https://api.github.com/users/prestodb/gists{/gist_id}","starred_url":"https://api.github.com/users/prestodb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prestodb/subscriptions","organizations_url":"https://api.github.com/users/prestodb/orgs","repos_url":"https://api.github.com/users/prestodb/repos","events_url":"https://api.github.com/users/prestodb/events{/privacy}","received_events_url":"https://api.github.com/users/prestodb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/prestodb/presto","description":"Distributed SQL query engine for big data","fork":false,"url":"https://api.github.com/repos/prestodb/presto","forks_url":"https://api.github.com/repos/prestodb/presto/forks","keys_url":"https://api.github.com/repos/prestodb/presto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/prestodb/presto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/prestodb/presto/teams","hooks_url":"https://api.github.com/repos/prestodb/presto/hooks","issue_events_url":"https://api.github.com/repos/prestodb/presto/issues/events{/number}","events_url":"https://api.github.com/repos/prestodb/presto/events","assignees_url":"https://api.github.com/repos/prestodb/presto/assignees{/user}","branches_url":"https://api.github.com/repos/prestodb/presto/branches{/branch}","tags_url":"https://api.github.com/repos/prestodb/presto/tags","blobs_url":"https://api.github.com/repos/prestodb/presto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/prestodb/presto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/prestodb/presto/git/refs{/sha}","trees_url":"https://api.github.com/repos/prestodb/presto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/prestodb/presto/statuses/{sha}","languages_url":"https://api.github.com/repos/prestodb/presto/languages","stargazers_url":"https://api.github.com/repos/prestodb/presto/stargazers","contributors_url":"https://api.github.com/repos/prestodb/presto/contributors","subscribers_url":"https://api.github.com/repos/prestodb/presto/subscribers","subscription_url":"https://api.github.com/repos/prestodb/presto/subscription","commits_url":"https://api.github.com/repos/prestodb/presto/commits{/sha}","git_commits_url":"https://api.github.com/repos/prestodb/presto/git/commits{/sha}","comments_url":"https://api.github.com/repos/prestodb/presto/comments{/number}","issue_comment_url":"https://api.github.com/repos/prestodb/presto/issues/comments{/number}","contents_url":"https://api.github.com/repos/prestodb/presto/contents/{+path}","compare_url":"https://api.github.com/repos/prestodb/presto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/prestodb/presto/merges","archive_url":"https://api.github.com/repos/prestodb/presto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/prestodb/presto/downloads","issues_url":"https://api.github.com/repos/prestodb/presto/issues{/number}","pulls_url":"https://api.github.com/repos/prestodb/presto/pulls{/number}","milestones_url":"https://api.github.com/repos/prestodb/presto/milestones{/number}","notifications_url":"https://api.github.com/repos/prestodb/presto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/prestodb/presto/labels{/name}","releases_url":"https://api.github.com/repos/prestodb/presto/releases{/id}","deployments_url":"https://api.github.com/repos/prestodb/presto/deployments","created_at":"2012-08-09T01:03:37Z","updated_at":"2016-06-21T14:07:25Z","pushed_at":"2016-06-21T19:09:09Z","git_url":"git://github.com/prestodb/presto.git","ssh_url":"git@github.com:prestodb/presto.git","clone_url":"https://github.com/prestodb/presto.git","svn_url":"https://github.com/prestodb/presto","homepage":"https://prestodb.io","size":155372,"stargazers_count":4840,"watchers_count":4840,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1447,"mirror_url":null,"open_issues_count":554,"forks":1447,"open_issues":554,"watchers":4840,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/prestodb/presto/pulls/5477"},"html":{"href":"https://github.com/prestodb/presto/pull/5477"},"issue":{"href":"https://api.github.com/repos/prestodb/presto/issues/5477"},"comments":{"href":"https://api.github.com/repos/prestodb/presto/issues/5477/comments"},"review_comments":{"href":"https://api.github.com/repos/prestodb/presto/pulls/5477/comments"},"review_comment":{"href":"https://api.github.com/repos/prestodb/presto/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/prestodb/presto/pulls/5477/commits"},"statuses":{"href":"https://api.github.com/repos/prestodb/presto/statuses/eedda6c694544d16e229dab10794cd017c45b442"}}}}
{"actor":{"display_login":"electrum"}}