{"action":"opened","number":2982,"pull_request":{"url":"https://api.github.com/repos/druid-io/druid/pulls/2982","id":70454750,"html_url":"https://github.com/druid-io/druid/pull/2982","diff_url":"https://github.com/druid-io/druid/pull/2982.diff","patch_url":"https://github.com/druid-io/druid/pull/2982.patch","issue_url":"https://api.github.com/repos/druid-io/druid/issues/2982","number":2982,"state":"open","locked":false,"title":"Add segment pruning based on secondary partition dimension","user":{"login":"acslk","id":11131839,"avatar_url":"https://avatars.githubusercontent.com/u/11131839?v=3","gravatar_id":"","url":"https://api.github.com/users/acslk","html_url":"https://github.com/acslk","followers_url":"https://api.github.com/users/acslk/followers","following_url":"https://api.github.com/users/acslk/following{/other_user}","gists_url":"https://api.github.com/users/acslk/gists{/gist_id}","starred_url":"https://api.github.com/users/acslk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acslk/subscriptions","organizations_url":"https://api.github.com/users/acslk/orgs","repos_url":"https://api.github.com/users/acslk/repos","events_url":"https://api.github.com/users/acslk/events{/privacy}","received_events_url":"https://api.github.com/users/acslk/received_events","type":"User","site_admin":false},"body":"Fixes #2940 \r\n\r\nCurrently the CachingClusterClient, which is the queryRunner for broker node, puts all segments within the query interval into segment descriptors which is then retrieved from cache or other servers. This can be optimized by filtering out data segments with singleDimensionShardSpec that does not match the query filter. For instance, dataSegment with dimension \"id\" and value from \"a\" to \"b\" does not need to be retrieved for query with selection filter \"id\"=\"person\".\r\n\r\nThis PR addresses this by calculating the range of possible values of the given dimension for the query filter, and intersect the range of filter with range of data segments to determine whether or not to add the segment to descriptors for retrieval.","created_at":"2016-05-18T00:58:01Z","updated_at":"2016-05-18T00:58:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/druid-io/druid/pulls/2982/commits","review_comments_url":"https://api.github.com/repos/druid-io/druid/pulls/2982/comments","review_comment_url":"https://api.github.com/repos/druid-io/druid/pulls/comments{/number}","comments_url":"https://api.github.com/repos/druid-io/druid/issues/2982/comments","statuses_url":"https://api.github.com/repos/druid-io/druid/statuses/350fefa47c6c62eb562d429ce5d6c7d2e8fba061","head":{"label":"acslk:feature-prun","ref":"feature-prun","sha":"350fefa47c6c62eb562d429ce5d6c7d2e8fba061","user":{"login":"acslk","id":11131839,"avatar_url":"https://avatars.githubusercontent.com/u/11131839?v=3","gravatar_id":"","url":"https://api.github.com/users/acslk","html_url":"https://github.com/acslk","followers_url":"https://api.github.com/users/acslk/followers","following_url":"https://api.github.com/users/acslk/following{/other_user}","gists_url":"https://api.github.com/users/acslk/gists{/gist_id}","starred_url":"https://api.github.com/users/acslk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acslk/subscriptions","organizations_url":"https://api.github.com/users/acslk/orgs","repos_url":"https://api.github.com/users/acslk/repos","events_url":"https://api.github.com/users/acslk/events{/privacy}","received_events_url":"https://api.github.com/users/acslk/received_events","type":"User","site_admin":false},"repo":{"id":58234003,"name":"druid","full_name":"acslk/druid","owner":{"login":"acslk","id":11131839,"avatar_url":"https://avatars.githubusercontent.com/u/11131839?v=3","gravatar_id":"","url":"https://api.github.com/users/acslk","html_url":"https://github.com/acslk","followers_url":"https://api.github.com/users/acslk/followers","following_url":"https://api.github.com/users/acslk/following{/other_user}","gists_url":"https://api.github.com/users/acslk/gists{/gist_id}","starred_url":"https://api.github.com/users/acslk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acslk/subscriptions","organizations_url":"https://api.github.com/users/acslk/orgs","repos_url":"https://api.github.com/users/acslk/repos","events_url":"https://api.github.com/users/acslk/events{/privacy}","received_events_url":"https://api.github.com/users/acslk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/acslk/druid","description":"Column oriented distributed data store ideal for powering interactive applications","fork":true,"url":"https://api.github.com/repos/acslk/druid","forks_url":"https://api.github.com/repos/acslk/druid/forks","keys_url":"https://api.github.com/repos/acslk/druid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/acslk/druid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/acslk/druid/teams","hooks_url":"https://api.github.com/repos/acslk/druid/hooks","issue_events_url":"https://api.github.com/repos/acslk/druid/issues/events{/number}","events_url":"https://api.github.com/repos/acslk/druid/events","assignees_url":"https://api.github.com/repos/acslk/druid/assignees{/user}","branches_url":"https://api.github.com/repos/acslk/druid/branches{/branch}","tags_url":"https://api.github.com/repos/acslk/druid/tags","blobs_url":"https://api.github.com/repos/acslk/druid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/acslk/druid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/acslk/druid/git/refs{/sha}","trees_url":"https://api.github.com/repos/acslk/druid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/acslk/druid/statuses/{sha}","languages_url":"https://api.github.com/repos/acslk/druid/languages","stargazers_url":"https://api.github.com/repos/acslk/druid/stargazers","contributors_url":"https://api.github.com/repos/acslk/druid/contributors","subscribers_url":"https://api.github.com/repos/acslk/druid/subscribers","subscription_url":"https://api.github.com/repos/acslk/druid/subscription","commits_url":"https://api.github.com/repos/acslk/druid/commits{/sha}","git_commits_url":"https://api.github.com/repos/acslk/druid/git/commits{/sha}","comments_url":"https://api.github.com/repos/acslk/druid/comments{/number}","issue_comment_url":"https://api.github.com/repos/acslk/druid/issues/comments{/number}","contents_url":"https://api.github.com/repos/acslk/druid/contents/{+path}","compare_url":"https://api.github.com/repos/acslk/druid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/acslk/druid/merges","archive_url":"https://api.github.com/repos/acslk/druid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/acslk/druid/downloads","issues_url":"https://api.github.com/repos/acslk/druid/issues{/number}","pulls_url":"https://api.github.com/repos/acslk/druid/pulls{/number}","milestones_url":"https://api.github.com/repos/acslk/druid/milestones{/number}","notifications_url":"https://api.github.com/repos/acslk/druid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/acslk/druid/labels{/name}","releases_url":"https://api.github.com/repos/acslk/druid/releases{/id}","deployments_url":"https://api.github.com/repos/acslk/druid/deployments","created_at":"2016-05-06T20:47:11Z","updated_at":"2016-05-06T20:47:19Z","pushed_at":"2016-05-18T00:06:35Z","git_url":"git://github.com/acslk/druid.git","ssh_url":"git@github.com:acslk/druid.git","clone_url":"https://github.com/acslk/druid.git","svn_url":"https://github.com/acslk/druid","homepage":"http://druid.io","size":106448,"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":"druid-io:master","ref":"master","sha":"15ccf451f9b12cbceff853dd71fac7accc258be8","user":{"login":"druid-io","id":4203474,"avatar_url":"https://avatars.githubusercontent.com/u/4203474?v=3","gravatar_id":"","url":"https://api.github.com/users/druid-io","html_url":"https://github.com/druid-io","followers_url":"https://api.github.com/users/druid-io/followers","following_url":"https://api.github.com/users/druid-io/following{/other_user}","gists_url":"https://api.github.com/users/druid-io/gists{/gist_id}","starred_url":"https://api.github.com/users/druid-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/druid-io/subscriptions","organizations_url":"https://api.github.com/users/druid-io/orgs","repos_url":"https://api.github.com/users/druid-io/repos","events_url":"https://api.github.com/users/druid-io/events{/privacy}","received_events_url":"https://api.github.com/users/druid-io/received_events","type":"Organization","site_admin":false},"repo":{"id":6358188,"name":"druid","full_name":"druid-io/druid","owner":{"login":"druid-io","id":4203474,"avatar_url":"https://avatars.githubusercontent.com/u/4203474?v=3","gravatar_id":"","url":"https://api.github.com/users/druid-io","html_url":"https://github.com/druid-io","followers_url":"https://api.github.com/users/druid-io/followers","following_url":"https://api.github.com/users/druid-io/following{/other_user}","gists_url":"https://api.github.com/users/druid-io/gists{/gist_id}","starred_url":"https://api.github.com/users/druid-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/druid-io/subscriptions","organizations_url":"https://api.github.com/users/druid-io/orgs","repos_url":"https://api.github.com/users/druid-io/repos","events_url":"https://api.github.com/users/druid-io/events{/privacy}","received_events_url":"https://api.github.com/users/druid-io/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/druid-io/druid","description":"Column oriented distributed data store ideal for powering interactive applications","fork":false,"url":"https://api.github.com/repos/druid-io/druid","forks_url":"https://api.github.com/repos/druid-io/druid/forks","keys_url":"https://api.github.com/repos/druid-io/druid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/druid-io/druid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/druid-io/druid/teams","hooks_url":"https://api.github.com/repos/druid-io/druid/hooks","issue_events_url":"https://api.github.com/repos/druid-io/druid/issues/events{/number}","events_url":"https://api.github.com/repos/druid-io/druid/events","assignees_url":"https://api.github.com/repos/druid-io/druid/assignees{/user}","branches_url":"https://api.github.com/repos/druid-io/druid/branches{/branch}","tags_url":"https://api.github.com/repos/druid-io/druid/tags","blobs_url":"https://api.github.com/repos/druid-io/druid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/druid-io/druid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/druid-io/druid/git/refs{/sha}","trees_url":"https://api.github.com/repos/druid-io/druid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/druid-io/druid/statuses/{sha}","languages_url":"https://api.github.com/repos/druid-io/druid/languages","stargazers_url":"https://api.github.com/repos/druid-io/druid/stargazers","contributors_url":"https://api.github.com/repos/druid-io/druid/contributors","subscribers_url":"https://api.github.com/repos/druid-io/druid/subscribers","subscription_url":"https://api.github.com/repos/druid-io/druid/subscription","commits_url":"https://api.github.com/repos/druid-io/druid/commits{/sha}","git_commits_url":"https://api.github.com/repos/druid-io/druid/git/commits{/sha}","comments_url":"https://api.github.com/repos/druid-io/druid/comments{/number}","issue_comment_url":"https://api.github.com/repos/druid-io/druid/issues/comments{/number}","contents_url":"https://api.github.com/repos/druid-io/druid/contents/{+path}","compare_url":"https://api.github.com/repos/druid-io/druid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/druid-io/druid/merges","archive_url":"https://api.github.com/repos/druid-io/druid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/druid-io/druid/downloads","issues_url":"https://api.github.com/repos/druid-io/druid/issues{/number}","pulls_url":"https://api.github.com/repos/druid-io/druid/pulls{/number}","milestones_url":"https://api.github.com/repos/druid-io/druid/milestones{/number}","notifications_url":"https://api.github.com/repos/druid-io/druid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/druid-io/druid/labels{/name}","releases_url":"https://api.github.com/repos/druid-io/druid/releases{/id}","deployments_url":"https://api.github.com/repos/druid-io/druid/deployments","created_at":"2012-10-23T19:08:07Z","updated_at":"2016-05-17T22:51:59Z","pushed_at":"2016-05-18T00:55:45Z","git_url":"git://github.com/druid-io/druid.git","ssh_url":"git@github.com:druid-io/druid.git","clone_url":"https://github.com/druid-io/druid.git","svn_url":"https://github.com/druid-io/druid","homepage":"http://druid.io","size":130187,"stargazers_count":3238,"watchers_count":3238,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":716,"mirror_url":null,"open_issues_count":426,"forks":716,"open_issues":426,"watchers":3238,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/druid-io/druid/pulls/2982"},"html":{"href":"https://github.com/druid-io/druid/pull/2982"},"issue":{"href":"https://api.github.com/repos/druid-io/druid/issues/2982"},"comments":{"href":"https://api.github.com/repos/druid-io/druid/issues/2982/comments"},"review_comments":{"href":"https://api.github.com/repos/druid-io/druid/pulls/2982/comments"},"review_comment":{"href":"https://api.github.com/repos/druid-io/druid/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/druid-io/druid/pulls/2982/commits"},"statuses":{"href":"https://api.github.com/repos/druid-io/druid/statuses/350fefa47c6c62eb562d429ce5d6c7d2e8fba061"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":4,"additions":862,"deletions":26,"changed_files":32}}