influxdata / influxdata/influxdb
createEmpty : true in aggregateWindow does not work for 'selector' functions
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 31.7k
- Forks
- 3.7k
- Avg merge
- 13h 37m
- Merged PRs (30d)
- 8
Description
Steps to reproduce:
When performing queries with missing data, for example
from(bucket: "bucket")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "measurement")
|> filter(fn: (r) => r["_field"] == "field")
|> aggregateWindow(every: v.windowPeriod, fn: max, createEmpty: true)
if fn parameter in aggregateWindow is part of aggregates things work as expected, however when using selectors, such as last, first, min, max, createEmpty: true does not have any effect
Expected behavior:
Returned datasets would include null in _value column for missing timestamps
Actual behavior:
Returned datasets do NOT include null in _value column for missing timestamps
Environment info:
- System info: Linux 4.15.0-135-generic x86_64
- InfluxDB version: 2.0.7
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the provided Flux query with aggregateWindow and compare aggregate functions with selector functions such as max, min, first, and last when createEmpty is true. Confirm the behavior for missing timestamps and inspect the aggregateWindow implementation and its tests. Done means selector functions produce rows with null in _value for empty windows.
Written by the indexing model from the issue text.
Assessment
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100