{"action":"created","issue":{"url":"https://api.github.com/repos/influxdb/influxdb/issues/3383","labels_url":"https://api.github.com/repos/influxdb/influxdb/issues/3383/labels{/name}","comments_url":"https://api.github.com/repos/influxdb/influxdb/issues/3383/comments","events_url":"https://api.github.com/repos/influxdb/influxdb/issues/3383/events","html_url":"https://github.com/influxdb/influxdb/pull/3383","id":95826581,"number":3383,"title":"Fix for derivative() CQ's with empty buckets","user":{"login":"kruckenb","id":94593,"avatar_url":"https://avatars.githubusercontent.com/u/94593?v=3","gravatar_id":"","url":"https://api.github.com/users/kruckenb","html_url":"https://github.com/kruckenb","followers_url":"https://api.github.com/users/kruckenb/followers","following_url":"https://api.github.com/users/kruckenb/following{/other_user}","gists_url":"https://api.github.com/users/kruckenb/gists{/gist_id}","starred_url":"https://api.github.com/users/kruckenb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kruckenb/subscriptions","organizations_url":"https://api.github.com/users/kruckenb/orgs","repos_url":"https://api.github.com/users/kruckenb/repos","events_url":"https://api.github.com/users/kruckenb/events{/privacy}","received_events_url":"https://api.github.com/users/kruckenb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-07-18T13:46:26Z","updated_at":"2015-09-25T18:54:11Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/influxdb/influxdb/pulls/3383","html_url":"https://github.com/influxdb/influxdb/pull/3383","diff_url":"https://github.com/influxdb/influxdb/pull/3383.diff","patch_url":"https://github.com/influxdb/influxdb/pull/3383.patch"},"body":"As mentioned beginning at https://github.com/influxdb/influxdb/issues/3247#issuecomment-122469191\r\nSetting recompute intervals using `recompute-previous-n` results in empty intervals when the interval doesn't overlap every sampling rate window.\r\nThe GROUP BY time() in the CQ already buckets on the correct intervals, so `recompute-previous-n` is unnecessary.\r\nThis is a fix against 0.9.2 branch, would be awesome if this could ship as part of 0.9.2"},"comment":{"url":"https://api.github.com/repos/influxdb/influxdb/issues/comments/143320582","html_url":"https://github.com/influxdb/influxdb/pull/3383#issuecomment-143320582","issue_url":"https://api.github.com/repos/influxdb/influxdb/issues/3383","id":143320582,"user":{"login":"sebito91","id":3159454,"avatar_url":"https://avatars.githubusercontent.com/u/3159454?v=3","gravatar_id":"","url":"https://api.github.com/users/sebito91","html_url":"https://github.com/sebito91","followers_url":"https://api.github.com/users/sebito91/followers","following_url":"https://api.github.com/users/sebito91/following{/other_user}","gists_url":"https://api.github.com/users/sebito91/gists{/gist_id}","starred_url":"https://api.github.com/users/sebito91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebito91/subscriptions","organizations_url":"https://api.github.com/users/sebito91/orgs","repos_url":"https://api.github.com/users/sebito91/repos","events_url":"https://api.github.com/users/sebito91/events{/privacy}","received_events_url":"https://api.github.com/users/sebito91/received_events","type":"User","site_admin":false},"created_at":"2015-09-25T18:54:11Z","updated_at":"2015-09-25T18:54:11Z","body":"Following up yet again, found a post with a tip buried deep within...though it does present its own problems. For derivative functions (likely any other rate calcs), you should append fill(0) to your query:\r\n\r\nhttps://groups.google.com/forum/#!topic/influxdb/YbbWL2KCyVk\r\n\r\nThis does result in some wonky first-bucket calculation periodically but overall does what you need."}}