{"action":"created","comment":{"url":"https://api.github.com/repos/infinispan/infinispan/pulls/comments/35318281","id":35318281,"diff_hunk":"@@ -0,0 +1,25 @@\n+package org.infinispan.objectfilter.impl.aggregation;\n+\n+/**\n+ * @author anistor@redhat.com\n+ * @since 8.0\n+ */\n+public final class SumAccumulator extends FieldAccumulator {\n+\n+   public SumAccumulator(int pos) {\n+      super(pos);\n+   }\n+\n+   @Override\n+   public void update(Object[] srcRow, Object[] destRow) {\n+      Number value = (Number) srcRow[pos];\n+      if (value != null) {\n+         Number sum = (Number) destRow[pos];\n+         if (sum == null) {\n+            destRow[pos] = value;\n+         } else {\n+            destRow[pos] = sum.intValue() + value.intValue(); //todo [anistor] this handles integers only!","path":"object-filter/src/main/java/org/infinispan/objectfilter/impl/aggregation/SumAccumulator.java","position":21,"original_position":21,"commit_id":"618da827a0a7d9d39fc47d696d1afd24b6daa829","original_commit_id":"618da827a0a7d9d39fc47d696d1afd24b6daa829","user":{"login":"wburns","id":648175,"avatar_url":"https://avatars.githubusercontent.com/u/648175?v=3","gravatar_id":"","url":"https://api.github.com/users/wburns","html_url":"https://github.com/wburns","followers_url":"https://api.github.com/users/wburns/followers","following_url":"https://api.github.com/users/wburns/following{/other_user}","gists_url":"https://api.github.com/users/wburns/gists{/gist_id}","starred_url":"https://api.github.com/users/wburns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wburns/subscriptions","organizations_url":"https://api.github.com/users/wburns/orgs","repos_url":"https://api.github.com/users/wburns/repos","events_url":"https://api.github.com/users/wburns/events{/privacy}","received_events_url":"https://api.github.com/users/wburns/received_events","type":"User","site_admin":false},"body":"I would say we should use a long and double respectively.","created_at":"2015-07-23T13:03:53Z","updated_at":"2015-07-23T13:03:53Z","html_url":"https://github.com/infinispan/infinispan/pull/3591#discussion_r35318281","pull_request_url":"https://api.github.com/repos/infinispan/infinispan/pulls/3591","_links":{"self":{"href":"https://api.github.com/repos/infinispan/infinispan/pulls/comments/35318281"},"html":{"href":"https://github.com/infinispan/infinispan/pull/3591#discussion_r35318281"},"pull_request":{"href":"https://api.github.com/repos/infinispan/infinispan/pulls/3591"}}},"pull_request":{"url":"https://api.github.com/repos/infinispan/infinispan/pulls/3591","id":40210854,"html_url":"https://github.com/infinispan/infinispan/pull/3591","diff_url":"https://github.com/infinispan/infinispan/pull/3591.diff","patch_url":"https://github.com/infinispan/infinispan/pull/3591.patch","issue_url":"https://api.github.com/repos/infinispan/infinispan/issues/3591","number":3591,"state":"open","locked":false,"title":"ISPN-5416 Grouping and aggregations with DSL based queries","user":{"login":"anistor","id":995864,"avatar_url":"https://avatars.githubusercontent.com/u/995864?v=3","gravatar_id":"","url":"https://api.github.com/users/anistor","html_url":"https://github.com/anistor","followers_url":"https://api.github.com/users/anistor/followers","following_url":"https://api.github.com/users/anistor/following{/other_user}","gists_url":"https://api.github.com/users/anistor/gists{/gist_id}","starred_url":"https://api.github.com/users/anistor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anistor/subscriptions","organizations_url":"https://api.github.com/users/anistor/orgs","repos_url":"https://api.github.com/users/anistor/repos","events_url":"https://api.github.com/users/anistor/events{/privacy}","received_events_url":"https://api.github.com/users/anistor/received_events","type":"User","site_admin":false},"body":"jira: https://issues.jboss.org/browse/ISPN-5416","created_at":"2015-07-17T08:43:51Z","updated_at":"2015-07-23T13:03:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d49be161ad11b6e7373c527a65786b59c9e92960","assignee":null,"milestone":{"url":"https://api.github.com/repos/infinispan/infinispan/milestones/31","html_url":"https://github.com/infinispan/infinispan/milestones/8.0.0.Beta2","labels_url":"https://api.github.com/repos/infinispan/infinispan/milestones/31/labels","id":1215406,"number":31,"title":"8.0.0.Beta2","description":null,"creator":{"login":"tristantarrant","id":392478,"avatar_url":"https://avatars.githubusercontent.com/u/392478?v=3","gravatar_id":"","url":"https://api.github.com/users/tristantarrant","html_url":"https://github.com/tristantarrant","followers_url":"https://api.github.com/users/tristantarrant/followers","following_url":"https://api.github.com/users/tristantarrant/following{/other_user}","gists_url":"https://api.github.com/users/tristantarrant/gists{/gist_id}","starred_url":"https://api.github.com/users/tristantarrant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tristantarrant/subscriptions","organizations_url":"https://api.github.com/users/tristantarrant/orgs","repos_url":"https://api.github.com/users/tristantarrant/repos","events_url":"https://api.github.com/users/tristantarrant/events{/privacy}","received_events_url":"https://api.github.com/users/tristantarrant/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":2,"state":"open","created_at":"2015-07-20T09:12:43Z","updated_at":"2015-07-22T09:14:48Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/infinispan/infinispan/pulls/3591/commits","review_comments_url":"https://api.github.com/repos/infinispan/infinispan/pulls/3591/comments","review_comment_url":"https://api.github.com/repos/infinispan/infinispan/pulls/comments{/number}","comments_url":"https://api.github.com/repos/infinispan/infinispan/issues/3591/comments","statuses_url":"https://api.github.com/repos/infinispan/infinispan/statuses/618da827a0a7d9d39fc47d696d1afd24b6daa829","head":{"label":"anistor:t_5416_m","ref":"t_5416_m","sha":"618da827a0a7d9d39fc47d696d1afd24b6daa829","user":{"login":"anistor","id":995864,"avatar_url":"https://avatars.githubusercontent.com/u/995864?v=3","gravatar_id":"","url":"https://api.github.com/users/anistor","html_url":"https://github.com/anistor","followers_url":"https://api.github.com/users/anistor/followers","following_url":"https://api.github.com/users/anistor/following{/other_user}","gists_url":"https://api.github.com/users/anistor/gists{/gist_id}","starred_url":"https://api.github.com/users/anistor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anistor/subscriptions","organizations_url":"https://api.github.com/users/anistor/orgs","repos_url":"https://api.github.com/users/anistor/repos","events_url":"https://api.github.com/users/anistor/events{/privacy}","received_events_url":"https://api.github.com/users/anistor/received_events","type":"User","site_admin":false},"repo":{"id":4410456,"name":"infinispan","full_name":"anistor/infinispan","owner":{"login":"anistor","id":995864,"avatar_url":"https://avatars.githubusercontent.com/u/995864?v=3","gravatar_id":"","url":"https://api.github.com/users/anistor","html_url":"https://github.com/anistor","followers_url":"https://api.github.com/users/anistor/followers","following_url":"https://api.github.com/users/anistor/following{/other_user}","gists_url":"https://api.github.com/users/anistor/gists{/gist_id}","starred_url":"https://api.github.com/users/anistor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anistor/subscriptions","organizations_url":"https://api.github.com/users/anistor/orgs","repos_url":"https://api.github.com/users/anistor/repos","events_url":"https://api.github.com/users/anistor/events{/privacy}","received_events_url":"https://api.github.com/users/anistor/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/anistor/infinispan","description":"Infinispan is an open source data grid platform and highly scalable NoSQL cloud data store.","fork":true,"url":"https://api.github.com/repos/anistor/infinispan","forks_url":"https://api.github.com/repos/anistor/infinispan/forks","keys_url":"https://api.github.com/repos/anistor/infinispan/keys{/key_id}","collaborators_url":"https://api.github.com/repos/anistor/infinispan/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/anistor/infinispan/teams","hooks_url":"https://api.github.com/repos/anistor/infinispan/hooks","issue_events_url":"https://api.github.com/repos/anistor/infinispan/issues/events{/number}","events_url":"https://api.github.com/repos/anistor/infinispan/events","assignees_url":"https://api.github.com/repos/anistor/infinispan/assignees{/user}","branches_url":"https://api.github.com/repos/anistor/infinispan/branches{/branch}","tags_url":"https://api.github.com/repos/anistor/infinispan/tags","blobs_url":"https://api.github.com/repos/anistor/infinispan/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/anistor/infinispan/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/anistor/infinispan/git/refs{/sha}","trees_url":"https://api.github.com/repos/anistor/infinispan/git/trees{/sha}","statuses_url":"https://api.github.com/repos/anistor/infinispan/statuses/{sha}","languages_url":"https://api.github.com/repos/anistor/infinispan/languages","stargazers_url":"https://api.github.com/repos/anistor/infinispan/stargazers","contributors_url":"https://api.github.com/repos/anistor/infinispan/contributors","subscribers_url":"https://api.github.com/repos/anistor/infinispan/subscribers","subscription_url":"https://api.github.com/repos/anistor/infinispan/subscription","commits_url":"https://api.github.com/repos/anistor/infinispan/commits{/sha}","git_commits_url":"https://api.github.com/repos/anistor/infinispan/git/commits{/sha}","comments_url":"https://api.github.com/repos/anistor/infinispan/comments{/number}","issue_comment_url":"https://api.github.com/repos/anistor/infinispan/issues/comments{/number}","contents_url":"https://api.github.com/repos/anistor/infinispan/contents/{+path}","compare_url":"https://api.github.com/repos/anistor/infinispan/compare/{base}...{head}","merges_url":"https://api.github.com/repos/anistor/infinispan/merges","archive_url":"https://api.github.com/repos/anistor/infinispan/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/anistor/infinispan/downloads","issues_url":"https://api.github.com/repos/anistor/infinispan/issues{/number}","pulls_url":"https://api.github.com/repos/anistor/infinispan/pulls{/number}","milestones_url":"https://api.github.com/repos/anistor/infinispan/milestones{/number}","notifications_url":"https://api.github.com/repos/anistor/infinispan/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/anistor/infinispan/labels{/name}","releases_url":"https://api.github.com/repos/anistor/infinispan/releases{/id}","created_at":"2012-05-22T17:56:18Z","updated_at":"2015-05-08T14:07:24Z","pushed_at":"2015-07-23T10:08:18Z","git_url":"git://github.com/anistor/infinispan.git","ssh_url":"git@github.com:anistor/infinispan.git","clone_url":"https://github.com/anistor/infinispan.git","svn_url":"https://github.com/anistor/infinispan","homepage":"http://www.infinispan.org","size":76791,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"infinispan:master","ref":"master","sha":"ad8d5c926ae2c8be979e81aaa31c8e05e27048fc","user":{"login":"infinispan","id":458093,"avatar_url":"https://avatars.githubusercontent.com/u/458093?v=3","gravatar_id":"","url":"https://api.github.com/users/infinispan","html_url":"https://github.com/infinispan","followers_url":"https://api.github.com/users/infinispan/followers","following_url":"https://api.github.com/users/infinispan/following{/other_user}","gists_url":"https://api.github.com/users/infinispan/gists{/gist_id}","starred_url":"https://api.github.com/users/infinispan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/infinispan/subscriptions","organizations_url":"https://api.github.com/users/infinispan/orgs","repos_url":"https://api.github.com/users/infinispan/repos","events_url":"https://api.github.com/users/infinispan/events{/privacy}","received_events_url":"https://api.github.com/users/infinispan/received_events","type":"Organization","site_admin":false},"repo":{"id":1050944,"name":"infinispan","full_name":"infinispan/infinispan","owner":{"login":"infinispan","id":458093,"avatar_url":"https://avatars.githubusercontent.com/u/458093?v=3","gravatar_id":"","url":"https://api.github.com/users/infinispan","html_url":"https://github.com/infinispan","followers_url":"https://api.github.com/users/infinispan/followers","following_url":"https://api.github.com/users/infinispan/following{/other_user}","gists_url":"https://api.github.com/users/infinispan/gists{/gist_id}","starred_url":"https://api.github.com/users/infinispan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/infinispan/subscriptions","organizations_url":"https://api.github.com/users/infinispan/orgs","repos_url":"https://api.github.com/users/infinispan/repos","events_url":"https://api.github.com/users/infinispan/events{/privacy}","received_events_url":"https://api.github.com/users/infinispan/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/infinispan/infinispan","description":"Infinispan is an open source data grid platform and highly scalable NoSQL cloud data store.","fork":false,"url":"https://api.github.com/repos/infinispan/infinispan","forks_url":"https://api.github.com/repos/infinispan/infinispan/forks","keys_url":"https://api.github.com/repos/infinispan/infinispan/keys{/key_id}","collaborators_url":"https://api.github.com/repos/infinispan/infinispan/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/infinispan/infinispan/teams","hooks_url":"https://api.github.com/repos/infinispan/infinispan/hooks","issue_events_url":"https://api.github.com/repos/infinispan/infinispan/issues/events{/number}","events_url":"https://api.github.com/repos/infinispan/infinispan/events","assignees_url":"https://api.github.com/repos/infinispan/infinispan/assignees{/user}","branches_url":"https://api.github.com/repos/infinispan/infinispan/branches{/branch}","tags_url":"https://api.github.com/repos/infinispan/infinispan/tags","blobs_url":"https://api.github.com/repos/infinispan/infinispan/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/infinispan/infinispan/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/infinispan/infinispan/git/refs{/sha}","trees_url":"https://api.github.com/repos/infinispan/infinispan/git/trees{/sha}","statuses_url":"https://api.github.com/repos/infinispan/infinispan/statuses/{sha}","languages_url":"https://api.github.com/repos/infinispan/infinispan/languages","stargazers_url":"https://api.github.com/repos/infinispan/infinispan/stargazers","contributors_url":"https://api.github.com/repos/infinispan/infinispan/contributors","subscribers_url":"https://api.github.com/repos/infinispan/infinispan/subscribers","subscription_url":"https://api.github.com/repos/infinispan/infinispan/subscription","commits_url":"https://api.github.com/repos/infinispan/infinispan/commits{/sha}","git_commits_url":"https://api.github.com/repos/infinispan/infinispan/git/commits{/sha}","comments_url":"https://api.github.com/repos/infinispan/infinispan/comments{/number}","issue_comment_url":"https://api.github.com/repos/infinispan/infinispan/issues/comments{/number}","contents_url":"https://api.github.com/repos/infinispan/infinispan/contents/{+path}","compare_url":"https://api.github.com/repos/infinispan/infinispan/compare/{base}...{head}","merges_url":"https://api.github.com/repos/infinispan/infinispan/merges","archive_url":"https://api.github.com/repos/infinispan/infinispan/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/infinispan/infinispan/downloads","issues_url":"https://api.github.com/repos/infinispan/infinispan/issues{/number}","pulls_url":"https://api.github.com/repos/infinispan/infinispan/pulls{/number}","milestones_url":"https://api.github.com/repos/infinispan/infinispan/milestones{/number}","notifications_url":"https://api.github.com/repos/infinispan/infinispan/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/infinispan/infinispan/labels{/name}","releases_url":"https://api.github.com/repos/infinispan/infinispan/releases{/id}","created_at":"2010-11-04T12:33:19Z","updated_at":"2015-07-20T20:05:17Z","pushed_at":"2015-07-23T11:47:46Z","git_url":"git://github.com/infinispan/infinispan.git","ssh_url":"git@github.com:infinispan/infinispan.git","clone_url":"https://github.com/infinispan/infinispan.git","svn_url":"https://github.com/infinispan/infinispan","homepage":"http://www.infinispan.org","size":155847,"stargazers_count":389,"watchers_count":389,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":296,"mirror_url":null,"open_issues_count":16,"forks":296,"open_issues":16,"watchers":389,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/infinispan/infinispan/pulls/3591"},"html":{"href":"https://github.com/infinispan/infinispan/pull/3591"},"issue":{"href":"https://api.github.com/repos/infinispan/infinispan/issues/3591"},"comments":{"href":"https://api.github.com/repos/infinispan/infinispan/issues/3591/comments"},"review_comments":{"href":"https://api.github.com/repos/infinispan/infinispan/pulls/3591/comments"},"review_comment":{"href":"https://api.github.com/repos/infinispan/infinispan/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/infinispan/infinispan/pulls/3591/commits"},"statuses":{"href":"https://api.github.com/repos/infinispan/infinispan/statuses/618da827a0a7d9d39fc47d696d1afd24b6daa829"}}}}