{"action":"created","comment":{"url":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/comments/54656509","id":54656509,"diff_hunk":"@@ -86,7 +86,9 @@\n     [\"extract\" columns crit]\n \n     [[\"extract\" columns subquery]]\n-    [\"extract\" columns [\"and\" subquery crit]]\n+    (if (= \"group_by\" (first subquery))","path":"src/puppetlabs/puppetdb/http/query.clj","position":5,"original_position":5,"commit_id":"927e0f6ce82fd49f06c60e05f62fc277264d5b7f","original_commit_id":"927e0f6ce82fd49f06c60e05f62fc277264d5b7f","user":{"login":"wkalt","id":4952091,"avatar_url":"https://avatars.githubusercontent.com/u/4952091?v=3","gravatar_id":"","url":"https://api.github.com/users/wkalt","html_url":"https://github.com/wkalt","followers_url":"https://api.github.com/users/wkalt/followers","following_url":"https://api.github.com/users/wkalt/following{/other_user}","gists_url":"https://api.github.com/users/wkalt/gists{/gist_id}","starred_url":"https://api.github.com/users/wkalt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wkalt/subscriptions","organizations_url":"https://api.github.com/users/wkalt/orgs","repos_url":"https://api.github.com/users/wkalt/repos","events_url":"https://api.github.com/users/wkalt/events{/privacy}","received_events_url":"https://api.github.com/users/wkalt/received_events","type":"User","site_admin":false},"body":"bit of a nitpick but can't we just do this with match like in the rest of this function?","created_at":"2016-03-01T23:46:19Z","updated_at":"2016-03-01T23:46:19Z","html_url":"https://github.com/puppetlabs/puppetdb/pull/1874#discussion_r54656509","pull_request_url":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/1874","_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/comments/54656509"},"html":{"href":"https://github.com/puppetlabs/puppetdb/pull/1874#discussion_r54656509"},"pull_request":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/1874"}}},"pull_request":{"url":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/1874","id":60920930,"html_url":"https://github.com/puppetlabs/puppetdb/pull/1874","diff_url":"https://github.com/puppetlabs/puppetdb/pull/1874.diff","patch_url":"https://github.com/puppetlabs/puppetdb/pull/1874.patch","issue_url":"https://api.github.com/repos/puppetlabs/puppetdb/issues/1874","number":1874,"state":"open","locked":false,"title":"(PDB-2360) Fix aliasing in aggregates and group-by","user":{"login":"ajroetker","id":3198124,"avatar_url":"https://avatars.githubusercontent.com/u/3198124?v=3","gravatar_id":"","url":"https://api.github.com/users/ajroetker","html_url":"https://github.com/ajroetker","followers_url":"https://api.github.com/users/ajroetker/followers","following_url":"https://api.github.com/users/ajroetker/following{/other_user}","gists_url":"https://api.github.com/users/ajroetker/gists{/gist_id}","starred_url":"https://api.github.com/users/ajroetker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajroetker/subscriptions","organizations_url":"https://api.github.com/users/ajroetker/orgs","repos_url":"https://api.github.com/users/ajroetker/repos","events_url":"https://api.github.com/users/ajroetker/events{/privacy}","received_events_url":"https://api.github.com/users/ajroetker/received_events","type":"User","site_admin":false},"body":"This commit fixes a bug with aggregates and group-by where the fields\nused as arguments to those operators (`function` and `group_by`) weren't\nbeing converted to our `fields` (honeysql) constructs which have the\ntable disambiguation and correct names for certain query API fields\n(e.g. queries to `/nodes` grouping by certname now work instead of\nerroring with an ambiguous column message, and queries to `/reports`\nwith `[\"function\",\"min\",\"report_timestamp\"]` will now properly rename\n`report_timestamp` to `reports.end_time` in the SQL).","created_at":"2016-02-26T23:32:46Z","updated_at":"2016-03-01T23:46:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c1ffc5670bf4fdeac9ac8e5657802b0efe5409fa","assignee":null,"milestone":{"url":"https://api.github.com/repos/puppetlabs/puppetdb/milestones/18","html_url":"https://github.com/puppetlabs/puppetdb/milestones/3.2.5%20(stable)","labels_url":"https://api.github.com/repos/puppetlabs/puppetdb/milestones/18/labels","id":1608135,"number":18,"title":"3.2.5 (stable)","description":"","creator":{"login":"kbarber","id":80595,"avatar_url":"https://avatars.githubusercontent.com/u/80595?v=3","gravatar_id":"","url":"https://api.github.com/users/kbarber","html_url":"https://github.com/kbarber","followers_url":"https://api.github.com/users/kbarber/followers","following_url":"https://api.github.com/users/kbarber/following{/other_user}","gists_url":"https://api.github.com/users/kbarber/gists{/gist_id}","starred_url":"https://api.github.com/users/kbarber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kbarber/subscriptions","organizations_url":"https://api.github.com/users/kbarber/orgs","repos_url":"https://api.github.com/users/kbarber/repos","events_url":"https://api.github.com/users/kbarber/events{/privacy}","received_events_url":"https://api.github.com/users/kbarber/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":2,"state":"open","created_at":"2016-02-26T14:19:47Z","updated_at":"2016-03-01T17:47:14Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/1874/commits","review_comments_url":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/1874/comments","review_comment_url":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/puppetlabs/puppetdb/issues/1874/comments","statuses_url":"https://api.github.com/repos/puppetlabs/puppetdb/statuses/927e0f6ce82fd49f06c60e05f62fc277264d5b7f","head":{"label":"ajroetker:ticket/stable/pdb-2360/fix_aliasing_in_aggregates","ref":"ticket/stable/pdb-2360/fix_aliasing_in_aggregates","sha":"927e0f6ce82fd49f06c60e05f62fc277264d5b7f","user":{"login":"ajroetker","id":3198124,"avatar_url":"https://avatars.githubusercontent.com/u/3198124?v=3","gravatar_id":"","url":"https://api.github.com/users/ajroetker","html_url":"https://github.com/ajroetker","followers_url":"https://api.github.com/users/ajroetker/followers","following_url":"https://api.github.com/users/ajroetker/following{/other_user}","gists_url":"https://api.github.com/users/ajroetker/gists{/gist_id}","starred_url":"https://api.github.com/users/ajroetker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajroetker/subscriptions","organizations_url":"https://api.github.com/users/ajroetker/orgs","repos_url":"https://api.github.com/users/ajroetker/repos","events_url":"https://api.github.com/users/ajroetker/events{/privacy}","received_events_url":"https://api.github.com/users/ajroetker/received_events","type":"User","site_admin":false},"repo":{"id":10415180,"name":"puppetdb","full_name":"ajroetker/puppetdb","owner":{"login":"ajroetker","id":3198124,"avatar_url":"https://avatars.githubusercontent.com/u/3198124?v=3","gravatar_id":"","url":"https://api.github.com/users/ajroetker","html_url":"https://github.com/ajroetker","followers_url":"https://api.github.com/users/ajroetker/followers","following_url":"https://api.github.com/users/ajroetker/following{/other_user}","gists_url":"https://api.github.com/users/ajroetker/gists{/gist_id}","starred_url":"https://api.github.com/users/ajroetker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajroetker/subscriptions","organizations_url":"https://api.github.com/users/ajroetker/orgs","repos_url":"https://api.github.com/users/ajroetker/repos","events_url":"https://api.github.com/users/ajroetker/events{/privacy}","received_events_url":"https://api.github.com/users/ajroetker/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ajroetker/puppetdb","description":"Centralized Puppet Storage","fork":true,"url":"https://api.github.com/repos/ajroetker/puppetdb","forks_url":"https://api.github.com/repos/ajroetker/puppetdb/forks","keys_url":"https://api.github.com/repos/ajroetker/puppetdb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ajroetker/puppetdb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ajroetker/puppetdb/teams","hooks_url":"https://api.github.com/repos/ajroetker/puppetdb/hooks","issue_events_url":"https://api.github.com/repos/ajroetker/puppetdb/issues/events{/number}","events_url":"https://api.github.com/repos/ajroetker/puppetdb/events","assignees_url":"https://api.github.com/repos/ajroetker/puppetdb/assignees{/user}","branches_url":"https://api.github.com/repos/ajroetker/puppetdb/branches{/branch}","tags_url":"https://api.github.com/repos/ajroetker/puppetdb/tags","blobs_url":"https://api.github.com/repos/ajroetker/puppetdb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ajroetker/puppetdb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ajroetker/puppetdb/git/refs{/sha}","trees_url":"https://api.github.com/repos/ajroetker/puppetdb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ajroetker/puppetdb/statuses/{sha}","languages_url":"https://api.github.com/repos/ajroetker/puppetdb/languages","stargazers_url":"https://api.github.com/repos/ajroetker/puppetdb/stargazers","contributors_url":"https://api.github.com/repos/ajroetker/puppetdb/contributors","subscribers_url":"https://api.github.com/repos/ajroetker/puppetdb/subscribers","subscription_url":"https://api.github.com/repos/ajroetker/puppetdb/subscription","commits_url":"https://api.github.com/repos/ajroetker/puppetdb/commits{/sha}","git_commits_url":"https://api.github.com/repos/ajroetker/puppetdb/git/commits{/sha}","comments_url":"https://api.github.com/repos/ajroetker/puppetdb/comments{/number}","issue_comment_url":"https://api.github.com/repos/ajroetker/puppetdb/issues/comments{/number}","contents_url":"https://api.github.com/repos/ajroetker/puppetdb/contents/{+path}","compare_url":"https://api.github.com/repos/ajroetker/puppetdb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ajroetker/puppetdb/merges","archive_url":"https://api.github.com/repos/ajroetker/puppetdb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ajroetker/puppetdb/downloads","issues_url":"https://api.github.com/repos/ajroetker/puppetdb/issues{/number}","pulls_url":"https://api.github.com/repos/ajroetker/puppetdb/pulls{/number}","milestones_url":"https://api.github.com/repos/ajroetker/puppetdb/milestones{/number}","notifications_url":"https://api.github.com/repos/ajroetker/puppetdb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ajroetker/puppetdb/labels{/name}","releases_url":"https://api.github.com/repos/ajroetker/puppetdb/releases{/id}","deployments_url":"https://api.github.com/repos/ajroetker/puppetdb/deployments","created_at":"2013-05-31T23:59:00Z","updated_at":"2015-04-29T22:51:50Z","pushed_at":"2016-03-01T00:29:42Z","git_url":"git://github.com/ajroetker/puppetdb.git","ssh_url":"git@github.com:ajroetker/puppetdb.git","clone_url":"https://github.com/ajroetker/puppetdb.git","svn_url":"https://github.com/ajroetker/puppetdb","homepage":"http://docs.puppetlabs.com/puppetdb","size":16124,"stargazers_count":0,"watchers_count":0,"language":"Clojure","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":0,"default_branch":"master"}},"base":{"label":"puppetlabs:stable","ref":"stable","sha":"14a67d8b2c8da4fb269b5fb69724196b9463cffe","user":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?v=3","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":2193032,"name":"puppetdb","full_name":"puppetlabs/puppetdb","owner":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?v=3","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/puppetlabs/puppetdb","description":"Centralized Puppet Storage","fork":false,"url":"https://api.github.com/repos/puppetlabs/puppetdb","forks_url":"https://api.github.com/repos/puppetlabs/puppetdb/forks","keys_url":"https://api.github.com/repos/puppetlabs/puppetdb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/puppetlabs/puppetdb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/puppetlabs/puppetdb/teams","hooks_url":"https://api.github.com/repos/puppetlabs/puppetdb/hooks","issue_events_url":"https://api.github.com/repos/puppetlabs/puppetdb/issues/events{/number}","events_url":"https://api.github.com/repos/puppetlabs/puppetdb/events","assignees_url":"https://api.github.com/repos/puppetlabs/puppetdb/assignees{/user}","branches_url":"https://api.github.com/repos/puppetlabs/puppetdb/branches{/branch}","tags_url":"https://api.github.com/repos/puppetlabs/puppetdb/tags","blobs_url":"https://api.github.com/repos/puppetlabs/puppetdb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/puppetlabs/puppetdb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/puppetlabs/puppetdb/git/refs{/sha}","trees_url":"https://api.github.com/repos/puppetlabs/puppetdb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/puppetlabs/puppetdb/statuses/{sha}","languages_url":"https://api.github.com/repos/puppetlabs/puppetdb/languages","stargazers_url":"https://api.github.com/repos/puppetlabs/puppetdb/stargazers","contributors_url":"https://api.github.com/repos/puppetlabs/puppetdb/contributors","subscribers_url":"https://api.github.com/repos/puppetlabs/puppetdb/subscribers","subscription_url":"https://api.github.com/repos/puppetlabs/puppetdb/subscription","commits_url":"https://api.github.com/repos/puppetlabs/puppetdb/commits{/sha}","git_commits_url":"https://api.github.com/repos/puppetlabs/puppetdb/git/commits{/sha}","comments_url":"https://api.github.com/repos/puppetlabs/puppetdb/comments{/number}","issue_comment_url":"https://api.github.com/repos/puppetlabs/puppetdb/issues/comments{/number}","contents_url":"https://api.github.com/repos/puppetlabs/puppetdb/contents/{+path}","compare_url":"https://api.github.com/repos/puppetlabs/puppetdb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/puppetlabs/puppetdb/merges","archive_url":"https://api.github.com/repos/puppetlabs/puppetdb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/puppetlabs/puppetdb/downloads","issues_url":"https://api.github.com/repos/puppetlabs/puppetdb/issues{/number}","pulls_url":"https://api.github.com/repos/puppetlabs/puppetdb/pulls{/number}","milestones_url":"https://api.github.com/repos/puppetlabs/puppetdb/milestones{/number}","notifications_url":"https://api.github.com/repos/puppetlabs/puppetdb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/puppetlabs/puppetdb/labels{/name}","releases_url":"https://api.github.com/repos/puppetlabs/puppetdb/releases{/id}","deployments_url":"https://api.github.com/repos/puppetlabs/puppetdb/deployments","created_at":"2011-08-11T18:54:46Z","updated_at":"2016-02-25T21:04:33Z","pushed_at":"2016-03-01T20:19:04Z","git_url":"git://github.com/puppetlabs/puppetdb.git","ssh_url":"git@github.com:puppetlabs/puppetdb.git","clone_url":"https://github.com/puppetlabs/puppetdb.git","svn_url":"https://github.com/puppetlabs/puppetdb","homepage":"http://docs.puppetlabs.com/puppetdb","size":19482,"stargazers_count":184,"watchers_count":184,"language":"Clojure","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":146,"mirror_url":null,"open_issues_count":8,"forks":146,"open_issues":8,"watchers":184,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/1874"},"html":{"href":"https://github.com/puppetlabs/puppetdb/pull/1874"},"issue":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/issues/1874"},"comments":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/issues/1874/comments"},"review_comments":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/1874/comments"},"review_comment":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/1874/commits"},"statuses":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/statuses/927e0f6ce82fd49f06c60e05f62fc277264d5b7f"}}}}