{"action":"created","comment":{"url":"https://api.github.com/repos/apache/incubator-pinot/pulls/comments/235451475","pull_request_review_id":177319385,"id":235451475,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNTQ1MTQ3NQ==","diff_hunk":"@@ -187,6 +187,8 @@ public IntermediateResultsBlock callJob()\n     mergedBlock.setNumEntriesScannedInFilter(executionStatistics.getNumEntriesScannedInFilter());\n     mergedBlock.setNumEntriesScannedPostFilter(executionStatistics.getNumEntriesScannedPostFilter());\n     mergedBlock.setNumTotalRawDocs(executionStatistics.getNumTotalRawDocs());\n+    mergedBlock.setNumSegmentsProcessed(executionStatistics.getNumSegmentsProcessed());\n+    mergedBlock.setNumSegmentsMatched(executionStatistics.getNumSegmentsWithNoMatch());","path":"pinot-core/src/main/java/com/linkedin/pinot/core/operator/CombineOperator.java","position":5,"original_position":5,"commit_id":"62defb766c862f4a280c9af04b3afb6051aafc15","original_commit_id":"62defb766c862f4a280c9af04b3afb6051aafc15","user":{"login":"sunithabeeram","id":3123798,"node_id":"MDQ6VXNlcjMxMjM3OTg=","avatar_url":"https://avatars2.githubusercontent.com/u/3123798?v=4","gravatar_id":"","url":"https://api.github.com/users/sunithabeeram","html_url":"https://github.com/sunithabeeram","followers_url":"https://api.github.com/users/sunithabeeram/followers","following_url":"https://api.github.com/users/sunithabeeram/following{/other_user}","gists_url":"https://api.github.com/users/sunithabeeram/gists{/gist_id}","starred_url":"https://api.github.com/users/sunithabeeram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sunithabeeram/subscriptions","organizations_url":"https://api.github.com/users/sunithabeeram/orgs","repos_url":"https://api.github.com/users/sunithabeeram/repos","events_url":"https://api.github.com/users/sunithabeeram/events{/privacy}","received_events_url":"https://api.github.com/users/sunithabeeram/received_events","type":"User","site_admin":false},"body":"This should be numsegmentsmatched, right?","created_at":"2018-11-21T16:14:06Z","updated_at":"2018-11-21T16:19:53Z","html_url":"https://github.com/apache/incubator-pinot/pull/3525#discussion_r235451475","pull_request_url":"https://api.github.com/repos/apache/incubator-pinot/pulls/3525","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-pinot/pulls/comments/235451475"},"html":{"href":"https://github.com/apache/incubator-pinot/pull/3525#discussion_r235451475"},"pull_request":{"href":"https://api.github.com/repos/apache/incubator-pinot/pulls/3525"}}},"pull_request":{"url":"https://api.github.com/repos/apache/incubator-pinot/pulls/3525","id":232421608,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMyNDIxNjA4","html_url":"https://github.com/apache/incubator-pinot/pull/3525","diff_url":"https://github.com/apache/incubator-pinot/pull/3525.diff","patch_url":"https://github.com/apache/incubator-pinot/pull/3525.patch","issue_url":"https://api.github.com/repos/apache/incubator-pinot/issues/3525","number":3525,"state":"open","locked":false,"title":"Adding execution stats for numSegmentsQueried/Processed/Matched","user":{"login":"kishoreg","id":850791,"node_id":"MDQ6VXNlcjg1MDc5MQ==","avatar_url":"https://avatars2.githubusercontent.com/u/850791?v=4","gravatar_id":"","url":"https://api.github.com/users/kishoreg","html_url":"https://github.com/kishoreg","followers_url":"https://api.github.com/users/kishoreg/followers","following_url":"https://api.github.com/users/kishoreg/following{/other_user}","gists_url":"https://api.github.com/users/kishoreg/gists{/gist_id}","starred_url":"https://api.github.com/users/kishoreg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kishoreg/subscriptions","organizations_url":"https://api.github.com/users/kishoreg/orgs","repos_url":"https://api.github.com/users/kishoreg/repos","events_url":"https://api.github.com/users/kishoreg/events{/privacy}","received_events_url":"https://api.github.com/users/kishoreg/received_events","type":"User","site_admin":false},"body":"This PR allows us to know how effective is our pruning strategy. The flow is as follows\r\n1. Total number of segments (NumSegments)\r\n2. Broker side Pruning (NumSegmentsPrunedByBroker)\r\n3. Broker queries all Servers after pruning(NumSegmentsQueried) \r\n4. Each server applies further pruning (NumSegmentsPrunedByServer)\r\n5. Each server processes all segments after Pruning (NumSegmentsProcessed)\r\n6. Some of the segments processed have no matching rows (NumSegmentsWithNoMatch)\r\n \r\nIf the pruning(broker + server) is effective, NumSegmentsWithNoMatch should be close to zero. Today, we don't have any metrics on numSegmentsProcessed. This PR allows us to identify use cases where Pruning is ineffective and we can add additional pruners e.g BloomFilter \r\n\r\nIn the perf benchmarks, we have seen that the number of Segments can impact latency and max throughput.\r\n\r\nCould not find any test case for BrokerNativeResponse class that validates the metadata fields in a response. Will add one and update the PR.\r\n\r\nSample response after this change\r\n\r\n```\r\n{\r\n    \"aggregationResults\": [\r\n    {\r\n        \"function\": \"count_star\",\r\n        \"value\": \"9\"\r\n    }],\r\n    \"exceptions\": [],\r\n    \"numServersQueried\": 1,\r\n    \"numServersResponded\": 1,\r\n    \"numSegmentsQueried\": 136,\r\n    \"numSegmentsProcessed\": 136,\r\n    \"numSegmentsMatched\": 8,\r\n    \"numDocsScanned\": 9,\r\n    \"numEntriesScannedInFilter\": 0,\r\n    \"numEntriesScannedPostFilter\": 0,\r\n    \"numGroupsLimitReached\": false,\r\n    \"totalDocs\": 66942316,\r\n    \"timeUsedMs\": 314,\r\n    \"segmentStatistics\": [],\r\n    \"traceInfo\": {}\r\n}\r\n```\r\n\r\n","created_at":"2018-11-20T18:42:40Z","updated_at":"2018-11-21T16:19:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d75c57c5a158ada63639db78540662b6e53aedb9","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/incubator-pinot/pulls/3525/commits","review_comments_url":"https://api.github.com/repos/apache/incubator-pinot/pulls/3525/comments","review_comment_url":"https://api.github.com/repos/apache/incubator-pinot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/incubator-pinot/issues/3525/comments","statuses_url":"https://api.github.com/repos/apache/incubator-pinot/statuses/62defb766c862f4a280c9af04b3afb6051aafc15","head":{"label":"apache:execution-stats","ref":"execution-stats","sha":"62defb766c862f4a280c9af04b3afb6051aafc15","user":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":19961085,"node_id":"MDEwOlJlcG9zaXRvcnkxOTk2MTA4NQ==","name":"incubator-pinot","full_name":"apache/incubator-pinot","private":false,"owner":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/apache/incubator-pinot","description":"Apache Pinot (Incubating) - A realtime distributed OLAP datastore","fork":false,"url":"https://api.github.com/repos/apache/incubator-pinot","forks_url":"https://api.github.com/repos/apache/incubator-pinot/forks","keys_url":"https://api.github.com/repos/apache/incubator-pinot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/incubator-pinot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/incubator-pinot/teams","hooks_url":"https://api.github.com/repos/apache/incubator-pinot/hooks","issue_events_url":"https://api.github.com/repos/apache/incubator-pinot/issues/events{/number}","events_url":"https://api.github.com/repos/apache/incubator-pinot/events","assignees_url":"https://api.github.com/repos/apache/incubator-pinot/assignees{/user}","branches_url":"https://api.github.com/repos/apache/incubator-pinot/branches{/branch}","tags_url":"https://api.github.com/repos/apache/incubator-pinot/tags","blobs_url":"https://api.github.com/repos/apache/incubator-pinot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/incubator-pinot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/incubator-pinot/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/incubator-pinot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/incubator-pinot/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/incubator-pinot/languages","stargazers_url":"https://api.github.com/repos/apache/incubator-pinot/stargazers","contributors_url":"https://api.github.com/repos/apache/incubator-pinot/contributors","subscribers_url":"https://api.github.com/repos/apache/incubator-pinot/subscribers","subscription_url":"https://api.github.com/repos/apache/incubator-pinot/subscription","commits_url":"https://api.github.com/repos/apache/incubator-pinot/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/incubator-pinot/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/incubator-pinot/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/incubator-pinot/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/incubator-pinot/contents/{+path}","compare_url":"https://api.github.com/repos/apache/incubator-pinot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/incubator-pinot/merges","archive_url":"https://api.github.com/repos/apache/incubator-pinot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/incubator-pinot/downloads","issues_url":"https://api.github.com/repos/apache/incubator-pinot/issues{/number}","pulls_url":"https://api.github.com/repos/apache/incubator-pinot/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/incubator-pinot/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/incubator-pinot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/incubator-pinot/labels{/name}","releases_url":"https://api.github.com/repos/apache/incubator-pinot/releases{/id}","deployments_url":"https://api.github.com/repos/apache/incubator-pinot/deployments","created_at":"2014-05-19T23:27:48Z","updated_at":"2018-11-21T08:02:49Z","pushed_at":"2018-11-21T02:26:46Z","git_url":"git://github.com/apache/incubator-pinot.git","ssh_url":"git@github.com:apache/incubator-pinot.git","clone_url":"https://github.com/apache/incubator-pinot.git","svn_url":"https://github.com/apache/incubator-pinot","homepage":"https://pinot.apache.org","size":157314,"stargazers_count":2039,"watchers_count":2039,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":373,"mirror_url":null,"archived":false,"open_issues_count":202,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":373,"open_issues":202,"watchers":2039,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"fdb9357353ac601906bda716fda3902e2256fd7d","user":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":19961085,"node_id":"MDEwOlJlcG9zaXRvcnkxOTk2MTA4NQ==","name":"incubator-pinot","full_name":"apache/incubator-pinot","private":false,"owner":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/apache/incubator-pinot","description":"Apache Pinot (Incubating) - A realtime distributed OLAP datastore","fork":false,"url":"https://api.github.com/repos/apache/incubator-pinot","forks_url":"https://api.github.com/repos/apache/incubator-pinot/forks","keys_url":"https://api.github.com/repos/apache/incubator-pinot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/incubator-pinot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/incubator-pinot/teams","hooks_url":"https://api.github.com/repos/apache/incubator-pinot/hooks","issue_events_url":"https://api.github.com/repos/apache/incubator-pinot/issues/events{/number}","events_url":"https://api.github.com/repos/apache/incubator-pinot/events","assignees_url":"https://api.github.com/repos/apache/incubator-pinot/assignees{/user}","branches_url":"https://api.github.com/repos/apache/incubator-pinot/branches{/branch}","tags_url":"https://api.github.com/repos/apache/incubator-pinot/tags","blobs_url":"https://api.github.com/repos/apache/incubator-pinot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/incubator-pinot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/incubator-pinot/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/incubator-pinot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/incubator-pinot/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/incubator-pinot/languages","stargazers_url":"https://api.github.com/repos/apache/incubator-pinot/stargazers","contributors_url":"https://api.github.com/repos/apache/incubator-pinot/contributors","subscribers_url":"https://api.github.com/repos/apache/incubator-pinot/subscribers","subscription_url":"https://api.github.com/repos/apache/incubator-pinot/subscription","commits_url":"https://api.github.com/repos/apache/incubator-pinot/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/incubator-pinot/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/incubator-pinot/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/incubator-pinot/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/incubator-pinot/contents/{+path}","compare_url":"https://api.github.com/repos/apache/incubator-pinot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/incubator-pinot/merges","archive_url":"https://api.github.com/repos/apache/incubator-pinot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/incubator-pinot/downloads","issues_url":"https://api.github.com/repos/apache/incubator-pinot/issues{/number}","pulls_url":"https://api.github.com/repos/apache/incubator-pinot/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/incubator-pinot/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/incubator-pinot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/incubator-pinot/labels{/name}","releases_url":"https://api.github.com/repos/apache/incubator-pinot/releases{/id}","deployments_url":"https://api.github.com/repos/apache/incubator-pinot/deployments","created_at":"2014-05-19T23:27:48Z","updated_at":"2018-11-21T08:02:49Z","pushed_at":"2018-11-21T02:26:46Z","git_url":"git://github.com/apache/incubator-pinot.git","ssh_url":"git@github.com:apache/incubator-pinot.git","clone_url":"https://github.com/apache/incubator-pinot.git","svn_url":"https://github.com/apache/incubator-pinot","homepage":"https://pinot.apache.org","size":157314,"stargazers_count":2039,"watchers_count":2039,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":373,"mirror_url":null,"archived":false,"open_issues_count":202,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":373,"open_issues":202,"watchers":2039,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-pinot/pulls/3525"},"html":{"href":"https://github.com/apache/incubator-pinot/pull/3525"},"issue":{"href":"https://api.github.com/repos/apache/incubator-pinot/issues/3525"},"comments":{"href":"https://api.github.com/repos/apache/incubator-pinot/issues/3525/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/incubator-pinot/pulls/3525/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/incubator-pinot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/incubator-pinot/pulls/3525/commits"},"statuses":{"href":"https://api.github.com/repos/apache/incubator-pinot/statuses/62defb766c862f4a280c9af04b3afb6051aafc15"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"sunithabeeram"}}