{"action":"created","comment":{"url":"https://api.github.com/repos/druid-io/druid/pulls/comments/52239198","id":52239198,"diff_hunk":"@@ -199,6 +192,15 @@ protected Integer addToFacts(\n       if (prev != null) {\n         rowOffset = prev;\n       } else {\n+        rowContainer.set(row);\n+        for (int i = 0; i < metrics.length; i++) {\n+          final AggregatorFactory agg = metrics[i];\n+          aggs[i] = agg.factorizeBuffered(\n+              makeColumnSelectorFactory(agg, rowSupplier, deserializeComplexMetrics)\n+          );\n+        }\n+        rowContainer.set(null);","path":"processing/src/main/java/io/druid/segment/incremental/OffheapIncrementalIndex.java","position":27,"original_position":27,"commit_id":"382cad667188107c3983f70226595c2e3b33e4e6","original_commit_id":"382cad667188107c3983f70226595c2e3b33e4e6","user":{"login":"himanshug","id":246308,"avatar_url":"https://avatars.githubusercontent.com/u/246308?v=3","gravatar_id":"","url":"https://api.github.com/users/himanshug","html_url":"https://github.com/himanshug","followers_url":"https://api.github.com/users/himanshug/followers","following_url":"https://api.github.com/users/himanshug/following{/other_user}","gists_url":"https://api.github.com/users/himanshug/gists{/gist_id}","starred_url":"https://api.github.com/users/himanshug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/himanshug/subscriptions","organizations_url":"https://api.github.com/users/himanshug/orgs","repos_url":"https://api.github.com/users/himanshug/repos","events_url":"https://api.github.com/users/himanshug/events{/privacy}","received_events_url":"https://api.github.com/users/himanshug/received_events","type":"User","site_admin":false},"body":"same rowContainer set/unset happens at line210 and 216 also, can we do the rowContainer.set and unset once only?","created_at":"2016-02-08T22:41:40Z","updated_at":"2016-02-08T22:41:40Z","html_url":"https://github.com/druid-io/druid/pull/2239#discussion_r52239198","pull_request_url":"https://api.github.com/repos/druid-io/druid/pulls/2239","_links":{"self":{"href":"https://api.github.com/repos/druid-io/druid/pulls/comments/52239198"},"html":{"href":"https://github.com/druid-io/druid/pull/2239#discussion_r52239198"},"pull_request":{"href":"https://api.github.com/repos/druid-io/druid/pulls/2239"}}},"pull_request":{"url":"https://api.github.com/repos/druid-io/druid/pulls/2239","id":55599183,"html_url":"https://github.com/druid-io/druid/pull/2239","diff_url":"https://github.com/druid-io/druid/pull/2239.diff","patch_url":"https://github.com/druid-io/druid/pull/2239.patch","issue_url":"https://api.github.com/repos/druid-io/druid/issues/2239","number":2239,"state":"open","locked":false,"title":"fix NPE with filtered aggregator at ingestion time","user":{"login":"sirpkt","id":4968993,"avatar_url":"https://avatars.githubusercontent.com/u/4968993?v=3","gravatar_id":"","url":"https://api.github.com/users/sirpkt","html_url":"https://github.com/sirpkt","followers_url":"https://api.github.com/users/sirpkt/followers","following_url":"https://api.github.com/users/sirpkt/following{/other_user}","gists_url":"https://api.github.com/users/sirpkt/gists{/gist_id}","starred_url":"https://api.github.com/users/sirpkt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sirpkt/subscriptions","organizations_url":"https://api.github.com/users/sirpkt/orgs","repos_url":"https://api.github.com/users/sirpkt/repos","events_url":"https://api.github.com/users/sirpkt/events{/privacy}","received_events_url":"https://api.github.com/users/sirpkt/received_events","type":"User","site_admin":false},"body":"This PR fixes #2061 \r\n\r\nNPE of #2061 is from filtered aggregator factory references RowSupplier at factorize() when row of RowSupplier is not set yet.\r\nThis patch delays the access of RowSupplier from makeMatcher() to ValueMatcher.matches(). \r\n\r\nIt works only for aggregator with selector filter because extraction filter is not supported at ingestion time as cardinality is not fixed at ingestion time","created_at":"2016-01-11T09:14:10Z","updated_at":"2016-02-08T22:41:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6a5e07224b875bf702235f371e89255290dc3877","assignee":null,"milestone":{"url":"https://api.github.com/repos/druid-io/druid/milestones/18","html_url":"https://github.com/druid-io/druid/milestones/0.9.1","labels_url":"https://api.github.com/repos/druid-io/druid/milestones/18/labels","id":1526819,"number":18,"title":"0.9.1","description":"","creator":{"login":"fjy","id":428325,"avatar_url":"https://avatars.githubusercontent.com/u/428325?v=3","gravatar_id":"","url":"https://api.github.com/users/fjy","html_url":"https://github.com/fjy","followers_url":"https://api.github.com/users/fjy/followers","following_url":"https://api.github.com/users/fjy/following{/other_user}","gists_url":"https://api.github.com/users/fjy/gists{/gist_id}","starred_url":"https://api.github.com/users/fjy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fjy/subscriptions","organizations_url":"https://api.github.com/users/fjy/orgs","repos_url":"https://api.github.com/users/fjy/repos","events_url":"https://api.github.com/users/fjy/events{/privacy}","received_events_url":"https://api.github.com/users/fjy/received_events","type":"User","site_admin":false},"open_issues":28,"closed_issues":1,"state":"open","created_at":"2016-01-20T19:04:22Z","updated_at":"2016-02-08T22:10:10Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/druid-io/druid/pulls/2239/commits","review_comments_url":"https://api.github.com/repos/druid-io/druid/pulls/2239/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/2239/comments","statuses_url":"https://api.github.com/repos/druid-io/druid/statuses/382cad667188107c3983f70226595c2e3b33e4e6","head":{"label":"sirpkt:filtered-aggregators-at-ingestion","ref":"filtered-aggregators-at-ingestion","sha":"382cad667188107c3983f70226595c2e3b33e4e6","user":{"login":"sirpkt","id":4968993,"avatar_url":"https://avatars.githubusercontent.com/u/4968993?v=3","gravatar_id":"","url":"https://api.github.com/users/sirpkt","html_url":"https://github.com/sirpkt","followers_url":"https://api.github.com/users/sirpkt/followers","following_url":"https://api.github.com/users/sirpkt/following{/other_user}","gists_url":"https://api.github.com/users/sirpkt/gists{/gist_id}","starred_url":"https://api.github.com/users/sirpkt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sirpkt/subscriptions","organizations_url":"https://api.github.com/users/sirpkt/orgs","repos_url":"https://api.github.com/users/sirpkt/repos","events_url":"https://api.github.com/users/sirpkt/events{/privacy}","received_events_url":"https://api.github.com/users/sirpkt/received_events","type":"User","site_admin":false},"repo":{"id":45589174,"name":"druid","full_name":"sirpkt/druid","owner":{"login":"sirpkt","id":4968993,"avatar_url":"https://avatars.githubusercontent.com/u/4968993?v=3","gravatar_id":"","url":"https://api.github.com/users/sirpkt","html_url":"https://github.com/sirpkt","followers_url":"https://api.github.com/users/sirpkt/followers","following_url":"https://api.github.com/users/sirpkt/following{/other_user}","gists_url":"https://api.github.com/users/sirpkt/gists{/gist_id}","starred_url":"https://api.github.com/users/sirpkt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sirpkt/subscriptions","organizations_url":"https://api.github.com/users/sirpkt/orgs","repos_url":"https://api.github.com/users/sirpkt/repos","events_url":"https://api.github.com/users/sirpkt/events{/privacy}","received_events_url":"https://api.github.com/users/sirpkt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sirpkt/druid","description":"Column oriented distributed data store ideal for powering interactive applications","fork":true,"url":"https://api.github.com/repos/sirpkt/druid","forks_url":"https://api.github.com/repos/sirpkt/druid/forks","keys_url":"https://api.github.com/repos/sirpkt/druid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sirpkt/druid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sirpkt/druid/teams","hooks_url":"https://api.github.com/repos/sirpkt/druid/hooks","issue_events_url":"https://api.github.com/repos/sirpkt/druid/issues/events{/number}","events_url":"https://api.github.com/repos/sirpkt/druid/events","assignees_url":"https://api.github.com/repos/sirpkt/druid/assignees{/user}","branches_url":"https://api.github.com/repos/sirpkt/druid/branches{/branch}","tags_url":"https://api.github.com/repos/sirpkt/druid/tags","blobs_url":"https://api.github.com/repos/sirpkt/druid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sirpkt/druid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sirpkt/druid/git/refs{/sha}","trees_url":"https://api.github.com/repos/sirpkt/druid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sirpkt/druid/statuses/{sha}","languages_url":"https://api.github.com/repos/sirpkt/druid/languages","stargazers_url":"https://api.github.com/repos/sirpkt/druid/stargazers","contributors_url":"https://api.github.com/repos/sirpkt/druid/contributors","subscribers_url":"https://api.github.com/repos/sirpkt/druid/subscribers","subscription_url":"https://api.github.com/repos/sirpkt/druid/subscription","commits_url":"https://api.github.com/repos/sirpkt/druid/commits{/sha}","git_commits_url":"https://api.github.com/repos/sirpkt/druid/git/commits{/sha}","comments_url":"https://api.github.com/repos/sirpkt/druid/comments{/number}","issue_comment_url":"https://api.github.com/repos/sirpkt/druid/issues/comments{/number}","contents_url":"https://api.github.com/repos/sirpkt/druid/contents/{+path}","compare_url":"https://api.github.com/repos/sirpkt/druid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sirpkt/druid/merges","archive_url":"https://api.github.com/repos/sirpkt/druid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sirpkt/druid/downloads","issues_url":"https://api.github.com/repos/sirpkt/druid/issues{/number}","pulls_url":"https://api.github.com/repos/sirpkt/druid/pulls{/number}","milestones_url":"https://api.github.com/repos/sirpkt/druid/milestones{/number}","notifications_url":"https://api.github.com/repos/sirpkt/druid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sirpkt/druid/labels{/name}","releases_url":"https://api.github.com/repos/sirpkt/druid/releases{/id}","deployments_url":"https://api.github.com/repos/sirpkt/druid/deployments","created_at":"2015-11-05T05:12:06Z","updated_at":"2016-01-12T07:39:06Z","pushed_at":"2016-02-05T05:20:38Z","git_url":"git://github.com/sirpkt/druid.git","ssh_url":"git@github.com:sirpkt/druid.git","clone_url":"https://github.com/sirpkt/druid.git","svn_url":"https://github.com/sirpkt/druid","homepage":"http://druid.io","size":100783,"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":"419fa5adaf128fd6b799e0e0dc88fee42d597cf0","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-02-08T15:32:42Z","pushed_at":"2016-02-08T22:12:04Z","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":125482,"stargazers_count":2421,"watchers_count":2421,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":573,"mirror_url":null,"open_issues_count":313,"forks":573,"open_issues":313,"watchers":2421,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/druid-io/druid/pulls/2239"},"html":{"href":"https://github.com/druid-io/druid/pull/2239"},"issue":{"href":"https://api.github.com/repos/druid-io/druid/issues/2239"},"comments":{"href":"https://api.github.com/repos/druid-io/druid/issues/2239/comments"},"review_comments":{"href":"https://api.github.com/repos/druid-io/druid/pulls/2239/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/2239/commits"},"statuses":{"href":"https://api.github.com/repos/druid-io/druid/statuses/382cad667188107c3983f70226595c2e3b33e4e6"}}}}