IssueRaiser

fill(previous) should find most recent value, even if outside query time range

### Feature Request **Proposal:** [Description of the feature] When executing `fill(previous)` the query should always have a value for `previous`, even if there is no point with that field in the query time range. **Current behavior:** [What currently happens] ``` > select * from fp name: fp -------- time value 2016-06-20T16:09:13Z 10 2016-06-20T16:19:13Z 100 > select max(value) from fp where time > now() - 20m group by time(5m) fill(previous) name: fp -------- time max 2016-06-20T16:05:00Z 10 2016-06-20T16:10:00Z 10 2016-06-20T16:15:00Z 100 2016-06-20T16:20:00Z 100 2016-06-20T16:25:00Z 100 > select max(value) from fp where time > now() - 18m group by time(5m) fill(previous) name: fp -------- time max 2016-06-20T16:10:00Z 2016-06-20T16:15:00Z 100 2016-06-20T16:20:00Z 100 2016-06-20T16:25:00Z 100 ``` Note the null value for the 16:10-16:15 bucket, despite there being a point at 16:09 with a value. **Desired behavior:** [What you would like to happen] ``` > select * from fp name: fp -------- time value 2016-06-20T16:09:13Z 10 2016-06-20T16:19:13Z 100 > select max(value) from fp where time > now() - 20m group by time(5m) fill(previous) name: fp -------- time max 2016-06-20T16:05:00Z 10 2016-06-20T16:10:00Z 10 2016-06-20T16:15:00Z 100 2016-06-20T16:20:00Z 100 2016-06-20T16:25:00Z 100 > select max(value) from fp where time > now() - 18m group by time(5m) fill(p

Posted by beckettsean on Jun 20, 2016, 4:33 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.5,000 issues0 comments

github (Other)

fill(previous) should find most recent value, even if outside query time range

beckettseanJun 20, 2016, 4:33 PM

### Feature Request **Proposal:** [Description of the feature] When executing `fill(previous)` the query should always have a value for `previous`, even if there is no point with that field in the query time range. **Current behavior:** [What currently happens] ``` > select * from fp name: fp -------- time value 2016-06-20T16:09:13Z 10 2016-06-20T16:19:13Z 100 > select max(value) from fp where time > now() - 20m group by time(5m) fill(previous) name: fp -------- time max 2016-06-20T16:05:00Z 10 2016-06-20T16:10:00Z 10 2016-06-20T16:15:00Z 100 2016-06-20T16:20:00Z 100 2016-06-20T16:25:00Z 100 > select max(value) from fp where time > now() - 18m group by time(5m) fill(previous) name: fp -------- time max 2016-06-20T16:10:00Z 2016-06-20T16:15:00Z 100 2016-06-20T16:20:00Z 100 2016-06-20T16:25:00Z 100 ``` Note the null value for the 16:10-16:15 bucket, despite there being a point at 16:09 with a value. **Desired behavior:** [What you would like to happen] ``` > select * from fp name: fp -------- time value 2016-06-20T16:09:13Z 10 2016-06-20T16:19:13Z 100 > select max(value) from fp where time > now() - 20m group by time(5m) fill(previous) name: fp -------- time max 2016-06-20T16:05:00Z 10 2016-06-20T16:10:00Z 10 2016-06-20T16:15:00Z 100 2016-06-20T16:20:00Z 100 2016-06-20T16:25:00Z 100 > select max(value) from fp where time > now() - 18m group by time(5m) fill(p

Comments (0)

No comments yet. Start the discussion.

Comment on this issue