{"action":"created","comment":{"url":"https://api.github.com/repos/influxdb/influxdb/pulls/comments/42408462","id":42408462,"diff_hunk":"@@ -242,11 +242,22 @@ func (q *QueryExecutor) PlanSelect(stmt *influxql.SelectStatement, chunkSize int\n \t// Replace instances of \"now()\" with the current time, and check the resultant times.\n \tstmt.Condition = influxql.Reduce(stmt.Condition, &influxql.NowValuer{Now: now})\n \ttmin, tmax := influxql.TimeRange(stmt.Condition)\n+\texplicitTimeRange := true\n \tif tmax.IsZero() {\n \t\ttmax = now\n+\t\texplicitTimeRange = false\n \t}\n \tif tmin.IsZero() {\n \t\ttmin = time.Unix(0, 0)\n+\t\texplicitTimeRange = false\n+\t}\n+\n+\t// for queries with small group by interval set time range if it wasn't explicit. #4481","path":"tsdb/query_executor.go","position":14,"original_position":14,"commit_id":"52d3171992a0165417832cebe8151f913159c463","original_commit_id":"52d3171992a0165417832cebe8151f913159c463","user":{"login":"otoolep","id":536312,"avatar_url":"https://avatars.githubusercontent.com/u/536312?v=3","gravatar_id":"","url":"https://api.github.com/users/otoolep","html_url":"https://github.com/otoolep","followers_url":"https://api.github.com/users/otoolep/followers","following_url":"https://api.github.com/users/otoolep/following{/other_user}","gists_url":"https://api.github.com/users/otoolep/gists{/gist_id}","starred_url":"https://api.github.com/users/otoolep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/otoolep/subscriptions","organizations_url":"https://api.github.com/users/otoolep/orgs","repos_url":"https://api.github.com/users/otoolep/repos","events_url":"https://api.github.com/users/otoolep/events{/privacy}","received_events_url":"https://api.github.com/users/otoolep/received_events","type":"User","site_admin":false},"body":"Can you pull the bug number from here? We don't tend to do that in our code, I don't think you'll find it anywhere else.","created_at":"2015-10-19T18:33:28Z","updated_at":"2015-10-19T18:33:28Z","html_url":"https://github.com/influxdb/influxdb/pull/4491#discussion_r42408462","pull_request_url":"https://api.github.com/repos/influxdb/influxdb/pulls/4491","_links":{"self":{"href":"https://api.github.com/repos/influxdb/influxdb/pulls/comments/42408462"},"html":{"href":"https://github.com/influxdb/influxdb/pull/4491#discussion_r42408462"},"pull_request":{"href":"https://api.github.com/repos/influxdb/influxdb/pulls/4491"}}},"pull_request":{"url":"https://api.github.com/repos/influxdb/influxdb/pulls/4491","id":48016157,"html_url":"https://github.com/influxdb/influxdb/pull/4491","diff_url":"https://github.com/influxdb/influxdb/pull/4491.diff","patch_url":"https://github.com/influxdb/influxdb/pull/4491.patch","issue_url":"https://api.github.com/repos/influxdb/influxdb/issues/4491","number":4491,"state":"open","locked":false,"title":"Fix GROUP BY for small intervals","user":{"login":"Pomyk","id":156784,"avatar_url":"https://avatars.githubusercontent.com/u/156784?v=3","gravatar_id":"","url":"https://api.github.com/users/Pomyk","html_url":"https://github.com/Pomyk","followers_url":"https://api.github.com/users/Pomyk/followers","following_url":"https://api.github.com/users/Pomyk/following{/other_user}","gists_url":"https://api.github.com/users/Pomyk/gists{/gist_id}","starred_url":"https://api.github.com/users/Pomyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pomyk/subscriptions","organizations_url":"https://api.github.com/users/Pomyk/orgs","repos_url":"https://api.github.com/users/Pomyk/repos","events_url":"https://api.github.com/users/Pomyk/events{/privacy}","received_events_url":"https://api.github.com/users/Pomyk/received_events","type":"User","site_admin":false},"body":"Implicit ending time range for group by was calculated later than\r\nstarting range. This caused too many buckets for small intervals.\r\nThe fix is to set explicit time range for such cases, but triggers\r\nreparsing of the query.","created_at":"2015-10-18T19:54:18Z","updated_at":"2015-10-19T18:33:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"683554e4c5c140dc2f47365b1d96a4b9e011c2c1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/influxdb/influxdb/pulls/4491/commits","review_comments_url":"https://api.github.com/repos/influxdb/influxdb/pulls/4491/comments","review_comment_url":"https://api.github.com/repos/influxdb/influxdb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/influxdb/influxdb/issues/4491/comments","statuses_url":"https://api.github.com/repos/influxdb/influxdb/statuses/52d3171992a0165417832cebe8151f913159c463","head":{"label":"Pomyk:fix-4481","ref":"fix-4481","sha":"52d3171992a0165417832cebe8151f913159c463","user":{"login":"Pomyk","id":156784,"avatar_url":"https://avatars.githubusercontent.com/u/156784?v=3","gravatar_id":"","url":"https://api.github.com/users/Pomyk","html_url":"https://github.com/Pomyk","followers_url":"https://api.github.com/users/Pomyk/followers","following_url":"https://api.github.com/users/Pomyk/following{/other_user}","gists_url":"https://api.github.com/users/Pomyk/gists{/gist_id}","starred_url":"https://api.github.com/users/Pomyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pomyk/subscriptions","organizations_url":"https://api.github.com/users/Pomyk/orgs","repos_url":"https://api.github.com/users/Pomyk/repos","events_url":"https://api.github.com/users/Pomyk/events{/privacy}","received_events_url":"https://api.github.com/users/Pomyk/received_events","type":"User","site_admin":false},"repo":{"id":43686918,"name":"influxdb","full_name":"Pomyk/influxdb","owner":{"login":"Pomyk","id":156784,"avatar_url":"https://avatars.githubusercontent.com/u/156784?v=3","gravatar_id":"","url":"https://api.github.com/users/Pomyk","html_url":"https://github.com/Pomyk","followers_url":"https://api.github.com/users/Pomyk/followers","following_url":"https://api.github.com/users/Pomyk/following{/other_user}","gists_url":"https://api.github.com/users/Pomyk/gists{/gist_id}","starred_url":"https://api.github.com/users/Pomyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pomyk/subscriptions","organizations_url":"https://api.github.com/users/Pomyk/orgs","repos_url":"https://api.github.com/users/Pomyk/repos","events_url":"https://api.github.com/users/Pomyk/events{/privacy}","received_events_url":"https://api.github.com/users/Pomyk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Pomyk/influxdb","description":"Scalable datastore for metrics, events, and real-time analytics","fork":true,"url":"https://api.github.com/repos/Pomyk/influxdb","forks_url":"https://api.github.com/repos/Pomyk/influxdb/forks","keys_url":"https://api.github.com/repos/Pomyk/influxdb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Pomyk/influxdb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Pomyk/influxdb/teams","hooks_url":"https://api.github.com/repos/Pomyk/influxdb/hooks","issue_events_url":"https://api.github.com/repos/Pomyk/influxdb/issues/events{/number}","events_url":"https://api.github.com/repos/Pomyk/influxdb/events","assignees_url":"https://api.github.com/repos/Pomyk/influxdb/assignees{/user}","branches_url":"https://api.github.com/repos/Pomyk/influxdb/branches{/branch}","tags_url":"https://api.github.com/repos/Pomyk/influxdb/tags","blobs_url":"https://api.github.com/repos/Pomyk/influxdb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Pomyk/influxdb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Pomyk/influxdb/git/refs{/sha}","trees_url":"https://api.github.com/repos/Pomyk/influxdb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Pomyk/influxdb/statuses/{sha}","languages_url":"https://api.github.com/repos/Pomyk/influxdb/languages","stargazers_url":"https://api.github.com/repos/Pomyk/influxdb/stargazers","contributors_url":"https://api.github.com/repos/Pomyk/influxdb/contributors","subscribers_url":"https://api.github.com/repos/Pomyk/influxdb/subscribers","subscription_url":"https://api.github.com/repos/Pomyk/influxdb/subscription","commits_url":"https://api.github.com/repos/Pomyk/influxdb/commits{/sha}","git_commits_url":"https://api.github.com/repos/Pomyk/influxdb/git/commits{/sha}","comments_url":"https://api.github.com/repos/Pomyk/influxdb/comments{/number}","issue_comment_url":"https://api.github.com/repos/Pomyk/influxdb/issues/comments{/number}","contents_url":"https://api.github.com/repos/Pomyk/influxdb/contents/{+path}","compare_url":"https://api.github.com/repos/Pomyk/influxdb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Pomyk/influxdb/merges","archive_url":"https://api.github.com/repos/Pomyk/influxdb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Pomyk/influxdb/downloads","issues_url":"https://api.github.com/repos/Pomyk/influxdb/issues{/number}","pulls_url":"https://api.github.com/repos/Pomyk/influxdb/pulls{/number}","milestones_url":"https://api.github.com/repos/Pomyk/influxdb/milestones{/number}","notifications_url":"https://api.github.com/repos/Pomyk/influxdb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Pomyk/influxdb/labels{/name}","releases_url":"https://api.github.com/repos/Pomyk/influxdb/releases{/id}","created_at":"2015-10-05T13:48:01Z","updated_at":"2015-10-05T13:48:06Z","pushed_at":"2015-10-19T18:27:51Z","git_url":"git://github.com/Pomyk/influxdb.git","ssh_url":"git@github.com:Pomyk/influxdb.git","clone_url":"https://github.com/Pomyk/influxdb.git","svn_url":"https://github.com/Pomyk/influxdb","homepage":"http://influxdb.com","size":32068,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"influxdb:master","ref":"master","sha":"cc54cba87f419c0ad43b0f9c2f77d9a4c41a73ea","user":{"login":"influxdb","id":5713248,"avatar_url":"https://avatars.githubusercontent.com/u/5713248?v=3","gravatar_id":"","url":"https://api.github.com/users/influxdb","html_url":"https://github.com/influxdb","followers_url":"https://api.github.com/users/influxdb/followers","following_url":"https://api.github.com/users/influxdb/following{/other_user}","gists_url":"https://api.github.com/users/influxdb/gists{/gist_id}","starred_url":"https://api.github.com/users/influxdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/influxdb/subscriptions","organizations_url":"https://api.github.com/users/influxdb/orgs","repos_url":"https://api.github.com/users/influxdb/repos","events_url":"https://api.github.com/users/influxdb/events{/privacy}","received_events_url":"https://api.github.com/users/influxdb/received_events","type":"Organization","site_admin":false},"repo":{"id":13124802,"name":"influxdb","full_name":"influxdb/influxdb","owner":{"login":"influxdb","id":5713248,"avatar_url":"https://avatars.githubusercontent.com/u/5713248?v=3","gravatar_id":"","url":"https://api.github.com/users/influxdb","html_url":"https://github.com/influxdb","followers_url":"https://api.github.com/users/influxdb/followers","following_url":"https://api.github.com/users/influxdb/following{/other_user}","gists_url":"https://api.github.com/users/influxdb/gists{/gist_id}","starred_url":"https://api.github.com/users/influxdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/influxdb/subscriptions","organizations_url":"https://api.github.com/users/influxdb/orgs","repos_url":"https://api.github.com/users/influxdb/repos","events_url":"https://api.github.com/users/influxdb/events{/privacy}","received_events_url":"https://api.github.com/users/influxdb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/influxdb/influxdb","description":"Scalable datastore for metrics, events, and real-time analytics","fork":false,"url":"https://api.github.com/repos/influxdb/influxdb","forks_url":"https://api.github.com/repos/influxdb/influxdb/forks","keys_url":"https://api.github.com/repos/influxdb/influxdb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/influxdb/influxdb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/influxdb/influxdb/teams","hooks_url":"https://api.github.com/repos/influxdb/influxdb/hooks","issue_events_url":"https://api.github.com/repos/influxdb/influxdb/issues/events{/number}","events_url":"https://api.github.com/repos/influxdb/influxdb/events","assignees_url":"https://api.github.com/repos/influxdb/influxdb/assignees{/user}","branches_url":"https://api.github.com/repos/influxdb/influxdb/branches{/branch}","tags_url":"https://api.github.com/repos/influxdb/influxdb/tags","blobs_url":"https://api.github.com/repos/influxdb/influxdb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/influxdb/influxdb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/influxdb/influxdb/git/refs{/sha}","trees_url":"https://api.github.com/repos/influxdb/influxdb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/influxdb/influxdb/statuses/{sha}","languages_url":"https://api.github.com/repos/influxdb/influxdb/languages","stargazers_url":"https://api.github.com/repos/influxdb/influxdb/stargazers","contributors_url":"https://api.github.com/repos/influxdb/influxdb/contributors","subscribers_url":"https://api.github.com/repos/influxdb/influxdb/subscribers","subscription_url":"https://api.github.com/repos/influxdb/influxdb/subscription","commits_url":"https://api.github.com/repos/influxdb/influxdb/commits{/sha}","git_commits_url":"https://api.github.com/repos/influxdb/influxdb/git/commits{/sha}","comments_url":"https://api.github.com/repos/influxdb/influxdb/comments{/number}","issue_comment_url":"https://api.github.com/repos/influxdb/influxdb/issues/comments{/number}","contents_url":"https://api.github.com/repos/influxdb/influxdb/contents/{+path}","compare_url":"https://api.github.com/repos/influxdb/influxdb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/influxdb/influxdb/merges","archive_url":"https://api.github.com/repos/influxdb/influxdb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/influxdb/influxdb/downloads","issues_url":"https://api.github.com/repos/influxdb/influxdb/issues{/number}","pulls_url":"https://api.github.com/repos/influxdb/influxdb/pulls{/number}","milestones_url":"https://api.github.com/repos/influxdb/influxdb/milestones{/number}","notifications_url":"https://api.github.com/repos/influxdb/influxdb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/influxdb/influxdb/labels{/name}","releases_url":"https://api.github.com/repos/influxdb/influxdb/releases{/id}","created_at":"2013-09-26T14:31:10Z","updated_at":"2015-10-19T16:21:01Z","pushed_at":"2015-10-19T18:27:52Z","git_url":"git://github.com/influxdb/influxdb.git","ssh_url":"git@github.com:influxdb/influxdb.git","clone_url":"https://github.com/influxdb/influxdb.git","svn_url":"https://github.com/influxdb/influxdb","homepage":"http://influxdb.com","size":61983,"stargazers_count":6526,"watchers_count":6526,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":734,"mirror_url":null,"open_issues_count":388,"forks":734,"open_issues":388,"watchers":6526,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/influxdb/influxdb/pulls/4491"},"html":{"href":"https://github.com/influxdb/influxdb/pull/4491"},"issue":{"href":"https://api.github.com/repos/influxdb/influxdb/issues/4491"},"comments":{"href":"https://api.github.com/repos/influxdb/influxdb/issues/4491/comments"},"review_comments":{"href":"https://api.github.com/repos/influxdb/influxdb/pulls/4491/comments"},"review_comment":{"href":"https://api.github.com/repos/influxdb/influxdb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/influxdb/influxdb/pulls/4491/commits"},"statuses":{"href":"https://api.github.com/repos/influxdb/influxdb/statuses/52d3171992a0165417832cebe8151f913159c463"}}}}